summaryrefslogtreecommitdiff
path: root/lib/aggiedit_web/templates/layout
diff options
context:
space:
mode:
authorLogan Hunt <loganhunt@simponic.xyz>2022-04-14 00:18:01 -0600
committerLogan Hunt <loganhunt@simponic.xyz>2022-04-14 00:18:01 -0600
commitddfab312f73a3f3e15ceb6fec7d350500adb53d6 (patch)
tree9cb6db148a93f21d320538ecc0a523aff8907244 /lib/aggiedit_web/templates/layout
parent43f225e181ec370dfa7de1b2dc9f18d9eec31be8 (diff)
downloadaggiedit-ddfab312f73a3f3e15ceb6fec7d350500adb53d6.tar.gz
aggiedit-ddfab312f73a3f3e15ceb6fec7d350500adb53d6.zip
Update UI
Diffstat (limited to 'lib/aggiedit_web/templates/layout')
-rw-r--r--lib/aggiedit_web/templates/layout/_user_menu.html.heex21
-rw-r--r--lib/aggiedit_web/templates/layout/root.html.heex47
2 files changed, 46 insertions, 22 deletions
diff --git a/lib/aggiedit_web/templates/layout/_user_menu.html.heex b/lib/aggiedit_web/templates/layout/_user_menu.html.heex
index f281cfc..4ab3b78 100644
--- a/lib/aggiedit_web/templates/layout/_user_menu.html.heex
+++ b/lib/aggiedit_web/templates/layout/_user_menu.html.heex
@@ -1,10 +1,15 @@
-<ul>
<%= if @current_user do %>
- <li><%= @current_user.email %></li>
- <li><%= link "Settings", to: Routes.user_settings_path(@conn, :edit) %></li>
- <li><%= link "Log out", to: Routes.user_session_path(@conn, :delete), method: :delete %></li>
+ <li class="nav-item active">
+ <%= link "Settings", to: Routes.user_settings_path(@conn, :edit), class: "nav-link" %>
+ </li>
+ <li class="nav-item active">
+ <%= link "Log out", to: Routes.user_session_path(@conn, :delete), method: :delete, class: "nav-link" %>
+ </li>
<% else %>
- <li><%= link "Register", to: Routes.user_registration_path(@conn, :new) %></li>
- <li><%= link "Log in", to: Routes.user_session_path(@conn, :new) %></li>
-<% end %>
-</ul>
+ <li class="nav-item active">
+ <%= link "Register", to: Routes.user_registration_path(@conn, :new), class: "nav-link" %>
+ </li>
+ <li class="nav-item active">
+ <%= link "Log in", to: Routes.user_session_path(@conn, :new), class: "nav-link" %>
+ </li>
+<% end %> \ No newline at end of file
diff --git a/lib/aggiedit_web/templates/layout/root.html.heex b/lib/aggiedit_web/templates/layout/root.html.heex
index 014c44a..3fb7d93 100644
--- a/lib/aggiedit_web/templates/layout/root.html.heex
+++ b/lib/aggiedit_web/templates/layout/root.html.heex
@@ -5,24 +5,43 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<%= csrf_meta_tag() %>
- <%= live_title_tag assigns[:page_title] || "Aggiedit", suffix: " ยท Phoenix Framework" %>
+ <%= live_title_tag assigns[:page_title] || "Aggiedit" %>
<link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/assets/app.css")}/>
<script defer phx-track-static type="text/javascript" src={Routes.static_path(@conn, "/assets/app.js")}></script>
+
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
</head>
- <body>
+ <body class="bg-secondary min-vh-100">
<header>
- <section class="container">
- <nav>
- <ul>
- <li><a href="https://hexdocs.pm/phoenix/overview.html">Get Started</a></li>
- <%= if function_exported?(Routes, :live_dashboard_path, 2) do %>
- <li><%= link "LiveDashboard", to: Routes.live_dashboard_path(@conn, :home) %></li>
- <% end %>
- </ul>
- <%= render "_user_menu.html", assigns %>
- </nav>
- </section>
+ <nav class="navbar navbar-expand-md navbar-dark bg-dark">
+ <div class="container">
+ <a href="/" class="navbar-brand">
+ AggiEdit
+ </a>
+ <button class="navbar-toggler ms-auto" type="button" data-bs-toggle="collapse" data-bs-target="#toggle">
+ <span class="navbar-toggler-icon"></span>
+ </button>
+ <div class="navbar-collapse collapse" id="toggle">
+ <ul class="navbar-nav">
+ <li class="nav-item active">
+ <a class="nav-link" href="/">Home</a>
+ </li>
+ <%= if @current_user do %>
+ <li class="nav-item active">
+ <%= link "My SubAggie", to: "/room/#{@current_user.room_id}", class: "nav-link" %>
+ </li>
+ <% end %>
+ </ul>
+ <ul class="navbar-nav ms-auto">
+ <%= render "_user_menu.html", assigns %>
+ </ul>
+ </div>
+ </div>
+ </nav>
</header>
- <%= @inner_content %>
+ <div class="container mt-2 bg-light p-2 shadow rounded">
+ <%= @inner_content %>
+ </div>
</body>
</html>