[dw-free] Style journal views and enable style=site as an option in settings, and add it to the navi
[commit: http://hg.dwscoalition.org/dw-free/rev/3fecf266967c]
http://bugs.dwscoalition.org/show_bug.cgi?id=4398
Style certain pages to look decent in site view (not including month pages).
Allow style=site as an option for journal pages in settings. Allow
style=site as an option for journal pages on the navigation strip.
Patch by
foxfirefey.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=4398
Style certain pages to look decent in site view (not including month pages).
Allow style=site as an option for journal pages in settings. Allow
style=site as an option for journal pages on the navigation strip.
Patch by
Files modified:
- bin/upgrading/s2layers/siteviews/layout.s2
- bin/upgrading/s2layers/siteviews/themes.s2
- cgi-bin/DW/Setting/ViewEntryStyle.pm
- cgi-bin/DW/Setting/ViewJournalStyle.pm
- cgi-bin/DW/Setting/ViewStyle.pm
- htdocs/stc/siteviews/celerity.css
- htdocs/stc/siteviews/gradation.css
- htdocs/stc/siteviews/layout.css
- htdocs/stc/siteviews/lynx.css
- htdocs/stc/siteviews/tropo-purple.css
- htdocs/stc/siteviews/tropo-red.css
--------------------------------------------------------------------------------
diff -r 11b560fda973 -r 3fecf266967c bin/upgrading/s2layers/siteviews/layout.s2
--- a/bin/upgrading/s2layers/siteviews/layout.s2 Sun May 13 17:15:56 2012 +0800
+++ b/bin/upgrading/s2layers/siteviews/layout.s2 Sun May 13 18:04:55 2012 +0800
@@ -39,6 +39,7 @@
function Page::print_default_stylesheet() {
# Do not actually *print* any stylesheets here, but you can $*SITEVIEWS->need_res(...); here to pull in anything.
+ $*SITEVIEWS->need_res( "stc/siteviews/layout.css" );
}
function Page::print_theme_stylesheet() {}
diff -r 11b560fda973 -r 3fecf266967c bin/upgrading/s2layers/siteviews/themes.s2
--- a/bin/upgrading/s2layers/siteviews/themes.s2 Sun May 13 17:15:56 2012 +0800
+++ b/bin/upgrading/s2layers/siteviews/themes.s2 Sun May 13 18:04:55 2012 +0800
@@ -7,3 +7,69 @@
# Do not actually *print* any stylesheets here, but you can $*SITEVIEWS->need_res(...); here to pull in anything.
}
+#NEWLAYER: siteviews/tropo-red
+layerinfo type = "theme";
+layerinfo name = "Tropospherical Red";
+layerinfo redist_uniq = "siteviews/tropo-red";
+
+function Page::print_theme_stylesheet() {
+ # Do not actually *print* any stylesheets here, but you can $*SITEVIEWS->need_res(...); here to pull in anything.
+ $*SITEVIEWS->need_res( "stc/siteviews/tropo-red.css" );
+}
+
+#NEWLAYER: siteviews/tropo-purple
+layerinfo type = "theme";
+layerinfo name = "Tropospherical Purple";
+layerinfo redist_uniq = "siteviews/tropo-purple";
+
+function Page::print_theme_stylesheet() {
+ # Do not actually *print* any stylesheets here, but you can $*SITEVIEWS->need_res(...); here to pull in anything.
+ $*SITEVIEWS->need_res( "stc/siteviews/tropo-purple.css" );
+}
+
+#NEWLAYER: siteviews/celerity
+layerinfo type = "theme";
+layerinfo name = "Celerity";
+layerinfo redist_uniq = "siteviews/celerity";
+
+function Page::print_theme_stylesheet() {
+ # Do not actually *print* any stylesheets here, but you can $*SITEVIEWS->need_res(...); here to pull in anything.
+ $*SITEVIEWS->need_res( "stc/siteviews/celerity.css" );
+}
+
+#NEWLAYER: siteviews/gradation-horizontal
+layerinfo type = "theme";
+layerinfo name = "Gradation Horizontal";
+layerinfo redist_uniq = "siteviews/gradation-horizontal";
+
+function Page::print_theme_stylesheet() {
+ # Do not actually *print* any stylesheets here, but you can $*SITEVIEWS->need_res(...); here to pull in anything.
+ $*SITEVIEWS->need_res( "stc/siteviews/gradation.css" );
+}
+
+#NEWLAYER: siteviews/gradation-vertical
+layerinfo type = "theme";
+layerinfo name = "Gradation Horizontal";
+layerinfo redist_uniq = "siteviews/gradation-vertical";
+
+function Page::print_theme_stylesheet() {
+ # Do not actually *print* any stylesheets here, but you can $*SITEVIEWS->need_res(...); here to pull in anything.
+ $*SITEVIEWS->need_res( "stc/siteviews/gradation.css" );
+}
+
+
+#NEWLAYER: siteviews/lynx
+layerinfo type = "theme";
+layerinfo name = "Lynx";
+layerinfo redist_uniq = "siteviews/lynx";
+
+function Page::print_theme_stylesheet() {
+ # Do not actually *print* any stylesheets here, but you can $*SITEVIEWS->need_res(...); here to pull in anything.
+ $*SITEVIEWS->need_res( "stc/siteviews/lynx.css" );
+}
+
+# override this so the layout.css is NOT included
+function Page::print_default_stylesheet() {
+ # Do not actually *print* any stylesheets here, but you can $*SITEVIEWS->need_res(...); here to pull in anything.
+}
+
diff -r 11b560fda973 -r 3fecf266967c cgi-bin/DW/Setting/ViewEntryStyle.pm
--- a/cgi-bin/DW/Setting/ViewEntryStyle.pm Sun May 13 17:15:56 2012 +0800
+++ b/cgi-bin/DW/Setting/ViewEntryStyle.pm Sun May 13 18:04:55 2012 +0800
@@ -21,10 +21,6 @@
use strict;
use warnings;
-sub supports_site {
- return 1;
-}
-
sub label {
return $_[0]->ml( 'setting.display.viewentrystyle.label' );
}
diff -r 11b560fda973 -r 3fecf266967c cgi-bin/DW/Setting/ViewJournalStyle.pm
--- a/cgi-bin/DW/Setting/ViewJournalStyle.pm Sun May 13 17:15:56 2012 +0800
+++ b/cgi-bin/DW/Setting/ViewJournalStyle.pm Sun May 13 18:04:55 2012 +0800
@@ -21,10 +21,6 @@
use strict;
use warnings;
-sub supports_site {
- return 0;
-}
-
sub label {
return $_[0]->ml( 'setting.display.viewjournalstyle.label' );
}
diff -r 11b560fda973 -r 3fecf266967c cgi-bin/DW/Setting/ViewStyle.pm
--- a/cgi-bin/DW/Setting/ViewStyle.pm Sun May 13 17:15:56 2012 +0800
+++ b/cgi-bin/DW/Setting/ViewStyle.pm Sun May 13 18:04:55 2012 +0800
@@ -23,10 +23,6 @@
# Only override the below methods
-sub supports_site {
- return 0;
-}
-
sub label {
die "Neglected to override 'label' in DW::Setting::ViewStyle subclass";
}
@@ -58,13 +54,7 @@
my @options = (
O => $class->ml( 'setting.display.viewstyle.original' ),
M => $class->ml( 'setting.display.viewstyle.mine' ),
- );
-
- push @options, (
S => $class->ml( 'setting.display.viewstyle.site' ),
- ) if $class->supports_site;
-
- push @options, (
L => $class->ml( 'setting.display.viewstyle.light' ),
);
@@ -83,7 +73,6 @@
my $val = uc( $class->get_arg( $args, "style" ) );
$class->error( style => $class->ml( '.setting.display.viewstyle.invalid' ) ) unless $val =~ /^[OMSL]$/;
- $class->error( style => $class->ml( '.setting.display.viewstyle.invalid' ) ) if ( $val eq 'S' && ! $class->supports_site );
return 1;
}
diff -r 11b560fda973 -r 3fecf266967c htdocs/stc/siteviews/celerity.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/htdocs/stc/siteviews/celerity.css Sun May 13 18:04:55 2012 +0800
@@ -0,0 +1,35 @@
+.month-wrapper table.month td.day span.label {
+ border-right: 1px solid #999966;
+ border-bottom: 1px solid #999966;
+ color: #999966;
+}
+
+.month-wrapper table.month th { color: #888833; }
+
+.month-wrapper table.month td, .month-wrapper table.month th { border: 1px solid #888833; }
+
+.month .footer a, .tags-container .manage-link a {
+ background-color: #999966;
+ color: white;
+}
+
+.month .footer a:hover, .tags-container .manage-link a:hover {
+ color: #FFFFDD;
+ background-color: #888833;
+}
+
+.navigation a, .navigation li.active {
+ background-color: #999966;
+ color: white;
+}
+
+.navigation li.active {
+ color: #888833;
+ background-color: #FFFFDD;
+ border: 1px solid #888833;
+}
+
+.navigation a:hover {
+ color: #FFFFDD;
+ background-color: #888833;
+}
diff -r 11b560fda973 -r 3fecf266967c htdocs/stc/siteviews/gradation.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/htdocs/stc/siteviews/gradation.css Sun May 13 18:04:55 2012 +0800
@@ -0,0 +1,29 @@
+.month-wrapper table.month td.day span.label {
+ border-right: 1px solid #999;
+ border-bottom: 1px solid #999;
+ color: #999;
+}
+
+.month-wrapper table.month th { color: #aaa; }
+
+.month-wrapper table.month td, .month-wrapper table.month th { border: 1px solid #999; }
+
+.month .footer a, .tags-container .manage-link a {
+ background-color: #666666;
+ color: white;
+}
+
+.month .footer a:hover, .tags-container .manage-link a:hover { color: #CCCC99; }
+
+.navigation a, .navigation li.active {
+ background-color: #666;
+ color: white;
+}
+
+.navigation li.active {
+ color: white;
+ background-color: #999;
+ border: 1px solid #aaa;
+}
+
+.navigation a:hover { color: #CCCC99; }
diff -r 11b560fda973 -r 3fecf266967c htdocs/stc/siteviews/layout.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/htdocs/stc/siteviews/layout.css Sun May 13 18:04:55 2012 +0800
@@ -0,0 +1,144 @@
+
+/* Recent page */
+
+.entry-wrapper { margin: 2em 0em; }
+
+.entry-wrapper .header {
+ padding: .5em;
+ margin-bottom: .5em;
+}
+
+.entry-wrapper .header h3 { font-size: 1.2em; }
+.entry-wrapper .header h3 a {
+ text-decoration: none;
+ margin-bottom: .4em;
+}
+
+.entry-wrapper .header .access-filter, .entry-wrapper .header .restrictions {
+ float: left;
+ margin-right: 8px;
+}
+
+.entry-wrapper .datetime {
+ display: block;
+ text-align: right;
+}
+
+.entry-wrapper .userpic {
+ float: left;
+ margin: .5em 1em 1em 0em;
+}
+
+.entry-content {
+ margin-top: .5em;
+ margin-bottom: .5em;
+}
+
+.entry .metadata {
+ clear: both;
+ padding-top: 1em;
+ padding-bottom: 1em;
+}
+
+.entry .metadata ul { list-style-type: none; }
+.entry .metadata-label { font-weight: bold; }
+
+.entry .tag { margin: .5em 0em; }
+.entry .tag .tag-text { font-weight: bold; }
+.entry .tag ul { list-style-type: none; display: inline; }
+.entry .tag ul li { display: inline; }
+
+.entry-wrapper .contents, .entry-wrapper .footer { clear: both; }
+
+.entry .footer { margin-top: .5em; }
+
+ul.entry-management-links { float: left; margin-left: 0px; }
+ul.entry-interaction-links { float: right; }
+
+ul.entry-management-links li, ul.entry-interaction-links li {
+ display: inline;
+ margin-right: .2em;
+}
+
+.separator-after { clear: both; }
+
+/* Year archive */
+
+.month-wrapper h3, .month-wrapper .contents { padding: .5em 0em; }
+
+.month-wrapper caption { display: none; }
+
+.month-wrapper table.month {
+ width: 100%;
+ border-collapse: collapse;
+}
+
+.month-wrapper table.month td.day {
+ height: 4em;
+ padding: 0px;
+}
+
+.month-wrapper table.month td.day span.label {
+ display: block;
+ width: 2em;
+ height: 1.5em;
+ padding: .2em .5em 0em 0em;
+ text-align: right;
+}
+
+.month-wrapper table.month th { padding: .5em; }
+
+#content .month-wrapper table.month td.day-has-entries p {
+ font-weight: bold;
+ text-align: center;
+ margin: 0px;
+ padding: 0px;
+}
+
+#content .month-wrapper table.month td.day-has-entries p a {
+ display: block;
+ text-decoration: none;
+ height: 3em;
+}
+
+.month-wrapper .footer { padding: .5em 0em; }
+
+.month .header h3 { padding-left: .5em; }
+
+.month .footer a , .tags-container .manage-link a {
+ display: block;
+ text-decoration: none;
+ text-align: center;
+ border-radius: .2em;
+ padding: .5em 0em;
+}
+
+/* Day archive page navigation, year archive page navigation */
+
+.day, .year { clear: both; }
+
+.navigation ul {
+ list-style-type: none;
+ padding-left: 0px;
+ margin-left: 0px;
+}
+
+.navigation li.page-back { float: left; }
+.navigation li.page-forward { float: right; }
+
+#archive-year .navigation li { float: left; margin-right: 1em;}
+
+.navigation a, .navigation li.active {
+ border-radius: 0.2em 0.2em 0.2em 0.2em;
+ display: block;
+ padding: 0.5em;
+ text-align: center;
+ text-decoration: none;
+ margin-bottom: .5em;
+}
+
+.navigation li.active { font-weight: bold; }
+
+/* Tag page */
+
+.tags-container .header, .tags-container .contents { padding: .5em; }
diff -r 11b560fda973 -r 3fecf266967c htdocs/stc/siteviews/lynx.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/htdocs/stc/siteviews/lynx.css Sun May 13 18:04:55 2012 +0800
@@ -0,0 +1,9 @@
+table.month { border-collapse: collapse; }
+
+table.month caption { display: none; }
+
+table.month td, table.month th { border: 1px solid #E2E2E2; padding: .2em; }
+
+table.month td.day { vertical-align: top; min-width: 3em; }
+
+table.month td.day p { margin: 0px .5em; text-align: right; }
diff -r 11b560fda973 -r 3fecf266967c htdocs/stc/siteviews/tropo-purple.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/htdocs/stc/siteviews/tropo-purple.css Sun May 13 18:04:55 2012 +0800
@@ -0,0 +1,23 @@
+.month-wrapper table.month td.day span.label {
+ border-right: 1px solid #999;
+ border-bottom: 1px solid #999;
+ color: #555;
+}
+
+.month-wrapper table.month th { color: #555; }
+
+.month-wrapper table.month td, .month-wrapper table.month th { border: 1px solid #999; }
+
+.month .footer a, .tags-container .manage-link a {
+ background-color: #999;
+ color: white;
+}
+
+.month .footer a:hover, .tags-container .manage-link a:hover { color: #F3D2FC; }
+
+.navigation li.active {
+ color: #999;
+ background-color: #DDDDDD;
+}
+
+.navigation a:hover { color: #F3D2FC; }
diff -r 11b560fda973 -r 3fecf266967c htdocs/stc/siteviews/tropo-red.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/htdocs/stc/siteviews/tropo-red.css Sun May 13 18:04:55 2012 +0800
@@ -0,0 +1,37 @@
+.month-wrapper table.month td.day span.label {
+ border-right: 1px solid #999;
+ border-bottom: 1px solid #999;
+ color: #555;
+}
+
+.month-wrapper table.month th { color: #555; }
+
+.month-wrapper table.month td, .month-wrapper table.month th { border: 1px solid #999; }
+
+.month .footer a {
+ background-color: #999;
+ color: white;
+}
+
+.month .footer a:hover { color: #FFD8D8; }
+
+.month-wrapper table.month td.day span.label {
+ border-right: 1px solid #999;
+ border-bottom: 1px solid #999;
+ color: #555;
+}
+
+.month .footer a , .tags-container .manage-link a {
+ background-color: #999;
+ color: white;
+}
+
+.month .footer a:hover, .tags-container .manage-link a:hover { color: #FFD8D8; }
+
+.navigation a, .navigation li.active {
+ background-color: #999999;
+ color: white;
+}
+
+.navigation a:hover { color: #FFD8D8; }
+
--------------------------------------------------------------------------------
