aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/document__tag.html.erb
blob: c1429ec147df35197754fd86f7e09f65ff8ca687 (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
<% _stylesheets = attr 'stylesheets' %>
<% _author = attr 'author' %>
<% _description = attr 'description' %>
<% _lang = attr 'lang' %>
<% _site_copyright_year = attr 'site-copyright-year' %>
<% _copyright_year = attr 'copyright-year' %>
<% _site_name = attr 'site-name' %>
<% _title = title %>
<% _posts = posts %>
<!DOCTYPE html>
<html lang="<%= _lang %>">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author" content="<%= _author %>">
    <meta name="copyright" content="&copy; <%= _copyright_year %> <%= _author %>">
    <meta name="description" content="<%= _description %>">
    <link rel="icon" type="image/svg+xml" href="/favicon.svg">
    <title><%= _title %> | <%= _site_name %></title>
    <% for stylesheet in _stylesheets %>
      <link rel="stylesheet" href="<%= stylesheet %>">
    <% end %>
  </head>
  <body class="list">
    <header class="header">
      <nav class="nav">
        <p class="logo">
          <a href="/"><%= _site_name %></a>
        </p>
      </nav>
    </header>
    <main class="main">
      <header class="page-header">
        <h1><%= _title %></h1>
      </header>
      <% for post in _posts %>
        <article class="post-entry">
          <a href="<%= post.attributes['href'] %>">
            <header class="entry-header">
              <h2><%= post.doctitle %></h2>
            </header>
            <section class="entry-content">
              <p>
                <%= post.attributes['description'] %>
              </p>
            </section>
            <footer class="entry-footer">
              Posted on <time datetime="<%= post.attributes['revision-history'].first.date %>"><%= post.attributes['revision-history'].first.date %></time><% if post.attributes['revision-history'].length > 1 %>, updated on <time datetime="<%= post.attributes['revision-history'].last.date %>"><%= post.attributes['revision-history'].last.date %></time><% end %>
            </footer>
          </a>
        </article>
      <% end %>
    </main>
    <footer class="footer">
      &copy; <%= _site_copyright_year %> <%= _author %>
    </footer>
  </body>
</html>