Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- layerinfo "source_viewable" = 1;
- layerinfo "type" = "theme";
- layerinfo "name" = "Shades of Brown";
- set font_family = "Verdana, sans-serif";
- set background_repeat = "no-repeat";
- set text_meta_mood = "Mood";
- set nav_calendar_text = "Calendar";
- set nav_entries_text = "Entries";
- set page_background_image = "none";
- set third_position = "navigation_order";
- set page_friends_items = 20;
- set comment_divider = " // ";
- set links_text = "Links";
- # set custom_control_strip_colors = "on_no_gradient";
- set text_meta_music = "Music";
- set nav_info_text = "Profile";
- set nav_friends_text = "Reading";
- set show_summary = false;
- set tags_text = "Tags";
- set second_position = "calendar_order";
- set first_position = "profile_order";
- set show_entry_userpic = true;
- set text_meta_location = "Location";
- set free_text_text = "Custom Subscription Filters";
- set page_recent_items = 50;
- set profile_text = "Profile";
- set comp_navbar = false;
- set page_summary_text = "Page summary";
- set lineheight = 17;
- set background_scrolling = "fixed";
- set calendar_text = "Calendar";
- set show_tags = false;
- set main_bgcolor = "#5a513c";
- set entry_bgcolor = "#ada386";
- set entry_fgcolor = "#3f382a";
- set entry_link = "#695522";
- set entry_link_visited = "#695522";
- set comp_bgcolor = "#988b67";
- set comp_fgcolor = "#383325";
- set header_bgcolor = "#6e6449";
- set header_fgcolor = "#bcb59f";
- set header_link = "#dddbd6";
- set comments_bgcolor = "#948b6f";
- set comments_screened_bgcolor = "#a29f97";
- set calendar_inactive = "#988b67";
- set calendar_active = "#817452";
- #######################################
- # CUSTOM CSS MODIFICATION #
- # kunzite1, xtomxfallsx #
- # component-help/1002140 #
- # overrides Page::print_custom_head() #
- # required by #
- # SHRINKING AND CENTERING/SIDING #
- #######################################
- function Page::print_custom_head() {
- """
- <style media="screen" type="text/css">
- """;
- if(viewer_sees_control_strip()) {
- """
- html body {
- padding-top: 46px !important;
- }
- """;
- }
- """
- .header-item {
- top: 0px;
- }
- .header {
- background-image: url() !important; /* remove the gradient background */
- height: 20px !important; /* adjust the height of the component */
- }
- </style> """;
- }
- # Step Two:
- ####################################
- # SHRINKING AND CENTERING/SIDING #
- # (v3.0) #
- # WITH ROUNDED OR SQUARE NAVBAR #
- # AND OPTIONAL HEADER #
- # kunzite1, xtomxfallsx #
- # component-help/1002140 #
- # overrides page_layout(Page p) #
- # requires print_custom_head() #
- ####################################
- function page_layout(Page p) {
- # Set this to the width that you want both the navbar (if it exists) and the whole journal to be
- # may be percentage (80%) or number of pixels (800px).
- var string k1Swidth = ""; # width of component layout (including entries and components)
- var string k1Sheader_url = "https://judas-river.dreamwidth.org/file/1237.png"; # optional header image url
- var string k1Sheader_alt = "hills-midnight"; # optional header image alt text
- var string k1Sheader_align = "center"; # header alignment
- var string k1Salign = "center"; # layout alignment
- var bool k1Sroundnavbar = true; # set to false for square navbar corners
- # Calculate the corner_color for the new rounded navigation bar
- var Color k1Sheader = $*header_bgcolor;
- var Color k1SheaderMinus5 = $k1Sheader->darker(50);
- var Color k1SheaderPlus3 = $k1Sheader->lighter(30);
- var string k1Scorner_color = "/p0"+$k1SheaderPlus3->substr(1,6)+"1"+$k1SheaderMinus5->substr(1,6)+"2"+$k1Sheader->substr(1,6);
- var string k1Smargin = $k1Salign == "center" ? " margin: auto;" : "";
- # Create the corners of the navbar, both square and rounded
- 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;">""";
- 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>""";
- 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%">""";
- 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>""";
- # set the width of the side td to zero if the navbar is square
- var int k1Sside_spacing = ($k1Sroundnavbar == true) ? 3 : 0;
- # Start the html document and print the head section which controls the page title, stylesheet information,
- # server supplied head content, and custom header informtion from the print_custom_head function.
- var string title = $p->title();
- """
- <html>
- <head>
- <link rel="stylesheet" href="$p.stylesheet_url" type="text/css"/>
- """;
- $p->print_head();
- """
- <title>$title</title>
- </head>
- """;
- # Start the body section of the html document which controls the visible parts of the page.
- """<body style="text-align:center;">""";
- # print the navigation strip if the remote viewer sees it
- $p->print_control_strip();
- if($k1Sheader_url != "") {
- """<div align="$k1Sheader_align"><img src="$k1Sheader_url" alt="$k1Sheader_alt" title="$k1Sheader_alt" style="max-width:100%" /></div>""";
- }
- if($k1Swidth != "") {
- """<table align="$k1Salign" border="0" cellpadding="0" cellspacing="0" style="border: 0px;$k1Smargin padding: 0px; width:$k1Swidth;"><tr><td>""";
- }
- # Print the navigation bar if it is needed. This can be incorporated into any other tutorials which override
- # the page_layout() function, and should be placed immediately after the <body> tag above.
- if (not $*comp_navbar or $*comp_state=="none") {
- if ($k1Sroundnavbar == true) {
- print $ro_nav_bar_open;
- } else {
- print $sq_nav_bar_open;
- }
- """ <div class="header">""";
- var string[] views_order = ["Profile", "Entries", "Tags", "Icons", "Calendar", "Update", "Reading"]; # view order
- # "Profile" = userinfo link
- # "Entries" = recent view
- # "Tags" = tags link
- # "Icons" = icons link
- # "Calendar" = calendar view
- # "Update" = update link
- # "Reading" = reading view
- var string{} view_text = { # build text hash
- "Profile" => $*nav_info_text,
- "Entries" => $*nav_entries_text,
- "Tags" => "Tags",
- "Icons" => "Icons",
- "Calendar" => $*nav_calendar_text,
- "Update" => "Update",
- "Reading" => $p.journal_type != "C" ? $*nav_friends_text : $*text_view_friends_comm,
- };
- var string base_url = $p.journal->base_url(); # get base url
- var string{} view_url = { # build url hash
- "Profile" => "$base_url/profile",
- "Entries" => "$base_url/",
- "Tags" => $p.journal->base_url() + "/tag/",
- "Icons" => "$base_url/icons?sortorder=keyword",
- "Calendar" => "$base_url/calendar/",
- "Update" => "$*SITEROOT/update.bml",
- "Reading" => $p.journal->base_url() + "/read/",
- };
- foreach var string v ($views_order) {
- print """<span class="header-item"><a href="$view_url{$v}" class="headerLinks">$view_text{$v}</a></span>""";
- }
- # to add your own links you can use these as a template
- # print """<span class="header-item"><a href="$*SITEROOT/tools/memories.bml?user=$p.journal.username" class="headerLinks">memories</a></span>""";
- # print """<span class="header-item"><a href="http://www.yahoo.com/" class="headerLinks">yahoo!</a></span>""";
- if ($p.journal.website_url != "") {
- print """<span class="header-item"><a href="$p.journal.website_url" class="headerLinks">$p.journal.website_name</a></span>""";
- }
- $p->lay_viewspec_nav(); # prints previous / next links including arrow images
- """
- </div>
- """;
- if ($k1Sroundnavbar == true) {
- print $ro_nav_bar_close;
- } else {
- print $sq_nav_bar_close;
- }
- }
- # Print a spacer at the top of the page above the components and main area.
- """<div><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></div>""";
- # Start the table which lays out the components and main area in side-by-side layout
- """
- <table cellspacing="0" cellpadding="0" valign="top">
- <tr valign="top" width="100%">
- <td width="$k1Sside_spacing">
- <img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="$k1Sside_spacing" height="1" alt="" border="0" />
- </td>
- """;
- # If the components are supposed to be on the left side of the page, then print them, followed by a column
- # with a spacer which is to seperate the components and the main area.
- if ($*comp_state == "left") {
- print_my_components($p);
- """
- <td width="3">
- <img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="3" height="1" alt="" border="0" />
- </td>
- """;
- }
- # Print the main area of the page.
- print_my_entries($p, $title);
- # If the components are supposed to be on the right side of the page, then first print a column with a spacer
- # and then print the components after the spacer.
- if ($*comp_state == "right") {
- """
- <td width="3">
- <img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="3" height="1" alt="" border="0" />
- </td>
- """;
- print_my_components($p);
- }
- # Finish off the table for the body
- """
- <td width="$k1Sside_spacing">
- <img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="$k1Sside_spacing" height="1" alt="" border="0" />
- </td>
- </tr>
- </table>
- """;
- if($k1Swidth != "") {
- """</td></tr></table>""";
- }
- # End the body section and end the html document
- """
- </body>
- </html>
- """;
- } # End code
- function TagsPage::view_title() : string {
- return "Tags Page";
- }
- function TagsPage::print_body() {
- var string welcome_title = "Visible Tags";
- print_entry_header("<b>$welcome_title<b>");
- """
- <table cellspacing="0" cellpadding="0" border="0" width="100%">
- <tr>
- <td width="1" class="dkLine"><img src="https://l-stat.livejournal.net/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
- <td class="entryHolderBg" width="100%">
- """;
- print_content_top();
- var string content = "";
- var string[] security_order = ["public"];
- var int security_index = 1;
- if(viewer_is_owner()) {
- $security_order[$security_index++] = "private";
- $security_order[$security_index++] = "group";
- }
- if(viewer_logged_in()) {
- $security_order[$security_index++] = "friends";
- }
- var int colspan = viewer_is_owner() ? 3 : 2;
- var string{} security_labels = {
- "public" => "",
- "private" => """<img src="https://www.dreamwidth.org/img/silk/entry/private.png" />""",
- "friends" => """<img src="https://www.dreamwidth.org/img/silk/entry/locked.png" />""",
- "group" => """<img src="https://www.dreamwidth.org/img/silk/entry/locked.png" />"""
- };
- var string{} security_headers = {
- "public" => "Public",
- "private" => "Private",
- "access" => "Protected",
- "group" => "Group"
- };
- $content = $content + """<table>\n<tr>\n <th align="center" colspan="2" nowrap="nowrap"> Tag </th>\n""" + (viewer_is_owner() ? """<th align="center" nowrap="nowrap"> Total </th>\n""" : "");
- foreach var string security($security_order) {
- $content = $content + """ <th align="center" nowrap="nowrap"> $security_headers{$security} </th>\n""";
- }
- $content = $content + "</tr>\n";
- foreach var TagDetail td ($.tags) {
- var int security_count = 0;
- var int group_count = $td.use_count;
- var string uses = (viewer_is_owner() ? ("""<td style="font-family: courier; text-align: right;">$td.use_count</td>""") : "");
- foreach var string security($security_order) {
- $security_count = $security != "group" ? $td.security_counts{$security} : $group_count;
- $uses = $uses + """<td style="font-family: courier; text-align: right;">$security_count</td>""";
- $group_count = $group_count - $security_count;
- }
- $content = $content + """<tr><td>$security_labels{$td.visibility}</td><td><a href="$td.url">$td.name</a></td>$uses</tr>\n""";
- }
- $content = $content + "</table>";
- print $content;
- print_content_bottom();
- print_system_box_bottom();
- }
- function print_free_text(Page p) {
- if ($*free_text_text and $*free_text) {
- print_comp_header($*free_text_text);
- """$*free_text""";
- print_comp_footer();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment