Welcome to mirror list, hosted at ThFree Co, Russian Federation.

navigation.html « partials « layouts - github.com/parsiya/Hugo-Octopress.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 50c9ced8c0ac854221c8f3d490128f1dd228f6f7 (plain)
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
<!-- mobile navigation -->
<fieldset class="mobile-nav">
  <!-- apart from Disqus and analytics, this is the only place where we need JavaScript -->
  <select onchange="location = this.value;">
    <option value="">Navigate…</option>
      {{ range .Site.Menus.main }}
        <option value="{{ .URL | absURL }}">» {{ .Name }}</option>
      {{ end }}
  </select>
</fieldset>

<!-- reading menu items from config file -->
<ul class="main-navigation">
  <!-- links to root open in the same window - other links will be opened in a new window if navigationNewWindow is set to true in the config file -->
  {{ range .Site.Menus.main }}
    {{ if eq .URL "/" }}
      <li><a href="{{ .URL | absURL }}" title="{{ .Name }}">{{ .Name }}</a></li>
    {{ else }}
      <li><a href="{{ .URL | absURL }}" title="{{ .Name }}" {{ if eq $.Site.Params.navigationNewWindow true }} target="_blank" {{ end }} rel="noopener noreferrer">{{ .Name }}</a></li>
    {{ end }}
  {{ end }}
</ul>

<ul class="subscription">
  {{ if or .Site.Params.rss .Site.Params.textrss }}
    {{ if .Site.Params.rss }}
        <a href="{{ "/index.xml" | absURL }}" target="_blank" type="application/rss+xml" title="RSS" rel="noopener noreferrer"><i class="fa fa-rss-square fa-lg"></i></a>
    {{ else }}
        <li><a href="/index.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
    {{ end }}
  {{ end }}
</ul>

{{ with .Site.Params.searchEngineURL }}
  <form action="{{ . }}" method="get" target="_blank" rel="noopener noreferrer">
    <fieldset role="search">
      <input class="search" type="text" name="q" results="0" placeholder="Search"/>
      <input type="hidden" name="q" value="site:{{ "/" | absURL }}" />
    </fieldset>
  </form>
{{end}}