diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/home/index.html.erb | 15 | ||||
-rw-r--r-- | app/views/layouts/application.html.erb | 37 |
2 files changed, 42 insertions, 10 deletions
diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index d90d13f..10be138 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -1,4 +1,15 @@ -<div> +<div class="space-y-8"> <h1 class="font-bold text-2xl">Welcome to the Cable Club!</h1> - <%= link_to "Login", new_user_session_path %> + + <div class="space-y-4"> + <h2>Latest checkpoints</h2> + <ul class="list-disc"> + <% @latest_checkpoints.each do |checkpoint| %> + <li>At <%= checkpoint.created_at %> + <%= checkpoint.user.email %> checked in a save for + <%= link_to checkpoint.run.title, run_path(checkpoint.run) %> (<%= checkpoint.run.game.title %>) + <%= link_to "[save file]", rails_blob_path(checkpoint.save_file, disposition: "attachment") %></li> + <% end %> + </ul> + </div> </div> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 46b1f5b..d956145 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,7 +1,7 @@ <!DOCTYPE html> -<html> +<html lang="en"> <head> - <title>CableClub</title> + <title>Cable Club</title> <meta name="viewport" content="width=device-width,initial-scale=1"> <%= csrf_meta_tags %> <%= csp_meta_tag %> @@ -11,12 +11,33 @@ <%= javascript_importmap_tags %> </head> - <body> - <main class="container mx-auto mt-28 px-5"> - <p class="notice"><%= notice %></p> - <p class="alert"><%= alert %></p> + <body class="flex flex-col min-h-screen bg-slate-100"> - <%= yield %> - </main> + <nav class="flex flex-wrap items-center justify-between px-4 py-2 text-display"> + <div class="flex flex-grow items-center space-x-8"> + <%= link_to "Cable Club", root_path, class: "text-xl" %> + <%= link_to "Runs", runs_path %> + </div> + <div class="space-x-8"> + <% if user_signed_in? %> + <%= link_to "Profile", "#" %> + <%= link_to "Sign out", destroy_user_session_path %> + <% else %> + <%= link_to "Sign in", new_user_session_path %> + <% end %> + </div> + </nav> + + <main class="container mx-auto mt-28 px-5"> + <p class="notice"><%= notice %></p> + <p class="alert"><%= alert %></p> + + <%= yield %> + </main> + + <footer class="flex-shrink"> + <div class="max-w-screen-lg mx-auto pb-4"> + </div> + </footer> </body> </html> |