homepage.naml

<macro name="view_homepage">
  <n.app_html>
    <head>
      <n.app_title/>
    </head>
    <body>
      <n.if.root_node.has_child_topics>
        <then>
          <div class="post-message">
            <n.homepage_node.node_message_as_html/>
          </div>
        </then>
        <else>
          <n.root_node.new_topic_link text="Create Homepage"/>
        </else>
      </n.if.root_node.has_child_topics>
    </body>
  </n.app_html>
</macro>


<macro name="homepage_node" dot_parameter="do">
  <n.root_node.children_list. start="0" length="1" sort="pinned-and-root-node-date" filter="[n.post_filter/]">
    <n.loop.>
      <n.current_node.do/>
    </n.loop.>
  </n.root_node.children_list.>
</macro>