Committer: ybuhvalova
LJSUP-11708: New style - Kite in CloudsU trunk/bin/upgrading/s2layers/sup/themes.s2
Modified: trunk/bin/upgrading/s2layers/sup/themes.s2 =================================================================== --- trunk/bin/upgrading/s2layers/sup/themes.s2 2012-04-11 07:56:41 UTC (rev 11686) +++ trunk/bin/upgrading/s2layers/sup/themes.s2 2012-04-11 08:11:57 UTC (rev 11687) @@ -33,7 +33,6 @@ set theme_css = "x-1-5.css"; set active_theme = "x1"; - #NEWLAYER: sup/x-2-1 layerinfo "type" = "theme"; layerinfo "name" = "Deep Ocean"; @@ -2900,6 +2899,8 @@ var Page p = get_page(); var string poster = defined $c.poster ? _user_print($c.poster, "microformatted") : "<em>$*text_poster_anonymous</em>"; var string evenodd = $c.depth % 2 ? "odd" : "even"; + var string commdate = _dateTime($c.time); + if (defined $c.userpic and $*comment_userpic_style != "off") { var int w = $c.userpic.width; var int h = $c.userpic.height; @@ -2929,8 +2930,8 @@ if (defined $c.subject_icon or $c.subject != "") { """<h3>$c.subject_icon $c.subject</h3>"""; } - """<span class="c-poster">$poster</span>"""; - """ <span class="c-time">"""; _dateTime($c.time); "</span>"; + """<span class="c-poster">$poster</span>"""; + """ <span class="c-time">$commdate</span>"""; if ($c.metadata{"poster_ip"}) { """ <span class="c-ip">IP: """; @@ -2958,17 +2959,113 @@ print safe "<span>$*text_comment_frozen</span> "; } elseif($c.screened) { var Link link = $c->get_link("unscreen_to_reply"); - """<span><a class="unscreen-to-reply" href="$link.url" title="$link.caption">$link.caption</a></span> """; + """<span><a class="unscreen-to-reply" href="$link.url" title="$link.caption">$link.caption</a></span>"""; } elseif ((not $c.spam) or ($p.showspam)) { - $c->print_reply_link({"linktext" => $*text_comment_reply}); + """<span>"""; $c->print_reply_link({"linktext" => $*text_comment_reply}); """</span>"""; } - if ($c.parent_url != "") { print safe """<span><a href="$c.parent_url">$*text_comment_parent</a></span> """; } + if ($c.parent_url != "") { print safe """<span><a href="$c.parent_url">$*text_comment_parent</a></span>"""; } if (($c.thread_url != "") and (not $c.spam)) { print safe """<span><a href="$c.thread_url">$*text_comment_thread</a></span> """; if ($c.parent_url != "") { $c->print_expand_collapse_links({ "expand"=>"<span>%_</span>", "collapse"=>"<span>%_</span>"}); } } - """ <span><a class="comment-permalink" href="$c.permalink_url">$*text_permalink</a></span>"""; + """<span><a class="comment-permalink" href="$c.permalink_url">$*text_permalink</a></span>"""; """</div><div class="hr"><hr /></div>"""; -} \ No newline at end of file +} + +function _Sidebar { + var Page p=get_page(); + var int visible_counter = 0; +""" + <div class="sidebar"> + <div class="sidebar-inner"""+ (viewer_sees_ad_box("s2.box.bottom")?" with_ad":"") +""""> +"""; + if ($*layout_show_calendar) { + $visible_counter++; +""" + <dl class="sidebar-block sidebar-cal item-$visible_counter"> + <dt><div>$*text_view_archive</div></dt> + <dd class="calendar-wrap"><div class="sidebar-block-inner">"""; _calendar($p->get_latest_month(), "sidebar"); """</div></dd> + </dl> +"""; + } + + var Entry[] _summary_entries; + if ($*_RecentPage) { + $_summary_entries = $*_RecentPage.entries; + } elseif ($*_FriendsPage) { + $_summary_entries = $*_FriendsPage.entries; + } elseif ($*_DayPage) { + $_summary_entries = $*_DayPage.entries; + } + + if ($*layout_show_summary) { + if ($_summary_entries) { + $visible_counter++; +""" + <dl class="sidebar-block sidebar-summary item-$visible_counter"> + <dt><div>$*text_page_summary</div></dt> + <dd><div class="sidebar-block-inner"> + """; _summary($_summary_entries); """ + </div></dd> + </dl> +"""; + } + } + if (size($p.linklist) > 0 and $*layout_show_links) { + if ($*layout_show_calendar) { + $visible_counter++; + """<div class="hr"><hr /></div>""";} +""" + <dl class="sidebar-block sidebar-links item-$visible_counter"> + """; _linklist(); """ + </dl> +"""; + } + + if (size($p->visible_tag_list()) > 0 and $*layout_show_tags and $p.view!="tags") { + $visible_counter++; + if ($*layout_show_calendar or (size($p.linklist) > 0 and $*layout_show_links)) {"""<div class="hr"><hr /></div>""";} +""" + <dl class="sidebar-block sidebar-tags item-$visible_counter"> + <dt><div>$*text_tags_section_header</div></dt> + <dd class="tags"><div class="sidebar-block-inner">"""; + if ($*tag_limit) { + _taglist($*tag_cloud_max,108); + } else { + _taglist(108); + } """</div></dd> + </dl> + """; + } + + if (bool($*layout_customHTML) and $*layout_show_custom) { + $visible_counter++; + if ($*layout_show_calendar or (size($p.linklist) > 0 and $*layout_show_links) or (bool($*layout_customHTML) and $*layout_show_custom)) {"""<div class="hr"><hr /></div>""";} +""" + <dl class="sidebar-block sidebar-custom item-$visible_counter"> + <dd><div class="sidebar-block-inner">$*layout_customHTML</div></dd> + </dl> + +"""; + } + + + """ + </div> + </div> + """; + + +} + + +#NEWLAYER: sup/kite +layerinfo "type" = "theme"; +layerinfo "name" = "Kite in clouds"; +layerinfo "redist_uniq" = "sup/kite"; +set theme_css = "kite.css"; +set active_theme = "x0"; +set show_title_on_tagpage = true; +set hide_comment_controls = true;