mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-25 13:12:54 +00:00
Cleanup code
This commit is contained in:
parent
9e2c5ada51
commit
8afcd8365c
2 changed files with 23 additions and 20 deletions
|
@ -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({
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue