From: slothman Date: Thu, 28 Feb 2008 03:26:03 +0000 (+0000) Subject: Allow attribution for colorsets X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=cd1eebb66c2c57dd5a64c2a79d7439583a8d6028;p=s9y.git Allow attribution for colorsets Added criterion colorsets, in fixed and fluid variations --- diff --git a/templates/bulletproof/config.inc.php b/templates/bulletproof/config.inc.php index 07a9732..6eaa47d 100644 --- a/templates/bulletproof/config.inc.php +++ b/templates/bulletproof/config.inc.php @@ -306,7 +306,7 @@ $template_config = array( ) ); -$template_loaded_config = serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option']); +$template_loaded_config = &serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option']); $navlinks = array(); @@ -330,3 +330,15 @@ for ($i = 0; $i < $template_loaded_config['amount']; $i++) { } $serendipity['smarty']->assign_by_ref('navlinks', $navlinks); + +// Allow colorset authors to include license and attribution data +$colorset_data = array(); // Maybe we'll want more data later... +$colorset_data['attribution'] = $template_loaded_config['colorset'] . ' colorset provided under BSD license.'; +$attribution_file = dirname(__FILE__) . '/' . $template_loaded_config['colorset'] . '_license.txt'; +if (is_readable($attribution_file)) { + $attribution = file_get_contents($attribution_file); + if (!empty($attribution)) { + $colorset_data['attribution'] = $attribution; + } +} +$template_loaded_config['colorset_data'] = $colorset_data; diff --git a/templates/bulletproof/criterion_fluid_license.txt b/templates/bulletproof/criterion_fluid_license.txt new file mode 100644 index 0000000..0048dbe --- /dev/null +++ b/templates/bulletproof/criterion_fluid_license.txt @@ -0,0 +1 @@ +criterion CC BY Free CSS Templates diff --git a/templates/bulletproof/criterion_fluid_style.css b/templates/bulletproof/criterion_fluid_style.css new file mode 100644 index 0000000..08763f8 --- /dev/null +++ b/templates/bulletproof/criterion_fluid_style.css @@ -0,0 +1,211 @@ +/* +Design by Free CSS Templates +http://www.freecsstemplates.org +Released for free under a Creative Commons Attribution 2.5 License + +Adapted for Serendipity BulletProof Template as a colorset by Judebert +http://judebert.com/ +*/ + +* { +margin: 0pt; +padding: 0pt; +} + +#wrapper { + font-size: 100%; +} + +body { + background: #FFFFFF url(img/criterion_body.png) repeat-x; + /*--JAM: (I don't like this) font: normal small "Trebuchet MS", Arial, Helvetica, sans-serif; */ + font: normal small "Trebuchet MS", Arial, Helvetica, sans-serif; + color: #666666; +} + +h1, h2, h3 { + color: #586BAA; +} + +blockquote { + margin-left: 3em; +} + +/* This is not really needed; if used, fix {#sitenav ul}, {#sbsitenav ul}, {#skiplinks ul}, {ul.archivesrow}, and {ul.staticpage_navigation}, along with their
  • s +ul { + margin-left: 3em; +} + +ul li { +} + +ol { + margin-left: 3em; +} + +ol li { +} +*/ + +.serendipity_entry_body ul, +.serendipity_entry_body ol { + margin-left: 3em; +} + + +a { + color: #586BAA; +} + +a:hover { + text-decoration: none; +} + +/* Sidebar items (criterion Boxed Style) */ +.serendipitySideBarItem { + margin-bottom: 20px; +} + +.serendipitySideBarItem .serendipitySideBarTitle { + height: 31px; + padding: 9px 0 0 20px; + background: #6FBE6E url(img/criterion_sbtitle.png) repeat-x; + font-size: 1.2em; + color: #CC0000; +} + +.serendipitySideBarItem .serendipitySideBarContent { + padding: 20px 20px 40px 20px; + background: url(img/criterion_sbcontent.png) repeat-x; +} + +/* entries (criterion Post) */ +.serendipity_title { + padding: 5px 0 0 20px; + font-size: 2em; + font-weight: normal; +} + +.serendipity_title a { + text-decoration: none; +} + +.serendipity_entry { + padding: 20px 20px 10px 20px; + background: url(img/criterion_entry.png) repeat-x; +} + +.serendipity_entry_body p, +.serendipity_entry_body blockquote, +.serendipity_entry_body ul, +.serendipity_entry_body ol { + margin-bottom: 1.5em; + line-height: 180%; +} + +/* Sitenav tabs (criterion Menu) */ +#sitenav { + width: auto; + height: 90px; + margin: 0 auto; + padding: 0; + float: none; +} + +#sitenav ul { + display: block; + margin: 0; + padding-top: 25px; +} + +/* Already handled by BP +#sitenav li { + display: inline; +} +*/ + +#sitenav ul li { + /* Override index.php */ + padding: 0; +} + +#sitenav a { + display: block; + float: left; + height: 32px; + margin-left: 1px; + padding: 13px 25px 0 25px; + background: #FFFFFF url(img/criterion_tab.png) repeat-x; + text-align: center; + text-decoration: none; + font-weight: bold; + color: #586BAA; +} + +#sitenav a:hover { + background-image: url(img/criterion_tabhover.png); + border-color: #FEDA8D; + color: #CC0000; +} + +#sitenav .currentpage a { + height: 36px; + margin-top: -4px; + background-image: url(img/criterion_tabactive.png); + border: 1px solid #479AC6; + border-bottom: none; + font-weight: bold; + color: #479AC6; +} + +/* Banner (criterion Logo */ +#serendipity_banner { + height: 60px; + margin: 0 auto; +} + +#serendipity_banner h1 { + float: left; + letter-spacing: -2px; + font-size: 36px; + font-weight: normal; +} + +#serendipity_banner h2 { + float: left; + font-size: 14px; + font-weight: normal; +} + +#serendipity_banner a { + text-decoration: none; + text-transform: lowercase; + font-style: italic; + color: #479AC6; +} + +/* criterion Content */ +/* Nothing in BP exactly matches this. As it sets the width of the page, + * it's closest to #wrapper; however, criterion uses #content to wrap the + * entries and sidebar, leaving #logo and #menu outside. BP puts everything + * in #wrapper, and only the entries in #content. + */ +#wrapper { + width: 95%; + margin: 0 auto; +} + +/* Footer (criterion Footer) (Imagine that!) */ +#footer { + clear: both; + width: 740px; + margin: 0 auto; + padding: 30px 0; + background: url(img/criterion_pagefooter.png) repeat-x; +} + +#footer p { + margin: 0; + text-align: center; + font-size: x-small; +} diff --git a/templates/bulletproof/criterion_license.txt b/templates/bulletproof/criterion_license.txt new file mode 100644 index 0000000..0048dbe --- /dev/null +++ b/templates/bulletproof/criterion_license.txt @@ -0,0 +1 @@ +criterion CC BY Free CSS Templates diff --git a/templates/bulletproof/criterion_style.css b/templates/bulletproof/criterion_style.css new file mode 100644 index 0000000..bfe46f2 --- /dev/null +++ b/templates/bulletproof/criterion_style.css @@ -0,0 +1,309 @@ +/* +Design by Free CSS Templates +http://www.freecsstemplates.org +Released for free under a Creative Commons Attribution 2.5 License + +Adapted for Serendipity BulletProof Template as a colorset by Judebert +http://judebert.com/ +*/ + +* { +margin: 0pt; +padding: 0pt; +} + +#wrapper { + font-size: 100%; + /* + width: 100%; + */ +} + +body { + background: #FFFFFF url(img/criterion_body.png) repeat-x; + /*--JAM: (I don't like this) font: normal small "Trebuchet MS", Arial, Helvetica, sans-serif; */ + font: normal small "Trebuchet MS", Arial, Helvetica, sans-serif; + color: #666666; +} + +h1, h2, h3 { + color: #586BAA; +} + +blockquote { + margin-left: 3em; +} + +/* This is not really needed; if used, fix {#sitenav ul}, {#sbsitenav ul}, {#skiplinks ul}, {ul.archivesrow}, and {ul.staticpage_navigation}, along with their
  • s +ul { + margin-left: 3em; +} + +ul li { +} + +ol { + margin-left: 3em; +} + +ol li { +} +*/ + +.serendipity_entry_body ul, +.serendipity_entry_body ol { + margin-left: 3em; +} + +a { + color: #586BAA; +} + +a:hover { + text-decoration: none; +} + +/* Sidebar items (criterion Boxed Style) */ +.serendipitySideBarItem { + margin-bottom: 20px; +} + +.serendipitySideBarItem .serendipitySideBarTitle { + height: 31px; + padding: 9px 0 0 20px; + background: #6FBE6E url(img/criterion_sbtitle.png) repeat-x; + font-size: 1.2em; + color: #CC0000; +} + +.serendipitySideBarItem .serendipitySideBarContent { + padding: 20px 20px 40px 20px; + background: url(img/criterion_sbcontent.png) repeat-x; +} + +/* entries (criterion Post) */ +.serendipity_title { + padding: 5px 0 0 20px; + font-size: 2em; + font-weight: normal; +} + +.serendipity_title a { + text-decoration: none; +} + +.serendipity_entry { + padding: 20px 20px 10px 20px; + background: url(img/criterion_entry.png) repeat-x; +} + +.serendipity_entry_body p, +.serendipity_entry_body blockquote, +.serendipity_entry_body ul, +.serendipity_entry_body ol { + margin-bottom: 1.5em; + line-height: 180%; +} + +/* Oddly, criterion doesn't have any Header + * The closest thing is div#logo, which contains an h1 and h2. +#header { + width: 740px; + height: 150px; + margin: 0 auto; +} +*/ + +/* Sitenav tabs (criterion Menu) */ +#sitenav { + width: 740px; + height: 90px; + margin: 0 auto; + padding: 0; + float: none; +} + +#sitenav ul { + display: block; + margin: 0; + padding-top: 25px; +} + +/* Already handled by BP +#sitenav li { + display: inline; +} +*/ + +#sitenav ul li { + /* Override index.php */ + padding: 0; +} + +#sitenav a { + display: block; + float: left; + height: 32px; + margin-left: 1px; + padding: 13px 25px 0 25px; + background: #FFFFFF url(img/criterion_tab.png) repeat-x; + text-align: center; + text-decoration: none; + font-weight: bold; + color: #586BAA; +} + +#sitenav a:hover { + background-image: url(img/criterion_tabhover.png); + border-color: #FEDA8D; + color: #CC0000; +} + +#sitenav .currentpage a { + height: 36px; + margin-top: -4px; + background-image: url(img/criterion_tabactive.png); + border: 1px solid #479AC6; + border-bottom: none; + font-weight: bold; + color: #479AC6; +} + +/* Banner (criterion Logo */ +#serendipity_banner { + width: 740px; + height: 60px; + margin: 0 auto; +} + +#serendipity_banner h1 { + float: left; + letter-spacing: -2px; + font-size: 36px; + font-weight: normal; +} + +#serendipity_banner h2 { + float: left; + font-size: 14px; + font-weight: normal; +} + +#serendipity_banner a { + text-decoration: none; + text-transform: lowercase; + font-style: italic; + color: #479AC6; +} + +/* criterion Content */ +/* Nothing in BP exactly matches this. As it sets the width of the page, + * it's closest to #wrapper; however, criterion uses #content to wrap the + * entries and sidebar, leaving #logo and #menu outside. BP puts everything + * in #wrapper, and only the entries in #content. + */ +#wrapper { + width: 740px; + margin: 0 auto; +} + +/* criterion Content > Main */ +/* This doesn't fit well in BP. As #main contains only entries, the idea + * appears to be to float the entries in a right "column". BP takes care + * of column placement on its own. But we can still take care of the width. + */ +/* Two columns, main and sidebar, just like criterion */ +.twomain { + width: 505px; +} +/* Three columns, main and two equal sidebars */ +.threemain { + width: 400px; +} + +/* criterion Content > Sidebar */ +/* Again, this doesn't fit well in BP. #sidebar contains, predictably; the + * sidebar, which criterion floats left. BP still handles column placement + * with no intervention from me (which allows multiple layouts). Note that + * #login is a sidebar box, which doesn't apply to s9y. + * + * However, Serendipity does have sidebars, and in a fixed-width template, + * it's important to get the size right. + */ +/* Two columns, main and sidebar, just like criterion */ +.twoside { + width: 220px; +} +/* Three columns, main and two equal sidebars */ +.threeside { + width: 160px; +} +/* Bottom sidebars, 5 items at a time */ +.onefull .serendipitySideBarItem { + width: 18% +} + +/* These are the specific sidebar items in the original criterion +#login fieldset { + border: none; +} + +#login legend { + display: none; +} + +#login label { + font-size: x-small; + font-weight: bold; +} + +#login input { + margin-bottom: 5px; +} + +#inputtext1, #inputtext2 { + width: 170px; + padding: 2px; + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + color: #666666; +} + +#inputsubmit1 { +} + +/* criterion Content > Sidebar > Updates*/ +/* This might be useful in the s9y recent plugin. +#updates { +} + +#updates ul { + margin: 0; + list-style: none; +} + +#updates h3 { + margin: 0; + font: bold x-small Verdana, Arial, Helvetica, sans-serif; +} + +#updates p { + margin-bottom: 1.4em; + font-size: smaller; + line-height: normal; +} +*/ + +/* Footer (criterion Footer) (Imagine that!) */ +#footer { + clear: both; + width: 740px; + margin: 0 auto; + padding: 30px 0; + background: url(img/criterion_pagefooter.png) repeat-x; +} + +#footer p { + margin: 0; + text-align: center; + font-size: x-small; +} diff --git a/templates/bulletproof/img/criterion_back.png b/templates/bulletproof/img/criterion_back.png new file mode 100644 index 0000000..b6ca30c Binary files /dev/null and b/templates/bulletproof/img/criterion_back.png differ diff --git a/templates/bulletproof/img/criterion_body.png b/templates/bulletproof/img/criterion_body.png new file mode 100644 index 0000000..4e2cb35 Binary files /dev/null and b/templates/bulletproof/img/criterion_body.png differ diff --git a/templates/bulletproof/img/criterion_entry.png b/templates/bulletproof/img/criterion_entry.png new file mode 100644 index 0000000..2101de3 Binary files /dev/null and b/templates/bulletproof/img/criterion_entry.png differ diff --git a/templates/bulletproof/img/criterion_fluid_back.png b/templates/bulletproof/img/criterion_fluid_back.png new file mode 100644 index 0000000..b6ca30c Binary files /dev/null and b/templates/bulletproof/img/criterion_fluid_back.png differ diff --git a/templates/bulletproof/img/criterion_fluid_forward.png b/templates/bulletproof/img/criterion_fluid_forward.png new file mode 100644 index 0000000..60804ee Binary files /dev/null and b/templates/bulletproof/img/criterion_fluid_forward.png differ diff --git a/templates/bulletproof/img/criterion_fluid_graph_bar.png b/templates/bulletproof/img/criterion_fluid_graph_bar.png new file mode 100644 index 0000000..9c48022 Binary files /dev/null and b/templates/bulletproof/img/criterion_fluid_graph_bar.png differ diff --git a/templates/bulletproof/img/criterion_forward.png b/templates/bulletproof/img/criterion_forward.png new file mode 100644 index 0000000..60804ee Binary files /dev/null and b/templates/bulletproof/img/criterion_forward.png differ diff --git a/templates/bulletproof/img/criterion_graph_bar.png b/templates/bulletproof/img/criterion_graph_bar.png new file mode 100644 index 0000000..9c48022 Binary files /dev/null and b/templates/bulletproof/img/criterion_graph_bar.png differ diff --git a/templates/bulletproof/img/criterion_pagefooter.png b/templates/bulletproof/img/criterion_pagefooter.png new file mode 100644 index 0000000..665409f Binary files /dev/null and b/templates/bulletproof/img/criterion_pagefooter.png differ diff --git a/templates/bulletproof/img/criterion_sbcontent.png b/templates/bulletproof/img/criterion_sbcontent.png new file mode 100644 index 0000000..257f9e4 Binary files /dev/null and b/templates/bulletproof/img/criterion_sbcontent.png differ diff --git a/templates/bulletproof/img/criterion_sbtitle.png b/templates/bulletproof/img/criterion_sbtitle.png new file mode 100644 index 0000000..d83718e Binary files /dev/null and b/templates/bulletproof/img/criterion_sbtitle.png differ diff --git a/templates/bulletproof/img/criterion_tab.png b/templates/bulletproof/img/criterion_tab.png new file mode 100644 index 0000000..db0c246 Binary files /dev/null and b/templates/bulletproof/img/criterion_tab.png differ diff --git a/templates/bulletproof/img/criterion_tabactive.png b/templates/bulletproof/img/criterion_tabactive.png new file mode 100644 index 0000000..714d255 Binary files /dev/null and b/templates/bulletproof/img/criterion_tabactive.png differ diff --git a/templates/bulletproof/img/criterion_tabhover.png b/templates/bulletproof/img/criterion_tabhover.png new file mode 100644 index 0000000..229072c Binary files /dev/null and b/templates/bulletproof/img/criterion_tabhover.png differ diff --git a/templates/bulletproof/index.tpl b/templates/bulletproof/index.tpl index fc49b59..4c70c2c 100644 --- a/templates/bulletproof/index.tpl +++ b/templates/bulletproof/index.tpl @@ -396,7 +396,8 @@ -
    {$CONST.POWERED_BY} s9y – Template by Bulletproof development team.
    +
    {$CONST.POWERED_BY} s9y – Template by Bulletproof development team.
    {$template_option.colorset_data.attribution}
    + {if $template_option.counter_code_toggle == 'true'}
    {$template_option.counter_code}
    {/if} @@ -421,4 +422,4 @@ {if $is_embedded != true} -{/if} \ No newline at end of file +{/if}