diff options
author | John Ankarström <john@ankarstrom.se> | 2021-03-03 14:36:03 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-03-03 14:36:03 +0100 |
commit | 27067b4d8e5e854f16e3bdb08c2f63f4250632a8 (patch) | |
tree | 3221635a1fda3604da02548debfab19b96ddd50c /interfaces/http/web/views | |
parent | d40c681d2f9d56e01cd5f1ff3e586b79ea4397f9 (diff) | |
download | comb-27067b4d8e5e854f16e3bdb08c2f63f4250632a8.tar.gz |
Add 'url' field to config table
Diffstat (limited to 'interfaces/http/web/views')
-rw-r--r-- | interfaces/http/web/views/index.erb | 9 | ||||
-rw-r--r-- | interfaces/http/web/views/not_found.erb | 2 | ||||
-rw-r--r-- | interfaces/http/web/views/post.erb | 9 |
3 files changed, 15 insertions, 5 deletions
diff --git a/interfaces/http/web/views/index.erb b/interfaces/http/web/views/index.erb index ee96a6c..657859b 100644 --- a/interfaces/http/web/views/index.erb +++ b/interfaces/http/web/views/index.erb @@ -1,7 +1,12 @@ <% for post in @posts %> - <h2><%= post.title %></h2> + <h2><a href="<%= post.url %>"><%= post.title %></a></h2> <div class="meta"> - <p><%= post.created_at.strftime('%e %b %Y') %></p> + <p> + by + <%= post.user.name || post.user.username %> + on + <%= post.created_at.strftime('%e %b %Y') %> + </p> </div> <div class="content"> <%= post.body %> diff --git a/interfaces/http/web/views/not_found.erb b/interfaces/http/web/views/not_found.erb index 7a4228b..71912b3 100644 --- a/interfaces/http/web/views/not_found.erb +++ b/interfaces/http/web/views/not_found.erb @@ -1,3 +1,3 @@ -<h1>404 Not Found</h1> +<h2>404 Not Found</h2> <p>The page you are looking for does not exist.</p> <p><a href="/">Go to front page</a>.</p> diff --git a/interfaces/http/web/views/post.erb b/interfaces/http/web/views/post.erb index 1fe689a..21794fb 100644 --- a/interfaces/http/web/views/post.erb +++ b/interfaces/http/web/views/post.erb @@ -1,7 +1,12 @@ <h1><%= @post.title %></h1> <div class="meta"> - <p><%= @post.created_at %></p> + <p> + by + <%= @post.user.name || @post.user.username %> + on + <%= @post.created_at.strftime('%e %b %Y') %> + </p> </div> <div class="content"> <%= @post.body %> -</div> +</div>
\ No newline at end of file |