priv/templates/article.html.eex

Summary

Maintainability
Test Coverage
<!doctype html>
<html class="no-js" lang="ja">

<head>
  <meta charset="utf-8">
  <title><%= title %></title>
  <meta name="description" content="<%= description %>">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="assets/css/normalize.css">
  <link rel="stylesheet" href="assets/css/main.css">
  <!-- for highlightjs -->
  <link rel="stylesheet" href="assets/css/default.css">
  <link rel="stylesheet" href="assets/css/solarized-dark.css">
</head>

<body>
  <!--[if IE]>
    <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
  <![endif]-->

  <header>
    <h1><%= title %></h1>
  </header>

  <main>
  <%= body %>
  </main>

  <footer>
    <%= if !Enum.empty?(links) do %>
    <nav>
      <p>links</p>
      <ul>
      <%= for link <- links do %>
        <li><a href="<%= link %>.html"><%= link %></a></li>
      <% end %>
      </ul>
    </nav>
    <% end %>
    <%= if !Enum.empty?(linked) do %>
    <nav>
      <ul>
      <%= for {title, links} <- linked do %>
        <li><a href="<%= title %>.html"><%= title %></a>
          <ul>
          <%= for link <- links do %>
            <li><a href="<%= link %>.html"><%= link %></a></li>
          <% end %>
          </ul>
        </li>
      <% end %>
      </ul>
    </nav>
    <% end %>
  </footer>

  <% if ga_tracking_id do %>
  <script>
    window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;
    ga('create', '<%= ga_tracking_id %>', 'auto'); ga('set','transport','beacon'); ga('send', 'pageview')
  </script>
  <script src="https://www.google-analytics.com/analytics.js" async></script>
  <% end %>

  <script src="assets/js/highlight.pack.js"></script>
  <script>
    document.addEventListener('DOMContentLoaded', (event) => {
      document.querySelectorAll('pre code').forEach((block) => {
        hljs.highlightBlock(block);
      });
    });
  </script>
</body>
</html>