summaryrefslogtreecommitdiff
path: root/lib/lsg_web/templates/layout/app.html.eex
diff options
context:
space:
mode:
authorhref <href@random.sh>2020-07-07 21:39:10 +0200
committerhref <href@random.sh>2020-07-07 21:39:51 +0200
commitd6ee134a5957e299c3ad59011df320b3c41e6e61 (patch)
tree29567e6635466f8a3415a935b3cc8a777019f5bc /lib/lsg_web/templates/layout/app.html.eex
parentbleh (diff)
pouet
Diffstat (limited to 'lib/lsg_web/templates/layout/app.html.eex')
-rw-r--r--lib/lsg_web/templates/layout/app.html.eex16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/lsg_web/templates/layout/app.html.eex b/lib/lsg_web/templates/layout/app.html.eex
index 4c2ad44..1871e8b 100644
--- a/lib/lsg_web/templates/layout/app.html.eex
+++ b/lib/lsg_web/templates/layout/app.html.eex
@@ -1,16 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
+ <%= page_title(@conn) %>
<meta charset="utf-8">
<meta name="robots" content="noindex, nofollow, nosnippet">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="robots" content="noindex, noarchive, nofollow, nosnippet" />
+ <title><%= Map.get(assigns, :title, "") %></title>
<link rel="stylesheet" href="<%= static_path(@conn, "/assets/css/app.css") %>">
</head>
<body>
<div class="container">
<main role="main">
+ <%= if !@conn.assigns[:no_header] do %>
+ <h1>
+ <small style="font-size: 14px;">
+ <a href="/"><%= Keyword.get(Application.get_env(:lsg, :irc), :name, "ircbot") %></a>
+ <%= if @conn.assigns[:account], do: @conn.assigns.account.name %>
+ &rsaquo;
+ <%= if n = @conn.assigns[:network] do %><a href="/<%= n %>"><%= n %></a> &rsaquo; <% end %>
+ <%= if c = @conn.assigns[:chan] do %><a href="/<%= @conn.assigns.network %>/<%= LSGWeb.format_chan(c) %>"><%= c %></a> &rsaquo; <% end %>
+ <%= for({name, href} <- @conn.assigns[:breadcrumbs]||[], do: [link(name, to: href), raw(" &rsaquo; ")]) %>
+ </small><br />
+ <%= @conn.assigns[:title] || @conn.assigns[:chan] || @conn.assigns[:network] %>
+ </h1>
+ <% end %>
<%= render @view_module, @view_template, assigns %>
</main>
</div>