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: 4ecd4dc0e2fc8a891ec19aa4b67a8f5eed65a9e3 (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

<!-- 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>

  <!-- Links in side bar, for example the following links add blog - I have removed them as we have links in the navigation
  you can also add sidebar links from config file via the .Site.Menus.main  part
  <ul class="sidebar-nav">
    <li class="sidebar-nav-item"><a href="{{ "/" | absURL }}">{{ if isset .Site.Params "home"}}{{ .Site.Params.home }}{{ else }}Blog{{ end }}</a></li>
    {{ range .Site.Menus.main }}
    <li class="sidebar-nav-item">{{ .Pre }}<a href="{{ .URL | absURL }}">{{ .Name }}</a></li>
    {{end}}
  </ul>
-->

<!-- 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
 -->

  <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>

  <!-- add recent posts - limit is .Site.Params.SidebarRecentLimit - example copied from https://gohugo.io/templates/go-templates/ -->
  <section class="even">
    <h1>Recent Posts</h1>

    <!-- check if the number of recent posts is set in config file, otherwise use 5 -->
    <ul id="recent_posts">
      {{ $.Scratch.Set "numberofrecentposts" 5  }}
      {{ if isset .Site.Params "SidebarRecentLimit" }}
        {{ $.Scratch.Set "numberofrecentposts" .Site.Params.SidebarRecentLimit }}
      {{ end }}
      {{ range first ($.Scratch.Get "numberofrecentposts") .Site.Pages }}
      <li class="post">
        <a href="{{ .RelPermalink }}">{{ .Title }}</a>
      </li>
      {{ end }}
    </ul>
  </section>

</aside>