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

github.com/zwbetz-gh/vanilla-bootstrap-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZachary Betz <zwbetz@gmail.com>2019-01-03 21:08:44 +0300
committerZachary Betz <zwbetz@gmail.com>2019-01-03 21:08:44 +0300
commit481fa480987ad13722c3013a11e3f5bf44049ccf (patch)
tree8e70e3719bfc276a680a96c10cc2db9f6850da03 /layouts
parent42e829be70efbfa3738927581f7e980de1cfd4fd (diff)
Only specify icon name in config
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/nav.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index e797f62..9ca3c7c 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -10,7 +10,9 @@
{{ $active = "nav-link-active" }}
{{ end }}
{{ end }}
- <a class="nav-link {{ $active }}" href="{{ .URL }}">{{ print .Pre " " .Name | safeHTML }}</a>
+ {{ $icon := printf "<i data-feather=\"%s\"></i>" .Pre }}
+ {{ $text := print $icon " " .Name | safeHTML }}
+ <a class="nav-link {{ $active }}" href="{{ .URL }}">{{ $text }}</a>
{{ end }}
</nav>
</div> \ No newline at end of file