From 4c1398c6b152b6ca8ee16d90f622dd11273e58a9 Mon Sep 17 00:00:00 2001 From: Christian Vogeley Date: Wed, 25 Apr 2012 19:09:46 +0200 Subject: add cleanzero theme --- view/theme/cleanzero/cleanzero-green/style.css | 127 +++++++++++++++++++++ view/theme/cleanzero/cleanzero-purple/style.css | 127 +++++++++++++++++++++ view/theme/cleanzero/cleanzero/style.css | 127 +++++++++++++++++++++ view/theme/cleanzero/config.php | 79 +++++++++++++ view/theme/cleanzero/js/jquery.ae.image.resize.js | 69 +++++++++++ .../cleanzero/js/jquery.ae.image.resize.min.js | 1 + view/theme/cleanzero/nav.tpl | 71 ++++++++++++ view/theme/cleanzero/screenshot.png | Bin 0 -> 125858 bytes view/theme/cleanzero/style.css | 127 +++++++++++++++++++++ view/theme/cleanzero/style.php | 71 ++++++++++++ view/theme/cleanzero/theme.php | 76 ++++++++++++ view/theme/cleanzero/theme_settings.tpl | 10 ++ 12 files changed, 885 insertions(+) create mode 100644 view/theme/cleanzero/cleanzero-green/style.css create mode 100644 view/theme/cleanzero/cleanzero-purple/style.css create mode 100644 view/theme/cleanzero/cleanzero/style.css create mode 100644 view/theme/cleanzero/config.php create mode 100644 view/theme/cleanzero/js/jquery.ae.image.resize.js create mode 100644 view/theme/cleanzero/js/jquery.ae.image.resize.min.js create mode 100644 view/theme/cleanzero/nav.tpl create mode 100644 view/theme/cleanzero/screenshot.png create mode 100644 view/theme/cleanzero/style.css create mode 100644 view/theme/cleanzero/style.php create mode 100644 view/theme/cleanzero/theme.php create mode 100644 view/theme/cleanzero/theme_settings.tpl diff --git a/view/theme/cleanzero/cleanzero-green/style.css b/view/theme/cleanzero/cleanzero-green/style.css new file mode 100644 index 000000000..73feb5e60 --- /dev/null +++ b/view/theme/cleanzero/cleanzero-green/style.css @@ -0,0 +1,127 @@ +@import url('../greenzero/style.css'); +body {background-image:none; + +} + +.wall-item-content-wrapper { + border-top: 1px solid #ccc; +//border-top:none; +border-left:none; +border-right:none; +border-radius:0px; +//border:none; + //background: #f8f8f8 !important; +} + +.wall-item-content-wrapper.comment { + // background: #f8f8f8 !important; + // border-left: 1px solid #ccc; + border-top: 1px solid #ccc; +border-left:none; +border-right:none; +border-radius:0px; + } + + .wall-item-tools { +// border-top: 1px solid #ccc; +// background: #f8f8f8 !important; +background: #ffffff !important; + } + +.comment-edit-text-empty, .comment-edit-text-full { + border: 1px solid #ccc; + border-left: 1px solid #EEE; + background: #ffffff; +} + +.comment-edit-wrapper, .comment-wwedit-wrapper { + // background: #ffffff; !important; +//background: #f8f8f8 !important; +} + + + + + +section { + margin: 0px 10%; +margin-right:12%; + background-image:none; +} + +aside { + margin-left: 10%; + background-image:none; +} +nav { + margin-left: 32px; + margin-right: 5%; + +} + +nav #site-location { + top: 80px; + right: 5%; + +} + +.wall-item-photo, .photo, .contact-block-img, .my-comment-photo { + border-radius: 3px; + -moz-border-radius: 3px; +} + +.tabs { background-image:none; + +} +.tab.active { + padding: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border: 1px solid #CCCCCC; + //background: #F8F8F8; + font-weight: bold; +} +.tab { margin-right: 1px ; + +} + +#group-sidebar { + margin-bottom: 10px; + border:none; +} + +#nets-sidebar { + margin-bottom: 10px; + border:none; +} + +#saved-search-list { + border:none; +} +blockquote { + //background-color: #f8f8f8; + border: 1px solid #ccc; + -moz-border-radius: 3px; + + border-radius: 3px; +} +.widget { +border: none; +} + + +.wall-item-content { +max-height: 20000px; +overflow: none; +} + +.nav-commlink, .nav-login-link { +margin-top: 67px; +height: 15px; +float:left; +padding: 6px 3px; +} + +nav .nav-link { + //float: left; +} \ No newline at end of file diff --git a/view/theme/cleanzero/cleanzero-purple/style.css b/view/theme/cleanzero/cleanzero-purple/style.css new file mode 100644 index 000000000..1de6e076e --- /dev/null +++ b/view/theme/cleanzero/cleanzero-purple/style.css @@ -0,0 +1,127 @@ +@import url('../purplezero/style.css'); +body {background-image:none; + +} + +.wall-item-content-wrapper { + border-top: 1px solid #ccc; +//border-top:none; +border-left:none; +border-right:none; +border-radius:0px; +//border:none; + //background: #f8f8f8 !important; +} + +.wall-item-content-wrapper.comment { + // background: #f8f8f8 !important; + // border-left: 1px solid #ccc; + border-top: 1px solid #ccc; +border-left:none; +border-right:none; +border-radius:0px; + } + + .wall-item-tools { +// border-top: 1px solid #ccc; +// background: #f8f8f8 !important; +background: #ffffff !important; + } + +.comment-edit-text-empty, .comment-edit-text-full { + border: 1px solid #ccc; + border-left: 1px solid #EEE; + background: #ffffff; +} + +.comment-edit-wrapper, .comment-wwedit-wrapper { + // background: #ffffff; !important; +// background: #f8f8f8 !important; +} + + + + + +section { + margin: 0px 10%; +margin-right:12%; + background-image:none; +} + +aside { + margin-left: 10%; + background-image:none; +} +nav { + margin-left: 32px; + margin-right: 5%; + +} + +nav #site-location { + top: 80px; + right: 5%; + +} + +.wall-item-photo, .photo, .contact-block-img, .my-comment-photo { + border-radius: 3px; + -moz-border-radius: 3px; +} + +.tabs { background-image:none; + +} +.tab.active { + padding: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border: 1px solid #CCCCCC; + // background: #F8F8F8; + font-weight: bold; +} +.tab { margin-right: 1px ; + +} + +#group-sidebar { + margin-bottom: 10px; + border:none; +} + +#nets-sidebar { + margin-bottom: 10px; + border:none; +} + +#saved-search-list { + border:none; +} +blockquote { + background-color: #f8f8f8; + border: 1px solid #ccc; + -moz-border-radius: 3px; + + border-radius: 3px; +} +.widget { +border: none; +} + + +.wall-item-content { +max-height: 20000px; +overflow: none; +} + +.nav-commlink, .nav-login-link { +margin-top: 67px; +height: 15px; +float:left; +padding: 6px 3px; +} + +nav .nav-link { + //float: left; +} \ No newline at end of file diff --git a/view/theme/cleanzero/cleanzero/style.css b/view/theme/cleanzero/cleanzero/style.css new file mode 100644 index 000000000..3efb8a25c --- /dev/null +++ b/view/theme/cleanzero/cleanzero/style.css @@ -0,0 +1,127 @@ +@import url('../duepuntozero/style.css'); +body {background-image:none; + +} + +.wall-item-content-wrapper { + border-top: 1px solid #ccc; +//border-top:none; +border-left:none; +border-right:none; +border-radius:0px; +//border:none; + //background: #f8f8f8 !important; +} + +.wall-item-content-wrapper.comment { + background: #f8f8f8 !important; + // border-left: 1px solid #ccc; + border-top: 1px solid #ccc; +border-left:none; +border-right:none; +border-radius:0px; + } + + .wall-item-tools { +// border-top: 1px solid #ccc; +// background: #f8f8f8 !important; +background: #ffffff !important; + } + +.comment-edit-text-empty, .comment-edit-text-full { + border: 1px solid #ccc; + border-left: 1px solid #EEE; + background: #ffffff; +} + +.comment-edit-wrapper, .comment-wwedit-wrapper { + // background: #ffffff; !important; +background: #f8f8f8 !important; +} + + + + + +section { + margin: 0px 10%; +margin-right:12%; + background-image:none; +} + +aside { + margin-left: 10%; + background-image:none; +} +nav { + margin-left: 32px; + margin-right: 5%; + +} + +nav #site-location { + top: 80px; + right: 5%; + +} + +.wall-item-photo, .photo, .contact-block-img, .my-comment-photo { + border-radius: 3px; + -moz-border-radius: 3px; +} + +.tabs { background-image:none; + +} +.tab.active { + padding: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border: 1px solid #CCCCCC; + background: #F8F8F8; + font-weight: bold; +} +.tab { margin-right: 1px ; + +} + +#group-sidebar { + margin-bottom: 10px; + border:none; +} + +#nets-sidebar { + margin-bottom: 10px; + border:none; +} + +#saved-search-list { + border:none; +} +blockquote { + background-color: #f8f8f8; + border: 1px solid #ccc; + -moz-border-radius: 3px; + + border-radius: 3px; +} +.widget { +border: none; +} + + +.wall-item-content { +max-height: 20000px; +overflow: none; +} + +.nav-commlink, .nav-login-link { +margin-top: 67px; +height: 15px; +float:left; +padding: 6px 3px; +} + +nav .nav-link { + //float: left; +} \ No newline at end of file diff --git a/view/theme/cleanzero/config.php b/view/theme/cleanzero/config.php new file mode 100644 index 000000000..7982a75c5 --- /dev/null +++ b/view/theme/cleanzero/config.php @@ -0,0 +1,79 @@ +"cleanzero", + "cleanzero-green"=>"green", + "cleanzero-purple"=>"purple" + ); + $font_sizes = array( + '12'=>'12', + "---"=>"---", + "16"=>"16", + "14"=>"14", + '10'=>'10', + ); + $resizes = array( + "0"=>"0 (no resizing)", + "600"=>"1 (600px)", + "300"=>"2 (300px)", + "250"=>"3 (250px)", + "150"=>"4 (150px)", + ); + + $t = file_get_contents( dirname(__file__). "/theme_settings.tpl" ); + $o .= replace_macros($t, array( + '$submit' => t('Submit'), + '$baseurl' => $a->get_baseurl(), + '$title' => t("Theme settings"), + '$resize' => array('cleanzero_resize',t ('Set resize level for images in posts and comments (width and height)'),$resize,'',$resizes), + '$font_size' => array('cleanzero_font_size', t('Set font-size for posts and comments'), $font_size, '', $font_sizes), + '$color' => array('cleanzero_color', t('Color scheme'), $color, '', $colors), + )); + return $o; +} diff --git a/view/theme/cleanzero/js/jquery.ae.image.resize.js b/view/theme/cleanzero/js/jquery.ae.image.resize.js new file mode 100644 index 000000000..bac09cd45 --- /dev/null +++ b/view/theme/cleanzero/js/jquery.ae.image.resize.js @@ -0,0 +1,69 @@ +(function( $ ) { + + $.fn.aeImageResize = function( params ) { + + var aspectRatio = 0 + // Nasty I know but it's done only once, so not too bad I guess + // Alternate suggestions welcome :) + , isIE6 = $.browser.msie && (6 == ~~ $.browser.version) + ; + + // We cannot do much unless we have one of these + if ( !params.height && !params.width ) { + return this; + } + + // Calculate aspect ratio now, if possible + if ( params.height && params.width ) { + aspectRatio = params.width / params.height; + } + + // Attach handler to load + // Handler is executed just once per element + // Load event required for Webkit browsers + return this.one( "load", function() { + + // Remove all attributes and CSS rules + this.removeAttribute( "height" ); + this.removeAttribute( "width" ); + this.style.height = this.style.width = ""; + + var imgHeight = this.height + , imgWidth = this.width + , imgAspectRatio = imgWidth / imgHeight + , bxHeight = params.height + , bxWidth = params.width + , bxAspectRatio = aspectRatio; + + // Work the magic! + // If one parameter is missing, we just force calculate it + if ( !bxAspectRatio ) { + if ( bxHeight ) { + bxAspectRatio = imgAspectRatio + 1; + } else { + bxAspectRatio = imgAspectRatio - 1; + } + } + + // Only resize the images that need resizing + if ( (bxHeight && imgHeight > bxHeight) || (bxWidth && imgWidth > bxWidth) ) { + + if ( imgAspectRatio > bxAspectRatio ) { + bxHeight = ~~ ( imgHeight / imgWidth * bxWidth ); + } else { + bxWidth = ~~ ( imgWidth / imgHeight * bxHeight ); + } + + this.height = bxHeight; + this.width = bxWidth; + } + }) + .each(function() { + + // Trigger load event (for Gecko and MSIE) + if ( this.complete || isIE6 ) { + $( this ).trigger( "load" ); + } + }); + }; +})( jQuery ); \ No newline at end of file diff --git a/view/theme/cleanzero/js/jquery.ae.image.resize.min.js b/view/theme/cleanzero/js/jquery.ae.image.resize.min.js new file mode 100644 index 000000000..16c30b123 --- /dev/null +++ b/view/theme/cleanzero/js/jquery.ae.image.resize.min.js @@ -0,0 +1 @@ +(function(d){d.fn.aeImageResize=function(a){var i=0,j=d.browser.msie&&6==~~d.browser.version;if(!a.height&&!a.width)return this;if(a.height&&a.width)i=a.width/a.height;return this.one("load",function(){this.removeAttribute("height");this.removeAttribute("width");this.style.height=this.style.width="";var e=this.height,f=this.width,g=f/e,b=a.height,c=a.width,h=i;h||(h=b?g+1:g-1);if(b&&e>b||c&&f>c){if(g>h)b=~~(e/f*c);else c=~~(f/e*b);this.height=b;this.width=c}}).each(function(){if(this.complete||j)d(this).trigger("load")})}})(jQuery); \ No newline at end of file diff --git a/view/theme/cleanzero/nav.tpl b/view/theme/cleanzero/nav.tpl new file mode 100644 index 000000000..4dacf3858 --- /dev/null +++ b/view/theme/cleanzero/nav.tpl @@ -0,0 +1,71 @@ + + + diff --git a/view/theme/cleanzero/screenshot.png b/view/theme/cleanzero/screenshot.png new file mode 100644 index 000000000..d259e2e4d Binary files /dev/null and b/view/theme/cleanzero/screenshot.png differ diff --git a/view/theme/cleanzero/style.css b/view/theme/cleanzero/style.css new file mode 100644 index 000000000..3efb8a25c --- /dev/null +++ b/view/theme/cleanzero/style.css @@ -0,0 +1,127 @@ +@import url('../duepuntozero/style.css'); +body {background-image:none; + +} + +.wall-item-content-wrapper { + border-top: 1px solid #ccc; +//border-top:none; +border-left:none; +border-right:none; +border-radius:0px; +//border:none; + //background: #f8f8f8 !important; +} + +.wall-item-content-wrapper.comment { + background: #f8f8f8 !important; + // border-left: 1px solid #ccc; + border-top: 1px solid #ccc; +border-left:none; +border-right:none; +border-radius:0px; + } + + .wall-item-tools { +// border-top: 1px solid #ccc; +// background: #f8f8f8 !important; +background: #ffffff !important; + } + +.comment-edit-text-empty, .comment-edit-text-full { + border: 1px solid #ccc; + border-left: 1px solid #EEE; + background: #ffffff; +} + +.comment-edit-wrapper, .comment-wwedit-wrapper { + // background: #ffffff; !important; +background: #f8f8f8 !important; +} + + + + + +section { + margin: 0px 10%; +margin-right:12%; + background-image:none; +} + +aside { + margin-left: 10%; + background-image:none; +} +nav { + margin-left: 32px; + margin-right: 5%; + +} + +nav #site-location { + top: 80px; + right: 5%; + +} + +.wall-item-photo, .photo, .contact-block-img, .my-comment-photo { + border-radius: 3px; + -moz-border-radius: 3px; +} + +.tabs { background-image:none; + +} +.tab.active { + padding: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border: 1px solid #CCCCCC; + background: #F8F8F8; + font-weight: bold; +} +.tab { margin-right: 1px ; + +} + +#group-sidebar { + margin-bottom: 10px; + border:none; +} + +#nets-sidebar { + margin-bottom: 10px; + border:none; +} + +#saved-search-list { + border:none; +} +blockquote { + background-color: #f8f8f8; + border: 1px solid #ccc; + -moz-border-radius: 3px; + + border-radius: 3px; +} +.widget { +border: none; +} + + +.wall-item-content { +max-height: 20000px; +overflow: none; +} + +.nav-commlink, .nav-login-link { +margin-top: 67px; +height: 15px; +float:left; +padding: 6px 3px; +} + +nav .nav-link { + //float: left; +} \ No newline at end of file diff --git a/view/theme/cleanzero/style.php b/view/theme/cleanzero/style.php new file mode 100644 index 000000000..b820d3b7a --- /dev/null +++ b/view/theme/cleanzero/style.php @@ -0,0 +1,71 @@ +theme_info = array( + 'extends' => 'duepuntozero', +); +function cleanzero_init(&$a) { +$a->page['htmlhead'] .= <<< EOT + +EOT; +// get resize configuration + +$resize=false; +$site_resize = get_config('cleanzero', 'resize' ); +if(local_user()) $resize = get_pconfig(local_user(), 'cleanzero', 'resize' ); + +if ($resize===false) $resize=$site_resize; +if ($resize===false) $resize=0; + +if (intval($resize) > 0) { +//load jquery.ae.image.resize.js +$imageresizeJS = $a->get_baseurl($ssl_state)."/view/theme/cleanzero/js/jquery.ae.image.resize.js"; +$a->page['htmlhead'] .= sprintf('', $imageresizeJS); +$a->page['htmlhead'] .= ' +';} +} diff --git a/view/theme/cleanzero/theme_settings.tpl b/view/theme/cleanzero/theme_settings.tpl new file mode 100644 index 000000000..07e7cba05 --- /dev/null +++ b/view/theme/cleanzero/theme_settings.tpl @@ -0,0 +1,10 @@ +{{inc field_select.tpl with $field=$color}}{{endinc}} +{{inc field_select.tpl with $field=$font_size}}{{endinc}} +{{inc field_select.tpl with $field=$resize}}{{endinc}} + + + +
+ +
+ -- cgit v1.2.3