Mercurial Hosting > nabble
comparison src/nabble/view/naml/view_news.naml @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7ecd1a4ef557 |
---|---|
1 <subroutine name="view_news" requires="basic,nabble,servlet"> | |
2 <n.apply_app_namespace.view_news_page /> | |
3 </subroutine> | |
4 | |
5 <macro name="view_news_page"> | |
6 <n.set_app_rows_per_page rows_per_page="[n.news_topics_per_page/]"/> | |
7 <n.app_html> | |
8 <head> | |
9 <n.app_title/> | |
10 <n.news_table_stylesheet/> | |
11 </head> | |
12 <body> | |
13 <n.news_page_layout/> | |
14 </body> | |
15 </n.app_html> | |
16 </macro> | |
17 | |
18 <macro name="news_topics_per_page"> | |
19 25 | |
20 </macro> | |
21 | |
22 <macro name="news_table_stylesheet"> | |
23 <style type="text/css"> | |
24 span.topic-count { | |
25 font-size:80%; | |
26 margin-right:1.7em; | |
27 } | |
28 h2.news-header { | |
29 margin:0; | |
30 padding:0; | |
31 } | |
32 table.news-table { | |
33 width:100%; | |
34 border-collapse:collapse; | |
35 } | |
36 table.news-table td.header { | |
37 padding: .2em .3em; | |
38 border-bottom-width: 1px; | |
39 border-bottom-style: solid; | |
40 } | |
41 td.news-row { | |
42 padding:.7em .1em .6em .5em; | |
43 border-width: 1px; | |
44 border-style: solid; | |
45 border-left: none; | |
46 border-right: none; | |
47 border-top: none; | |
48 } | |
49 td.thumbnail-cell { | |
50 width:140px; | |
51 text-align:center; | |
52 padding-top:1em; | |
53 vertical-align:top; | |
54 } | |
55 div.news-details { | |
56 text-align:right; | |
57 clear:both; | |
58 font-variant: small-caps; | |
59 padding:.5em 0 0 0; | |
60 } | |
61 div.news-title h2 { | |
62 display:inline; | |
63 } | |
64 </style> | |
65 </macro> | |
66 | |
67 <macro name="news_page_layout" requires="app_namespace"> | |
68 <n.column_layout.> | |
69 <n.column. width="70%"> | |
70 <n.news_sidebar_widget/> | |
71 </n.column.> | |
72 <n.column. width="30%"> | |
73 <n.sidebar_widget/> | |
74 </n.column.> | |
75 </n.column_layout.> | |
76 </macro> | |
77 | |
78 <macro name="news_page_layout" requires="narrow_app_namespace"> | |
79 <n.new_topic_action_link text="[t]New Post[/t]"/> | |
80 <n.subapps_action_link text="[t]Subcategories[/t]"/> | |
81 <n.people_action_link/> | |
82 <n.options_action_menu/> | |
83 | |
84 <div style="clear:both"/> | |
85 <n.widget.> | |
86 <div class="sidebar-section shaded-bg-color"> | |
87 <n.app_topic_pagination margin=".2em .5em"/> | |
88 <h2 class="news-header"> | |
89 <t>Topics</t> | |
90 <span class="weak-color topic-count"> | |
91 (<n.app_topic_count/>) | |
92 </span> | |
93 </h2> | |
94 </div> | |
95 <n.news_table/> | |
96 <n.app_topic_pagination margin=".5em .3em"/> | |
97 </n.widget.> | |
98 <n.forum_footer/> | |
99 </macro> | |
100 | |
101 <macro name="news_sidebar_widget"> | |
102 <n.widget.> | |
103 <div class="sidebar-section shaded-bg-color"> | |
104 <n.app_topic_pagination margin=".2em .5em"/> | |
105 <h2 class="news-header"> | |
106 <t>Topics</t> | |
107 <span class="weak-color topic-count"> | |
108 (<n.app_topic_count/>) | |
109 </span> | |
110 </h2> | |
111 </div> | |
112 <n.news_table/> | |
113 <n.app_topic_pagination margin=".5em .3em"/> | |
114 </n.widget.> | |
115 </macro> | |
116 | |
117 <macro name="news_table"> | |
118 <table id="news-table" class="news-table medium-border-color"> | |
119 <n.page_node.topics_list. | |
120 sort="pinned-and-root-node-date" | |
121 start="[n.app_index_record/]" | |
122 length="[n.app_rows_per_page/]" | |
123 filter="[n.app_topic_filter/]" | |
124 > | |
125 <n.handle_empty_newspaper/> | |
126 <n.loop.current_node.> | |
127 <tr> | |
128 <n.if.has_thumbnail> | |
129 <then> | |
130 <td class="news-row thumbnail-cell light-border-color"> | |
131 <n.thumbnail_box/> | |
132 </td> | |
133 <td class="news-row light-border-color" style="vertical-align:top"> | |
134 <n.news_text_cell/> | |
135 </td> | |
136 </then> | |
137 <else> | |
138 <td class="news-row light-border-color" style="vertical-align:top" colspan="2"> | |
139 <n.news_text_cell/> | |
140 </td> | |
141 </else> | |
142 </n.if.has_thumbnail> | |
143 </tr> | |
144 </n.loop.current_node.> | |
145 </n.page_node.topics_list.> | |
146 </table> | |
147 </macro> | |
148 | |
149 <macro name="news_text_cell" requires="node"> | |
150 <n.news_title_row/> | |
151 <n.news_details_row/> | |
152 <n.news_snippet_row/> | |
153 </macro> | |
154 | |
155 <macro name="news_title_row" requires="node"> | |
156 <div class="news-title"> | |
157 <h2 class="news-title adbayes-content"> | |
158 <n.node_link/> | |
159 </h2> | |
160 <n.if.is_in_subapp> | |
161 <then> | |
162 <t>in <t.location.italic.subapp_link_on_hover/></t> | |
163 </then> | |
164 </n.if.is_in_subapp> | |
165 </div> | |
166 </macro> | |
167 | |
168 <macro name="news_snippet_row" requires="node"> | |
169 <div class="node-snippet adbayes-content" style="padding:1em 0 .5em;clear:both"> | |
170 <n.truncate size="300"> | |
171 <text><n.remove_html_tags.message.as_text/></text> | |
172 <if_truncated> | |
173 <n.news_snippet_read_more_link/> | |
174 </if_truncated> | |
175 </n.truncate> | |
176 </div> | |
177 </macro> | |
178 | |
179 <macro name="news_snippet_read_more_link" requires="node"> | |
180 <n.node_link text="[t]read more[/t]"/> | |
181 </macro> | |
182 | |
183 <macro name="news_details_row" requires="node"> | |
184 <div class="news-details weak-color"> | |
185 <span class="nowrap"> | |
186 <t>by <t.author.owner.name truncate="20"/></t> | |
187 • | |
188 </span> | |
189 <span class="nowrap"><n.when_created.short_format/></span> | |
190 <span>|</span> | |
191 <span class="nowrap"><n.views show_text="true"/></span> | |
192 <n.if.not.is_locked_topic> | |
193 <then> | |
194 <span>|</span> | |
195 <span class="nowrap"> | |
196 <img src="/images/icon_message.png" align="absmiddle" height="14" width="15"/> | |
197 <n.if.has_replies> | |
198 <then><n.comments_link/></then> | |
199 <else>0 <t>comments</t></else> | |
200 </n.if.has_replies> | |
201 </span> | |
202 </then> | |
203 </n.if.not.is_locked_topic> | |
204 <n.if.is_pinned_in_loop> | |
205 <then><span><img src="/images/pin.png" width="20" height="21" style="margin:0 .5em" align="absmiddle"/></span></then> | |
206 </n.if.is_pinned_in_loop> | |
207 </div> | |
208 </macro> | |
209 | |
210 <macro name="handle_empty_newspaper" requires="node_list,node_page"> | |
211 <n.if.not.has_more_elements> | |
212 <then> | |
213 <div class="light-border-color" style="border-width:2px;border-style:solid;padding:1.5em .5em"> | |
214 <n.page_node.> | |
215 <n.new_topic_link> | |
216 <text> | |
217 <div class="second-font weak-color" style="font-size:150%;font-weight:bold;margin-bottom:.5em"> | |
218 <t>Write Your First Headline</t> | |
219 </div> | |
220 <t>Click here to make your first post</t> | |
221 </text> | |
222 </n.new_topic_link> | |
223 </n.page_node.> | |
224 </div> | |
225 </then> | |
226 </n.if.not.has_more_elements> | |
227 </macro> |