summaryrefslogtreecommitdiffstats
path: root/themes/oni/index.tmpl
blob: 6562c1ef7a7200ddb6c7609e708037ee974bdc6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{namespace coleslaw.theme.oni}
{template index}
  <header>
    <h1 class="title">{$index.title}</h1>
  </header>

  {foreach $obj in $index.content}
    <article>
      <header>
        <h1><a href="{$config.domain}/{$obj.url}">{$obj.title}</a></h1>
        <small>Published on: <time>{$obj.date}</time></small>
      </header>

      <div class="article-content">
        {$obj.text|noAutoescape}
      </div>

      <footer>
        {if $obj.tags}
          This article is tagged as:
          {foreach $tag in $obj.tags}
            <a href="{$config.domain}/{$tag.url}">{$tag.name}</a>{nil}
            {if not isLast($tag)},{sp}{/if}
          {/foreach}
        {/if}
      </footer>
    </article>
    {if not isLast($obj)}
      <hr />
    {/if}
  {/foreach}

  <nav id="page-navigation">
    <ul>
      {if $prev}
        <li class="prev">
          <a href="{$config.domain}/{$prev.url}">Previous</a>
        </li>
      {/if}
      {if $next}
        <li class="next">
          <a href="{$config.domain}/{$next.url}">Next</a>
        </li>
      {/if}
    </ul>
    <div class="clear"></div>
  </nav>

  <hr />

  {if $tags}
    <div id="tagsoup">
      <p>
        This blog covers
        {foreach $tag in $tags}
          <a href="{$config.domain}/{$tag.url}">{$tag.name}</a>{nil}
          {if not isLast($tag)},{sp}{/if}
        {/foreach}
      </p>
    </div>
  {/if}

  {if $months}
    <div id="monthsoup">
      <p>
        View content from
        {foreach $month in $months}
          <a href="{$config.domain}/{$month.url}">{$month.name}</a>{nil}
          {if not isLast($month)},{sp}{/if}
        {/foreach}
      </p>
    </div>
  {/if}
{/template}