diff options
| author | nsfisis <nsfisis@gmail.com> | 2022-11-20 22:36:04 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2022-11-20 22:49:35 +0900 |
| commit | af8b61cf2816ea330ee35b1e3fcb3d2b24a0f05d (patch) | |
| tree | 2037bdf4345e58071dcb30be0d972b5ab09bae2c /templates/document__post_list.html.erb | |
| parent | 75402b673c0f630b620904ce3153f8645d89d700 (diff) | |
| download | blog.nsfisis.dev-af8b61cf2816ea330ee35b1e3fcb3d2b24a0f05d.tar.gz blog.nsfisis.dev-af8b61cf2816ea330ee35b1e3fcb3d2b24a0f05d.tar.zst blog.nsfisis.dev-af8b61cf2816ea330ee35b1e3fcb3d2b24a0f05d.zip | |
refactor: organize template files
Diffstat (limited to 'templates/document__post_list.html.erb')
| -rw-r--r-- | templates/document__post_list.html.erb | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/templates/document__post_list.html.erb b/templates/document__post_list.html.erb new file mode 100644 index 0000000..c1429ec --- /dev/null +++ b/templates/document__post_list.html.erb @@ -0,0 +1,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="© <%= _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"> + © <%= _site_copyright_year %> <%= _author %> + </footer> + </body> +</html> |
