NEW: styling (#5)
This commit is contained in:
parent
26995d72e3
commit
2b8a6a1927
13 changed files with 175 additions and 118 deletions
|
@ -1,5 +1,15 @@
|
|||
<main role="main" class="container">
|
||||
<p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
|
||||
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
|
||||
<%= if not is_nil(get_flash(@conn, :info)) do %>
|
||||
<p class="notification is-info" role="alert">
|
||||
<%= get_flash(@conn, :info) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= if not is_nil(get_flash(@conn, :error)) do %>
|
||||
<p class="notification is-danger" role="alert">
|
||||
<%= get_flash(@conn, :error) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= @inner_content %>
|
||||
</main>
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
<main role="main" class="container">
|
||||
<p class="alert alert-info" role="alert"
|
||||
phx-click="lv:clear-flash"
|
||||
phx-value-key="info"><%= live_flash(@flash, :info) %></p>
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<%= if live_flash(@flash, :info) do %>
|
||||
<p class="alert alert-info" role="alert"
|
||||
phx-click="lv:clear-flash"
|
||||
phx-value-key="info"><%= live_flash(@flash, :info) %></p>
|
||||
<% end %>
|
||||
|
||||
<p class="alert alert-danger" role="alert"
|
||||
phx-click="lv:clear-flash"
|
||||
phx-value-key="error"><%= live_flash(@flash, :error) %></p>
|
||||
<%= if live_flash(@flash, :error) do %>
|
||||
<p class="alert alert-danger" role="alert"
|
||||
phx-click="lv:clear-flash"
|
||||
phx-value-key="error"><%= live_flash(@flash, :error) %></p>
|
||||
<% end %>
|
||||
|
||||
<%= @inner_content %>
|
||||
<%= @inner_content %>
|
||||
</div>
|
||||
</main>
|
||||
|
|
|
@ -2,27 +2,34 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>Planner</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>planner</title>
|
||||
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
|
||||
<%= csrf_meta_tag() %>
|
||||
<script defer type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Planner</h1>
|
||||
<ul>
|
||||
<%= if @current_user do %>
|
||||
<li><%= @current_user.email %></li>
|
||||
<li><%= link "Settings", to: Routes.user_settings_path(@conn, :edit) %></li>
|
||||
<li><%= link "Logout", to: Routes.user_session_path(@conn, :delete), method: :delete %></li>
|
||||
<% else %>
|
||||
<li><%= link "Login", to: Routes.user_session_path(@conn, :new) %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<nav class="navbar is-dark" role="navigation">
|
||||
<div class="navbar-brand">
|
||||
<%= link "planner", to: Routes.landing_path(@conn, :index), class: "navbar-item has-text-weight-bold hast-text-info-light" %>
|
||||
|
||||
<hr>
|
||||
<a role="button" class="navbar-burger burger" data-target="nvbr">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<%= @inner_content %>
|
||||
<div id="nvbr" class="navbar-menu">
|
||||
<div class="navbar-start">
|
||||
<%= link "tasks", to: Routes.landing_path(@conn, :index), class: "navbar-item" %>
|
||||
</div>
|
||||
|
||||
<div class="navbar-end">
|
||||
<%= link "log out", to: Routes.user_session_path(@conn, :delete), method: :delete, class: "navbar-item" %>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<%= @inner_content %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue