Advertisement
Guest User

Untitled

a guest
Jun 11th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.62 KB | None | 0 0
  1. # -*-s2-*-
  2. layerinfo type = "layout";
  3. layerinfo name = "Opal (Libra OSWD)";
  4. layerinfo lang = "en";
  5.  
  6. layerinfo author_name = "Ported by Kevin Phillips";
  7. layerinfo author_email = "xevinx@livejournal.com";
  8. layerinfo des = "Based on the Libra and Pasilda design available from Open Source Web Designs. Originally written by whompy.";
  9. layerinfo redist_uniq = "opal/layout";
  10. layerinfo previews = "opal/opal.jpg";
  11.  
  12.  
  13.  
  14. ################################################################################
  15. #
  16. # Properties
  17. #
  18.  
  19.  
  20. propgroup prez = "Presentation";
  21. propgroup prez {
  22.  
  23. property use font_base;
  24. property use font_fallback;
  25. property string static_font_size { noui = 1; }
  26. property string static_font_measurement { noui = 1; }
  27.  
  28.  
  29. property use use_shared_pic;
  30.  
  31.  
  32. property bool show_entry_userpic {
  33. des = "Always display userpic?";
  34. }
  35.  
  36. property int summary_items {
  37. des = "Summary Items";
  38. note="Maximum number of items in the Page Summary list. Set to 0 to turn off the Page Summary. Set to 100 to show all available items.";
  39. }
  40.  
  41. property bool use_count {
  42. noui=1;
  43. }
  44.  
  45. set static_font_size = "12";
  46. set static_font_measurement = "px";
  47. set summary_items = 100;
  48. set show_entry_userpic = false;
  49. set font_fallback = "sans-serif";
  50. }
  51.  
  52.  
  53. propgroup colors = "Colors";
  54.  
  55. propgroup colors {
  56. property Color color_bg {
  57. des = "Background Color";
  58. }
  59.  
  60. property Color color_bg_font {
  61. des = "Background Font Color";
  62. note = "The color of any font appearing on the background color.";
  63. }
  64.  
  65. property Color color_med {
  66. des = "Page Holder Background";
  67. note = "This is the background of the main body, but within the outer borders.";
  68. }
  69.  
  70. property Color color_med_font {
  71. des = "Page Holder Font Color";
  72. note="The color of the font appearing on the Page Holder Background color.";
  73. }
  74.  
  75. property Color color_fg {
  76. des = "Content Background Color";
  77. note = "This is the background to the main content where the entries and side elements are.";
  78. }
  79.  
  80. property Color color_fg_font {
  81. des = "Content Font Color";
  82. note = "The color of the font that appears on in the main Content area.";
  83. }
  84.  
  85. property Color color_link {
  86. des = "Link Color";
  87. }
  88.  
  89. property Color color_visited {
  90. des = "Visited Link Color";
  91. }
  92.  
  93. set color_bg = "#0b4107";
  94. set color_bg_font = "#ffffff";
  95. set color_med = "#8ba485";
  96. set color_med_font = "#e5fcde";
  97. set color_fg = "#a1cb78";
  98. set color_fg_font = "#01331e";
  99. }
  100.  
  101. propgroup text = "Text";
  102. propgroup text {
  103.  
  104. property string free_text_header {
  105. des = "Free Text Header";
  106. }
  107.  
  108. property string free_text_text {
  109. des = "Free Text Text";
  110. cols = 30;
  111. rows = 10;
  112. }
  113.  
  114. property string links_header {
  115. des = "Links Header";
  116. }
  117.  
  118. property string page_summary_title {
  119. des = "Page Summary Header";
  120. }
  121.  
  122. property use text_view_userinfo;
  123. property use text_view_recent;
  124. property use text_view_friends;
  125. property use text_view_archive;
  126. property string text_forward {
  127. des = "Text to show in a link to skip forward through entries";
  128. }
  129. property string text_back {
  130. des = "Text to show in a link to skip backward through entries";
  131. }
  132. property use text_read_comments;
  133. property use text_read_comments_friends;
  134. property use text_post_comment;
  135. property use text_post_comment_friends;
  136. property use text_comment_reply;
  137. property use text_reply_back;
  138. property use text_nosubject;
  139. property use text_noentries_day;
  140. property use text_meta_music;
  141. property use text_meta_mood;
  142.  
  143. set page_summary_title = "Page Summary";
  144. set links_header = "Links";
  145. set free_text_header = "About this journal";
  146. set free_text_text = "";
  147. set text_back = "Back";
  148. set text_forward = "Forward";
  149. }
  150.  
  151. set tags_aware = true;
  152.  
  153. ################################################################################
  154. #
  155. # Prop Init
  156. #
  157.  
  158. function prop_init () {
  159. if($*color_bg.as_string == "") { $*color_bg = "#000000"; }
  160. if($*color_fg.as_string == "") { $*color_fg = "#000000"; }
  161. if($*color_fg_font.as_string == "") { $*color_fg_font = "#000000"; }
  162. }
  163.  
  164.  
  165. ################################################################################
  166. #
  167. # Stylesheet
  168. #
  169.  
  170. function getAltColor (Color color, string dir, int num) : Color {
  171. var int lt = $color->lightness();
  172. if($dir == "light") {
  173. if($lt > 200) {
  174. $color = $color->darker($num);
  175. } else {
  176. $color = $color->lighter($num);
  177. }
  178. } elseif($dir == "dark") {
  179. if($lt < 55) {
  180. $color = $color->lighter($num);
  181. } else {
  182. $color = $color->darker($num);
  183. }
  184. }
  185. return $color;
  186. }
  187.  
  188. function print_stylesheet () {
  189.  
  190.  
  191. var Color color_bg_lt = getAltColor($*color_bg, "light", 30);
  192. var Color color_fg_dk = getAltColor($*color_fg, "dark", 20);
  193. var Color color_fg_dk_font = getAltColor($*color_fg_font, "dark", 20);
  194. var Color color_divider = getAltColor($color_fg_dk, "dark", 30);
  195. var Color color_fg_dk_dk_font = getAltColor($color_fg_dk, "dark", 50);
  196. var Color color_border = getAltColor($*color_bg, "light", 90);
  197. var string base = ($*font_base != "") ? "$*font_base, " : "";
  198.  
  199. """
  200. body {
  201. font-family: $base $*font_fallback;
  202. background-color: $*color_bg;
  203. margin: 10px;
  204. }
  205.  
  206. .border4 { border: 1px solid $*color_bg; }
  207. .border3 { border: 1px solid $*color_fg; }
  208. .border2 { border: 2px solid $color_border; }
  209.  
  210. """;
  211. if($*color_link.as_string != "") {
  212. """
  213. A { color: $*color_link; }
  214. """;
  215. }
  216.  
  217. if($*color_visited.as_string != "") {
  218. """
  219. A:Visited { color: $*color_visited; }
  220. """;
  221. }
  222. """
  223. #bodycontent { background-color: $*color_med; border: 1px solid $*color_bg; padding: 3px; }
  224.  
  225. #headerinfo {
  226. background-color: $*color_bg;
  227. color: $*color_bg_font;
  228. text-align: right;
  229. font-size: 10px;
  230. padding: 2px;
  231. margin-top: 1px;
  232. }
  233. #header { color: $*color_med_font; }
  234. #header h3 { font-weight: normal; }
  235. #userpic { float: right; }
  236.  
  237. .userpic2 {
  238. float: right;
  239. text-align: right;
  240. margin-top: 2px;
  241. margin-right: 3px;
  242. }
  243.  
  244. #nav {
  245. white-space: nowrap;
  246. margin-bottom: 10px;
  247. font-size: $*static_font_size$*static_font_measurement;
  248. }
  249.  
  250. #nav A {
  251. border: 1px solid $*color_bg;
  252. padding-left: 10px;
  253. padding-right: 10px;
  254. padding-top: 2px;
  255. padding-bottom: 2px;
  256. height: 20px;
  257. text-decoration: none;
  258. color: $*color_bg_font;
  259. background-color: $color_bg_lt;
  260. }
  261.  
  262. #nav A:Hover { background-color: $*color_bg; }
  263.  
  264. #content {
  265. background-color: $*color_fg;
  266. border: 1px solid $color_fg_dk;
  267. padding: 4px;
  268. }
  269.  
  270. .columncontent {
  271. background-color: $color_bg_lt;
  272. border: 1px solid $*color_bg;
  273. padding: 3px;
  274. width: 200px;
  275. font-size: $*static_font_size$*static_font_measurement;
  276. color: $*color_bg_font;
  277. }
  278.  
  279. .columnitem {
  280. background-color: $color_fg_dk;
  281. padding: 3px;
  282. margin-top: 5px;
  283. color: $*color_fg_font;
  284. border-top: 1px solid $color_divider;
  285. border-bottom: 1px solid $color_divider;
  286. overflow: hidden;
  287. }
  288.  
  289. .entries { color: $*color_fg_font; }
  290.  
  291. .entrydivider {
  292. border-top: 1px solid $color_divider;
  293. border-bottom: 1px solid $*color_fg;
  294. }
  295.  
  296. .minicomment {
  297. background-color: $color_fg_dk;
  298. padding: 4px;
  299. color: $*color_fg_font;
  300. border: 1px solid $*color_fg;
  301. font-size: $*static_font_size$*static_font_measurement;
  302. }
  303.  
  304. .minicommentholder { border: 1px solid $color_divider; }
  305.  
  306. .entryinfo {
  307. background-color: $color_fg_dk;
  308. font-size: $*static_font_size$*static_font_measurement;
  309. padding: 4px;
  310. color: $*color_fg_font;
  311. }
  312.  
  313. .postedby {
  314. background-color: $color_fg_dk;
  315. padding: 6px;
  316. font-size: $*static_font_size$*static_font_measurement;
  317. }
  318.  
  319. .entrylinks {
  320. border-bottom: 1px solid $*color_fg;
  321. background-color: $color_fg_dk;
  322. padding-top: 4px;
  323. padding-bottom: 4px;
  324. font-size: $*static_font_size$*static_font_measurement;
  325. }
  326.  
  327. .entrylinks A {
  328. text-decoration: none;
  329. padding-top: 4px;
  330. padding-bottom: 4px;
  331. white-space: nowrap;
  332. color: $*color_fg_font;
  333. border-right: 1px solid $*color_fg;
  334. }
  335.  
  336. .entrylinks A:Hover {
  337. background-color: $*color_fg;
  338. }
  339.  
  340. .messageholder {
  341. border: 1px solid $*color_bg;;
  342. margin-bottom: 5px;
  343. margin-top: 5px;
  344. }
  345.  
  346. .systemmessage {
  347. background-color: $color_bg_lt;
  348. color: $*color_bg_font;
  349. border: 1px solid $color_border;
  350. font-size: $*static_font_size$*static_font_measurement;
  351. }
  352.  
  353. .systemtext {
  354. font-weight: normal;
  355. padding-left: 10px;
  356. padding-right: 10px;
  357. }
  358.  
  359. .systemmessage A {
  360. text-decoration: none;
  361. padding-left: 10px;
  362. padding-right: 10px;
  363. color: $*color_bg_font;
  364. padding-top: 4px;
  365. padding-bottom: 4px;
  366. }
  367.  
  368. .systemmessage A:Hover {
  369. background-color: $*color_bg;
  370. }
  371.  
  372. .systemmessage input, .systemmessage textarea, .systemmessage select {
  373. background-color: $*color_fg;
  374. color: $*color_fg_font;
  375. }
  376.  
  377. .systemmessage TD {
  378. padding: 4px;
  379. font-size: $*static_font_size$*static_font_measurement;
  380. color: $*color_bg_font;
  381. }
  382.  
  383. .entry { margin-bottom: 30px; }
  384. .entrytext { margin: 10px; }
  385. .subject { font-weight: bold; }
  386.  
  387. .meta {
  388. font-size: $*static_font_size$*static_font_measurement;
  389. padding: 4px;
  390. }
  391.  
  392. .meta A {
  393. text-decoration: none;
  394. color: $*color_link;
  395. }
  396.  
  397. .systemmessage A:Hover {
  398. background-color: $*color_bg;
  399. }
  400.  
  401. #sidecolumn TD { color: $*color_bg_font; }
  402.  
  403. #sidecolumn A {
  404. text-decoration: none;
  405. color: $*color_fg_font;
  406. }
  407.  
  408. .sidetd {
  409. width: 200px;
  410. }
  411.  
  412. .backtop {
  413. text-align: right;
  414. }
  415.  
  416. .backtop A {
  417. color: $*color_fg_font;
  418. font-size: $*static_font_size$*static_font_measurement;
  419. text-decoration: none;
  420. padding-bottom: 1px;
  421. }
  422.  
  423. #cal A {
  424. text-decoration: none;
  425. color: $*color_fg_font;
  426. }
  427.  
  428. .calrow {
  429. clear: both;
  430. font-family: Arial, sans-serif;
  431. }
  432.  
  433. .calempty {
  434. width: 24px;
  435. font-size: 11px;
  436. margin: 1px;
  437. float: left;
  438. }
  439.  
  440. .calactitem {
  441. float: left;
  442. margin: 1px;
  443. width: 23px;
  444. font-size: 11px;
  445. text-align: center;
  446. background-color: $color_fg_dk;
  447. border-right: 1px solid $color_bg_lt;
  448. border-bottom: 1px solid $color_bg_lt;
  449. }
  450.  
  451. .calinitem {
  452. float: left;
  453. margin: 1px;
  454. width: 23px;
  455. font-size: 11px;
  456. text-align: center;
  457. border-right: 1px solid $color_fg_dk;
  458. border-bottom: 1px solid $color_fg_dk;
  459. }
  460.  
  461. .friendcolor {
  462. width: 10px;
  463. height: 10px;
  464. border: 2px solid $*color_fg;
  465. }
  466.  
  467. .multiform {
  468. font-weight: bold;
  469. }
  470.  
  471. .ip {
  472. color: $color_fg_dk_dk_font;
  473. }
  474.  
  475. .friendname {
  476. padding: 4px;
  477. text-decoration: none;
  478. border-left: 1px solid $*color_fg;
  479. border-right: 1px solid $*color_fg;
  480. }
  481.  
  482. .bigday {
  483. font-size: 2em;
  484. color: $color_fg_dk;
  485. float: left;
  486. font-weight: bolder;
  487. }
  488.  
  489. .notablemessage {
  490. padding: 4px;
  491. }
  492.  
  493. """;
  494. }
  495.  
  496.  
  497.  
  498. ################################################################################
  499. #
  500. # Global functions
  501. #
  502.  
  503. function generateDots (string un) : string {
  504. var string dots;
  505. if($un != "") {
  506. foreach var string s ($un) {
  507. if($s == "a" or $s == "c" or $s == "e" or $s == "f" or $s == "h" or $s == "k" or $s == "m" or $s == "n" or $s == "p" or $s == "r" or $s == "t" or $s == "v" or $s == "x" or $s == "z") {
  508. $dots = $dots + ":";
  509. } elseif($s == " ") {
  510. $dots = $dots + " ";
  511. } else {
  512. $dots = $dots + ".";
  513. }
  514. }
  515. }
  516. return $dots;
  517. }
  518.  
  519.  
  520.  
  521.  
  522. function print_box (string header, string text) {
  523. """
  524.  
  525. <div class="border4">
  526. <div class="border3">
  527. <div class="border2">
  528. <div class="columncontent">
  529. """;
  530. print safe """<strong>$header</strong>""";
  531. print safe """$text""";
  532.  
  533. """
  534. </div>
  535. </div>
  536. </div>
  537. </div>
  538. <br />
  539. """;
  540.  
  541. }
  542.  
  543. function box_item (string text) : string {
  544. return """<div class="columnitem">$text</div>\n""";
  545. }
  546.  
  547.  
  548. function num_comments_in_thread (Comment[] comments) : int {
  549. var int total = 0;
  550. foreach var Comment c ($comments) {
  551. $total = $total + 1;
  552. if (size $c.replies > 0) {
  553. $total = $total + num_comments_in_thread($c.replies);
  554. }
  555. }
  556. return $total;
  557. }
  558.  
  559.  
  560. ################################################################################
  561. #
  562. # Layout specific functions
  563. #
  564.  
  565. function Page::lay_print_userpic() {
  566. if(defined $.journal.default_pic) {
  567. """
  568. <div id="userpic"><a href="$*SITEROOT/allpics.bml?user=$.journal.username"><img src="$.journal.default_pic.url" width="$.journal.default_pic.width" height="$.journal.default_pic.height" alt="$.journal.name" title="$.journal.name" border="0" /></a></div>
  569. """;
  570. }
  571. }
  572.  
  573. function Page::lay_print_username () {
  574.  
  575. var string dots = generateDots($.global_title);
  576.  
  577. """
  578. <div id="headerinfo">
  579. $.journal.username <br /> $dots
  580. </div>
  581. """;
  582. }
  583.  
  584. function Page::lay_print_header () {
  585. var string title = $this->title();
  586. """
  587. <div id="header">
  588. <h3>$title</h3>
  589. <div id="nav">
  590. """;
  591.  
  592. foreach var string v ($.views_order) {
  593. println "<a href=\""+$.view_url{$v}+"\">"+lang_viewname($v)+"</a>";
  594. }
  595.  
  596. var string website;
  597. if($.journal.website_url != "") {
  598. $website = """<a href="$.journal.website_url">$.journal.website_name</a>""";
  599. }
  600.  
  601. """
  602. $website
  603. </div>
  604. </div>
  605. """;
  606. }
  607.  
  608. function Page::lay_print_freetext () {
  609. if($*free_text_text != "") {
  610. var string text = box_item($*free_text_text);
  611. print_box($*free_text_header, $text);
  612. }
  613. }
  614.  
  615. function Page::print_linklist() {
  616. if (size $.linklist <= 0) {
  617. return;
  618. }
  619.  
  620. var string links;
  621. foreach var UserLink l ($.linklist) {
  622. if ($l.title) {
  623. if ($l.is_heading) {
  624. $links = $links + """<div style="margin-top: 4px;"><strong>$l.title</strong></div>""";
  625. } else {
  626. $links = $links + box_item("""<a href="$l.url">$l.title</a>""");
  627. }
  628. }
  629. }
  630.  
  631. print_box($*links_header, $links);
  632. }
  633.  
  634.  
  635. function Page::lay_print_calendar () {
  636. var YearMonth m = $this->get_latest_month();
  637. var string mon = $m->month_format();
  638. var string text;
  639. $text = """
  640. <table cellspacing="2" cellpadding="2" border="0" width="100%">""";
  641. foreach var YearWeek w ($m.weeks) {
  642. $text = $text + """
  643. <tr>""";
  644. if($w.pre_empty > 0) {
  645. foreach var int empty (1..$w.pre_empty) {
  646. $text = $text + """
  647. <td class="calempty">&nbsp;</td>""";
  648. }
  649. }
  650. foreach var YearDay d ($w.days) {
  651. if($d.num_entries > 0) {
  652. $text = $text + """
  653. <td class="calactitem"><a href="$d.url">$d.day</a></td>""";
  654. } else {
  655. $text = $text + """
  656. <td class="calinitem">$d.day</td>""";
  657. }
  658. }
  659. $text = $text + "</tr>\n";
  660. }
  661. $text = $text + "</table>";
  662. print_box($mon, $text);
  663. }
  664.  
  665.  
  666. function Page::lay_entry_nav (Entry e) : string {
  667.  
  668. var string line;
  669. var string date;
  670. if($e.new_day) {
  671. $date = $e.time->date_format("short");
  672. }
  673. var string time = $e.time->time_format();
  674. var string subject = ($e.subject != "") ? " :: $e.subject" : """ :: <i class="nosubject">$*text_nosubject</i>""";
  675. var string j = ($.view == "friends" and $e.journal.username != $e.poster.username) ? " : $e.journal " : "";
  676. var string item = ($.view == "friends" or $e.journal.username != $e.poster.username) ? $e.poster->as_string() + """$j <a href="#item""" + $e.itemid + """\">""" : """<a href="#item""" + $e.itemid + """\"><strong>$date $time</strong>""";
  677. $line = """<div class="columnitem">$item $subject</a></div>""";
  678.  
  679. return $line;
  680. }
  681.  
  682. function Page::lay_print_summary () {
  683. #blank because there's shouldn't be a box if there's nothing specific about the page.
  684. }
  685.  
  686.  
  687. function RecentPage::lay_print_summary () {
  688. var int count = $*summary_items;
  689. if($count == 0) { return; }
  690.  
  691. var string text;
  692. foreach var Entry e ($.entries) {
  693. if($count > 0) {
  694. $text = $text + $this->lay_entry_nav($e);
  695. }
  696. $count = $count - 1;
  697. }
  698. if($text != "") {
  699. if($count < 0) {
  700. $count = $count * -1;
  701. $text = $text + """<div style="margin-top: 4px;"><strong>+$count more</strong></div>""";
  702. }
  703. print_box($*page_summary_title, $text);
  704. }
  705. }
  706.  
  707. function EntryPage::lay_print_summary () {
  708. var int count = $*summary_items;
  709. if($count == 0) { return; }
  710.  
  711. var string text;
  712. $text = $this->lay_entry_nav($.entry);
  713. $count = $count - 1;
  714.  
  715. foreach var Comment c ($.comments) {
  716. if($count > 0) {
  717. var string subject = ($c.subject != "") ? $c.subject : """<i class="nosubject">$*text_nosubject</i> """;
  718. $text = $text + """<div class="columnitem">$c.poster :: <a href="#$c.anchor">$subject</a>""";
  719. var int num = num_comments_in_thread($c.replies);
  720. if($num > 0) {
  721. $text = $text + " [+" + string($num) + "] ";
  722. }
  723. $text = $text + """</div>""";
  724. }
  725. $count = $count - 1;
  726. }
  727.  
  728. if($text != "") {
  729. if($count < 0) {
  730. $count = $count * -1;
  731. $text = $text + """<div style="margin-top: 4px;"><strong>+$count more</strong></div>""";
  732. }
  733. if($count != ($*summary_items - 1)) {
  734. print_box($*page_summary_title, $text);
  735. }
  736. }
  737. }
  738.  
  739. function YearPage::lay_print_summary () {
  740. var int count = $*summary_items;
  741. if($count == 0) { return; }
  742.  
  743. var string text;
  744. var int num_entries;
  745. foreach var YearMonth m ($.months) {
  746. if($count > 0) {
  747. var string mon = $m->month_format();
  748. if($m.has_entries) {
  749. $num_entries = 0;
  750. foreach var YearWeek w ($m.weeks) {
  751. foreach var YearDay d ($w.days) {
  752. $num_entries = $num_entries + $d.num_entries;
  753. }
  754. }
  755. $text = $text + """<div class="columnitem"><a href="#anchor$m.month">$mon [$num_entries entries]</a></div>""";
  756. }
  757. }
  758. $count = $count - 1;
  759. }
  760. if($text != "") {
  761. if($count < 0) {
  762. $count = $count * -1;
  763. $text = $text + """<div style="margin-top: 4px;"><strong>+$count more</strong></div>""";
  764. }
  765. print_box($*page_summary_title, $text);
  766. }
  767.  
  768. }
  769.  
  770. function MonthPage::lay_print_summary () {
  771. var int count = $*summary_items;
  772. if($count == 0) { return; }
  773.  
  774. var string text;
  775. foreach var MonthDay d ($.days) {
  776. if($count > 0) {
  777. var string day = lang_ordinal($d.day);
  778. if ($d.has_entries) {
  779. $text = $text + """<div class="columnitem"><a href="#anchor$d.day">$day [$d.num_entries entries]</a></div>""";
  780. }
  781. }
  782. }
  783.  
  784. if($text != "") {
  785. if($count < 0) {
  786. $count = $count * -1;
  787. $text = $text + """<div style="margin-top: 4px;"><strong>+$count more</strong></div>""";
  788. }
  789. print_box($*page_summary_title, $text);
  790. }
  791. }
  792.  
  793. function DayPage::lay_print_summary () {
  794. var int count = $*summary_items;
  795. if($count == 0) { return; }
  796.  
  797. var string text;
  798. foreach var Entry e ($.entries) {
  799. $text = $text + $this->lay_entry_nav($e);
  800. }
  801.  
  802. if($text != "") {
  803. if($count < 0) {
  804. $count = $count * -1;
  805. $text = $text + """<div style="margin-top: 4px;"><strong>+$count more</strong></div>""";
  806. }
  807. print_box($*page_summary_title, $text);
  808. }
  809. }
  810.  
  811. function Page::lay_print_subnav () {
  812. #
  813. }
  814.  
  815. function RecentPage::lay_print_subnav () {
  816. var string back;
  817. if($.nav.backward_url != "") {
  818. $back = """<a href="$.nav.backward_url">$*text_back</a>""";
  819. } else {
  820. $back = "&nbsp;";
  821. }
  822. var string forward;
  823. if($.nav.forward_url != "") {
  824. $forward = """<a href="$.nav.forward_url">$*text_forward</a>""";
  825. } else {
  826. $forward = "&nbsp;";
  827. }
  828.  
  829. var int start = $.nav.skip;
  830. var int end = $.nav.skip + size $.entries;
  831. var string text = "Viewing $start - $end";
  832. """
  833. <div class="messageholder"><div class="systemmessage">
  834. <table cellspacing="0" cellpadding="0" border="0" width="100%">
  835. <tr>
  836. <td width="15%">$back</td>
  837. <td width="70%" align="center">$text</td>
  838. <td width="15%" align="right">$forward</td>
  839. </tr>
  840. </table>
  841. </div></div>
  842. """;
  843. }
  844.  
  845. function DayPage::lay_print_subnav () {
  846. var string back;
  847. if($.prev_url != "") {
  848. $back = """<a href="$.prev_url">$*text_back</a>""";
  849. } else {
  850. $back = "&nbsp;";
  851. }
  852. var string forward;
  853. if($.next_url != "") {
  854. $forward = """<a href="$.next_url">$*text_forward</a>""";
  855. } else {
  856. $forward = "&nbsp;";
  857. }
  858.  
  859. var string text = $.date->date_format("long");
  860.  
  861. """
  862. <div class="messageholder"><div class="systemmessage">
  863. <table cellspacing="0" cellpadding="0" border="0" width="100%">
  864. <tr>
  865. <td width="15%">$back</td>
  866. <td width="70%" align="center">$text</td>
  867. <td width="15%" align="right">$forward</td>
  868. </tr>
  869. </table>
  870. </div></div>
  871. """;
  872.  
  873. }
  874.  
  875.  
  876. function Page::lay_print_sidebar () {
  877. $this->lay_print_summary();
  878. $this->print_linklist();
  879. $this->lay_print_freetext();
  880. $this->lay_print_calendar();
  881. }
  882.  
  883.  
  884. function Page::lay_make_username(Entry e) {
  885. """
  886. <div class="entryinfo">
  887. $e.poster
  888. </div>
  889. <div class="entrydivider"></div>
  890. """;
  891. }
  892.  
  893. function FriendsPage::lay_make_username (Entry e) {
  894. var Friend f = $.friends{$e.journal.username};
  895. var string url = $e.poster->base_url();
  896. """
  897. <div class="entryinfo">
  898. <a href="$url/" class="friendname" style="color: $f.fgcolor; background-color: $f.bgcolor;">$e.poster.username</a>
  899. """;
  900. if($e.poster.username != $e.journal.username) {
  901. """ $e.journal""";
  902. }
  903. """
  904. </div>
  905. <div class="entrydivider"></div>
  906. """;
  907. }
  908.  
  909. function Page::print_entry (Entry e) {
  910.  
  911. print """<a name="item""" + $e.itemid + """\"></a>""";
  912. var string time = $e.time->time_format();
  913. var string date = $e.time->date_format();
  914. var string security;
  915. if ($e.security != "") {
  916. $security = """<img src="$e.security_icon.url" align="right" """+
  917. """width="$e.security_icon.width" height="$e.security_icon.height" """+
  918. """alt="[$e.security]" />""";
  919. }
  920.  
  921. var UserLite name;
  922. var string pname;
  923.  
  924. var bool show_name = ($.view == "friends" or $e.poster.username != $.journal.username or $.view == "entry") ? true : false;
  925. var bool show_pic = (defined $e.userpic and ($.view == "friends" or $*show_entry_userpic or $e.poster.username != $e.journal.username or $.view == "entry")) ? true : false;
  926.  
  927.  
  928.  
  929.  
  930. """
  931. <div class="entry">
  932. <div class="entrydivider"></div>
  933. """;
  934. if($show_pic) {
  935. """
  936. <div class="userpic2">
  937. <a href="$*SITEROOT/allpics.bml?user=$e.poster.username"><img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="$e.poster.name [userpic]" title="$e.poster.name [userpic]" border="0" /></a>
  938. </div>
  939. """;
  940. }
  941.  
  942. if($show_name) {
  943. $this->lay_make_username($e);
  944. }
  945. """
  946. <div class="entryinfo">$security $date $time</div>
  947. <div class="entrydivider"></div>
  948. <div class="entrylinks">
  949. """;
  950.  
  951. $e.comments->print();
  952.  
  953. foreach var string key (["edit_entry","edit_tags","mem_add","tell_friend"]) {
  954. var Link link = $e->get_link($key);
  955. if ($link) {
  956. """<a href=\"$link.url\"> &nbsp; $link.caption &nbsp; </a>""";
  957. }
  958. }
  959. """<a href="$e.permalink_url"> &nbsp; $*text_permalink &nbsp; </a>
  960. </div>
  961. <div class="entrytext">
  962. <div class="subject">$e.subject</div>
  963. <p>$e.text</p>
  964. """;
  965.  
  966. $e->print_metadata();
  967.  
  968. """
  969. </div>
  970. </div>
  971. <div class="backtop"><a href="#top">back to top</a></div>
  972.  
  973. """;
  974. }
  975.  
  976.  
  977.  
  978. function CommentInfo::print() {
  979. if ($.enabled) {
  980. $this->print_postlink();
  981. if ($.count > 0 or $.screened) {
  982. $this->print_readlink();
  983. }
  984. }
  985. }
  986.  
  987. function CommentInfo::print_postlink() {
  988. var Page p = get_page();
  989. "<a href=\"$.post_url\"> &nbsp; "+($p.view == "friends" ? $*text_post_comment_friends : $*text_post_comment)+" &nbsp; </a>";
  990. }
  991.  
  992. function CommentInfo::print_readlink {
  993. var Page p = get_page();
  994. "<a href=\"$.read_url\"> &nbsp; "+
  995. get_plural_phrase($.count, $p.view == "friends" ?
  996. "text_read_comments_friends" : "text_read_comments")+
  997. " &nbsp; </a>";
  998. }
  999.  
  1000.  
  1001. ################################################################################
  1002. #
  1003. # EntryPage and Comments
  1004. #
  1005.  
  1006. function EntryPage::print_body() {
  1007. """<div class="entries">""";
  1008. $this->print_entry($.entry);
  1009. if ($this.multiform_on) {
  1010. $this->print_multiform_start();
  1011. }
  1012.  
  1013. if ($.entry.comments.count > 0) {
  1014. """
  1015. <div class="messageholder"><div class="systemmessage"><div class="notablemessage "><b>Comments</b></div></div></div>
  1016. """;
  1017. }
  1018.  
  1019. if ($.comment_pages.total_subitems > 0) {
  1020. $.comment_pages->print();
  1021. }
  1022.  
  1023. if ($.entry.comments.enabled) {
  1024. $this->print_comments($.comments);
  1025. }
  1026.  
  1027.  
  1028. if ($.entry.comments.count > 0) {
  1029. """
  1030. <div class="messageholder">
  1031. <div class="systemmessage">
  1032. <div class="notablemessage ">
  1033. """;
  1034.  
  1035. $.entry.comments->print();
  1036.  
  1037. """
  1038. </div>
  1039. </div>
  1040. </div>
  1041. """;
  1042. }
  1043.  
  1044. if ($.comment_pages.total_subitems > 0) {
  1045. $.comment_pages->print();
  1046. }
  1047.  
  1048. if ($this.multiform_on and ($.entry.comments.count > 0)) {
  1049. """
  1050. <div class="messageholder">
  1051. <div class="systemmessage">
  1052. <div class="notablemessage ">
  1053. <div class="multiform">
  1054. """;
  1055. $this->print_multiform_actionline();
  1056. """
  1057. </div>
  1058. </div>
  1059. </div>
  1060. </div>
  1061. """;
  1062. $this->print_multiform_end();
  1063. }
  1064. """</div>""";
  1065. }
  1066.  
  1067. function EntryPage::print_comments(Comment[] cs) {
  1068. if (size $cs == 0) { return; }
  1069. foreach var Comment c ($cs) {
  1070. if ($c.full) {
  1071. $this->print_comment($c);
  1072. } else {
  1073. $this->print_comment_partial($c);
  1074. }
  1075. }
  1076. }
  1077.  
  1078. function EntryPage::print_comment(Comment c) {
  1079.  
  1080. var string datetime;
  1081. $datetime = $c.time->date_format()+", " + $c.time->time_format();
  1082.  
  1083.  
  1084. var string parent;
  1085. var string thread;
  1086. if($c.parent_url != "") {
  1087. $parent = """<a href="$c.parent_url"> &nbsp; $*text_comment_parent &nbsp; </a>""";
  1088. }
  1089. if($c.thread_url != "") {
  1090. $thread = """<a href="$c.thread_url"> &nbsp; $*text_comment_thread &nbsp; </a>""";
  1091. }
  1092.  
  1093. var string subjecticon;
  1094. if (defined $c.subject_icon) {
  1095. $subjecticon = """<img src="$c.subject_icon.url" width="$c.subject_icon.width" height="$c.subject_icon.height" alt="" />""";
  1096. }
  1097.  
  1098. var string ip;
  1099. if ($c.metadata{"poster_ip"}) {
  1100. $ip = """ &nbsp; """ + $c.metadata{"poster_ip"};
  1101. }
  1102.  
  1103. var string poster = defined $c.poster ? $c.poster->as_string() : "<b>(Anonymous)</b>";
  1104.  
  1105. var string pic;
  1106. if (defined $c.userpic and $*comment_userpic_style != "off") {
  1107. $pic = """<div class="userpic2"><img src="$c.userpic.url" width="$c.userpic.width" height="$c.userpic.height" alt="" /></div>""";
  1108. }
  1109.  
  1110. var string indent = ($c.depth - 1) * 25 + "px";
  1111.  
  1112. """
  1113. <div id='$c.dom_id'>
  1114. <a name='$c.anchor'></a>
  1115. $pic
  1116. <div class="entry" style="margin-left: $indent;">
  1117. <div class="entrydivider"></div>
  1118. <div class="postedby">$poster <span class="ip">$ip</span></div>
  1119. <div class="entrydivider"></div>
  1120. <div class="entryinfo">$subjecticon $datetime</div>
  1121. <div class="entrydivider"></div>
  1122.  
  1123. """;
  1124.  
  1125. if ($.multiform_on) {
  1126. """<div class="entryinfo"><label for="ljcomsel_$c.talkid">$*text_multiform_check</label> """;
  1127. $c->print_multiform_check();
  1128. """</div>
  1129. <div class="entrydivider"></div>
  1130. """;
  1131. }
  1132.  
  1133. var string replyurl;
  1134. if ($c.frozen) {
  1135. $replyurl = """<a href="javascript://"> &nbsp; $*text_comment_frozen &nbsp; </a>""";
  1136. } else {
  1137. $replyurl = """<a href="$c.reply_url"> &nbsp; $*text_comment_reply &nbsp; </a>""";
  1138. }
  1139.  
  1140. """
  1141. <div class="entrylinks">
  1142. $replyurl
  1143. """;
  1144.  
  1145. # some links for doing stuff to this comment
  1146. foreach var string k ($c.link_keyseq) {
  1147. var Link link = $c->get_link($k);
  1148. if ($link) {
  1149. """<a href=\"$link.url\"> &nbsp; $link.caption &nbsp; </a>""";
  1150. }
  1151. }
  1152.  
  1153. """
  1154. <a href="$c.permalink_url"> &nbsp; $*text_permalink &nbsp; </a>$parent$thread
  1155. </div>
  1156. <div class="entrytext">
  1157. <div class="subject">$c.subject</div>
  1158. <p>$c.text</p>
  1159. </div>
  1160. """;
  1161.  
  1162.  
  1163. if ((size $c.replies) > 0 and $c.replies[0].full == false) {
  1164. """<div style="margin-top: 5px; margin-bottom: 5px; clear: both;">\n""";
  1165. $this->print_comments($c.replies);
  1166. "</div>\n";
  1167. }
  1168.  
  1169. """
  1170. </div>
  1171. <div class="backtop"><a href="#top">back to top</a></div>
  1172. </div>
  1173. """;
  1174.  
  1175. if ((size $c.replies) > 0 and $c.replies[0].full == true) {
  1176. $this->print_comments($c.replies);
  1177. }
  1178.  
  1179. }
  1180.  
  1181. function EntryPage::print_comment_partial(Comment c) {
  1182. var string poster = defined $c.poster ? $c.poster->as_string() : "<i>(Anonymous)</i>";
  1183. var string subj = $c.subject != "" ? $c.subject : """<i class="nosubject">$*text_nosubject</i>""";
  1184. var string indent = ($c.depth - 1) * 25 + "px";
  1185. """
  1186. <div class="entry" style="margin-left: $indent;"><div class="minicommentholder"><div class="minicomment">$poster - <a href="$c.permalink_url">$subj</a></div></div></div>
  1187. """;
  1188. $this->print_comments($c.replies);
  1189. }
  1190.  
  1191. function ItemRange::print() {
  1192. if ($.all_subitems_displayed) { return; }
  1193. """
  1194. <div class="messageholder"><div class="systemmessage"><div class="notablemessage ">
  1195. <b>""";
  1196. print lang_page_of_pages($.current, $.total);
  1197. "</b> &mdash; ";
  1198. foreach var int i (1..$.total) {
  1199. if ($i == $.current) { """<b class="systemtext">[$i]</b>""";
  1200.  
  1201. } else {
  1202. var string url_of = $this->url_of($i);
  1203. "<a href='$url_of'><b>[$i]</b></a>";
  1204. }
  1205. }
  1206. """</div></div></div>""";
  1207. }
  1208.  
  1209. ################################################################################
  1210. #
  1211. # ReplyPage
  1212. #
  1213.  
  1214. function ReplyPage::print_body() {
  1215.  
  1216. var EntryLite e = $.replyto;
  1217. var string poster = defined $e.poster ? $e.poster->as_string() : "<i>(Anonymous)</i>";
  1218. var string datetime;
  1219. var string time = $e.time->time_format();
  1220. var string date = $e.time->date_format();
  1221.  
  1222. var UserLite name;
  1223. if(defined $e.userpic and $*comment_userpic_style != "off") {
  1224. $name = $e.poster;
  1225. """<div class="userpic2">""";
  1226. if (defined $e.userpic or (defined $e.userpic and $.view == "entry" and $*show_entry_userpic)) {
  1227. """<img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="" />""";
  1228. }
  1229. """ </div>""";
  1230. }
  1231. """
  1232. <div class="entry">
  1233. <div class="entrydivider"></div>
  1234. <div class="entryinfo">$name</div>
  1235. <div class="entrydivider"></div>
  1236. <div class="entryinfo">$time $date</div>
  1237. <div class="entrydivider"></div>
  1238. <div class="entrylinks">
  1239. <a href="$.entry.comments.read_url" class="comments">$*text_reply_back</a>""";
  1240.  
  1241.  
  1242. foreach var string key (["edit_entry","mem_add","tell_friend"]) {
  1243. var Link link = $e->get_link($key);
  1244. if ($link) {
  1245. """<a href=\"$link.url\">$link.caption</a>""";
  1246. }
  1247. }
  1248. """<a href="$e.permalink_url">$*text_permalink</a>
  1249. </div>
  1250. """;
  1251.  
  1252. """
  1253. <div class="entrytext">
  1254. <div class="subject">$e.subject</div>
  1255. <p>$e.text</p>
  1256. </div>
  1257.  
  1258. <div class="messageholder"><div class="systemmessage">
  1259. """;
  1260. $.form->print();
  1261. """
  1262. </div></div>
  1263. """;
  1264. }
  1265.  
  1266.  
  1267. function Entry::print_metadata() {
  1268. var string caption;
  1269. var string val;
  1270. var Image i;
  1271. if ($this.tags) {
  1272. """<div class="meta">""";
  1273. print $this->get_tags_text();
  1274. "</div>";
  1275. }
  1276. if (size $.metadata == 0) { return; }
  1277. foreach var string k ($.metadata) {
  1278. $caption = $k;
  1279. $val = $.metadata{$k};
  1280. if ($k == "music") {
  1281. $caption = $*text_meta_music;
  1282. }
  1283. elseif ($k == "mood") {
  1284. $caption = $*text_meta_mood;
  1285. if (defined $.mood_icon) {
  1286. $i = $.mood_icon;
  1287. $val = """<img src="$i.url" width="$i.width" height="$i.height" alt="$val" title="$val" /> $val""";
  1288. }
  1289. }
  1290. println """<div class="meta">$caption: $val</div>""";
  1291. }
  1292. }
  1293.  
  1294.  
  1295. ################################################################################
  1296. #
  1297. # RecentPage
  1298. #
  1299.  
  1300. function RecentPage::print_body () {
  1301. """
  1302.  
  1303. <div class="entries">
  1304. """;
  1305.  
  1306. foreach var Entry e ($.entries) {
  1307. $this->print_entry($e);
  1308. }
  1309.  
  1310. """
  1311. </div>
  1312. """;
  1313. }
  1314.  
  1315. ################################################################################
  1316. #
  1317. # YearPage
  1318. #
  1319.  
  1320.  
  1321. function YearPage::print_body {
  1322. $this->print_year_links();
  1323. """<div id="cal">""";
  1324. foreach var YearMonth m ($.months) {
  1325. $this->print_month($m);
  1326. }
  1327. """</div>""";
  1328. }
  1329.  
  1330. function YearPage::print_year_links() {
  1331. """<div class="messageholder"><div class="systemmessage"><div class="notablemessage">""";
  1332. foreach var YearYear y ($.years) {
  1333. if ($y.displayed) {
  1334. """<b class="systemtext">$y.year</b>""";
  1335. } else {
  1336. """<b><a href="$y.url"> &nbsp; $y.year &nbsp; </a></b>""";
  1337. }
  1338. }
  1339. """</div></div></div>""";
  1340. }
  1341.  
  1342. function YearPage::print_month(YearMonth m) {
  1343. if (not $m.has_entries) { return; }
  1344.  
  1345. """
  1346. <a name="anchor$m.month"></a>
  1347. <div class="entry">
  1348. <div class="entrydivider"></div>
  1349. <div class="entryinfo">
  1350. """;
  1351.  
  1352. print $m->month_format();
  1353.  
  1354. """
  1355. </div>
  1356. <div class="entrydivider"></div>
  1357. <div class="entrylinks"><a href="$m.url"> &nbsp; $*text_view_month &nbsp; </a></div>
  1358. <div class="entrytext">
  1359. <table cellspacing="0" cellpadding="0" border="0" width="100%">
  1360. <tr>
  1361. """;
  1362.  
  1363. foreach var int d (weekdays()) {
  1364. """
  1365. <td width="14%"><div class="bigday">$*lang_dayname_short[$d]</div></td>
  1366. """;
  1367. }
  1368. """
  1369. </tr>
  1370. """;
  1371. foreach var YearWeek w ($m.weeks) {
  1372. $w->print();
  1373. }
  1374. """
  1375. </table>
  1376. </div>
  1377. </div>
  1378. <div class="backtop"><a href="#top">back to top</a></div>
  1379. """;
  1380.  
  1381. }
  1382.  
  1383. function YearWeek::print() {
  1384. """
  1385. <tr>
  1386. """;
  1387. if ($.pre_empty > 0) {
  1388. """
  1389. <td colspan="$.pre_empty"></td>
  1390. """;
  1391. }
  1392.  
  1393. foreach var YearDay d ($.days) {
  1394. var string day = zeropad($d.day, 2);
  1395. """
  1396. <td>
  1397. <div class="bigday">$day</div>
  1398. """;
  1399. if ($d.num_entries > 0) {
  1400. var string num = $d.num_entries < 10 ? "&nbsp;" + string($d.num_entries) : string($d.num_entries);
  1401. """
  1402. <div class="calactitem"><a href="$d.url">$num</a></div>
  1403. """;
  1404. }
  1405. """
  1406. </td>
  1407. """;
  1408. }
  1409. """
  1410. </tr>
  1411. """;
  1412. }
  1413.  
  1414.  
  1415.  
  1416.  
  1417. ################################################################################
  1418. #
  1419. # MonthPage
  1420. #
  1421.  
  1422.  
  1423. function MonthPage::view_title : string {
  1424. return $.date->date_format($*lang_fmt_month_long);
  1425. }
  1426.  
  1427. function MonthPage::print_body {
  1428. "<form method='post' action='$.redir.url'>";
  1429. $.redir->print_hiddens();
  1430. var string back;
  1431. var string forward;
  1432. if ($.prev_url != "") { $back = """<a href="$.prev_url">$*text_back</a>"""; }
  1433. if ($.next_url != "") { $forward = """<a href="$.next_url">$*text_forward</a>"""; }
  1434. var string select;
  1435. if (size $.months > 1) {
  1436. $select = "<select name='redir_key'>\n";
  1437. foreach var MonthEntryInfo mei ($.months) {
  1438. var string sel;
  1439. if ($mei.date.year == $.date.year and $mei.date.month == $.date.month) {
  1440. $sel = " selected='selected'";
  1441. }
  1442. $select = $select + "<option value='$mei.redir_key'$sel>" + $mei.date->date_format($*lang_fmt_month_long) + "</option>";
  1443. }
  1444. $select = $select + "</select>\n<input type='submit' value='View' />";
  1445. }
  1446.  
  1447. """
  1448. <div class="messageholder"><div class="systemmessage">
  1449. <table cellspacing="0" cellpadding="0" border="0" width="100%">
  1450. <tr>
  1451. <td width="15%">$back</td>
  1452. <td align="center" width="70%">$select</td>
  1453. <td align="right" width="15%">$forward</td>
  1454. </tr>
  1455. </table>
  1456. </div></div>
  1457. """;
  1458. "</form>";
  1459. foreach var MonthDay d ($.days) {
  1460. if ($d.has_entries) {
  1461. """
  1462. <a name="anchor$d.day"></a>
  1463. <div class="entry">
  1464. <div class="entrydivider"></div>
  1465. <div class="entrylinks"><a href=\"$d.url\"> &nbsp; <b>
  1466. """;
  1467. print lang_ordinal($d.day);
  1468. """
  1469. </b> &nbsp; </a></div>
  1470. <div class="entries">
  1471. <div class="entrytext">
  1472. """;
  1473. $d->print_subjectlist();
  1474. """
  1475. </div>
  1476. </div>
  1477. </div>
  1478. <div class="backtop"><a href="#top">back to top</a></div>
  1479. """;
  1480. }
  1481. }
  1482. }
  1483.  
  1484. function MonthDay::print_subjectlist() {
  1485. # Too many tables...
  1486. foreach var Entry e ($.entries) {
  1487. print $e.time->time_format("short") + ": ";
  1488. if ($e.poster.username != $e.journal.username) {
  1489. $e.poster->print(); " ";
  1490. }
  1491. "$e.security_icon";
  1492. if ($e.subject != "") {
  1493. " <a href=\"$e.permalink_url\">$e.subject</a>";
  1494. } else {
  1495. """ <a href="$e.permalink_url"><i class="nosubject">$*text_nosubject</i></a>""";
  1496. }
  1497. if ($e.comments.count > 0) {
  1498. " - " + get_plural_phrase($e.comments.count, "text_read_comments");
  1499. }
  1500. if ($e.comments.screened) {
  1501. " <b>$*text_month_screened_comments</b>";
  1502. }
  1503. "<br />\n";
  1504. }
  1505. }
  1506.  
  1507.  
  1508. ################################################################################
  1509. #
  1510. # DayPage
  1511. #
  1512.  
  1513. function DayPage::print_body() {
  1514.  
  1515. """<div class="entries">""";
  1516. if ($.has_entries) {
  1517. foreach var Entry e ($.entries) {
  1518. $this->print_entry($e);
  1519. }
  1520.  
  1521. } else {
  1522. "<p>$*text_noentries_day</p>";
  1523. }
  1524. """</div>""";
  1525. }
  1526.  
  1527. ################################################################################
  1528. #
  1529. # Page
  1530. #
  1531.  
  1532. function Page::print () {
  1533.  
  1534. var string title = $this->title();
  1535.  
  1536. """
  1537. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  1538. <html xmlns="http://www.w3.org/1999/xhtml">
  1539. <head>
  1540. <title>$title</title>
  1541. <link rel="stylesheet" href="$.stylesheet_url" type="text/css" />
  1542. """;
  1543.  
  1544. $this->print_head();
  1545.  
  1546. """
  1547. </head>
  1548. <body>
  1549. <a name="top"></a>
  1550. <table cellspacing="0" cellpadding="0" border="0" width="100%">
  1551. <tr>
  1552. <td>
  1553. <div class="border3">
  1554. <div class="border2">
  1555. <div id="bodycontent">
  1556. """;
  1557.  
  1558. $this->lay_print_userpic();
  1559. $this->lay_print_username();
  1560. $this->lay_print_header();
  1561.  
  1562. """
  1563. <div id="content">
  1564. <table cellspacing="10" cellpadding="0" border="0">
  1565. <tr>
  1566. <td valign="top" class="sidetd">
  1567. <div id="sidecolumn">
  1568. """;
  1569.  
  1570. $this->lay_print_sidebar();
  1571.  
  1572. """
  1573. </div>
  1574. </td>
  1575.  
  1576. <td valign="top" width="100%">
  1577. """;
  1578.  
  1579. $this->lay_print_subnav();
  1580. $this->print_body();
  1581. $this->lay_print_subnav();
  1582.  
  1583. """
  1584. </td>
  1585. </tr>
  1586. </table>
  1587. </div>
  1588. </div>
  1589. </div>
  1590. </div>
  1591. </td>
  1592. </tr>
  1593. </table>
  1594. </body>
  1595. </html>
  1596. """;
  1597. }
  1598.  
  1599.  
  1600.  
  1601. function print_theme_preview() {
  1602.  
  1603. var Color color_bg_lt = getAltColor($*color_bg, "light", 30);
  1604. var Color color_fg_dk = getAltColor($*color_fg, "dark", 20);
  1605. var Color color_fg_dk_font = getAltColor($*color_fg_font, "dark", 20);
  1606. var Color color_divider = getAltColor($color_fg_dk, "dark", 30);
  1607. var Color color_fg_dk_dk_font = getAltColor($color_fg_dk, "dark", 50);
  1608. var Color color_border = getAltColor($*color_bg, "light", 90);
  1609.  
  1610. """
  1611. <div style="background-color: $*color_fg; border: 1px solid $color_fg_dk; padding: 4px; width: 210px;">
  1612. <div style="border-top: 1px solid $color_divider; border-bottom: 1px solid $*color_fg;"></div>
  1613. <div style="background-color: $color_fg_dk; font-size: $*static_font_size$*static_font_measurement; padding: 4px; width: 200px;">Username - Title</div>
  1614. <div style="border-top: 1px solid $color_divider; border-bottom: 1px solid $*color_fg;"></div>
  1615. <br />
  1616. <div style="border: 1px solid $*color_bg; width: 200px;"><div style="border: 1px solid $*color_fg;"><div style="border: 2px solid $color_border;">
  1617. <div style="background-color: $color_bg_lt; border: 1px solid $*color_bg; padding: 3px; font-size: $*static_font_size$*static_font_measurement; color: $*color_bg_font;">
  1618. <strong>Welcome</strong>
  1619. <div style="background-color: $color_fg_dk; padding: 3px; margin-top: 5px; color: $*color_fg_font; border-top: 1px solid $color_divider; border-bottom: 1px solid $color_divider;">This is my new journal using a cool new style!</div>
  1620. </div></div></div></div>
  1621. </div>
  1622. """;
  1623.  
  1624. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement