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 | |
| 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')
| -rw-r--r-- | templates/document__post.html.erb | 9 | ||||
| -rw-r--r-- | templates/document__post_list.html.erb (renamed from templates/tag.html.erb) | 23 | ||||
| -rw-r--r-- | templates/document__tag.html.erb (renamed from templates/posts_list.html.erb) | 23 |
3 files changed, 26 insertions, 29 deletions
diff --git a/templates/document__post.html.erb b/templates/document__post.html.erb index bc9a842..a52ac9a 100644 --- a/templates/document__post.html.erb +++ b/templates/document__post.html.erb @@ -4,11 +4,10 @@ <% _lang = attr 'lang' %> <% _site_copyright_year = attr 'site-copyright-year' %> <% _copyright_year = attr 'copyright-year' %> -<% _revisions = attr 'revision-history' %> <% _site_name = attr 'site-name' %> +<% _title = title %> +<% _revisions = attr 'revision-history' %> <% _tags = attr 'tags' %> -<% _doctitle = doctitle %> -<% _header_title = header.title %> <% _content = content %> <!DOCTYPE html> <html lang="<%= _lang %>"> @@ -20,7 +19,7 @@ <meta name="description" content="<%= _description %>"> <meta name="keywords" content="<%= _tags.map(&:label).join(',') %>"> <link rel="icon" type="image/svg+xml" href="/favicon.svg"> - <title><%= _doctitle %> | <%= _site_name %></title> + <title><%= _title %> | <%= _site_name %></title> <% for stylesheet in _stylesheets %> <link rel="stylesheet" href="<%= stylesheet %>"> <% end %> @@ -36,7 +35,7 @@ <main class="main"> <article class="post-single"> <header class="post-header"> - <h1 class="post-title"><%= _header_title %></h1> + <h1 class="post-title"><%= _title %></h1> <% if not _tags.empty? %> <ul class="post-tags"> <% for tag in _tags %> diff --git a/templates/tag.html.erb b/templates/document__post_list.html.erb index c92c0ca..c1429ec 100644 --- a/templates/tag.html.erb +++ b/templates/document__post_list.html.erb @@ -1,12 +1,11 @@ -<% _stylesheets = stylesheets %> -<% _author = author %> -<% _description = description %> -<% _lang = lang %> -<% _site_copyright_year = site_copyright_year %> -<% _copyright_year = copyright_year %> -<% _site_name = site_name %> -<% _doctitle = tag.label %> -<% _header_title = tag.label %> +<% _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 %>"> @@ -17,7 +16,7 @@ <meta name="copyright" content="© <%= _copyright_year %> <%= _author %>"> <meta name="description" content="<%= _description %>"> <link rel="icon" type="image/svg+xml" href="/favicon.svg"> - <title><%= _doctitle %> | <%= _site_name %></title> + <title><%= _title %> | <%= _site_name %></title> <% for stylesheet in _stylesheets %> <link rel="stylesheet" href="<%= stylesheet %>"> <% end %> @@ -26,13 +25,13 @@ <header class="header"> <nav class="nav"> <p class="logo"> - <a href="/">REPL: Rest-Eat-Program Loop</a> + <a href="/"><%= _site_name %></a> </p> </nav> </header> <main class="main"> <header class="page-header"> - <h1><%= _header_title %></h1> + <h1><%= _title %></h1> </header> <% for post in _posts %> <article class="post-entry"> diff --git a/templates/posts_list.html.erb b/templates/document__tag.html.erb index 5367258..c1429ec 100644 --- a/templates/posts_list.html.erb +++ b/templates/document__tag.html.erb @@ -1,12 +1,11 @@ -<% _stylesheets = stylesheets %> -<% _author = author %> -<% _description = description %> -<% _lang = lang %> -<% _site_copyright_year = site_copyright_year %> -<% _copyright_year = copyright_year %> -<% _site_name = site_name %> -<% _doctitle = doctitle %> -<% _header_title = header_title %> +<% _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 %>"> @@ -17,7 +16,7 @@ <meta name="copyright" content="© <%= _copyright_year %> <%= _author %>"> <meta name="description" content="<%= _description %>"> <link rel="icon" type="image/svg+xml" href="/favicon.svg"> - <title><%= _doctitle %> | <%= _site_name %></title> + <title><%= _title %> | <%= _site_name %></title> <% for stylesheet in _stylesheets %> <link rel="stylesheet" href="<%= stylesheet %>"> <% end %> @@ -26,13 +25,13 @@ <header class="header"> <nav class="nav"> <p class="logo"> - <a href="/">REPL: Rest-Eat-Program Loop</a> + <a href="/"><%= _site_name %></a> </p> </nav> </header> <main class="main"> <header class="page-header"> - <h1><%= _header_title %></h1> + <h1><%= _title %></h1> </header> <% for post in _posts %> <article class="post-entry"> |
