Максим Червонный (fiskus_boulder) wrote in changelog,
Максим Червонный
fiskus_boulder
changelog

[livejournal] r17619: LJSUP-7052: layout for browse recent pos...

Committer: mchervonniy
LJSUP-7052: layout for browse recent posts and communities widget
U   trunk/templates/Browse/browse.tmpl
U   trunk/templates/Browse/communities.tmpl
U   trunk/templates/Browse/index.tmpl
U   trunk/templates/Browse/menu.tmpl
U   trunk/templates/Browse/recent_posts.tmpl
Modified: trunk/templates/Browse/browse.tmpl
===================================================================
--- trunk/templates/Browse/browse.tmpl	2010-10-28 03:06:14 UTC (rev 17618)
+++ trunk/templates/Browse/browse.tmpl	2010-10-28 10:10:16 UTC (rev 17619)
@@ -1,18 +1,26 @@
 <div class="l-body">
-    <div class="b-catalogue">
-        <div class="l-aside">    
-            <TMPL_INCLUDE menu.tmpl> 
-        </div>
-        <div class="l-content">
-            <TMPL_INCLUDE communities.tmpl>
-        </div>
-        <div class="l-content">
-            <TMPL_INCLUDE recent_posts.tmpl>
-        </div>
-        <div class="l-sidebar">
-            <TMPL_INCLUDE sidebar.tmpl>
-        </div>
-    </div>
+	<div class="b-catalogue">
+		<div class="l-aside">	
+			<TMPL_INCLUDE menu.tmpl> 
+		</div>
+		<div class="l-content-wide">
+			<ul class="m-tab-switcher">
+				<li<tmpl_if expr="view eq 'recent_posts'"> class="cur"</tmpl_if>><a href="?view=recent_posts">Recent posts</a></li>
+				<li<tmpl_if expr="view eq 'communities'"> class="cur"</tmpl_if>><a href="?view=communities">Communities</a></li>
+			</ul>
+		</div>
+		<div class="l-content">
+        <tmpl_if expr="view eq 'communities'">
+			<TMPL_INCLUDE communities.tmpl>
+        </tmpl_if>
+        <tmpl_if expr="view eq 'recent_posts'">
+			<TMPL_INCLUDE recent_posts.tmpl>
+        </tmpl_if>
+		</div>
+		<div class="l-sidebar">
+			<TMPL_INCLUDE sidebar.tmpl>
+		</div>
+	</div>
 </div>
 
 

Modified: trunk/templates/Browse/communities.tmpl
===================================================================
--- trunk/templates/Browse/communities.tmpl	2010-10-28 03:06:14 UTC (rev 17618)
+++ trunk/templates/Browse/communities.tmpl	2010-10-28 10:10:16 UTC (rev 17619)
@@ -1,33 +1,42 @@
 <TMPL_IF communities>
-    <!-- paging -->
-    <TMPL_IF expr="pages gt 1">
-    <ul class="b-nav-counter">
-        <li class="b-nav-counter-first"><TMPL_IF page_first><a href="<TMPL_VAR page_first>" title="<TMPL_VAR expr="ml('widget.browse.page.first')">"><i><TMPL_VAR expr="ml('widget.browse.page.first')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.first')"></i></span></TMPL_IF></li>
-        <li class="b-nav-counter-prev"><TMPL_IF page_prev><a href="<TMPL_VAR page_prev>" title="<TMPL_VAR expr="ml('widget.browse.page.previous')">"><i><TMPL_VAR expr="ml('widget.browse.page.previous')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.previous')"></i></span></TMPL_IF></li>
-        <li class="b-nav-counter-pages"><TMPL_VAR page>/<TMPL_VAR pages></li>
-        <li class="b-nav-counter-next"><TMPL_IF page_next><a href="<TMPL_VAR page_next>" title="<TMPL_VAR expr="ml('widget.browse.page.next')">"><i><TMPL_VAR expr="ml('widget.browse.page.next')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.next')"></i></span></TMPL_IF></li>
-        <li class="b-nav-counter-last"><TMPL_IF page_last><a href="<TMPL_VAR page_last>" title="<TMPL_VAR expr="ml('widget.browse.page.last')">"><i><TMPL_VAR expr="ml('widget.browse.page.last')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.last')"></i></span></TMPL_IF></li>
-    </ul>
-   </TMPL_IF>     
-    <ul class="b-catalogue-list">
-        <TMPL_LOOP communities>
-            <li class="b-catalogue-item">
-                <dl>
-                    <dt class="b-catalogue-item-name"><TMPL_VAR journal_name></dt>
-                    <dd class="b-catalogue-item-userpic"><TMPL_IF userpic><TMPL_VAR userpic><TMPL_ELSE><TMPL_VAR userpic></TMPL_IF></dd>
-                    <dd class="b-catalogue-item-ago"><TMPL_VAR updated_ago></dd>
-                    <dd class="b-catalogue-item-desc">
-                        <h4><TMPL_VAR journal_title></h4>
-                        <p><TMPL_VAR journal_subtitle></p>
-                        <ul class="b-catalogue-item-action">
-                            <li><form action="/community/join.bml" method="GET"><input type="hidden" name="comm" value="<TMPL_VAR journal_user>"><input type="submit" value="<TMPL_VAR expr="ml('widget.browse.community.join')">" /></form></li>
-                            <li><form action="/friends/add.bml"><input type="hidden" name="user" value="<TMPL_VAR journal_user>"><input type="submit" value="<TMPL_VAR expr="ml('widget.browse.community.watch')">" /></form></li>
-                        </ul>
-                    <dd>
-                </dl>
-            </li>
-        </TMPL_LOOP>
-    </ul>
+	<!-- paging -->
+	<TMPL_IF expr="pages gt 1">
+	<ul class="b-nav-counter b-nav-counter-top">
+		<li class="b-nav-counter-first"><TMPL_IF page_first><a href="<TMPL_VAR page_first>" title="<TMPL_VAR expr="ml('widget.browse.page.first')">"><i><TMPL_VAR expr="ml('widget.browse.page.first')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.first')"></i></span></TMPL_IF></li>
+		<li class="b-nav-counter-prev"><TMPL_IF page_prev><a href="<TMPL_VAR page_prev>" title="<TMPL_VAR expr="ml('widget.browse.page.previous')">"><i><TMPL_VAR expr="ml('widget.browse.page.previous')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.previous')"></i></span></TMPL_IF></li>
+		<li class="b-nav-counter-pages"><TMPL_VAR page>/<TMPL_VAR pages></li>
+		<li class="b-nav-counter-next"><TMPL_IF page_next><a href="<TMPL_VAR page_next>" title="<TMPL_VAR expr="ml('widget.browse.page.next')">"><i><TMPL_VAR expr="ml('widget.browse.page.next')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.next')"></i></span></TMPL_IF></li>
+		<li class="b-nav-counter-last"><TMPL_IF page_last><a href="<TMPL_VAR page_last>" title="<TMPL_VAR expr="ml('widget.browse.page.last')">"><i><TMPL_VAR expr="ml('widget.browse.page.last')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.last')"></i></span></TMPL_IF></li>
+	</ul>
+   </TMPL_IF>	 
+	<ul class="b-catalogue-list">
+		<TMPL_LOOP communities>
+			<li class="b-catalogue-item">
+				<dl>
+					<dt class="b-catalogue-item-name"><TMPL_VAR journal_name></dt>
+					<dd class="b-catalogue-item-userpic"><TMPL_IF userpic><TMPL_VAR userpic><TMPL_ELSE><TMPL_VAR userpic></TMPL_IF></dd>
+					<dd class="b-catalogue-item-ago"><TMPL_VAR updated_ago></dd>
+					<dd class="b-catalogue-item-desc">
+						<h4><TMPL_VAR journal_title></h4>
+						<p><TMPL_VAR journal_subtitle></p>
+						<ul class="b-catalogue-item-action">
+							<li><form action="/community/join.bml" method="GET"><input type="hidden" name="comm" value="<TMPL_VAR journal_user>"><input type="submit" value="<TMPL_VAR expr="ml('widget.browse.community.join')">" /></form></li>
+							<li><form action="/friends/add.bml"><input type="hidden" name="user" value="<TMPL_VAR journal_user>"><input type="submit" value="<TMPL_VAR expr="ml('widget.browse.community.watch')">" /></form></li>
+						</ul>
+					<dd>
+				</dl>
+			</li>
+		</TMPL_LOOP>
+	</ul>
+	<TMPL_IF expr="pages gt 1">
+	<ul class="b-nav-counter">
+		<li class="b-nav-counter-first"><TMPL_IF page_first><a href="<TMPL_VAR page_first>" title="<TMPL_VAR expr="ml('widget.browse.page.first')">"><i><TMPL_VAR expr="ml('widget.browse.page.first')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.first')"></i></span></TMPL_IF></li>
+		<li class="b-nav-counter-prev"><TMPL_IF page_prev><a href="<TMPL_VAR page_prev>" title="<TMPL_VAR expr="ml('widget.browse.page.previous')">"><i><TMPL_VAR expr="ml('widget.browse.page.previous')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.previous')"></i></span></TMPL_IF></li>
+		<li class="b-nav-counter-pages"><TMPL_VAR page>/<TMPL_VAR pages></li>
+		<li class="b-nav-counter-next"><TMPL_IF page_next><a href="<TMPL_VAR page_next>" title="<TMPL_VAR expr="ml('widget.browse.page.next')">"><i><TMPL_VAR expr="ml('widget.browse.page.next')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.next')"></i></span></TMPL_IF></li>
+		<li class="b-nav-counter-last"><TMPL_IF page_last><a href="<TMPL_VAR page_last>" title="<TMPL_VAR expr="ml('widget.browse.page.last')">"><i><TMPL_VAR expr="ml('widget.browse.page.last')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.last')"></i></span></TMPL_IF></li>
+	</ul>
+   </TMPL_IF>	 
 <TMPL_ELSE>
-    <p><TMPL_VAR expr="ml('widget.browse.community.empty_list')"></p>
+	<p><TMPL_VAR expr="ml('widget.browse.community.empty_list')"></p>
 </TMPL_IF>

Modified: trunk/templates/Browse/index.tmpl
===================================================================
--- trunk/templates/Browse/index.tmpl	2010-10-28 03:06:14 UTC (rev 17618)
+++ trunk/templates/Browse/index.tmpl	2010-10-28 10:10:16 UTC (rev 17619)
@@ -1,11 +1,11 @@
 <div class="l-body">
-    <div>Vertical name</div>
-    <div>AD Block</div>
-    <div class="b-catalogue">
-        <div class="l-aside">    
-            <TMPL_INCLUDE browse.tmpl> 
-        </div>
-    </div>
+	<div>Vertical name</div>
+	<div>AD Block</div>
+	<div class="b-catalogue">
+		<div class="l-aside">	
+			<TMPL_INCLUDE browse.tmpl> 
+		</div>
+	</div>
 </div>
 
 

Modified: trunk/templates/Browse/menu.tmpl
===================================================================
--- trunk/templates/Browse/menu.tmpl	2010-10-28 03:06:14 UTC (rev 17618)
+++ trunk/templates/Browse/menu.tmpl	2010-10-28 10:10:16 UTC (rev 17619)
@@ -1,37 +1,37 @@
 <ul class="m-section">
-    <TMPL_LOOP categories>
-        <li class="m-section-item <TMPL_IF expr="is_current || is_expanded"> m-section-item-open</TMPL_IF>"><span><i class="m-switch"><i class="t"></i><i class="b"></i></i><TMPL_VAR name></span>
-            <ul class="m-section-list">
-                <TMPL_LOOP level1>
-                    <li<TMPL_IF is_current> class="m-section-item-open"</TMPL_IF>>
-                        <TMPL_IF level2>
-                            <span>
-                                <i class="m-switch"><i class="t"></i><i class="b"></i></i>
-                                <TMPL_IF is_current>
-                                    <strong><a href="<tmpl_var url>"><TMPL_VAR name></a></strong>
-                                <TMPL_ELSE>
-                                    <a href="<tmpl_var url>"><TMPL_VAR name></a>
-                                </TMPL_IF>
-                            </span>
-                        <TMPL_ELSE>
-                            <TMPL_IF is_current>
-                                <strong><TMPL_VAR name></strong>
-                            <TMPL_ELSE>
-                                <a href="<tmpl_var url>"><TMPL_VAR name></a>
-                            </TMPL_IF>
-                        </TMPL_IF>
-                        <TMPL_IF level2>
-                            <ul class="m-section-list">
-                                <TMPL_LOOP level2>
-                                    <li><tmpl_if is_current><strong><TMPL_VAR name></strong><tmpl_else><a href="<tmpl_var url>"><TMPL_VAR name></a></tmpl_if></li>
-                                </TMPL_LOOP>
-                            </ul>
-                         </TMPL_IF>
-                     </li>
-                 </TMPL_LOOP>
-             </ul>
-        </li>
-    </TMPL_LOOP>
+	<TMPL_LOOP categories>
+		<li class="m-section-item <TMPL_IF expr="is_current || is_expanded"> m-section-item-open</TMPL_IF>"><span><i class="m-switch"><i class="t"></i><i class="b"></i></i><TMPL_VAR name></span>
+			<ul class="m-section-list">
+				<TMPL_LOOP level1>
+					<li<TMPL_IF is_current> class="m-section-item-open"</TMPL_IF>>
+						<TMPL_IF level2>
+							<span>
+								<i class="m-switch"><i class="t"></i><i class="b"></i></i>
+								<TMPL_IF is_current>
+									<strong><a href="<tmpl_var url>"><TMPL_VAR name></a></strong>
+								<TMPL_ELSE>
+									<a href="<tmpl_var url>"><TMPL_VAR name></a>
+								</TMPL_IF>
+							</span>
+						<TMPL_ELSE>
+							<TMPL_IF is_current>
+								<strong><TMPL_VAR name></strong>
+							<TMPL_ELSE>
+								<a href="<tmpl_var url>"><TMPL_VAR name></a>
+							</TMPL_IF>
+						</TMPL_IF>
+						<TMPL_IF level2>
+							<ul class="m-section-list">
+								<TMPL_LOOP level2>
+									<li><tmpl_if is_current><strong><TMPL_VAR name></strong><tmpl_else><a href="<tmpl_var url>"><TMPL_VAR name></a></tmpl_if></li>
+								</TMPL_LOOP>
+							</ul>
+						 </TMPL_IF>
+					 </li>
+				 </TMPL_LOOP>
+			 </ul>
+		</li>
+	</TMPL_LOOP>
 </ul>
 
 

Modified: trunk/templates/Browse/recent_posts.tmpl
===================================================================
--- trunk/templates/Browse/recent_posts.tmpl	2010-10-28 03:06:14 UTC (rev 17618)
+++ trunk/templates/Browse/recent_posts.tmpl	2010-10-28 10:10:16 UTC (rev 17619)
@@ -1,23 +1,41 @@
+<TMPL_IF expr="post_pages gt 1">
+	<ul class="b-nav-counter b-nav-counter-top">
+		<li class="b-nav-counter-first"><TMPL_IF post_page_first><a href="<TMPL_VAR post_page_first>" title="<TMPL_VAR expr="ml('widget.browse.page.first')">"><i><TMPL_VAR expr="ml('widget.browse.page.first')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.first')"></i></span></TMPL_IF></li>
+		<li class="b-nav-counter-prev"><TMPL_IF post_page_prev><a href="<TMPL_VAR post_page_prev>" title="<TMPL_VAR expr="ml('widget.browse.page.previous')">"><i><TMPL_VAR expr="ml('widget.browse.page.previous')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.previous')"></i></span></TMPL_IF></li>
+		<li class="b-nav-counter-pages"><TMPL_VAR post_page>/<TMPL_VAR post_pages></li>
+		<li class="b-nav-counter-next"><TMPL_IF post_page_next><a href="<TMPL_VAR post_page_next>" title="<TMPL_VAR expr="ml('widget.browse.page.next')">"><i><TMPL_VAR expr="ml('widget.browse.page.next')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.next')"></i></span></TMPL_IF></li>
+		<li class="b-nav-counter-last"><TMPL_IF post_page_last><a href="<TMPL_VAR post_page_last>" title="<TMPL_VAR expr="ml('widget.browse.page.last')">"><i><TMPL_VAR expr="ml('widget.browse.page.last')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.last')"></i></span></TMPL_IF></li>
+	</ul>
+</TMPL_IF>	 
+
+<ul class="b-catalogue-list b-recent-posts">
 <tmpl_loop posts>
-    <img src="<tmpl_var userpic>"><br/>
-    <a href="<tmpl_var url_to_post>"><tmpl_var subject></a><br/>
-    <tmpl_loop tags><tmpl_unless __first__>,&nbsp;</tmpl_unless><tmpl_var tag></tmpl_loop><br/>
-    <tmpl_var mood><br/>
-    <tmpl_var music><br/>
-    <tmpl_var location><br/>
-    <tmpl_var post_text><br/>
-    <tmpl_if is_need_more>(<a href="<tmpl_var url_to_post>">Read more in original post</a>)<br/></tmpl_if>
-    <a href="<tmpl_var url_to_post>#comments"><tmpl_var comments_count> comments</a> | <a href="<tmpl_var url_to_post>?mode=reply">Leave comment</a><br/>
-    <hr/>
+	<li class="b-catalogue-item">
+		<dl class="b-catalogue-item-header">
+			<dt class="b-catalogue-item-subject"><a href="<tmpl_var url_to_post>"><tmpl_var subject></a></dt>
+			<dd class="b-catalogue-item-userpic"><img src="<tmpl_var userpic>"></dd>
+			<tmpl_if poster><dd class="b-catalogue-item-author">Posted <TMPL_VAR posted_ago> by <TMPL_VAR poster> </dd></tmpl_if>
+			<tmpl_if tags><dd class="b-catalogue-item-tags">Tags: <tmpl_loop tags><tmpl_unless __first__>,&nbsp;</tmpl_unless><tmpl_var tag></tmpl_loop></dd></tmpl_if>
+			<tmpl_if mood><dd class="b-catalogue-item-mood">Mood: <tmpl_var mood></dd></tmpl_if>
+			<tmpl_if music><dd class="b-catalogue-item-music">Music: <tmpl_var music></dd></tmpl_if>
+			<tmpl_if location><dd class="b-catalogue-item-location">Location: <tmpl_var location></dd></tmpl_if>
+		</dl>
+		<div class="b-catalogue-item-desc">
+			<tmpl_var post_text>
+			<tmpl_if is_need_more>(<a href="<tmpl_var url_to_post>">Read more in original post</a>)<br/></tmpl_if>
+		</div>
+		<p class="b-catalogue-item-comments"><span class="b-catalogue-comments-count"><a href="<tmpl_var url_to_post>#comments"><tmpl_var comments_count> comments</a> |<span> <a href="<tmpl_var url_to_post>?mode=reply">Leave comment</a></p>
+	</li>
 </tmpl_loop>
+</ul>
 
-    <TMPL_IF expr="post_pages gt 1">
-    <ul>
-        <li><TMPL_IF post_page_first><a href="<TMPL_VAR post_page_first>" title="<TMPL_VAR expr="ml('widget.browse.page.first')">"><i><TMPL_VAR expr="ml('widget.browse.page.first')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.first')"></i></span></TMPL_IF></li>
-        <li><TMPL_IF post_page_prev><a href="<TMPL_VAR post_page_prev>" title="<TMPL_VAR expr="ml('widget.browse.page.previous')">"><i><TMPL_VAR expr="ml('widget.browse.page.previous')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.previous')"></i></span></TMPL_IF></li>
-        <li><TMPL_VAR post_page>/<TMPL_VAR post_pages></li>
-        <li><TMPL_IF post_page_next><a href="<TMPL_VAR post_page_next>" title="<TMPL_VAR expr="ml('widget.browse.page.next')">"><i><TMPL_VAR expr="ml('widget.browse.page.next')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.next')"></i></span></TMPL_IF></li>
-        <li><TMPL_IF post_page_last><a href="<TMPL_VAR post_page_last>" title="<TMPL_VAR expr="ml('widget.browse.page.last')">"><i><TMPL_VAR expr="ml('widget.browse.page.last')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.last')"></i></span></TMPL_IF></li>
-    </ul>
-   </TMPL_IF>     
+<TMPL_IF expr="post_pages gt 1">
+	<ul class="b-nav-counter">
+		<li class="b-nav-counter-first"><TMPL_IF post_page_first><a href="<TMPL_VAR post_page_first>" title="<TMPL_VAR expr="ml('widget.browse.page.first')">"><i><TMPL_VAR expr="ml('widget.browse.page.first')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.first')"></i></span></TMPL_IF></li>
+		<li class="b-nav-counter-prev"><TMPL_IF post_page_prev><a href="<TMPL_VAR post_page_prev>" title="<TMPL_VAR expr="ml('widget.browse.page.previous')">"><i><TMPL_VAR expr="ml('widget.browse.page.previous')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.previous')"></i></span></TMPL_IF></li>
+		<li class="b-nav-counter-pages"><TMPL_VAR post_page>/<TMPL_VAR post_pages></li>
+		<li class="b-nav-counter-next"><TMPL_IF post_page_next><a href="<TMPL_VAR post_page_next>" title="<TMPL_VAR expr="ml('widget.browse.page.next')">"><i><TMPL_VAR expr="ml('widget.browse.page.next')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.next')"></i></span></TMPL_IF></li>
+		<li class="b-nav-counter-last"><TMPL_IF post_page_last><a href="<TMPL_VAR post_page_last>" title="<TMPL_VAR expr="ml('widget.browse.page.last')">"><i><TMPL_VAR expr="ml('widget.browse.page.last')"></i></a><TMPL_ELSE><span><i><TMPL_VAR expr="ml('widget.browse.page.last')"></i></span></TMPL_IF></li>
+	</ul>
+</TMPL_IF>	 
 

Tags: fiskus_boulder, livejournal, tmpl
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