fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-09-20 08:47 am

[dw-free] new Stepping Stones theme: Friendly Colors

[commit: http://hg.dwscoalition.org/dw-free/rev/c47962c9e15f]

http://bugs.dwscoalition.org/show_bug.cgi?id=3047

New theme of Stepping Stones, with CSS positioning modifications to support
journal foreground/background colors as a strip down the side of the entry
on the reading page + assorted tweaks.

Preview image by [personal profile] ninetydegrees. Patch by [personal profile] kareila.

Files modified:
  • bin/upgrading/s2layers/steppingstones/themes.s2
  • cgi-bin/LJ/S2Theme/steppingstones.pm
  • htdocs/img/customize/previews/steppingstones/friendlycolors.png
--------------------------------------------------------------------------------
diff -r b80946faeee5 -r c47962c9e15f bin/upgrading/s2layers/steppingstones/themes.s2
--- a/bin/upgrading/s2layers/steppingstones/themes.s2	Mon Sep 20 15:24:00 2010 +0800
+++ b/bin/upgrading/s2layers/steppingstones/themes.s2	Mon Sep 20 16:47:38 2010 +0800
@@ -117,6 +117,158 @@ set color_module_title = "#000";
 set color_module_title = "#000";
 
 
+#NEWLAYER: steppingstones/friendlycolors
+layerinfo type = "theme";
+layerinfo name = "Friendly Colors";
+layerinfo redist_uniq = "steppingstones/friendlycolors";
+layerinfo author_name = "kareila";
+
+set layout_authors = [ { "name" => "kareila", "type" => "user" } ];
+set layout_type = "two-columns-left";
+
+set use_custom_friend_colors = true;
+set custom_foreground_element = "custom";
+set custom_background_element = "custom";
+set custom_colors_template = "%%new%% .entry .contents .userpic { background-color: %%background%%; } %%new%% .entry .contents .userpic a { background-color: %%foreground%%; }";
+set module_pagesummary_opts_comments_tooltip = false;
+
+##===============================
+## Page Colors
+##===============================
+
+set color_page_background = "#D1D4F0";
+set color_page_link = "#7885E3";
+set color_page_link_visited = "#3C4ECF";
+set color_page_text = "#000";
+set color_page_title = "#fff";
+set color_header_background = "#9DA6ED";
+set color_footer_background = "#9DA6ED";
+
+##===============================
+## Entry Colors
+##===============================
+
+set color_entry_background = "#fff";
+set color_entry_border = "#7885E3";
+
+##===============================
+## Module Colors
+##===============================
+
+set color_module_background = "#7D8BF5";
+set color_module_link = "#eee";
+set color_module_link_visited = "#c6c6f6";
+set color_module_text = "#fff";
+set color_module_title = "#fff";
+
+function Page::print_theme_stylesheet () {
+    var string userpic_css = "";
+        if ($*userpics_position == "left") {
+            $userpic_css = """
+            .entry .header { padding-left: 0; }
+            .entry .contents .userpic { left: -1em; }
+            .entry-poster, .entry-content, .entry .metadata { margin-left: 110px; }
+            """;
+        }
+        elseif ($*userpics_position == "right") {
+            $userpic_css = """
+            .entry .header { padding-right: 0; }
+            .entry .contents .userpic { right: -1em; }
+            .entry-poster, .entry-content, .entry .metadata { margin-right: 110px; }
+            """;
+        }
+    """
+    /* one column: module display */
+    
+    .one-column #tertiary,
+    .one-column #secondary {
+        width: 100%;
+        }
+    
+    .one-column #secondary .module {
+        float: left;
+        }
+    
+    .one-column #secondary .module-section-one > .inner {
+        background-color: $*color_module_background;
+        float: left;
+        }
+    
+    /* module ul style tweaks */
+    
+    .module-content ul,
+    .module-navlinks ul,
+    .module-typelist ul {
+        list-style: inherit;
+        padding-left: 1em;
+        }
+    
+    .navigation ul {
+        background-color: $*color_module_background;
+        }
+    
+    .navigation ul a {
+        color: $*color_module_link;
+        }
+    
+    .navigation ul a:visited {
+        color: $*color_module_link_visited;
+        }
+    
+    .pagesummary-commentcount {
+        display: block;
+        }
+    
+    /* reposition userpics */
+
+    $userpic_css
+    
+    .entry .contents .userpic,
+    .entry .contents {
+        min-height: 110px;
+        }
+    
+    .entry .contents > .inner {
+        position: relative;
+        }
+    
+    .entry .contents .userpic {
+        top: 0;
+        height: 100%;
+        background-position-y: 0 !important;
+        background-position: 50% 0;  /* Firefox */
+        width: 110px;
+        padding-top: 2px;
+        }
+    
+    .entry .contents .userpic a {
+        padding: 2px;
+        }
+
+    .entry .contents .userpic,
+    .entry .contents .userpic a {
+        background-color: $*color_entry_background;
+        }
+
+    .entry .contents .userpic img {
+        margin-top: 3px;
+        }
+
+    .entry .footer ul.entry-management-links,
+    .entry .footer ul.entry-interaction-links {
+        margin-top: .5em;
+        }
+    
+    /* monospace weekday names on archive page */
+    
+    table.month th {
+        font-family: Lucida Console, Monaco, monospace;
+        }
+
+    """;
+}
+
+
 #NEWLAYER: steppingstones/gray
 layerinfo type = "theme";
 layerinfo name = "Gray";
diff -r b80946faeee5 -r c47962c9e15f cgi-bin/LJ/S2Theme/steppingstones.pm
--- a/cgi-bin/LJ/S2Theme/steppingstones.pm	Mon Sep 20 15:24:00 2010 +0800
+++ b/cgi-bin/LJ/S2Theme/steppingstones.pm	Mon Sep 20 16:47:38 2010 +0800
@@ -19,6 +19,11 @@ package LJ::S2Theme::steppingstones::dus
 package LJ::S2Theme::steppingstones::duskyrose;
 use base qw( LJ::S2Theme::steppingstones );
 sub cats { qw() }
+
+package LJ::S2Theme::steppingstones::friendlycolors;
+use base qw( LJ::S2Theme::steppingstones );
+sub cats { qw() }
+sub designer { "kareila" }
 
 package LJ::S2Theme::steppingstones::gray;
 use base qw( LJ::S2Theme::steppingstones );
diff -r b80946faeee5 -r c47962c9e15f htdocs/img/customize/previews/steppingstones/friendlycolors.png
Binary file htdocs/img/customize/previews/steppingstones/friendlycolors.png has changed
--------------------------------------------------------------------------------