fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-07-12 11:01 am

[dw-free] New Style: Five AM by winterfish

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

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

-- Create new userprops so that people can set colors for all four types of
links for usernames (normal, visited, etc)

-- If they don't set any or some of these, colors will default to the ones
of the section they're in (page, entries or modules) the same way entry link
colors default to page link colors if you don't set them specifically.

-- People who want to make usernames stay the same color no matter what can
now do so by assigning the same color to the four props.

Patch by [personal profile] ninetydegrees.

Files modified:
  • bin/upgrading/s2layers/fiveam/layout.s2
  • cgi-bin/LJ/S2Theme/fiveam.pm
--------------------------------------------------------------------------------
diff -r c646996e0ff5 -r 411f44195280 bin/upgrading/s2layers/fiveam/layout.s2
--- a/bin/upgrading/s2layers/fiveam/layout.s2	Tue Jul 05 12:10:23 2011 -0500
+++ b/bin/upgrading/s2layers/fiveam/layout.s2	Tue Jul 12 18:57:10 2011 +0800
@@ -29,7 +29,10 @@
 ##===============================
 
 propgroup colors_child {
-    property Color color_page_usernames { des = "Page usernames color"; }
+    property Color color_page_usernames { des = "Page username color"; }
+    property Color color_page_usernames_active { des = "Page active username color"; }
+    property Color color_page_usernames_hover { des = "Page hover username color"; }
+    property Color color_page_usernames_visited { des = "Page visited username color"; }
     property Color color_header_border { des = "Page header border color"; }
     property Color color_header_accent { des = "Page header accent color"; }
     property Color color_footer_border { des = "Page footer border color"; }
@@ -284,10 +287,29 @@
     text-decoration: none;
     }
 
+/* Keep before ljuser */
+
+.comment a { color: $*color_page_link; }
+.comment a:visited { color: $*color_page_link_visited; }
+.comment a:hover { color: $*color_page_link_hover; }
+.comment a:active { color: $*color_page_link_active; }
+
 .ljuser a {
     color: $*color_page_usernames;
     }
 
+.ljuser a:visited {
+    color: $*color_page_usernames_visited;
+    }
+
+.ljuser a:hover {
+    color: $*color_page_usernames_hover;
+    }
+
+.ljuser a:active {
+    color: $*color_page_usernames_active;
+    }
+
 /* Page Containers
 ***************************************************************************/
 
diff -r c646996e0ff5 -r 411f44195280 cgi-bin/LJ/S2Theme/fiveam.pm
--- a/cgi-bin/LJ/S2Theme/fiveam.pm	Tue Jul 05 12:10:23 2011 -0500
+++ b/cgi-bin/LJ/S2Theme/fiveam.pm	Tue Jul 12 18:57:10 2011 +0800
@@ -7,7 +7,12 @@
 
 sub page_props {
     my $self = shift;
-    my @props = qw( color_page_usernames );
+    my @props = qw(
+        color_page_usernames
+        color_page_usernames_active
+        color_page_usernames_hover
+        color_page_usernames_visited
+    );
     return $self->_append_props( "page_props", @props );
 }
 
--------------------------------------------------------------------------------