<bp:template>
  <main>
    <b:section class='main-section' id='main-section' maxwidgets='1' name='Main section' showaddelement='no'>
      <b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog' visible='true'>
        <b:includable id='main' var='this'>
          <b:comment>###### Posts ######</b:comment>

          <b:comment>### Homepage | Search (label|query|default) page | Archive page ###</b:comment>

          <b:if cond='data:view.isMultipleItems'>
            <b:if cond='data:posts.notEmpty'>
              <b:loop values='data:posts' var='post'>
                <article expr:id='"post-" + data:post.id'>

                  <b:comment>### Title ###</b:comment>
                  <h2>
                    <a expr:href='data:post.link ?: data:post.url'>
                      <b:eval expr='data:post.title ? data:post.title : data:messages.noTitle'/>
                    </a>
                  </h2>

                </article>
              </b:loop>
            </b:if>
          </b:if>

          <b:comment>### Single page ###</b:comment>

          <b:if cond='data:view.isPost'>
            <b:if cond='data:posts.notEmpty'>
              <b:loop values='data:posts' var='post'>
                <article expr:id='"post-" + data:post.id'>

                  <b:comment>### Title ###</b:comment>
                  <h1>
                    <b:eval expr='data:post.title ? data:post.title : data:messages.noTitle'/>
                  </h1>

                  <b:comment>### Body ###</b:comment>
                  <data:post.body/>

                </article>
              </b:loop>
            </b:if>
          </b:if>

          <b:comment>### Static page ###</b:comment>

          <b:if cond='data:view.isPage'>
            <b:if cond='data:posts.notEmpty'>
              <b:loop values='data:posts' var='post'>
                <article expr:id='"post-" + data:post.id'>

                  <b:comment>### Title ###</b:comment>
                  <h1>
                    <b:eval expr='data:post.title ? data:post.title : data:messages.noTitle'/>
                  </h1>

                  <b:comment>### Body ###</b:comment>
                  <data:post.body/>

                </article>
              </b:loop>
            </b:if>
          </b:if>

          <b:comment>###### Pager ######</b:comment>

          <b:if cond='!data:view.isPage and data:posts.notEmpty'>
            <nav>
              <a>
                <b:attr expr:value='data:newerPageUrl ? data:newerPageUrl : "#"' name='href'/>
                <b:class cond='!data:newerPageUrl' name='disabled'/>
                <data:messages.newer/>
              </a>

              <a>
                <b:attr expr:value='data:blog.homepageUrl' name='href'/>
                <data:messages.home/>
              </a>

              <a>
                <b:attr expr:value='data:olderPageUrl ? data:olderPageUrl : "#"' name='href'/>
                <b:class cond='!data:olderPageUrl' name='disabled'/>
                <data:messages.older/>
              </a>
            </nav>
          </b:if>
        </b:includable>
        {# Remove default includable #}
        <b:includable id='aboutPostAuthor'/>
        <b:includable id='addComments'/>
        <b:includable id='commentAuthorAvatar'/>
        <b:includable id='commentDeleteIcon'/>
        <b:includable id='commentForm'/>
        <b:includable id='commentFormIframeSrc'/>
        <b:includable id='commentItem'/>
        <b:includable id='commentList'/>
        <b:includable id='commentPicker'/>
        <b:includable id='comments'/>
        <b:includable id='commentsTitle'/>
        <b:includable id='feedLinks'/>
        <b:includable id='feedLinksBody'/>
        <b:includable id='homePageLink'/>
        <b:includable id='iframeComments'/>
        <b:includable id='inlineAd'/>
        <b:includable id='nextPageLink'/>
        <b:includable id='post'/>
        <b:includable id='postBody'/>
        <b:includable id='postBodySnippet'/>
        <b:includable id='postCommentsAndAd'/>
        <b:includable id='postCommentsLink'/>
        <b:includable id='postFooter'/>
        <b:includable id='postFooterAuthorProfile'/>
        <b:includable id='postHeader'/>
        <b:includable id='postMeta'/>
        <b:includable id='postPagination'/>
        <b:includable id='postTitle'/>
        <b:includable id='previousPageLink'/>
        <b:includable id='threadedCommentForm'/>
        <b:includable id='threadedCommentJs'/>
        <b:includable id='threadedComments'/>
      </b:widget>
    </b:section>
  </main>
</bp:template>
