Advertisement
emnem

s2

Jun 1st, 2014
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 8.87 KB | None | 0 0
  1. layerinfo "type" = "theme";
  2. layerinfo "name" = "Custom layout & theme layer for EE";
  3. layerinfo source_viewable = 1;
  4. set text_module_customtext = "Credits & Style Info";
  5.  
  6.  
  7. set text_module_customtext_content = "<a href=\"";
  8. set text_module_customtext_url = "";
  9.  
  10. function Page::print_global_title() {
  11.         if ($.global_title) {
  12.                 """<h1 id="title">
  13. <span><a href="http://mm-writes.dreamwidth.org/" title="Most recent posts on Everything Else">Everything Else</a></span></h1>""";
  14. }
  15.  
  16. }
  17. function FriendsPage::print_global_title() {
  18.         var string title = $.friends_title ? $.friends_title : $.global_title;
  19.         """<h1 id="title">
  20. <span><a href="http://mm-writes.dreamwidth.org/" title="Most recent posts on Everything Else">Everything Else</a></span></h1>""";
  21.  
  22. }
  23.  
  24. function Page::print_head_title()
  25. {
  26.     if ($this isa FriendsPage) {
  27.         print """<title>""" + $this->view_title() + $*text_default_separator + $.global_title + """</title>\n""";
  28.     }
  29.     elseif ($this isa RecentPage) {
  30.         print """<title>""" + $.global_title  + """</title>\n""";
  31.     }
  32.     else {
  33.         print """<title>""" + $this->view_title() + $*text_default_separator + $.global_title + """</title>\n""";
  34.     }
  35. }
  36.  
  37.  
  38. function Page::print()
  39. {
  40. """<!DOCTYPE html>
  41. <head><meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  42. <meta name="viewport" content="initial-scale=1.0" />
  43. <meta name="description" content="Opinion mixed with opining, complaining, fine dining, little explanation, some whining, often cloudy with chance of scattered rhyming" />
  44. <meta name="google-site-verification" content="7tpATdbXYm4az3zU1r46yP1ysmdCZzWp4FSKV1VxL7E" />
  45. <link rel="shortcut icon" href="http://www.iconj.com/ico/3/7/37i07y859q.ico" type="image/x-icon" />
  46. """;
  47.         $this->print_head();
  48.         $this->print_stylesheets();
  49.         $this->print_head_title();    
  50.     println "</head>";
  51.     $this->print_wrapper_start();
  52.     $this->print_control_strip();
  53.     """
  54.            <div id="container">
  55.  
  56.                
  57.              
  58.            <div id="header">
  59.  
  60.  
  61.  
  62.    
  63.    <div id="top"></div>""";
  64.    
  65.     $this->print_global_title();
  66. """
  67.                <a name="top"> </a>
  68.    """;
  69.     $this->print_global_subtitle();"""
  70.              
  71.            </div>
  72.    """;
  73.     $this->print_module_section("one");
  74.     """
  75.            <div id="wrap">
  76.            <div id="content">
  77.    """;
  78.     $this->print_body();
  79.     """
  80.            <div class="top"><a href="#top" title="Jump to top of page">Top of Page</a></div>
  81.             </div>
  82.     """;
  83.    $this->print_module_section("two");
  84.    """
  85.             </div><div style="clear:both;"></div>
  86.         </div>
  87.         <div id="footer">
  88.     """;
  89.    $this->print_module_section("three");
  90.    """
  91.        </div>
  92.     """;
  93.    $this->print_wrapper_end();
  94.    """
  95.     </html>
  96.     """;
  97. }
  98.  
  99.  
  100. # code by ninetydegrees/foxfirefey
  101. function print_module_navlinks() {
  102.  
  103.  var Page p = get_page();
  104.  var string prev_link;
  105.  var string next_link;
  106.  
  107.  if ( $p isa EntryPage ) {
  108.      var EntryPage ep = get_page() as EntryPage;
  109.      var Entry e = $ep.entry;
  110.      var Link prev = $e->get_link("nav_prev");
  111.      $prev_link = """<span class="mod_prev"><a href="$prev.url">$prev.caption</a></span>""";
  112.      var Link next = $e->get_link("nav_next");
  113.      $next_link = """<span class="mod_next"><a href="$next.url">$next.caption</a></span>""";
  114.  } elseif ( $p isa DayPage ) {
  115.      var DayPage dp = get_page() as DayPage;
  116.      $prev_link = """<span class="mod_prev"><a href="$dp.prev_url">$*text_day_prev</a></span>""";
  117.      $next_link = """<span class="mod_next"><a href="$dp.next_url">$*text_day_next</a></span>""";
  118.  } elseif ( $p isa RecentPage ) {
  119.      var RecentPage rp = get_page() as RecentPage;
  120.      if ( $rp.nav.backward_count > 0 ) {
  121.          $prev_link = """<span class="mod_prev"><a href="$rp.nav.backward_url">""" + get_plural_phrase( $rp.nav.backward_count, "text_skiplinks_back" ) + "</a></span>";
  122.      }
  123.      if ( $rp.nav.forward_count > 0 ) {
  124.          $next_link = """<span class="mod_next"><a href="$rp.nav.forward_url">""" + get_plural_phrase( $rp.nav.forward_count, "text_skiplinks_forward" ) + "</a></span>";
  125.      }
  126.  }
  127.  
  128.  var string[] navlinks_order = [];
  129.  var string{} navlinks_urls = {};
  130.  var string{} navlinks_text = {};
  131.  
  132.  $navlinks_order =
  133.    [
  134.        
  135.        "userinfo",
  136.        "tags",
  137.        "archive",      
  138.        "journals",
  139.        "communities",
  140.        "networkpc",
  141.    ];
  142.  
  143. $navlinks_urls =
  144.    {   "userinfo" => "$p.base_url/profile",
  145.        "tags" => "$p.base_url/tag",  
  146.        "archive" => "$p.base_url/calendar",        
  147.        "journals" => "$p.base_url/read?show=P",
  148.        "communities" => "$p.base_url/read?show=C",
  149.        "networkpc" => "$p.base_url/network?show=PC",      
  150.        
  151.    };
  152.  
  153. $navlinks_text =
  154.    {   "userinfo" => "Profile",
  155.        "tags" => "Tags",
  156.        "archive" => "Archive",        
  157.        "journals" => "People",        
  158.        "communities" => "Places",
  159.        "networkpc" => "Plains",        
  160.        
  161.    };
  162.  
  163.  
  164.    open_module("navlinks", "", "");
  165.    var string[] links = [];
  166.    
  167.    if ( $prev_link ) {
  168.        $links[size $links] = $prev_link;
  169.    }    
  170.    
  171.    foreach var string k ($navlinks_order) {
  172.        if ($navlinks_urls{$k} != "") {
  173.            var string css = """ class="$k" """;
  174.            if ($p.view == $k) { $css = """ class="current $k" """; }
  175.            $links[size $links] = """<a href="$navlinks_urls{$k}"$css>$navlinks_text{$k}</a>""";
  176.        }
  177.    }
  178.    
  179.    if ( $next_link ) {
  180.        $links[size $links] = $next_link;
  181.    }
  182.    
  183.    
  184.    print_module_list($links);
  185.    close_module();
  186. }
  187.  
  188. function print_module_customtext() {
  189.    var Page p = get_page();
  190.    
  191.  
  192.  
  193. open_module("customtext2", $*text_module_customtext, $*text_module_customtext_url);
  194.    """<div class="module-typelist2">
  195. <div class="module-content">
  196. <ul class="module-list">
  197. <li class="module-list-item"><a href="http://style_test.dreamwidth.org/" title="And it really is...quite...elegant!">'Elegant Grunge' WP Layout (ported by Alis Dee)</a></li>
  198. <li class="module-list-item"><a href="http://pastebin.com/print.php?i=Xmjjdpu7" title="widescreen version">Current CSS</a> (some images courtesy of <a href="http://ninetydegrees.dreamwidth.org">90°</a>)</li>
  199. <li class="module-list-item"><a href="http://www.dreamwidth.org/customize/advanced/layersource?id=116552&amp;fmt=html" title="I like to play with the s2">Custom Theme Layer</a> (some s2 courtesy of <a href="http://ninetydegrees.dreamwidth.org">90°</a>)</li>
  200. </ul>
  201. </div>
  202. </div>
  203. <div class="module-typelist2">
  204. <h2 class="module-header1">Style Management</h2>
  205. <div class="module-content">
  206. <ul class="module-list">
  207. <li class="module-list-item"><a href="http://style-tester.dreamwidth.org/" title="Just another CSS playground">Style Tester</a></li>
  208. <li class="module-list-item"><a href="http://www.raffoul.ca/users/masterslacker/ljhtmlparser.php" title="Converts raw code into raw-er code">HTML for LJ/DW Mod Tool</a></li>
  209. <li class="module-list-item"><a href="http://wiki.dwscoalition.org/notes/S2_Cookbook:_Introduction" title="Boil, boil, bubble and toil...">DW's S2 Cookbook</a></li>
  210. </ul>
  211. </div>
  212. </div>
  213.  
  214. <div class="module-typelist2">
  215. <h2 class="module-header1">Win Re-installs</h2>
  216. <div class="module-content">
  217. <ul class="module-list">
  218.  
  219. <li class="module-list-item"><a href="http://www.voidtools.com/Everything-1.3.4.686.x86.zip" title="Everything/Void Tools">Everything</a></li>
  220. <li class="module-list-item"><a href="http://download.tuxfamily.org/notepadplus/6.6.8/npp.6.6.8.Installer.exe" title="Notepad++">Notepad++</a></li>
  221. <li class="module-list-item"><a href="http://www.oldapps.com/fast_stone_capture.php?old_fscapture=17?download" title="FSCapture 5.3">FSCapture 5.3</a></li>
  222. <li class="module-list-item"><a href="https://addons.mozilla.org/en-us/firefox/collections/emnem/marahmarie/" title="My Firefox add-ons.">Firefox Add-ons</a></li>
  223. <li class="module-list-item"><a href="https://greasyfork.org/scripts/2242-google-redone/code/Google%20Redone.user.js" title="Google Redone: needs some redoing">Google Redone @Greasyfork.org</a></li>
  224. <li class="module-list-item"><a href="http://mm-writes.dreamwidth.org/187916.html" title="Keep XP Safe/Use Vista Fonts on XP">XP Updates and Font Installs</a></li>
  225. <li style="visibility:hidden"> <!-- GoStats Simple HTML Based Code --><a target="_blank" title="" href="http://gostats.com"><img alt=""
  226. src="http://c3.gostats.com/bin/count/a_369968/t_5/i_1/counter.png" style="border:0" /></a>
  227. <!-- End GoStats Simple HTML Based Code --><div id="statcounter_image" style="display:inline;"><a
  228. title="" href="http://statcounter.com/free-web-stats/" class="statcounter"><img src="http://c.statcounter.com/9919767/0/52bdf58d/1/" alt=""
  229. style="border:0;" /></a></li>
  230. </ul>
  231. </div> </div>
  232.  
  233.     """;
  234.  close_module();
  235.  
  236. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement