site

Website's source files.
git clone git://git.ryanmj.xyz/site.git
Log | Files | Refs | LICENSE

commit 363d9afac0c300529fc392568b33d0ffa4f01cdb
parent bd598d9d82bd390fe507bde40726a96d94476283
Author: Ryan Jeffrey <ryan@ryanmj.xyz>
Date:   Thu, 27 Oct 2022 19:22:28 -0700

Show the created at and updated at time

Diffstat:
Mapp/assets/stylesheets/application.css | 5+++++
Mapp/views/posts/blog_index.html.erb | 30+++++++++++++++++++++---------
2 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css @@ -47,6 +47,11 @@ h1 { text-shadow: 0 0 1px var(--header-color); } +/* Do not display figure number */ +.figure-number { + display: none; +} + h2 { margin: 0 auto; padding: 0; diff --git a/app/views/posts/blog_index.html.erb b/app/views/posts/blog_index.html.erb @@ -1,12 +1,24 @@ <div class="ewin"> - <ul> - <li><a href="/">..</a></li> - <% @posts.each do |post| %> - <li> - <a href="/posts/<%= post.url %>"> - <%= post.title %> - </a> - </li> + <table> + <tr> + <th><a href="/">Name</a></th> + <th>Created</th> + <th>Last Updated</th> + </tr> + <% @posts.sort_by(&:created_at).reverse.each do |post| %> + <tr> + <th> + <a href="/posts/<%= post.url %>"> + <%= post.title %> + </a> + </th> + <th> + <%= post.created_at.strftime("%Y %b %d") %> + </th> + <th> + <%= post.updated_at.strftime("%Y %b %d") %> + </th> + </tr> <% end %> - </ul> + </table> </div>