File: extra_template.eex

package info (click to toggle)
elixir-ex-doc 0.35.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,784 kB
  • sloc: javascript: 2,848; makefile: 15; xml: 12; sh: 5
file content (60 lines) | stat: -rw-r--r-- 1,787 bytes parent folder | download
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<%= head_template(config, %{title: node.title, type: type, noindex: false}) %>
<%= sidebar_template(config, nodes_map) %>

<div id="top-content">
  <h1>
    <%= if node.source_url do %>
      <a href="<%= node.source_url %>" title="View Source" class="icon-action" rel="help">
        <i class="ri-code-s-slash-line" aria-hidden="true"></i>
        <span class="sr-only">View Source</span>
      </a>
    <% end %>
    <%= if type == :cheatmd do %>
      <button onclick="window.print()" title="Print Cheatsheet" class="icon-action" rel="print">
        <i class="ri-printer-line" aria-hidden="true"></i>
        <span class="sr-only">Print cheatsheet</span>
      </button>
    <% end %>

    <span><%= node.title_content %></span>
  </h1>

  <%= if type == :livemd do %>
    <div class="livebook-badge-container">
      <a href="#" class="livebook-badge">
        <img src="https://livebook.dev/badge/v1/blue.svg" alt="Run in Livebook" width="150" />
      </a>
    </div>
  <% end %>

  <%= link_headings(node.content) %>
</div>

<div class="bottom-actions" id="bottom-actions">
  <div class="bottom-actions-item">
    <%= if refs.prev do %>
      <a href="<%= refs.prev.path %>" class="bottom-actions-button" rel="prev">
        <span class="subheader">
          ← Previous Page
        </span>
        <span class="title">
          <%= refs.prev.title %>
        </span>
      </a>
    <% end %>
  </div>
  <div class="bottom-actions-item">
    <%= if refs.next do %>
      <a href="<%= refs.next.path %>" class="bottom-actions-button" rel="next">
        <span class="subheader">
          Next Page →
        </span>
        <span class="title">
          <%= refs.next.title %>
        </span>
      </a>
    <% end %>
  </div>
</div>

<%= footer_template(config, node) %>