emnem

s2 Custom Theme Layer last edits 7-6-22 (changed navlink order; some code cleanup)

Sep 25th, 2020 (edited)
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 9.09 KB | None | 0 0
  1. layerinfo "type" = "theme";
  2. layerinfo "name" = "MM";
  3.  
  4. layerinfo is_public = 1;
  5. layerinfo source_viewable = 1;
  6.  
  7. set text_module_customtext = "";
  8.  
  9. set text_replyform_header = "Reply Form";
  10. set text_comment_posted = "Reply successfully posted";
  11. set comment_page_prev = "Previous Replies";
  12. set text_reply_back = "Read Replies";
  13.  
  14. set text_day_prev = "Prev";
  15. set text_day_next = "Next";
  16.  
  17. set text_view_month = "View Entries";
  18.  
  19. set text_icons_page_header = "Icons";
  20.  
  21. set text_module_syndicate = "Subscribe RSS/Atom";
  22.  
  23.     function Page::print()
  24. {
  25.  
  26. """<!DOCTYPE html>
  27. <html lang="en">
  28. <head>
  29.  <style type="text/css">
  30.    /*3-3-22 custom quotes style for off-label blockquote uses*/
  31.  span.scrape-text{display:block;padding:.7em .5em .05em .7em;font-style:italic}
  32. span.scrape:before{content:"{{{scrape}}}";border-bottom:3px double #444;color:#ab1414}
  33.  </style>  
  34.  
  35. <link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABILAAASCwAAAAAAAAAAAAAAAMgAAAC5OwAA0ucAAG//AAAA/wAAAP8AAC//AADJ/wYGof8SEkv/AQHK/wAAy/8AAKb/AAC1/wAAybUAAKQTAAB4BgAAyKQAANb/AABr/wAAAP8AAAD/AAAs/wAAyP8LC37/DQ1z/wAA0P8AAFv/AAAJ/wAAHf8AAJv4AADFagAAsi0AAM/jAADW/wAAvP8AAFf/AABA/wAAmP8AANP/Dg5j/wYGo/8AAL//AAAc/wAAAP8AAAD/AABo/wAAzMIAALxWAADS+AAA1P8AANX/AADT/wAA0P8AANf/AgLE/w8PYP8CAsX/AADN/wAATv8AAAP/AAAT/wAA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AAAA/AAAAPwAAAD8AAA==" rel="icon" type="image/x-icon">
  36. <meta name="description" content="A subdomain of Dreamwidth *still* haunted by someone named Marah Marie" />
  37. <meta name="google-site-verification" content="7tpATdbXYm4az3zU1r46yP1ysmdCZzWp4FSKV1VxL7E" />
  38. """;
  39.     $this->print_meta_tags();
  40.         $this->print_head();
  41.     $this->print_stylesheets();
  42.     $this->print_head_title();
  43.     """</head>""";
  44.     $this->print_wrapper_start();
  45.     $this->print_control_strip();
  46.     """
  47.    <div id="canvas">
  48.        <div class="inner">
  49.            <div id="header">
  50.                <div class="inner">
  51.                    """;
  52.                     $this->print_module_section("header");
  53.                     $this->print_header();
  54.     """
  55.                </div><!-- end header>inner -->
  56.            </div><!-- end header -->
  57.            <div id="content">
  58.                <div class="inner">
  59.    """;
  60.                 if ($*layout_type == "one-column-split") {
  61.     """
  62.                    <div id="secondary"><div class="inner">
  63.    """;
  64.                         $this->print_module_section("one");
  65.     """
  66.                    </div></div><!--  end secondary and secondary>inner -->
  67.    """;
  68.                 }
  69.     """
  70.                    <div id="primary"><div class="inner">
  71.                        """;
  72.                         $this->print_body();
  73.     """
  74.                    </div></div><!-- end primary and primary>inner -->
  75.    """;
  76.                 if ($*layout_type != "one-column-split") {
  77.     """
  78.                    <div id="secondary"><div class="inner">
  79.    """;
  80.                         $this->print_module_section("one");
  81.     """
  82.                    </div></div><!--  end secondary and secondary>inner -->
  83.    """;
  84.                 }
  85.     """
  86.                    <div id="invisible-separator" style="float: left; width: 1px;"></div> <!-- this is a hack for IE7 + two-columns-right -->
  87.                    <div id="tertiary"><div class="inner">
  88.                        """;
  89.                         $this->print_module_section("two");
  90.     """
  91.                    </div></div><!-- end tertiary and tertiary>inner -->
  92.                    <div id="content-footer"></div>
  93.                </div><!-- end content>inner -->
  94.            </div> <!-- end content -->
  95.        </div> <!-- end canvas>inner -->
  96.    """;
  97.  
  98.     """
  99.    <div id="footer">
  100.        <div class="inner">
  101.            """;
  102.             print safe """
  103.                <div class="page-top"><a href="#">$*text_page_top</a></div>
  104.         </div><!-- end footer>inner -->
  105.     </div><!-- end footer -->
  106.  
  107.     </div> <!-- end canvas -->
  108.     """;
  109.    $this->print_wrapper_end();
  110.    """</html>""";
  111. }
  112.  
  113. function Page::print_global_title() {
  114.        if ($.global_title) {
  115.                """<h1 id="title">
  116. <span>
  117. <a href="https://marahmarie.dreamwidth.org/" title="Back to the home page of MM">MM</a></span>
  118. </h1>""";
  119. }
  120.  
  121. }
  122. function FriendsPage::print_global_title() {
  123.        var string title = $.friends_title ? $.friends_title : $.global_title;
  124.        """<h1 id="title">
  125. <span><a href="https://marahmarie.dreamwidth.org/" title="Back to the home page of MM">MM</a></span></h1>""";
  126. }
  127.  
  128. function Page::print_head_title()
  129.  
  130. {
  131.    if ($this isa FriendsPage) {
  132.        print """<title>""" + $this->view_title() + $*text_default_separator + $.global_title + """</title>\n""";
  133.    }
  134.    elseif ($this isa RecentPage) {
  135.        print """<title>""" + $.global_title + $*text_default_separator + $.global_subtitle + """</title>\n""";
  136.    }
  137.    else {
  138.        print """<title>""" + $this->view_title() + $*text_default_separator + $.global_title + """</title>\n""";
  139.    }
  140. }
  141.  
  142. # code by ninetydegrees/foxfirefey
  143. function print_module_navlinks() {
  144. var Page p = get_page();
  145.  
  146. var string[] navlinks_order = [];
  147. var string{} navlinks_urls = {};
  148. var string{} navlinks_text = {};
  149.  
  150. $navlinks_order =    [        
  151.       "main",      
  152.       "journals",
  153.       "tags",
  154.       "communities",
  155.       "networkpc",
  156.       "archive",      
  157.       "latest",
  158.       "userinfo"
  159.  
  160.   ];
  161.  
  162. $navlinks_urls =
  163.   {   "main" => "https://marahmarie.dreamwidth.org/",      
  164.       "journals" => "https://marahmarie.dreamwidth.org/read?show=P",
  165.       "tags" => "https://marahmarie.dreamwidth.org/tag",      
  166.       "communities" => "https://marahmarie.dreamwidth.org/read?show=C",
  167.       "networkpc" => "https://marahmarie.dreamwidth.org/network?show=PC",  
  168.       "archive" => "https://marahmarie.dreamwidth.org/calendar",
  169.       "latest" => "https://www.dreamwidth.org/latest",
  170.       "userinfo" => "https://marahmarie.dreamwidth.org/profile"
  171.      
  172.   };
  173.  
  174. $navlinks_text =
  175.   {   "main" => " ☼  Hello",
  176.       "journals" => "World!",
  177.       "tags" => "If/Then",
  178.       "communities" => "Else",
  179.       "networkpc" => "Foo",
  180.       "archive" => "Cached",
  181.       "latest" => "LTFeed",
  182.       "userinfo" => "'bout MM"
  183.      
  184.   };
  185.  
  186.   open_module("navlinks", "", "");
  187.   var string[] links = [];
  188.  
  189.   foreach var string k ($navlinks_order) {
  190.       if ($navlinks_urls{$k} != "") {
  191.           var string css = """ class="$k" """;
  192.           if ($p.view == $k) { $css = """ class="current $k" """; }
  193.           $links[size $links] = """<a href="$navlinks_urls{$k}"$css>$navlinks_text{$k}</a>""";
  194.       }
  195.   }    
  196.  
  197.   print_module_list($links);
  198.   close_module();
  199. }
  200.  
  201. function print_module_customtext() {
  202.   var Page p = get_page();  
  203. open_module("customtext", $*text_module_customtext, $*text_module_customtext_url);
  204.   """<div class="module-typelist2 module">
  205. <h2 class="module-header">Style Info & Loose Links</h2>
  206. <div class="module-content">
  207. <ul class="module-list">
  208. <li class="module-list-item"><a href="https://pastebin.com/gdx4F4hh" title="Link updated 9/25/2020">Custom Theme Layer</a> (some s2 via <a href="http://ninetydegrees.dreamwidth.org">90°</a>)</li>
  209. <li class="module-list-item"><a href="https://style-tester.dreamwidth.org/" title="Just another CSS playground">Style Tester</a></li>
  210. <li class="module-list-item"><a href="https://s.dreamwidth.org/stc/??css/components/quick-reply.css,controlstrip.css,controlstrip-dark.css,jquery/jquery.ui.button.css,jquery/jquery.ui.dialog.css,jquery/jquery.ui.theme.smoothness.css?v=1448242651" title="Controlstrip, hovermenus">DW Components</a></li>
  211. <li class="module-list-item"><a href="https://pastebin.com/u/emnem" title="My DW s2, HTML &amp; CSS pastes">DW Code Pastes</a></li>
  212. <li class="module-list-item"><a href="https://www.freeformatter.com/html-escape.html" title="Converts raw code into raw-er code">Escape LJ/DW HTML</a></li>
  213. <li class="module-list-item"><a href="https://outline.com/" title="Read that article">Outline</a></li>
  214.  </ul></div></div>
  215.     """;
  216. close_module();
  217. }
Add Comment
Please, Sign In to add comment