[Jifty-commit] r6121 - in wifty/trunk: share/web/static/css
Jifty commits
jifty-commit at lists.jifty.org
Tue Dec 16 18:49:06 EST 2008
Author: ruz
Date: Tue Dec 16 18:49:06 2008
New Revision: 6121
Modified:
wifty/trunk/lib/Wifty/View/Feeds.pm
wifty/trunk/lib/Wifty/View/Page.pm
wifty/trunk/share/web/static/css/app.css
Log:
* publish feeds in head and content where we want them to be
right from templates using new page class plugin
* add simple css
Modified: wifty/trunk/lib/Wifty/View/Feeds.pm
==============================================================================
--- wifty/trunk/lib/Wifty/View/Feeds.pm (original)
+++ wifty/trunk/lib/Wifty/View/Feeds.pm Tue Dec 16 18:49:06 2008
@@ -10,21 +10,24 @@
private template 'pages_links' => sub {
my ($title, $path) = get(qw(title path));
- add rel "alternate",
- type => "application/atom+xml",
- title => $title .' '. _('(headlines)'),
- href => "/feeds/atom/$path/headlines",
- ;
- add rel "alternate",
- type => "application/atom+xml",
- title => $title .' '. _('(full content)'),
- href => "/feeds/atom/$path/full",
- ;
- add rel "alternate",
- type => "application/atom+xml",
- title => $title .' '. _('(diffs)'),
- href => "/feeds/atom/$path/diffs",
- ;
+ ul { attr { class is 'atom-feeds' };
+ li { add rel "alternate",
+ type => "application/atom+xml",
+ title => $title .' '. _('(headlines)'),
+ href => "/feeds/atom/$path/headlines",
+ }
+ li { add rel "alternate",
+ type => "application/atom+xml",
+ title => $title .' '. _('(full content)'),
+ href => "/feeds/atom/$path/full",
+ }
+ li { add rel "alternate",
+ type => "application/atom+xml",
+ title => $title .' '. _('(diffs)'),
+ href => "/feeds/atom/$path/diffs",
+ }
+ };
+ return '';
};
# XXX: id rendering is not correct
Modified: wifty/trunk/lib/Wifty/View/Page.pm
==============================================================================
--- wifty/trunk/lib/Wifty/View/Page.pm (original)
+++ wifty/trunk/lib/Wifty/View/Page.pm Tue Dec 16 18:49:06 2008
@@ -68,4 +68,18 @@
sub render_title_inpage { return '' }
+sub render_link_inpage {
+ my $self = shift;
+ my %link = @_;
+ if ( ($link{rel}||'') eq 'alternate' && ($link{type}||'') eq 'application/atom+xml' ) {
+ a { attr { href => $link{'href'} };
+ img { attr {
+ src => '/static/images/feed-icon-14x14.png',
+ width => 14, heigth => 14,
+ title => $link{'title'}
+ } }
+ }
+ }
+ return '';
+}
1;
Modified: wifty/trunk/share/web/static/css/app.css
==============================================================================
--- wifty/trunk/share/web/static/css/app.css (original)
+++ wifty/trunk/share/web/static/css/app.css Tue Dec 16 18:49:06 2008
@@ -122,3 +122,20 @@
float: left;
}
+ul.atom-feeds {
+ clear: both;
+ margin-left: 0em;
+ padding-left: 0em;
+ list-style-type: none;
+}
+
+ul.atom-feeds a img {
+ border: none;
+}
+
+ul.atom-feeds li {
+ margin-left: 1em;
+ padding-left: 0;
+ display: inline;
+}
+
More information about the Jifty-commit
mailing list