Restructures the templates

This commit is contained in:
Huy Tran 2018-07-10 11:41:30 +10:00
parent 6b929ff8e0
commit f4aa888a5c
14 changed files with 108 additions and 128 deletions

View file

@ -0,0 +1,23 @@
<div>
<ul class="sidebar-nav">
{{ $currentPage := . }}
{{- range .Site.Menus.main -}}
{{ if .HasChildren -}}
<li class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
<a href="#">{{ .Pre }}<span>{{ .Name }}</span></a>
<ul class="sidebar-nav">
{{- range .Children -}}
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
<a href="{{ .URL }}">{{ .Name | title }}</a>
</li>
{{- end -}}
</ul>
{{- else -}}
<li>
<a href="{{.URL}}">{{ .Pre }} <span>{{ .Name | title }}</span></a>
</li>
{{- end -}}
{{- end }}
</li>
</ul>
</div>

View file

@ -0,0 +1,38 @@
<section class="row text-center">
{{ with .Site.Params.social.twitter -}}
<a href="https://twitter.com/{{.}}"><i class="fab fa-twitter fa-lg" aria-hidden="true"></i></a>
{{- end }}
{{ with .Site.Params.social.facebook -}}
&nbsp;<a href="https://facebook.com/{{.}}"><i class="fab fa-facebook-f"></i></a>
{{- end }}
{{ with .Site.Params.social.github -}}
&nbsp;<a href="https://github.com/{{.}}"><i class="fab fa-github fa-lg" aria-hidden="true"></i></a>
{{- end }}
{{ with .Site.Params.social.bitbucket -}}
&nbsp;<a href="https://bitbucket.org/{{.}}"><i class="fab fa-bitbucket fa-lg" aria-hidden="true"></i></a>
{{- end }}
{{ with .Site.Params.social.gitlab -}}
&nbsp;<a href="https://gitlab.com/{{.}}"><i class="fab fa-gitlab fa-lg" aria-hidden="true"></i></a>
{{- end }}
{{ with .Site.Params.social.instagram -}}
&nbsp;<a href="https://instagram.com/{{.}}"><i class="fab fa-instagram fa-lg" aria-hidden="true"></i></a>
{{- end }}
{{ with .Site.Params.social.linkedin -}}
&nbsp;<a href="https://linkedin.com/in/{{.}}"><i class="fab fa-linkedin fa-lg" aria-hidden="true"></i></a>
{{- end }}
{{ with .Site.Params.social.stackoverflow -}}
&nbsp;<a href="https://stackoverflow.com/users/{{.}}"><i class="fab fa-stack-overflow fa-lg" aria-hidden="true"></i></a>
{{- end }}
{{ with .Site.Params.social.medium}}
&nbsp;<a href="https://medium.com/{{.}}"><i class="fab fa-medium fa-lg" aria-hidden="true"></i></a>
{{- end }}
{{ with .Site.Params.social.xing -}}
&nbsp;<a href="https://www.xing.com/profile/{{.}}"><i class="fab fa-xing fa-lg" aria-hidden="true"></i></a>
{{- end }}
{{ with .Site.Params.social.keybase -}}
&nbsp;<a href="https://keybase.io/{{.}}"><i class="fab fa-keybase fa-lg" aria-hidden="true"></i></a>
{{- end }}
{{ with .Site.Params.social.email -}}
&nbsp;<a href="mailto:{{.}}"><i class="fas fa-at fa-lg" aria-hidden="true"></i></a>
{{- end }}
</section>