kizu (ki_zu) wrote in changelog,
kizu
ki_zu
changelog

[ljcom] r7583: LJSUP-4664: Adding Penguins theme to Min...

Committer: rkomarov
LJSUP-4664: Adding Penguins theme to Minimalism

U   trunk/bin/upgrading/s2layers/sup/themes.s2
Modified: trunk/bin/upgrading/s2layers/sup/themes.s2
===================================================================
--- trunk/bin/upgrading/s2layers/sup/themes.s2	2009-08-20 09:21:08 UTC (rev 7582)
+++ trunk/bin/upgrading/s2layers/sup/themes.s2	2009-08-20 09:33:51 UTC (rev 7583)
@@ -205,3 +205,148 @@
 set text_read_comments = "# // # // #";
 set theme_designer = "ruthenia_alba";
 
+#NEWLAYER: sup/10y-penguins
+layerinfo "type" = "theme";
+layerinfo "name" = "Penguins";
+layerinfo "redist_uniq" = "sup/10y-penguins";
+set theme_css = "10y-penguins.css";
+set active_theme = "10y";
+set friends_show_date = true;
+set theme_designer = "herbera";
+
+function Page::print() {
+    if ($.view == "recent") {$*_RecentPage = $this as RecentPage;} elseif ($.view == "friends") {$*_FriendsPage = $this as FriendsPage;} elseif ($.view == "day") {$*_DayPage = $this as DayPage;} elseif ($.view == "month") {$*_MonthPage = $this as MonthPage;} elseif ($.view == "archive") {$*_YearPage = $this as YearPage;}
+    _global_init_();
+    var string _upic = $.journal.default_pic?"""<div class="userpic"><img alt="${.journal.default_pic.alttext}" width="${.journal.default_pic.width}" height="${.journal.default_pic.height}" src="${.journal.default_pic.url}" /></div>""":"";
+    var string _h1 = "<h1>" + _user_print($.journal, "microformatted") + "</h1>";
+    var string _nav = """ <li class="item item-recent""" + (($.view == "recent")?" item-selected":"") + """"><a""" + (($*exact_view != "recent_first")?" rel=\"home\" href=\"$*base_url\"":"") + """>$*text_view_recent</a></li> <li class="item item-friends""" + (($.view == "friends")?" item-selected":"") + """"><a""" + (($*exact_view != "friends_first")?" href=\"$*base_url/friends\"":"") + """>$*text_view_friends</a></li> <li class="item item-archive""" + (($.view == "archive" or $.view == "month" or $.view == "day")?" item-selected":"") + """"><a""" + (($*exact_view != "archive_first")?" href=\"$*base_url/calendar\"":"") + """>$*text_view_archive</a></li> <li class="item item-profile"><a href="$*base_url/profile">$*text_view_userinfo</a></li> """;
+    var string rsslink = ($.data_link{"rss"})?($.data_link{"rss"}.url):"$*base_url/data/rss";
+    var string _nav_sub = ((not viewer_is_owner() and not viewer_is_friend())?""" <li class="item item-addfriend"><a href="$*SITEROOT/friends/add.bml?user=$.journal.username">$*text_friend_add</a></li> """ : "") + """ <li class="item item-rss"><a href="$rsslink">RSS</a></li> """;
+    var string _h2 = """<h2>$.global_title</h2>""";
+    var string _h3 = ($.view == "friends")?"<h3>$*_FriendsPage.friends_title</h3>":"<h3>$.global_subtitle</h3>";
+    var string _hfeed = ($.view=="recent" or $.view=="friends" or $.view=="day")?" hfeed":"";
+    _Header();
+"""
+<div id="page">
+    <div class="layout">
+    <div class="layout-inner">
+        <div class="header">
+            <div class="u-wrap">
+                $_upic
+                $_h1
+            </div>
+            $_h2
+            $_h3
+            <ul class="nav">
+                $_nav
+            </ul>
+            <ul class="nav-sub">
+                $_nav_sub
+            </ul>
+        </div>
+        <div class="content$_hfeed">
+            <div class="content-inner"><div class="content-inner-in">
+                """;$this->print_body();"""
+            </div></div>
+        </div>
+""";
+            _Sidebar();
+"""
+    </div>
+    </div>
+</div>
+""";
+    _Footer();
+}
+
+
+
+function _print_entry(Entry e) {
+    var Page p = get_page();
+    var string entrydate = _dateTime($e.time);
+    var string isodate = $e.time->date_format("%%yyyy%%-%%mm%%-%%dd%%T%%HH%%:%%min%%:%%sec%%+03:00");
+    var string extraclasses = "";
+    var string _entry_title = "$e.security_icon" +
+        ($p.view=="entry" or $p.view=="reply"
+        ? ($e.subject == "" ? $*text_nosubject : $e.subject) + """<a href="$e.permalink_url" rel="bookmark" style="display:none;"></a>"""
+        : ($e.subject == "" ? ("""<a href="$e.permalink_url" class="subj-link" rel="bookmark">$*text_nosubject</a>""") : $e -> formatted_subject({"class"=>"subj-link","rel"=>"bookmark"})));
+    if (not $e.comments.enabled) {
+        $extraclasses = $extraclasses + " disabledcomments";
+    }
+
+"""
+                <div class="entry-wrap">
+                <dl class="entry hentry$extraclasses" id="post-$e.journal.username-$e.itemid">
+""";
+    if ($p.view=="entry" or $p.view=="reply") {
+        """<dt class="entry-title entry-linkbar">""";
+        $e->print_linkbar();
+        """</dt>""";
+    }
+
+"""
+                    <dt class="entry-title">$_entry_title</dt>
+                    <dd class="entry-text">
+                        <dl class="vcard author">
+                            <dt>"""; if ($e.userpic) { $e.userpic->print(); } """</dt>
+                            <dd class="username">"""; print _user_print($e.poster,"inside"); if ($e.poster.username!=$e.journal.username and not ($p.journal.journal_type == "C" and $p.view == "recent" )){ " $*text_user_posts_in "; print _user_print($e.journal,"simple");} """</dd>
+                            <dd class="entry-date"><abbr class="updated" title="$isodate">$entrydate</abbr></dd>
+                        </dl>
+                        <div class="entry-content">"""; $e->print_metadata(); $e->print_text();"""</div>
+                    </dd>
+""";
+    if ($p.view!="entry" and $p.view!="reply") {
+"""
+                    <dd class="entrymenu">
+                        <ul>
+""";
+            $e.comments->print();
+
+            """</ul></dd><dd class="entrysubmenu"><ul>""";
+            var Link link;
+            var string url = "";
+            var string text = "";
+            var string{} link_caption = {
+                "edit_entry" => $*text_edit_entry,
+                "edit_tags" => $*text_edit_tags,
+                "mem_add" => $*text_mem_add,
+                "tell_friend" => $*text_tell_friend,
+                "flag" => $*text_flag,
+                "watch_comments" => $*text_watch_comments,
+                "unwatch_comments" => $*text_unwatch_comments
+            };
+            foreach var string link_key ($e.link_keyseq) {
+                $link = $e->get_link($link_key);
+                if (defined $link) {
+                    $url = $link.url;
+                    $text = $link_caption{$link_key} != "" ? $link_caption{$link_key} : $link.caption;
+                    print safe """<li class="$link_key"><a href="$url">$text</a></li> """;
+                }
+            }
+"""
+                        </ul>
+                    </dd>
+""";
+    }
+"""
+                </dl>
+                </div>
+                <div class="hr"><hr /></div>
+""";
+}
+
+function CommentInfo::print() {
+    var Page p = get_page();
+    if ($.show_readlink) {
+        """<li class="comments"><a href="$.read_url">$.count</a></li>""";
+    }
+    if ($.show_postlink) {
+        """<li class="postcomment">""";
+        if ($.maxcomments) {
+            print safe """$*text_max_comments""";
+        } else {
+            """<a href="$.post_url">"""+($p.view == "friends" ? $*text_post_comment_friends : $*text_post_comment)+"</a>";
+        }
+        "</li>";
+    }
+}

Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments