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: 739d365cacbb7fa873c83ac71390f7e6411cb2a2 (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
<!-- 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.sidebar_header }}
      <h1>{{ . | markdownify }}</h1>
    {{ end }}

    <p>
      {{ with .Site.Params.sidebar_text }}
        {{ . | 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.twitter }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-twitter fa-3x"></i></a>{{ end }}
      {{ with .Site.Params.keybase }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-key fa-3x"></i></a>{{ end }} <!-- added keybase -->
      {{ 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 }}

    <!-- don't need RSS here anymore -->
    <!-- {{ 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 the items -->

  {{ if eq .Site.Params.sidebar_menu_enabled true }}
    <section class="odd">
      {{ if isset .Site.Params "sidebar_menu_header" }}
        <h1>{{ .Site.Params.sidebar_menu_header }}</h1>
      {{ end }}
      {{ range .Site.Menus.sidebar }}
        <li>
          <a href="{{ .URL | absURL }}" title="{{ .Name }}">{{ .Name }}</a>
        </li>
      {{ end }}
    </section>
  {{ 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 -->
  {{ if not (eq .Site.Params.sidebarRecentLimit 0) }}
    <section class="even">
      <h1>Recent Posts</h1>
      <ul id="recent_posts">
        {{ range first .Site.Params.sidebarRecentLimit .Site.Pages }}
          <li class="post">
            <a href="{{ .RelPermalink }}">{{ .Title }}</a>
          </li>
        {{ end }}
      </ul>
    </section>
  {{ end }}

</aside>