Cleanup code

This commit is contained in:
Hanzei 2018-06-23 11:59:46 +02:00
parent 9e2c5ada51
commit 8afcd8365c
No known key found for this signature in database
GPG key ID: 69A2DEFD98937BA0
2 changed files with 23 additions and 20 deletions

View file

@ -127,7 +127,7 @@
<!-- Bitty scrolling links script -->
<script>
$('a[href^="/#"]').click(function(e) {
$('a[href^="#"]').click(function(e) {
e.preventDefault();
var target = this.hash;
$('html, body').animate({

View file

@ -14,38 +14,41 @@
<a class="nav-item" href="{{ "/" | relURL }}">Main</a>
{{ end }}
<a class="nav-item" href="{{ "/#about" | relURL }}">About</a>
<a class="nav-item" href="#about">About</a>
{{ if and (.Site.Params.showProjects) (not (and (eq .Page.Section "projects") (eq .Page.Kind "section") )) }}
{{ if .IsHome }}
<a class="nav-item" href="{{ "/#projects" | relURL }}">Projects</a>
{{ else}}
{{ if ne .Section "projects" }}
<a class="nav-item" href="{{ "/projects" | relURL }}">Projects</a>
{{ else }}
<a class="nav-item" href="{{ "/projects" | relURL }}">Back to Projects</a>
{{ end }}
{{ if .IsHome }}
<a class="nav-item" href="#projects">Projects</a>
{{ else }}
<a class="nav-item" href="{{ "/projects" | relURL }}">
{{ if eq .Section "projects" }}
Back to Projects
{{ else }}
Projects
{{ end }}
</a>
{{ end }}
{{ end }}
{{ if and (.Site.Params.showBlog) (not (and (eq .Page.Section "blog") (eq .Page.Kind "section") )) }}
{{ if .IsHome }}
<a class="nav-item" href="{{ "/#blog" | relURL }}">Blog</a>
{{ if .IsHome }}
<a class="nav-item" href="#blog">Blog</a>
{{ else }}
<a class="nav-item" href="{{ "/blog" | relURL }}">
{{ if eq .Section "blog" }}
Back to Blog
{{ else }}
{{ if ne .Section "blog" }}
<a class="nav-item" href="{{ "/blog" | relURL }}">Blog</a>
{{ else }}
<a class="nav-item" href="{{ "/blog" | relURL }}">Back to Blog</a>
{{ end }}
{{ end}}
Blog
{{ end }}
</a>
{{ end }}
{{ end }}
<a class="nav-item" href="{{ "/#contact" | relURL }}">Contact</a>
<a class="nav-item" href="#contact">Contact</a>
{{ if and .Site.Params.showRSSButton .Site.RSSLink }}
<a class="nav-item" href="{{ .Site.RSSLink }}"><i class="fa fa-rss"></i></a>
{{ end }}
{{ if not .Page.IsHome }}
</div>
{{ end }}