Guest User

Untitled

a guest
Dec 20th, 2020
567
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.36 KB | None | 0 0
  1. layerinfo "source_viewable" = 1;
  2. layerinfo "type" = "theme";
  3. layerinfo "name" = "Shades of Brown";
  4.  
  5.  
  6.  
  7.  
  8. set font_family = "Verdana, sans-serif";
  9. set background_repeat = "no-repeat";
  10. set text_meta_mood = "Mood";
  11. set nav_calendar_text = "Calendar";
  12. set nav_entries_text = "Entries";
  13. set page_background_image = "none";
  14. set third_position = "navigation_order";
  15. set page_friends_items = 20;
  16. set comment_divider = " // ";
  17. set links_text = "Links";
  18. # set custom_control_strip_colors = "on_no_gradient";
  19. set text_meta_music = "Music";
  20. set nav_info_text = "Profile";
  21. set nav_friends_text = "Reading";
  22. set show_summary = false;
  23. set tags_text = "Tags";
  24. set second_position = "calendar_order";
  25. set first_position = "profile_order";
  26. set show_entry_userpic = true;
  27. set text_meta_location = "Location";
  28. set free_text_text = "Custom Subscription Filters";
  29. set page_recent_items = 50;
  30. set profile_text = "Profile";
  31. set comp_navbar = false;
  32. set page_summary_text = "Page summary";
  33. set lineheight = 17;
  34. set background_scrolling = "fixed";
  35. set calendar_text = "Calendar";
  36. set show_tags = false;
  37.  
  38.  
  39. set main_bgcolor = "#5a513c";
  40. set entry_bgcolor = "#ada386";
  41. set entry_fgcolor = "#3f382a";
  42. set entry_link = "#695522";
  43. set entry_link_visited = "#695522";
  44. set comp_bgcolor = "#988b67";
  45. set comp_fgcolor = "#383325";
  46. set header_bgcolor = "#6e6449";
  47. set header_fgcolor = "#bcb59f";
  48. set header_link = "#dddbd6";
  49. set comments_bgcolor = "#948b6f";
  50. set comments_screened_bgcolor = "#a29f97";
  51. set calendar_inactive = "#988b67";
  52. set calendar_active = "#817452";
  53.  
  54.  
  55.  
  56.  
  57. #######################################
  58. # CUSTOM CSS MODIFICATION #
  59. # kunzite1, xtomxfallsx #
  60. # component-help/1002140 #
  61. # overrides Page::print_custom_head() #
  62. # required by #
  63. # SHRINKING AND CENTERING/SIDING #
  64. #######################################
  65.  
  66. function Page::print_custom_head() {
  67. """
  68. <style media="screen" type="text/css">
  69. """;
  70. if(viewer_sees_control_strip()) {
  71. """
  72. html body {
  73. padding-top: 46px !important;
  74. }
  75. """;
  76. }
  77. """
  78. .header-item {
  79. top: 0px;
  80. }
  81. .header {
  82. background-image: url() !important; /* remove the gradient background */
  83. height: 20px !important; /* adjust the height of the component */
  84. }
  85. </style> """;
  86. }
  87.  
  88. # Step Two:
  89.  
  90. ####################################
  91. # SHRINKING AND CENTERING/SIDING #
  92. # (v3.0) #
  93. # WITH ROUNDED OR SQUARE NAVBAR #
  94. # AND OPTIONAL HEADER #
  95. # kunzite1, xtomxfallsx #
  96. # component-help/1002140 #
  97. # overrides page_layout(Page p) #
  98. # requires print_custom_head() #
  99. ####################################
  100.  
  101. function page_layout(Page p) {
  102. # Set this to the width that you want both the navbar (if it exists) and the whole journal to be
  103. # may be percentage (80%) or number of pixels (800px).
  104. var string k1Swidth = ""; # width of component layout (including entries and components)
  105. var string k1Sheader_url = "https://judas-river.dreamwidth.org/file/1237.png"; # optional header image url
  106. var string k1Sheader_alt = "hills-midnight"; # optional header image alt text
  107. var string k1Sheader_align = "center"; # header alignment
  108. var string k1Salign = "center"; # layout alignment
  109.  
  110. var bool k1Sroundnavbar = true; # set to false for square navbar corners
  111.  
  112. # Calculate the corner_color for the new rounded navigation bar
  113. var Color k1Sheader = $*header_bgcolor;
  114. var Color k1SheaderMinus5 = $k1Sheader->darker(50);
  115. var Color k1SheaderPlus3 = $k1Sheader->lighter(30);
  116. var string k1Scorner_color = "/p0"+$k1SheaderPlus3->substr(1,6)+"1"+$k1SheaderMinus5->substr(1,6)+"2"+$k1Sheader->substr(1,6);
  117. var string k1Smargin = $k1Salign == "center" ? " margin: auto;" : "";
  118.  
  119. # Create the corners of the navbar, both square and rounded
  120.  
  121. var string sq_nav_bar_open = """<table cellspacing="0" cellpadding="0" border="0"><tr><td class="dkLine" colspan="7"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr><tr><td class="dkLine" colspan="1"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="ltLine" colspan="5"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="dkLine" colspan="1"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr><tr><td class="dkLine" colspan="1"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="ltLine" colspan="1"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="medLine" colspan="4"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="dkLine" colspan="1"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr><tr><td class="dkLine" rowspan="3" colspan="1"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="ltLine" rowspan="3" colspan="1"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="medLine" rowspan="3" colspan="1"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="tabBg" rowspan="1" colspan="2"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="medLine" rowspan="3" colspan="1"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="dkLine" rowspan="3" colspan="1"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr><tr><td class="tabBg" colspan="2"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr><tr><td class="tabBg" colspan="2"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td></tr><tr><td class="dkLine" width="1" rowspan="3"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="ltLine" width="1" rowspan="2"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="medLine" width="3"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td><td class="tabBg" width="100%"><div class="compFont" style="position:relative; top:-3px; left:2px;">""";
  122. var string sq_nav_bar_close = """</div></td><td class="tabBg" width="3" ><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td><td class="medLine" width="1" rowspan="2"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="dkLine" width="1" rowspan="3"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr><tr><td class="medLine" colspan="4"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr><tr><td class="dkLine" colspan="5"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr><tr><td><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td></tr></table>""";
  123. var string ro_nav_bar_open = """<table width="100%" cellspacing="0" cellpadding="0" valign="top"><tr valign="top" width="100%"><td width="3"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="3" height="1" alt="" border="0"></td><td><table cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td valign="top" rowspan="3" colspan="3" width="5"><img src="https://l-stat.livejournal.net/palimg/component/curve-top-left.gif/p09385611332e2126e6449" width="5" height="5" alt="" border="0" /></td><td class="dkLine"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td valign="top" rowspan="3" colspan="3" width="5"><img src="https://l-stat.livejournal.net/palimg/component/curve-top-right.gif/p09385611332e2126e6449" width="5" height="5" alt="" border="0" /></td></tr><tr><td class="ltLine"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr><tr><td class="tabBg"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td></tr><tr><td class="dkLine" width="1"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="ltLine" width="1"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="tabBg" width="3"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td><td class="tabBg" width="100%">""";
  124. var string ro_nav_bar_close = """</td><td class="tabBg" width="3"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td><td class="ltLine" width="1"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="dkLine" width="1"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr><tr><td valign="top" rowspan="3" colspan="3" width="5"><img src="https://l-stat.livejournal.net/palimg/component/curve-bottom-left.gif/p09385611332e2126e6449" width="5" height="5" alt="" border="0" /></td><td class="tabBg"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td><td valign="top" rowspan="3" colspan="3" width="5"><img src="https://l-stat.livejournal.net/palimg/component/curve-bottom-right.gif/p09385611332e2126e6449" width="5" height="5" alt="" border="0" /></td></tr><tr><td class="ltLine"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr><tr><td class="dkLine"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr></table></td><td width="3"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="3" height="1" alt="" border="0"></td></tr></table>""";
  125.  
  126. # set the width of the side td to zero if the navbar is square
  127.  
  128. var int k1Sside_spacing = ($k1Sroundnavbar == true) ? 3 : 0;
  129.  
  130. # Start the html document and print the head section which controls the page title, stylesheet information,
  131. # server supplied head content, and custom header informtion from the print_custom_head function.
  132. var string title = $p->title();
  133. """
  134. <html>
  135. <head>
  136. <link rel="stylesheet" href="$p.stylesheet_url" type="text/css"/>
  137. """;
  138. $p->print_head();
  139. """
  140. <title>$title</title>
  141. </head>
  142. """;
  143.  
  144. # Start the body section of the html document which controls the visible parts of the page.
  145. """<body style="text-align:center;">""";
  146.  
  147. # print the navigation strip if the remote viewer sees it
  148. $p->print_control_strip();
  149.  
  150. if($k1Sheader_url != "") {
  151. """<div align="$k1Sheader_align"><img src="$k1Sheader_url" alt="$k1Sheader_alt" title="$k1Sheader_alt" style="max-width:100%" /></div>""";
  152. }
  153.  
  154. if($k1Swidth != "") {
  155. """<table align="$k1Salign" border="0" cellpadding="0" cellspacing="0" style="border: 0px;$k1Smargin padding: 0px; width:$k1Swidth;"><tr><td>""";
  156. }
  157.  
  158. # Print the navigation bar if it is needed. This can be incorporated into any other tutorials which override
  159. # the page_layout() function, and should be placed immediately after the <body> tag above.
  160.  
  161. if (not $*comp_navbar or $*comp_state=="none") {
  162. if ($k1Sroundnavbar == true) {
  163. print $ro_nav_bar_open;
  164. } else {
  165. print $sq_nav_bar_open;
  166. }
  167. """ <div class="header">""";
  168. var string[] views_order = ["Profile", "Entries", "Tags", "Icons", "Calendar", "Update", "Reading"]; # view order
  169. # "Profile" = userinfo link
  170. # "Entries" = recent view
  171. # "Tags" = tags link
  172. # "Icons" = icons link
  173. # "Calendar" = calendar view
  174. # "Update" = update link
  175. # "Reading" = reading view
  176. var string{} view_text = { # build text hash
  177. "Profile" => $*nav_info_text,
  178. "Entries" => $*nav_entries_text,
  179. "Tags" => "Tags",
  180. "Icons" => "Icons",
  181. "Calendar" => $*nav_calendar_text,
  182. "Update" => "Update",
  183. "Reading" => $p.journal_type != "C" ? $*nav_friends_text : $*text_view_friends_comm,
  184. };
  185. var string base_url = $p.journal->base_url(); # get base url
  186. var string{} view_url = { # build url hash
  187. "Profile" => "$base_url/profile",
  188. "Entries" => "$base_url/",
  189. "Tags" => $p.journal->base_url() + "/tag/",
  190. "Icons" => "$base_url/icons?sortorder=keyword",
  191. "Calendar" => "$base_url/calendar/",
  192. "Update" => "$*SITEROOT/update.bml",
  193. "Reading" => $p.journal->base_url() + "/read/",
  194. };
  195. foreach var string v ($views_order) {
  196. print """<span class="header-item"><a href="$view_url{$v}" class="headerLinks">$view_text{$v}</a></span>""";
  197. }
  198.  
  199. # to add your own links you can use these as a template
  200.  
  201. # print """<span class="header-item"><a href="$*SITEROOT/tools/memories.bml?user=$p.journal.username" class="headerLinks">memories</a></span>""";
  202. # print """<span class="header-item"><a href="http://www.yahoo.com/" class="headerLinks">yahoo!</a></span>""";
  203.  
  204. if ($p.journal.website_url != "") {
  205. print """<span class="header-item"><a href="$p.journal.website_url" class="headerLinks">$p.journal.website_name</a></span>""";
  206. }
  207. $p->lay_viewspec_nav(); # prints previous / next links including arrow images
  208.  
  209. """
  210. </div>
  211. """;
  212. if ($k1Sroundnavbar == true) {
  213. print $ro_nav_bar_close;
  214. } else {
  215. print $sq_nav_bar_close;
  216. }
  217. }
  218.  
  219. # Print a spacer at the top of the page above the components and main area.
  220. """<div><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></div>""";
  221.  
  222. # Start the table which lays out the components and main area in side-by-side layout
  223. """
  224. <table cellspacing="0" cellpadding="0" valign="top">
  225. <tr valign="top" width="100%">
  226. <td width="$k1Sside_spacing">
  227. <img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="$k1Sside_spacing" height="1" alt="" border="0" />
  228. </td>
  229. """;
  230.  
  231. # If the components are supposed to be on the left side of the page, then print them, followed by a column
  232. # with a spacer which is to seperate the components and the main area.
  233. if ($*comp_state == "left") {
  234. print_my_components($p);
  235. """
  236. <td width="3">
  237. <img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="3" height="1" alt="" border="0" />
  238. </td>
  239. """;
  240. }
  241.  
  242. # Print the main area of the page.
  243. print_my_entries($p, $title);
  244.  
  245. # If the components are supposed to be on the right side of the page, then first print a column with a spacer
  246. # and then print the components after the spacer.
  247. if ($*comp_state == "right") {
  248. """
  249. <td width="3">
  250. <img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="3" height="1" alt="" border="0" />
  251. </td>
  252. """;
  253. print_my_components($p);
  254. }
  255.  
  256. # Finish off the table for the body
  257. """
  258. <td width="$k1Sside_spacing">
  259. <img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="$k1Sside_spacing" height="1" alt="" border="0" />
  260. </td>
  261. </tr>
  262. </table>
  263. """;
  264.  
  265. if($k1Swidth != "") {
  266. """</td></tr></table>""";
  267. }
  268.  
  269. # End the body section and end the html document
  270.  
  271. """
  272. </body>
  273. </html>
  274. """;
  275. } # End code
  276.  
  277.  
  278.  
  279.  
  280.  
  281. function TagsPage::view_title() : string {
  282. return "Tags Page";
  283. }
  284.  
  285. function TagsPage::print_body() {
  286. var string welcome_title = "Visible Tags";
  287.  
  288. print_entry_header("<b>$welcome_title<b>");
  289. """
  290. <table cellspacing="0" cellpadding="0" border="0" width="100%">
  291. <tr>
  292. <td width="1" class="dkLine"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
  293. <td class="entryHolderBg" width="100%">
  294. """;
  295. print_content_top();
  296.  
  297. var string content = "";
  298. var string[] security_order = ["public"];
  299. var int security_index = 1;
  300. if(viewer_is_owner()) {
  301. $security_order[$security_index++] = "private";
  302. $security_order[$security_index++] = "group";
  303. }
  304. if(viewer_logged_in()) {
  305. $security_order[$security_index++] = "friends";
  306. }
  307. var int colspan = viewer_is_owner() ? 3 : 2;
  308. var string{} security_labels = {
  309. "public" => "",
  310. "private" => """<img src="https://www.dreamwidth.org/img/silk/entry/private.png" />""",
  311. "friends" => """<img src="https://www.dreamwidth.org/img/silk/entry/locked.png" />""",
  312. "group" => """<img src="https://www.dreamwidth.org/img/silk/entry/locked.png" />"""
  313. };
  314. var string{} security_headers = {
  315. "public" => "Public",
  316. "private" => "Private",
  317. "access" => "Protected",
  318. "group" => "Group"
  319. };
  320.  
  321. $content = $content + """<table>\n<tr>\n <th align="center" colspan="2" nowrap="nowrap">&nbsp;Tag&nbsp;</th>\n""" + (viewer_is_owner() ? """<th align="center" nowrap="nowrap">&nbsp;Total&nbsp;</th>\n""" : "");
  322. foreach var string security($security_order) {
  323. $content = $content + """ <th align="center" nowrap="nowrap">&nbsp;$security_headers{$security}&nbsp;</th>\n""";
  324. }
  325. $content = $content + "</tr>\n";
  326. foreach var TagDetail td ($.tags) {
  327. var int security_count = 0;
  328. var int group_count = $td.use_count;
  329. var string uses = (viewer_is_owner() ? ("""<td style="font-family: courier; text-align: right;">$td.use_count</td>""") : "");
  330. foreach var string security($security_order) {
  331. $security_count = $security != "group" ? $td.security_counts{$security} : $group_count;
  332. $uses = $uses + """<td style="font-family: courier; text-align: right;">$security_count</td>""";
  333. $group_count = $group_count - $security_count;
  334. }
  335. $content = $content + """<tr><td>$security_labels{$td.visibility}</td><td><a href="$td.url">$td.name</a></td>$uses</tr>\n""";
  336. }
  337. $content = $content + "</table>";
  338. print $content;
  339.  
  340. print_content_bottom();
  341. print_system_box_bottom();
  342. }
  343.  
  344.  
  345.  
  346.  
  347.  
  348. function print_free_text(Page p) {
  349. if ($*free_text_text and $*free_text) {
  350. print_comp_header($*free_text_text);
  351. """$*free_text""";
  352. print_comp_footer();
  353. }
  354. }
Advertisement
Add Comment
Please, Sign In to add comment