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: c371715f59fa7b21119344d218e0902001f2a043 (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
42
43
44
<!-- mobile navigation -->
<fieldset class="mobile-nav">
  <!-- this needs JavaScript but works until I manage to make one with CSS without wrecking the site -->
  <select onchange="location = this.value;">
    <option value="">Navigate…</option>
      {{ range .Site.Menus.main }}
        <option value="{{ .URL | absURL }}">» {{ .Name }}</option>
      {{ end }}
<!--         <option value="{{ "/index.xml" | absURL }}">» RSS</option> -->
  </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 }}>{{ .Name }}</a></li>
    {{ end }}
  {{ end }}
</ul>

<!-- http://fontawesome.io icon fa-lg adapts it to size (at least it is supposed to) -->
<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"><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">
  <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}}