Cleanup code

This commit is contained in:
Hanzei 2018-06-25 15:03:18 +02:00
parent 8afcd8365c
commit 8269d33fa2
No known key found for this signature in database
GPG key ID: 69A2DEFD98937BA0
18 changed files with 357 additions and 470 deletions

View file

@ -27,8 +27,6 @@ enforce_ssl = false
fadeIn = true # Turn on/off the fade-in effect fadeIn = true # Turn on/off the fade-in effect
customCSS = [] # Include custom css files e.g. ["css/foo.css", "css/bar.css"] customCSS = [] # Include custom css files e.g. ["css/foo.css", "css/bar.css"]
showBlog = true # Show Blog section on home page
showProjects = true # Show Projects section on home page
projectColumns = "3" # Choose "2" or "3" columns for projects section projectColumns = "3" # Choose "2" or "3" columns for projects section
placeHolderimg = "/img/workday.jpg" # For Projects without image placeHolderimg = "/img/workday.jpg" # For Projects without image
showAllPosts = false # Set 'true' to list all posts on home page, or set 'false' to link to separate blog list page showAllPosts = false # Set 'true' to list all posts on home page, or set 'false' to link to separate blog list page

View file

@ -0,0 +1,6 @@
---
title: "Blog"
date: 2017-03-09T13:19:25+08:00
---
Here is some introduction text for my blog

View file

@ -0,0 +1,6 @@
---
title: "Projects"
date: 2017-03-09T13:19:25+08:00
---
Here is some introduction text for my projects

View file

@ -1,12 +1,12 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
<body> <body>
<!-- Parent section -->
<div class="section" id="top"><!-- Parent section --> <div class="section" id="top">
<!-- Begin Title -->
<div class="container hero is-medium has-text-centered {{ if .Site.Params.fadeIn }} fade-in one {{ end }}"><!-- Begin Title --> <div class="container hero is-medium has-text-centered {{ if .Site.Params.fadeIn }} fade-in one {{ end }}">
<h1 class="bold-title is-1">404</h1> <h1 class="bold-title is-1">404</h1>
</div><!-- End Title --> </div>
<!-- End Title -->
<!-- Everything below fades in two! --> <!-- Everything below fades in two! -->
<div class="section {{ if .Site.Params.fadeIn }} fade-in two {{ end }}"> <div class="section {{ if .Site.Params.fadeIn }} fade-in two {{ end }}">
{{ partial "nav.html" . }} {{ partial "nav.html" . }}
@ -15,7 +15,10 @@
Oops! Either you've found a bug (in which case, <a href="mailto:{{ .Site.Params.email }}">please tell me</a>) or you're just making things up. This page doesn't exist! Oops! Either you've found a bug (in which case, <a href="mailto:{{ .Site.Params.email }}">please tell me</a>) or you're just making things up. This page doesn't exist!
</div> </div>
<!-- End blurb --> <!-- End blurb -->
<div class="container top-pad">
<div class="container top-pad"><hr></div> <hr>
</div>
</div>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
</div><!-- End parent section --> </div>
<!-- End parent section -->

View file

@ -1,29 +1,23 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
<body> <body>
<div class="section" id="top">
<!-- Parent section --> <!-- Parent section -->
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}"> <div class="section" id="top">
<!-- Begin Title --> <!-- Begin Title -->
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}">
<h1 class="bold-title is-1">{{ .Title }}</h1> <h1 class="bold-title is-1">{{ .Title }}</h1>
</div> </div>
<!-- End Title --> <!-- End Title -->
<!-- Everything below fades in two! --> <!-- Everything below fades in two! -->
<div class="section no-padding {{ if .Site.Params.fadeIn }} fade-in two {{ end }}"> <div class="section no-padding {{ if .Site.Params.fadeIn }} fade-in two {{ end }}">
{{ partial "nav.html" . }} {{ partial "nav.html" . }}
<div class="container markdown {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }} top-pad">
<article>
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md --> <!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
{{ .Content }} {{ .Content }}
</article> </div>
<div class="container">
<!-- Begin Blog container --> <!-- Begin Blog container -->
<div class="container">
<ul> <ul>
<!-- Ranges through content/post/*.md -->
{{ range .Data.Pages.ByPublishDate }} {{ if not (eq .Section "blog") }} {{ range .Data.Pages.ByPublishDate }} {{ if not (eq .Section "blog") }}
<li> <li>
<a href="{{.Permalink}}">{{.Date.Format (.Site.Params.dateform | default "Jan 02, 2006") }} | {{.Title}}</a> <a href="{{.Permalink}}">{{.Date.Format (.Site.Params.dateform | default "Jan 02, 2006") }} | {{.Title}}</a>
@ -32,31 +26,10 @@
</ul> </ul>
</div> </div>
<!-- End Blog container --> <!-- End Blog container -->
{{ partial "top-icon-with-hr.html" . }}
<div class="container has-text-centered top-pad">
<hr>
<a href="#top">
<i class="fa fa-arrow-up"></i>
</a>
<hr>
</div>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
</div> </div>
<!-- End fade in two --> <!-- End fade in two -->
</div> </div>
<!-- End parent section --> <!-- End parent section -->
<!-- Bitty scrolling links script -->
<script>
$('a[href^="{{ .Permalink }}#"]').click(function (e) {
e.preventDefault();
var target = this.hash;
$('html, body').animate({
scrollTop: $(target).offset().top
}, 500);
return false;
})
</script>
</body> </body>

View file

@ -1,22 +1,17 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
<body> <body>
<div class="section" id="top">
<!-- Parent section --> <!-- Parent section -->
<div class="section" id="top">
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}">
<!-- Begin Title --> <!-- Begin Title -->
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}">
<h1 class="bold-title is-1">{{ .Title }}</h1> <h1 class="bold-title is-1">{{ .Title }}</h1>
</div> </div>
<!-- End Title --> <!-- End Title -->
<!-- Everything below fades in two! --> <!-- Everything below fades in two! -->
<div class="section {{ if .Site.Params.fadeIn }} fade-in two {{ end }}"> <div class="section {{ if .Site.Params.fadeIn }} fade-in two {{ end }}">
{{ partial "nav.html" . }} {{ partial "nav.html" . }}
<div class="container markdown {{ if .Site.Params.fadeIn }} fade-in two {{ end }} top-pad">
<!-- Begin blog post content --> <!-- Begin blog post content -->
<div class="container markdown {{ if .Site.Params.fadeIn }} fade-in two {{ end }} top-pad">
{{ if .Params.image }} {{ if .Params.image }}
<div class="has-text-centered"> <div class="has-text-centered">
<img src="{{ .Params.image }}" class="img-responsive"> <img src="{{ .Params.image }}" class="img-responsive">
@ -25,35 +20,14 @@
{{ .Content }} {{ .Content }}
</div> </div>
<!-- End blog post content --> <!-- End blog post content -->
<div class="disqus"> <div class="disqus">
{{ template "_internal/disqus.html" . }} {{ template "_internal/disqus.html" . }}
</div> </div>
{{ partial "top-icon-with-hr.html" . }}
<div class="container has-text-centered top-pad">
<hr>
<a href="#top">
<i class="fa fa-arrow-up"></i>
</a>
<hr>
</div>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
</div> </div>
<!-- End fade in two --> <!-- End fade in two -->
</div> </div>
<!-- End parent section --> <!-- End parent section -->
<!-- Bitty scrolling links script -->
<script>
$('a[href^="{{ .Permalink }}#"]').click(function (e) {
e.preventDefault();
var target = this.hash;
$('html, body').animate({
scrollTop: $(target).offset().top
}, 500);
return false;
})
</script>
</body> </body>

View file

@ -1,29 +1,22 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
<body> <body>
<div class="section" id="top">
<!-- Parent section --> <!-- Parent section -->
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}"> <div class="section" id="top">
<!-- Begin Title --> <!-- Begin Title -->
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}">
<h1 class="bold-title is-1">Tagged "{{ lower .Title }}"</h1> <h1 class="bold-title is-1">Tagged "{{ lower .Title }}"</h1>
</div> </div>
<!-- End Title --> <!-- End Title -->
<!-- Everything below fades in two! --> <!-- Everything below fades in two! -->
<div class="section no-padding {{ if .Site.Params.fadeIn }} fade-in two {{ end }}"> <div class="section no-padding {{ if .Site.Params.fadeIn }} fade-in two {{ end }}">
{{ partial "nav.html" . }} {{ partial "nav.html" . }}
<article> <article>
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
{{ .Content }} {{ .Content }}
</article> </article>
<div class="container">
<!-- Begin Blog container --> <!-- Begin Blog container -->
<div class="container">
<ul> <ul>
<!-- Ranges through content/post/*.md -->
{{ range .Data.Pages.ByPublishDate }} {{ range .Data.Pages.ByPublishDate }}
<li> <li>
<a href="{{.Permalink}}">{{.Date.Format (.Site.Params.dateform | default "Jan 02, 2006") }} | {{.Title}}</a> <a href="{{.Permalink}}">{{.Date.Format (.Site.Params.dateform | default "Jan 02, 2006") }} | {{.Title}}</a>
@ -32,31 +25,10 @@
</ul> </ul>
</div> </div>
<!-- End Blog container --> <!-- End Blog container -->
{{ partial "top-icon-with-hr.html" . }}
<div class="container has-text-centered top-pad">
<hr>
<a href="#top">
<i class="fa fa-arrow-up"></i>
</a>
<hr>
</div>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
</div> </div>
<!-- End fade in two --> <!-- End fade in two -->
</div> </div>
<!-- End parent section --> <!-- End parent section -->
<!-- Bitty scrolling links script -->
<script>
$('a[href^="{{ .Permalink }}#"]').click(function (e) {
e.preventDefault();
var target = this.hash;
$('html, body').animate({
scrollTop: $(target).offset().top
}, 500);
return false;
})
</script>
</body> </body>

View file

@ -1,57 +1,31 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
<body> <body>
<div class="section" id="top">
<!-- Parent section --> <!-- Parent section -->
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}"> <div class="section" id="top">
<!-- Begin Title --> <!-- Begin Title -->
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}">
<h1 class="bold-title is-1">{{ .Title }}</h1> <h1 class="bold-title is-1">{{ .Title }}</h1>
</div> </div>
<!-- End Title --> <!-- End Title -->
<!-- Everything below fades in two! --> <!-- Everything below fades in two! -->
<div class="section no-padding {{ if .Site.Params.fadeIn }} fade-in two {{ end }}"> <div class="section no-padding {{ if .Site.Params.fadeIn }} fade-in two {{ end }}">
{{ partial "nav.html" . }} {{ partial "nav.html" . }}
<article> <article>
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
{{ .Content }} {{ .Content }}
</article> </article>
<div class="container"> <div class="container">
<div class="section tags-list"> <div class="section tags-list">
{{ range $name, $taxonomy := .Site.Taxonomies.tags }} {{ range $name, $taxonomy := .Site.Taxonomies.tags }}
<a class="tag-cloud" href="{{"tags/" | relLangURL }}{{ $name | urlize }}">{{ lower $name }} ({{ len $taxonomy }})</a> <a class="tag-cloud" href="{{"tags/" | relLangURL }}{{ $name | urlize }}">{{ lower $name }} ({{ len $taxonomy }})</a>
{{ end }} {{ end }}
</div> </div>
<div class="container has-text-centered top-pad">
<hr>
<a href="#top">
<i class="fa fa-arrow-up"></i>
</a>
<hr>
</div> </div>
{{ partial "top-icon-with-hr.html" . }}
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
</div> </div>
<!-- End fade in two --> <!-- End fade in two -->
</div> </div>
<!-- End parent section --> <!-- End parent section -->
<!-- Bitty scrolling links script -->
<script>
$('a[href^="{{ .Permalink }}#"]').click(function (e) {
e.preventDefault();
var target = this.hash;
$('html, body').animate({
scrollTop: $(target).offset().top
}, 500);
return false;
})
</script>
</body> </body>

View file

@ -1,19 +1,21 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
<body> <body>
<!-- Parent section -->
<div class="section" id="top"><!-- Parent section --> <div class="section" id="top">
<!-- Begin Title -->
<div class="container hero {{ if .Site.Params.fadeIn | default true }}fade-in one{{ end }}"><!-- Begin Title --> <div class="container hero {{ if .Site.Params.fadeIn | default true }}fade-in one{{ end }}">
<h1 class="bold-title is-1">{{ .Site.Params.blogHead | default "Blog" }}</h1> <h1 class="bold-title is-1">{{ .Title }}</h1>
</div><!-- End Title --> </div>
<!-- End Title -->
<!-- Everything below fades in two! --> <!-- Everything below fades in two! -->
<div class="section no-padding {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}"> <div class="section no-padding {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}">
{{ partial "nav.html" . }} {{ partial "nav.html" . }}
<div class="container markdown {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }} top-pad">
<div class="container"><!-- Begin Blog container --> <!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
{{ .Content }}
</div>
<!-- Begin Blog container -->
<div class="container">
{{ if .Site.Params.showLatest }} {{ if .Site.Params.showLatest }}
<h2 class="title is-2 top-pad">Latest Post</h2> <h2 class="title is-2 top-pad">Latest Post</h2>
{{ range first 1 (where .Data.Pages.ByPublishDate.Reverse "Section" "blog") }} {{ range first 1 (where .Data.Pages.ByPublishDate.Reverse "Section" "blog") }}
@ -28,7 +30,6 @@
</div> </div>
{{ end }} {{ end }}
{{ end }} {{ end }}
<h2 class="title is-2 top-pad">All Posts</h2> <h2 class="title is-2 top-pad">All Posts</h2>
<ul> <ul>
{{ range .Data.Pages.ByPublishDate }} {{ range .Data.Pages.ByPublishDate }}
@ -37,29 +38,12 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
</ul> </ul>
</div><!-- End Blog container -->
<div class="container has-text-centered top-pad">
<hr>
<a href="{{ .Permalink }}#top"><i class="fa fa-arrow-up"></i></a>
<hr>
</div> </div>
<!-- End Blog container -->
{{ partial "top-icon-with-hr.html" . }}
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
</div><!-- End fade in two --> </div>
</div><!-- End parent section --> <!-- End fade in two -->
</div>
<!-- Bitty scrolling links script --> <!-- End parent section -->
<script>
$('a[href^="{{ .Permalink }}#"]').click(function(e) {
e.preventDefault();
var target = this.hash;
$('html, body').animate({
scrollTop: $(target).offset().top
}, 500);
return false;
})
</script>
</body> </body>

View file

@ -1,24 +1,22 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
<body> <body>
<!-- Parent section -->
<div class="section" id="top"><!-- Parent section --> <div class="section" id="top">
<!-- Begin Title -->
<div class="container hero {{ if .Site.Params.fadeIn | default true }}fade-in one{{ end }}"><!-- Begin Title --> <div class="container hero {{ if .Site.Params.fadeIn | default true }}fade-in one{{ end }}">
<h1 class="bold-title is-1">{{ .Site.Params.blogHead | default "Blog" }}</h1> <h1 class="bold-title is-1">{{ .Site.Params.blogHead | default "Blog" }}</h1>
</div><!-- End Title --> </div>
<!-- End Title -->
<!-- Everything below fades in two! --> <!-- Everything below fades in two! -->
<div class="section {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}"> <div class="section {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}">
{{ partial "nav.html" . }} {{ partial "nav.html" . }}
<!-- Begin blog title container -->
<div class="container {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}"><!-- Begin blog title container --> <div class="container {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}">
<h2 class="title is-1 top-pad strong-post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2> <h2 class="title is-1 top-pad strong-post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<div class="post-data"> <div class="post-data">
{{ .Date.Format (.Site.Params.dateForm | default "Jan 02, 2006") }} | {{ .Date.Format (.Site.Params.dateForm | default "Jan 02, 2006") }} |
{{ if eq 1 .ReadingTime }}{{ .ReadingTime }} minute read{{ else }}{{ .ReadingTime }} minutes read{{ end }} {{ if eq 1 .ReadingTime }}{{ .ReadingTime }} minute read{{ else }}{{ .ReadingTime }} minutes read{{ end }}
</div> </div>
{{ if .Site.Params.shareButtons }} {{ if .Site.Params.shareButtons }}
<div class="blog-share"> <div class="blog-share">
Share this: Share this:
@ -52,37 +50,20 @@
{{ end }} {{ end }}
</div> </div>
{{ end }} {{ end }}
</div>
</div><!-- End blog title container --> <!-- End blog title container -->
<!-- Begin blog post content -->
<div class="container markdown {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }} top-pad"><!-- Begin blog post content --> <div class="container markdown {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }} top-pad">
{{ .Content }} {{ .Content }}
</div><!-- End blog post content --> </div>
<!-- End blog post content -->
<div class="disqus"> <div class="disqus">
{{ template "_internal/disqus.html" . }} {{ template "_internal/disqus.html" . }}
</div> </div>
{{ partial "top-icon-with-hr.html" . }}
<div class="container has-text-centered top-pad">
<hr>
<a href="{{ .Permalink }}#top"><i class="fa fa-arrow-up"></i></a>
<hr>
</div>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
</div><!-- End fade in two --> </div>
</div><!-- End parent section --> <!-- End fade in two -->
</div>
<!-- Bitty scrolling links script --> <!-- End parent section -->
<script>
$('a[href^="{{ .Permalink }}#"]').click(function(e) {
e.preventDefault();
var target = this.hash;
$('html, body').animate({
scrollTop: $(target).offset().top
}, 500);
return false;
})
</script>
</body> </body>

View file

@ -35,61 +35,43 @@
<div class="section no-padding {{ if .Site.Params.fadeIn | default true }}fade-in three{{ end }}"> <div class="section no-padding {{ if .Site.Params.fadeIn | default true }}fade-in three{{ end }}">
<!-- Tell them all about it! --> <!-- Tell them all about it! -->
{{ with .Site.GetPage "page" "about" }}
<div class="section" id="about"> <div class="section" id="about">
<div class="container"> <div class="container">
<h2 class="title is-2 has-text-centered">About</h2> <h2 class="title is-2 has-text-centered">{{ .Title }}</h2>
<div class="columns"><!-- Avatar and about.md side by side except mobile --> <div class="columns"><!-- Avatar and about.md side by side except mobile -->
{{ if .Site.Params.avatar }} {{ if .Site.Params.avatar }}
<div class="column is-one-third has-text-centered"> <div class="column is-one-third has-text-centered">
<img class="img-responsive avatar" src="{{ .Site.Params.avatar | relURL }}" alt="My profile picture."> <img class="img-responsive avatar" src="{{ .Site.Params.avatar | relURL }}" alt="My profile picture">
</div> </div>
{{ end }} {{ end }}
<div class="column markdown"> <div class="column markdown">
{{ range .Data.Pages }}
{{if eq .Title "About" }}
{{.Content}} {{.Content}}
{{end}}
{{ end }}
</div> </div>
</div> </div>
</div><!-- End About container--> </div>
<!-- End About container-->
<div class="container has-text-centered top-pad"><a href="#top"><i class="fa fa-arrow-up"></i></a></div> {{ partial "top-icon.html" . }}
</div><!-- End About section --> </div>
<!-- End About section -->
<div class="container"><hr></div> <div class="container"><hr></div>
{{ end }}
<!-- Now for some cool projects --> <!-- Now for some cool projects -->
{{ if .Site.Params.showProjects }}
<div class="section" id="projects">
{{ partial "projects.html" . }} {{ partial "projects.html" . }}
</div><!-- End Projects section -->
<div class="container"><hr></div>
{{ end }}
<!-- Let's show some blog posts --> <!-- Let's show some blog posts -->
{{ if .Site.Params.showBlog }}
<div class="section" id="blog">
{{ partial "blogsection.html" . }} {{ partial "blogsection.html" . }}
</div><!-- End Blog section -->
<div class="container"><hr></div>
{{ end }}
<!-- Let's chat, shall we? --> <!-- Let's chat, shall we? -->
{{ with .Site.GetPage "page" "contact" }}
<div class="section" id="contact"> <div class="section" id="contact">
<div class="container has-text-centered"> <div class="container has-text-centered">
<h2 class="title is-2">Contact</h2> <h2 class="title is-2">{{ .Title }}</h2>
<div class="markdown"> <div class="markdown">
{{ range .Data.Pages }}
{{if eq .Title "Contact" }}
{{.Content}} {{.Content}}
{{end}}
{{ end }}
</div> </div>
{{ if .Site.Params.localTime }} {{ if .Site.Params.localTime }}
@ -111,30 +93,20 @@
{{ end }} {{ end }}
{{ partial "social.html" . }} {{ partial "social.html" . }}
</div><!-- End Contact container --> </div>
<!-- End Contact container -->
<div class="container has-text-centered top-pad"><a href="#top"><i class="fa fa-arrow-up"></i></a></div> {{ partial "top-icon.html" . }}
</div><!-- End Contact section --> </div>
<!-- End Contact section -->
<div class="container"><hr></div> <div class="container"><hr></div>
{{ end }}
<!-- Nice clean finish --> <!-- Nice clean finish -->
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
<!-- Footer done! --> <!-- Footer done! -->
</div><!-- End of fade in three section --> </div>
<!-- End of fade in three section -->
<!-- Where all the awesome ends. Aww. --> <!-- Where all the awesome ends. Aww. -->
<!-- Bitty scrolling links script -->
<script>
$('a[href^="#"]').click(function(e) {
e.preventDefault();
var target = this.hash;
$('html, body').animate({
scrollTop: $(target).offset().top
}, 500);
return false;
})
</script>
</body> </body>

View file

@ -1,5 +1,7 @@
<div class="container"><!-- Begin Blog container --> {{ with .Site.GetPage "section" "blog" }}
<div class="section" id="blog">
<!-- Begin Blog container -->
<div class="container">
{{ if .Site.Params.showLatest }} {{ if .Site.Params.showLatest }}
<h2 class="title is-2 has-text-centered">Latest Post</h2> <h2 class="title is-2 has-text-centered">Latest Post</h2>
{{ range first 1 (where .Data.Pages.ByPublishDate.Reverse "Section" "blog") }} {{ range first 1 (where .Data.Pages.ByPublishDate.Reverse "Section" "blog") }}
@ -18,16 +20,18 @@
{{ if .Site.Params.showAllPosts }} {{ if .Site.Params.showAllPosts }}
<h2 class="title is-2 has-text-centered top-pad">All Posts</h2> <h2 class="title is-2 has-text-centered top-pad">All Posts</h2>
<ul> <ul>
{{ range .Data.Pages.ByPublishDate }} {{ range .Pages }}
{{ if eq .Section "blog" }}
{{ partial "li.html" . }} {{ partial "li.html" . }}
{{ end }} {{ end }}
{{ end }}
</ul> </ul>
{{ else }} {{ else }}
<div class="container has-text-centered top-pad"><a href="/blog">ALL BLOG POSTS</a></div> <div class="container has-text-centered top-pad"><a href={{ "/blog" | relURL }}>ALL BLOG POSTS</a></div>
{{ end }} {{ end }}
</div>
<!-- End Blog container -->
{{ partial "top-icon.html" . }}
</div>
<!-- End Blog section -->
</div><!-- End Blog container --> <div class="container"><hr></div>
{{ end }}
<div class="container has-text-centered top-pad"><a href="#top"><i class="fa fa-arrow-up"></i></a></div>

View file

@ -1,9 +1,25 @@
<div class="section" id="footer"><!-- Begin Footer section --> <!-- Begin Footer section -->
<div class="container has-text-centered"><!-- Begin Footer container --> <div class="section" id="footer">
{{ if .Site.Params.footerText }} <!-- Begin Footer container -->
{{ .Site.Params.footerText | markdownify }} <div class="container has-text-centered">
{{ with .Site.Params.footerText }}
{{ . | markdownify }}
{{ else }} {{ else }}
<span class="footer-text"><a href="https://github.com/vickylai/hugo-theme-introduction" target="_blank" rel="noopener">Introduction</a> theme for <a href="http://gohugo.io/" target="_blank" rel="noopener">Hugo</a>. Made with <i class="fa fa-heart"></i> and <i class="fa fa-coffee"></i> by <a href="https://vickylai.com" target="_blank" rel="noopener">Vicky Lai</a>.</span> <span class="footer-text"><a href="https://github.com/vickylai/hugo-theme-introduction" target="_blank" rel="noopener">Introduction</a> theme for <a href="http://gohugo.io/" target="_blank" rel="noopener">Hugo</a>. Made with <i class="fa fa-heart"></i> and <i class="fa fa-coffee"></i> by <a href="https://vickylai.com" target="_blank" rel="noopener">Vicky Lai</a>.</span>
{{ end }} {{ end }}
</div><!-- End Footer container --> </div>
</div><!-- End Footer section --> <!-- End Footer container -->
</div>
<!-- End Footer section -->
<!-- Bitty scrolling links script -->
<script>
$('a[href^="#"]').click(function(e) {
e.preventDefault();
var target = this.hash;
$('html, body').animate({
scrollTop: $(target).offset().top
}, 500);
return false;
})
</script>

View file

@ -10,7 +10,7 @@
<meta name="referrer" content="no-referrer"> <meta name="referrer" content="no-referrer">
{{ if .Site.Params.description }}<meta name="description" content="{{ .Site.Params.description }}">{{ end }} {{ if .Site.Params.description }}<meta name="description" content="{{ .Site.Params.description }}">{{ end }}
<base href="{{ .Site.BaseURL }}"> <!--<base href="{{ .Site.BaseURL }}">-->
<title> <title>
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} {{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
{{ if eq $url "/" }} {{ if eq $url "/" }}

View file

@ -2,7 +2,8 @@
<div class="container"> <div class="container">
<hr> <hr>
<nav class="nav nav-center"> <nav class="nav nav-center">
{{ if not .Page.IsHome }} {{ $isHome := .Page.IsHome }}
{{ if not $isHome }}
<span id="nav-toggle" class="nav-toggle" onclick="document.getElementById('nav-menu').classList.toggle('is-active');"> <span id="nav-toggle" class="nav-toggle" onclick="document.getElementById('nav-menu').classList.toggle('is-active');">
<span></span> <span></span>
<span></span> <span></span>
@ -10,41 +11,51 @@
</span> </span>
<div id="nav-menu" class="nav-left nav-menu"> <div id="nav-menu" class="nav-left nav-menu">
{{ end }} {{ end }}
{{ if not .Page.IsHome }} {{ if not $isHome }}
<a class="nav-item" href="{{ "/" | relURL }}">Main</a> <a class="nav-item" href="{{ "/" | relURL }}">Main</a>
{{ end }} {{ end }}
<a class="nav-item" href="#about">About</a> {{ with .Site.GetPage "page" "about" }}
<a class="nav-item" href="{{ if $isHome }}#about{{ else }}{{ "/#about" | relURL }}{{ end }}">{{ .Title }}</a>
{{ end }}
{{ if and (.Site.Params.showProjects) (not (and (eq .Page.Section "projects") (eq .Page.Kind "section") )) }} {{ $pageIsInProjects := eq .Page.Section "projects"}}
{{ if .IsHome }} {{ if not (and $pageIsInProjects (eq .Page.Kind "section")) }}
<a class="nav-item" href="#projects">Projects</a> {{ with .Site.GetPage "section" "projects" }}
{{ if $isHome }}
<a class="nav-item" href="#projects">{{ .Title }}</a>
{{ else }} {{ else }}
<a class="nav-item" href="{{ "/projects" | relURL }}"> <a class="nav-item" href="{{ "/projects" | relURL }}">
{{ if eq .Section "projects" }} {{ if $pageIsInProjects }}
Back to Projects Back to {{ .Title }}
{{ else }} {{ else }}
Projects {{ .Title }}
{{ end }} {{ end }}
</a> </a>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }}
{{ if and (.Site.Params.showBlog) (not (and (eq .Page.Section "blog") (eq .Page.Kind "section") )) }} {{ $pageIsInBlog := eq .Page.Section "blog"}}
{{ if .IsHome }} {{ if not (and $pageIsInBlog (eq .Page.Kind "section")) }}
<a class="nav-item" href="#blog">Blog</a> {{ with .Site.GetPage "section" "blog" }}
{{ if $isHome }}
<a class="nav-item" href="#blog">{{ .Title }}</a>
{{ else }} {{ else }}
<a class="nav-item" href="{{ "/blog" | relURL }}"> <a class="nav-item" href="{{ "/blog" | relURL }}">
{{ if eq .Section "blog" }} {{ if $pageIsInBlog }}
Back to Blog Back to {{ .Title | singularize}}
{{ else }} {{ else }}
Blog {{ .Title | singularize}}
{{ end }} {{ end }}
</a> </a>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }}
<a class="nav-item" href="#contact">Contact</a> {{ with .Site.GetPage "page" "contact" }}
<a class="nav-item" href="{{ if $isHome }}#contact{{ else }}{{ "/#contact" | relURL }}{{ end }}">{{ .Title }}</a>
{{ end }}
{{ if and .Site.Params.showRSSButton .Site.RSSLink }} {{ if and .Site.Params.showRSSButton .Site.RSSLink }}
<a class="nav-item" href="{{ .Site.RSSLink }}"><i class="fa fa-rss"></i></a> <a class="nav-item" href="{{ .Site.RSSLink }}"><i class="fa fa-rss"></i></a>

View file

@ -1,10 +1,11 @@
<div class="container"> {{ with .Site.GetPage "section" "projects" }}
<div class="section" id="projects">
<!-- Begin Projects container --> <!-- Begin Projects container -->
<h2 class="title is-2 has-text-centered">Projects</h2> <div class="container">
<h2 class="title is-2 has-text-centered">{{ .Title }}</h2>
<div class="section is-small"> <div class="section is-small">
<div class="columns is-multiline"> <div class="columns is-multiline">
{{ range sort .Pages }} {{ if eq .Section "projects" }} {{ range sort .Pages }}
{{ if eq .Site.Params.projectColumns "2" }} {{ if eq .Site.Params.projectColumns "2" }}
<div class="column is-half"> {{ else if eq .Site.Params.projectColumns "3" }} <div class="column is-half"> {{ else if eq .Site.Params.projectColumns "3" }}
<div class="column is-one-third"> {{ else }} <div class="column is-one-third"> {{ else }}
@ -25,14 +26,15 @@
</div> </div>
</div> </div>
</div> </div>
{{ end }} {{ end }} {{ end }}
</div> </div>
</div> </div>
</div> </div>
<!-- End Projects container --> <!-- End Projects container -->
<!-- Projects modals --> <!-- Projects modals -->
{{ range sort .Pages }} {{ if eq .Section "projects" }} {{ if not .Params.external_link }} {{ range sort .Pages }}
{{ if not .Params.external_link }}
<div class="modal" id="modal{{ $card := .Title | urlize }}{{ replace $card "%" ""}}"> <div class="modal" id="modal{{ $card := .Title | urlize }}{{ replace $card "%" ""}}">
<div class="modal-background"></div> <div class="modal-background"></div>
<div class="modal-card"> <div class="modal-card">
@ -60,11 +62,10 @@
$('#modal{{ $card := .Title | urlize }}{{ replace $card "%" ""}}').removeClass('is-active'); $('#modal{{ $card := .Title | urlize }}{{ replace $card "%" ""}}').removeClass('is-active');
}); });
</script> </script>
{{ end }} {{ end }} {{ end }} {{ end }} {{ end }}
{{ partial "top-icon.html" . }}
<div class="container has-text-centered top-pad">
<a href="#top">
<i class="fa fa-arrow-up"></i>
</a>
</div> </div>
<!-- End Projects section -->
<div class="container"><hr></div>
{{ end }}

View file

@ -0,0 +1,7 @@
<div class="container top-pad">
<hr>
</div>
{{ partial "top-icon.html" . }}
<div class="container top-pad">
<hr>
</div>

View file

@ -0,0 +1,5 @@
<div class="container has-text-centered top-pad">
<a href="#top">
<i class="fa fa-arrow-up"></i>
</a>
</div>