kizu (ki_zu) wrote in changelog,
kizu
ki_zu
changelog

[livejournal] r15044: LJSUP-3879: some fixes and improvements

Committer: rkomarov
LJSUP-3879: some fixes and improvements

U   trunk/bin/upgrading/s2layers/understroke/layout.s2
U   trunk/htdocs/stc/sup/_/style.css
Modified: trunk/bin/upgrading/s2layers/understroke/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/understroke/layout.s2	2009-03-26 04:31:16 UTC (rev 15043)
+++ trunk/bin/upgrading/s2layers/understroke/layout.s2	2009-03-26 09:46:52 UTC (rev 15044)
@@ -36,6 +36,7 @@
 property string text_nosubject { noui = 1; }
 property string text_syndicate { noui = 1; }
 property string text_month_form_btn { noui = 1; }
+property string text_tags_section_header { noui = 1; }
 
 property string text_user_posts_in {
 	noui = 1;
@@ -244,7 +245,26 @@
 		];
 }
 
+function _summary() : string[][] {
+	var string[][] result;
+	var RecentPage p = get_page() as RecentPage;
+	foreach var Entry e ($p.entries) {
+		var string user = "";
+		if (($p.journal.username == $e.journal.username) and $p.view != "friends" and $p.journal_type == "C") {
+			$user = _ljuser($e.poster,"") + " — ";
+		} elseif ($p.journal.username != $e.journal.username or $p.view == "friends") {
+			$user = _ljuser($e.journal,"") + " — ";
+		}
+		$result[size $result] = ["",
+			"""$user<a href="#post-$e.journal.username-$e.itemid">"""+ (($e.subject != "") ? striphtml($e.subject) : $*text_nosubject) +"</a>"
+			+ (($e.comments.count > 0) ? (""" — <a href="$e.permalink_url">""" + get_plural_phrase($e.comments.count, "text_read_comments") + "</a>"):"")
+		];
+	}
 
+	return $result;
+}
+
+
 function _calendar(YearMonth mon) : string {
 	var Page p = get_page();
 	var string result = "";
@@ -467,7 +487,7 @@
 	<meta name="viewport" id="iphone-viewport" content="width=480, maximum-scale=0.6667" />
 	<title>$title</title>
 </head>
-<body class="$bc">
+<body class="$bc">"""; if (viewer_sees_control_strip()) { """<div class="controlstrip">"""; $p->print_control_strip(); "</div>"; } """
 <div id="Page" class="$bc">
 """;
 }
@@ -488,6 +508,26 @@
 	return $result;
 } 
 
+function _sort(string[] input, int[] order) : string {
+	var string result = "";
+	var string[] array;
+	var int i = 0;
+	foreach var string item ($input) {
+		if ($order[$i]) {
+			if ($array[$order[$i]*100]) {
+				$array[$order[$i]*100+$i+1] = $item;
+			} else {
+				$array[$order[$i]*100] = $item;
+			}
+		}
+		$i++;
+	}
+	foreach var string item ($array) {
+		$result = "$result$item";
+	}
+	return $result;
+}
+
 function _items(string[][] input, string{} _args) :string {
 	var string result = "";
 	var string{} args = _merge({
@@ -600,6 +640,11 @@
 			"before" => "$*_{"HR"}<dl>",
 			"after" => "</dl>"
 		});
+	var string summary = _items(
+		_summary(),
+		{
+			"before" => "$*_{"HR"}<ul>"
+		});
 	var string extras = _items(
 		_extralinks(),
 		{
@@ -620,6 +665,7 @@
 	$cal
 	$tags
 	$links
+	$summary
 	$extras
 """;
 
@@ -693,7 +739,7 @@
 	var string tags = _items(
 		_entry_tags($e),
 		{
-			"before" => """<div class="ljtags">$*text_tags: """,
+			"before" => """<div class="ljtags">$*text_tags_section_header: """,
 			"after" => "</div>",
 			"tag" => "",
 			"glue" => ", ",
@@ -922,7 +968,7 @@
 			$c->print_linkbar();
 			"</p>";
 			if ($c.metadata{"poster_ip"}) { "<p>(" + $c.metadata{"poster_ip"} + ")</p>"; }
-			"""</div></div><div class="comment-text">"""; $c->print_text(); """</div></div><div class="hr"><hr /></div>""";
+			"""</div></div><div class="comment-text text">"""; $c->print_text(); """</div></div><div class="hr"><hr /></div>""";
 		}
 		"""<div class="replyform">""";
 		$.form->print();
@@ -977,7 +1023,7 @@
 	"""</p>""";
 	if ($c.metadata{"poster_ip"}) { "<p>(" + $c.metadata{"poster_ip"} + ")</p>"; }
 	"</div></div>";
-	"""<div class="comment-text">"""; $c->print_text(); "</div>";
+	"""<div class="comment-text text">"""; $c->print_text(); "</div>";
 	"""<div class="comment-menu">""";
 	if ($c.frozen) {
 		print safe "($*text_comment_frozen) ";

Modified: trunk/htdocs/stc/sup/_/style.css
===================================================================
--- trunk/htdocs/stc/sup/_/style.css	2009-03-26 04:31:16 UTC (rev 15043)
+++ trunk/htdocs/stc/sup/_/style.css	2009-03-26 09:46:52 UTC (rev 15044)
@@ -177,6 +177,9 @@
 --------------------------------*/
 
 /* clearfix */
+#Page:after,
+.layout:after, 
+.layout-in:after,
 .comment-head:after,
 .clearfix:after { 
 	content:" ";
@@ -187,6 +190,13 @@
 	overflow:hidden;
 	visibility:hidden;
 	}
+	#Page,
+	.layout,
+	.layout-in,
+	.comment-head,
+	.clearfix { 
+		zoom:1;
+		}
 
 /* Some base styles */
 BODY {
@@ -208,7 +218,6 @@
 	.comment-head {
 		padding:1px 4px;
 		margin-top:10px;
-		zoom:1; /* ToDo move to ie.css */
 		}
 		.comment-head H3 {
 			font-size:1.4em;
@@ -304,3 +313,71 @@
 	P.tags .etc {
 		display:none;
 		}
+
+/* Layout */
+	/*bg stretching*/
+	HTML {
+		position:relative;
+		height:100%;
+		min-height:100%;
+		}
+	BODY {
+		position:relative;
+		min-height:100%;
+		//height:100%;
+		padding-top:0 !important;
+		}
+	.controlstrip {
+		overflow:hidden;
+		}
+	#lj_controlstrip {
+		position:relative !important;
+		}
+
+/* width/min-width */
+.lay .l-fix #Page {
+	margin:0 auto;
+	}
+.lay #Page,
+.lay .layout-in {
+	position:relative;
+	}
+.lay .header {
+	clear:both;
+	}
+
+/* columns */
+.lay .content {
+	float:left;
+	width:100%;
+	margin-right:-100%;
+	}
+	* HTML .lay .content {
+		margin-right:-65535px;
+		}
+	.lay .content-in {
+		position:relative;
+		}
+	.lay .l-type-2CR .content-in {
+		margin-right:300px;
+		}
+	.lay .l-type-2CL .content-in {
+		margin-left:300px;
+		}
+.lay .sidebar {
+	float:left;
+	width:100%;
+	}
+	.lay .sidebar-in {
+		width:300px;
+		position:relative;
+		}
+	.lay .l-type-1C .sidebar {
+		display:none;
+		}
+	.lay .l-type-2CL .sidebar-in {
+		float:left;
+		}
+	.lay .l-type-2CR .sidebar-in {
+		float:right;
+		}

Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments