Mercurial Hosting > nabble
diff src/nabble/view/naml/view_board.naml @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/nabble/view/naml/view_board.naml Thu Mar 21 19:15:52 2019 -0600 @@ -0,0 +1,128 @@ +<subroutine name="view_board" requires="basic,nabble,servlet"> + <n.view_board_page/> +</subroutine> + +<macro name="view_board_page"> + <n.app_html> + <head> + <n.app_title/> + <n.board_table_stylesheet/> + </head> + <body> + <n.topics_action_link/> + <n.people_action_link/> + <n.options_action_menu/> + + <n.board_table.> + <n.subcategories_column title="[n.current_node.node_link class='second-font category-link'/]"/> + <n.topic_count_column width="5em"/> + <n.post_count_column width="5em"/> + <n.last_post_column/> + </n.board_table.> + + <n.forum_footer/> + </body> + </n.app_html> +</macro> + +<macro name="board_table_stylesheet"> + <style type="text/css"> + table.main { + margin-top:.2em; + border-collapse:collapse; + width:100%; + border-width:1px; + border-style:solid; + } + table.main tr.category-row td { + padding: .3em .4em; + font-weight: bold; + border-width: 1px; + border-style: solid; + border-left: none; + border-right: none; + } + table.main tr.main-row td { + padding:.3em .5em; + border-bottom-width: 1px; + border-bottom-style: dotted; + } + table.main tr.main-row, + table.avatar-table tr { + vertical-align:top; + } + div.sub-forums { + margin-top:.8em; + font-size:90%; + clear:both; + } + a.category-link { + text-decoration:none; + font-weight:bold; + font-size:110%; + } + </style> +</macro> + +<macro name="board_table" dot_parameter="columns"> + <div style="clear:both"></div> + <table class="main medium-border-color"> + <n.if.page_node.has_children> + <then> + <n.page_node.children_list. length="20"> + <n.loop.> + <n.table_header.> + <tr class="category-row shaded-bg-color"> + <n.columns/> + </tr> + </n.table_header.> + <n.if.current_node.has_children> + <then> + <n.current_node.children_list. length="20"> + <n.loop.> + <tr class="main-row"> + <n.columns/> + </tr> + </n.loop.> + <n.if.there_is_more> + <then> + <tr> + <td></td> + <td colspan="4"><n.page_node.node_link href="[n.url template='view_standard'/]" text="[t]View more[/t]"/> »</td> + </tr> + </then> + </n.if.there_is_more> + </n.current_node.children_list.> + </then> + <else> + <tr> + <td style="width:35px"></td> + <td style="padding:.7em .5em"> + <n.if.current_node.is_app> + <then><t>No sub-forums</t></then> + <else><t>No replies</t></else> + </n.if.current_node.is_app> + </td> + <td colspan="3"></td> + </tr> + </else> + </n.if.current_node.has_children> + </n.loop.> + <n.if.there_is_more> + <then> + <tr> + <td colspan="5" style="padding:.5em"><n.page_node.node_link href="[n.url template='view_standard'/]" text="[t]More categories[/t]"/> »</td> + </tr> + </then> + </n.if.there_is_more> + </n.page_node.children_list.> + </then> + <else> + <tr> + <td colspan="4"><t>No sub-forums</t></td> + </tr> + </else> + </n.if.page_node.has_children> + </table> + <div style="clear:both"></div> +</macro> \ No newline at end of file