summaryrefslogtreecommitdiff
path: root/lib/lsg_web/templates/layout/app.html.eex
blob: 1871e8b2762b1c293377b9785ecf0fbd4009cf84 (plain) (blame)
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
<!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>
    <script src="<%= static_path(@conn, "/assets/js/app.js") %>"></script>
  </body>
</html>