Skip to content

Commit

Permalink
CSS base style update
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Dibble <digitalskill@xtra.co.nz>
  • Loading branch information
digitalskill committed Jul 22, 2012
1 parent f3df7d0 commit 38ff1f0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 56 deletions.
27 changes: 9 additions & 18 deletions sketch-system/controller/styles.php
Expand Up @@ -43,12 +43,7 @@ function getPluginStyles( $dir, $admindir = false ) {
$themepath = $this->urlP . sketch( "themepath" );
$themepath = str_replace( "index.php/", "", $themepath );
if ( !$admindir ) {
if ( sketch( "mobile" ) ) {
$themepath .= "views/mobile/styles/images/";
} //sketch( "mobile" )
else {
$themepath .= "views/styles/images/";
}
$themepath .= "views/styles/images/";
$css .= ( str_replace( array(
"iepngfix/",
"images/",
Expand All @@ -58,7 +53,7 @@ function getPluginStyles( $dir, $admindir = false ) {
"/index.php/",
"/index.php",
"index.php/"
), "", $this->urlP ) . "index.php/iepngfix/",
), "/", $this->urlP ) . "index.php/iepngfix/",
$themepath,
""
), file_get_contents( rtrim( $dir, "/" ) . "/" . $value ) ) );
Expand All @@ -74,7 +69,7 @@ function getPluginStyles( $dir, $admindir = false ) {
}
$themepath = explode( "http://", $themepath );
$themepath = "http://" . end( $themepath );
$css .= ( str_replace( array("iepngfix/","images/","../" ), array( str_replace( array("/index.php/","/index.php","index.php/"), "", $this->urlP ) . "index.php/iepngfix/", $themepath . "/images/","" ), file_get_contents( rtrim( $dir, "/" ) . "/" . $value ) ) );
$css .= ( str_replace( array("iepngfix/","images/","../" ), array( str_replace( array("/index.php/","/index.php","index.php/"), "/", $this->urlP ) . "index.php/iepngfix/", $themepath . "/images/","" ), file_get_contents( rtrim( $dir, "/" ) . "/" . $value ) ) );
}
} //stripos( $value, ".css" ) !== false && strpos( $value, "._" ) === false && stripos( $value, "cms.css" ) === false && stripos( $value, "edits.css" ) === false && stripos( $value, "mobile.css" ) === false
} //$files as $key => $value
Expand All @@ -86,16 +81,11 @@ function loadStyles( ) {
$cache = CACHECLASS::cache( $this->filecss, $this->expiry );
if ( !$cache->start() ) {
$css = '';
if ( sketch( "mobile" ) == false ) {
$css .= $this->getPluginStyles( sketch( "sketchPath" ) . "plugins" . sketch( "slash" ) . "general" . sketch( "slash" ), true );
$css .= $this->getPluginStyles( sketch( "abspath" ) . sketch( "themepath" ) . "views" . sketch( "slash" ) . "styles" . sketch( "slash" ) );
if ( adminCheck() ) {
$css .= $this->getPluginStyles( sketch( "sketchPath" ) . "plugins" . sketch( "slash" ) . "admin" . sketch( "slash" ), true );
} //adminCheck()
} //sketch( "mobile" ) == false
else {
$css .= $this->getPluginStyles( sketch( "abspath" ) . sketch( "themepath" ) . "views" . sketch( "slash" ) . "mobile" . sketch( "slash" ) . "styles" . sketch( "slash" ) );
}
$css .= $this->getPluginStyles( sketch( "sketchPath" ) . "plugins" . sketch( "slash" ) . "general" . sketch( "slash" ), true );
$css .= $this->getPluginStyles( sketch( "abspath" ) . sketch( "themepath" ) . "views" . sketch( "slash" ) . "styles" . sketch( "slash" ) );
if ( adminCheck() ) {
$css .= $this->getPluginStyles( sketch( "sketchPath" ) . "plugins" . sketch( "slash" ) . "admin" . sketch( "slash" ), true );
} //adminCheck()
if ( getSettings( "version" ) > 2 ) {
$r = getData( "template", "*", "template_type='css'" );
//die(urlPath(sketch( "themepath" ) . "views" . sketch( "slash" ) . "styles" . sketch( "slash" )));
Expand All @@ -109,6 +99,7 @@ function loadStyles( ) {
,$r->template_content);
} //$r->advance()
} //getSettings( "version" ) > 2
$css = str_replace("//","/",$css);
echo getSettings( 'cache' ) ? CssMin::compress( $css ) : $css;
$cache->end();
} //!$cache->start()
Expand Down
46 changes: 12 additions & 34 deletions theme/views/styles/grid.css
Expand Up @@ -140,7 +140,7 @@ img, object, embed, video {
float: left;
margin-left: 0;
width: 17.8571%;
display: block;
display: none;
}

#center {
Expand All @@ -152,10 +152,10 @@ img, object, embed, video {
}

#rightcontent {
clear: none;
clear: both;
float: left;
margin-left: 2.6785%;
width: 79.4642%;
margin-left: 0;
width: 100%;
display: block;
}

Expand Down Expand Up @@ -253,14 +253,6 @@ ul.grid li {
display: block;
}

#admin_panel {
clear: both;
float: left;
margin-left: 0;
width: 100%;
display: block;
}

/* Tablet Layout: 481px to 768px. Inherits styles from: Mobile Layout. */

@media only screen and (min-width: 481px) {
Expand Down Expand Up @@ -330,23 +322,23 @@ ul.grid li {
#logo {
clear: both;
float: left;
margin-left: 12.7071%;
margin-left: 0;
width: 23.7569%;
display: none;
display:block;
}
#menu {
clear: both;
clear: none;
float: left;
margin-left: 2%;
width: 98%;
width: 73%;
display: block;
}

#menu ul {
margin: auto;
padding: 0;
list-style-type: none;
float:none;
float:right;
}

#banner-container {
Expand Down Expand Up @@ -381,7 +373,7 @@ ul.grid li {
#sidenav {
clear: both;
float: left;
margin-left: 12.7071%;
margin-left: 0;
width: 23.7569%;
display: block;
}
Expand All @@ -396,7 +388,7 @@ ul.grid li {
clear: none;
float: left;
margin-left: 1.6574%;
width: 49.1712%;
width: 74.5856%;
display: block;
}
#landing {
Expand Down Expand Up @@ -469,13 +461,6 @@ ul.grid li {
width: 31.464%;
display: block;
}
#admin_panel{
clear: both;
float: left;
margin-left: 0;
width: 100%;
display: block;
}

}

Expand Down Expand Up @@ -686,11 +671,4 @@ ul.grid li {
width: 35.207%;
display: block;
}
#admin_panel{
clear: both;
float: left;
margin-left: 0;
width: 100%;
display: block;
}
}
}
5 changes: 1 addition & 4 deletions theme/views/styles/main.css
Expand Up @@ -2,7 +2,6 @@ ul, ol{
margin:0;
padding:0;
}

h1, h2, h3, h4, h5, h6, p{
margin:0;
padding:0;
Expand All @@ -13,8 +12,6 @@ body {
background-color: #f0f0f0;
color: #565656;
font-size: 13px;
overflow-y: scroll;
overflow-x: hidden;
}

p {
Expand Down Expand Up @@ -1260,7 +1257,7 @@ ul.ads li {

#newslist p {
margin: 0;
width: 73%;
width: 75%;
float:left;
}

Expand Down

0 comments on commit 38ff1f0

Please sign in to comment.