summaryrefslogtreecommitdiff
path: root/app/views/layouts/application.html.erb
blob: a7ac625b284df297bddb71ffe29236ce95052552 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Cable Club</title>
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>
    <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>

    <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
    <%= javascript_importmap_tags %>
  </head>

  <body class="flex flex-col min-h-screen bg-orange-100 text-orange-900">

  <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 nav-links">
      <%= link_to root_path, class: "text-xl flex items-center space-x-4" do %>
        <%= image_tag "poke_ball_original_small.png", size: 60 %>
        <span>Cable Club</span>
      <% end %>
      <%= link_to "Runs", runs_path %>
    </div>
    <div class="space-x-8 nav-links">
      <% if user_signed_in? %>
        <%= link_to "Profile", user_path(current_user) %>
        <%= 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 mt-28">
    <div class="max-w-screen-lg mx-auto pb-4 flex items-center">
      <div class="flex-1 italic">
        <div>"Despite that, we never stop trying.<br>Why? It's a dream that never ends."</div>
        <div>- Scientist, Mossdeep Space Center</div>
      </div>
      <div><%= image_tag "oddish.png", size: 120 %></div>
      <div class="flex-1 text-right"><%= link_to "Source code", "https://git.aikuro.net/poems/cable-club" %></div>
    </div>
  </footer>
  </body>
</html>