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

sidebar.html « partials « layouts - github.com/parsiya/Hugo-Octopress.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4e708b7a9cef809a5867fb1ab4b8801f7b2fe874 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!-- To modify sidebar width check the css file lines 757 and 765 (for large screens) -->

<aside class="sidebar thirds">
  <section class="first odd">

    {{ with .Site.Params.sidebarHeader }}
      <h1>{{ . | markdownify }}</h1>
    {{ end }}

    <p>
      {{ with .Site.Params.sidebarText }}
        {{ . | markdownify }}
      {{ end }}
    </p>
  </section>

<!-- Font awesome icons - code taken from the Hyde-x theme - "Font Awesome by Dave Gandy - http://fontawesome.io"
     Icons: https://fortawesome.github.io/Font-Awesome/icons/
     to give icons square dark backgrounds use them like this: fa fa-key-square
     size is fa-3x, sizes are 1-5
 -->

  <!-- Sidebar social network icons -->
  <ul class="sidebar-nav">
    <li class="sidebar-nav-item">
      {{ with .Site.Params.github }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-github fa-3x"></i></a>{{ end }}
      {{ with .Site.Params.bitbucket }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-bitbucket fa-3x"></i></a>{{ end }}
      {{ with .Site.Params.gitlab }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-gitlab fa-3x"></i></a>{{ end }}
      {{ with .Site.Params.twitter }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-twitter fa-3x"></i></a>{{ end }}
      {{ if not .Site.Params.fontAwesome }}
        {{ with .Site.Params.keybase }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-keybase fa-3x"></i></a>{{ end }} <!-- added keybase -->
      {{ else }}
        {{ with .Site.Params.keybase }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-key fa-3x"></i></a>{{ end }} <!-- added keybase -->
      {{ end }}
      {{ with .Site.Params.linkedin }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-linkedin fa-3x"></i></a>{{ end }}
      {{ with .Site.Params.stackOverflow }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-stack-overflow fa-3x"></i></a>{{ end }}
      {{ with .Site.Params.googleplus }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-google-plus fa-3x"></i></a>{{ end }}
      {{ with .Site.Params.facebook }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-facebook fa-3x"></i></a>{{ end }}
      {{ with .Site.Params.youtube }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-youtube fa-3x"></i></a>{{ end }}
      {{ with .Site.Params.instagram }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-instagram fa-3x"></i></a>{{ end }}
      {{ with .Site.Params.bitcoin }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-bitcoin fa-3x"></i></a>{{ end }}

    <!-- Uncomment to add the RSS icon -->
    <!-- {{ if .Site.Params.rss }}<a href="{{ "/index.xml" | absURL }}" type="application/rss+xml" title="RSS"><i class="fa fa-rss-square fa-3x"></i></a>{{ end }} -->
    </li>
  </ul>

  <!-- Sidebar menu - items are read from the config file
       first we check if it is enabled in config file and then start adding items.
       if Site.Params.sidebarNewWindow exists and is set to true then open these links in a new window -->

  {{ with .Site.Params.sidebarMenuEnabled }}
    {{ if eq . true }}
      <section class="odd">
        {{ with $.Site.Params.sidebarMenuHeader }}
          <h1>{{ . }}</h1>
        {{ end }}
        {{ range $.Site.Menus.sidebar }}
          <li>
            <a href="{{ .URL | absURL }}" title="{{ .Name }}" {{ if eq $.Site.Params.sidebarNewWindow true }} target="_blank" {{ end }}>{{ .Name }}</a>
          </li>
        {{ end }}
      </section>
    {{ end }}
  {{ end }}

  <!-- Add recent posts - limit is .Site.Params.sidebarRecentLimit - example copied from https://gohugo.io/templates/go-templates/ -->
  <!-- Only display this section if sideBarRecentLimit is not zero -->
  {{ with .Site.Params.sidebarRecentLimit }}
    {{ if not (eq . 0) }}
      <section class="even">
        <h1>Recent Posts</h1>
        <ul id="recent_posts">
          {{ $pages := where $.Site.Pages "Type" "post" }}
          {{ range first . $pages }}
            {{ if .IsPage }}
              <li class="post">
                <a href="{{ .RelPermalink }}">{{ .Title }}</a>
              </li>
            {{ end }}
          {{ end }}
        </ul>
      </section>
    {{ end }}
  {{ end }}
</aside>