mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-12-23 07:02:53 +00:00
Cleanup code
This commit is contained in:
parent
8afcd8365c
commit
8269d33fa2
18 changed files with 357 additions and 470 deletions
|
@ -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
|
||||||
|
|
6
exampleSite/content/blog/_index.md
Normal file
6
exampleSite/content/blog/_index.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "Blog"
|
||||||
|
date: 2017-03-09T13:19:25+08:00
|
||||||
|
---
|
||||||
|
|
||||||
|
Here is some introduction text for my blog
|
6
exampleSite/content/projects/_index.md
Normal file
6
exampleSite/content/projects/_index.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "Projects"
|
||||||
|
date: 2017-03-09T13:19:25+08:00
|
||||||
|
---
|
||||||
|
|
||||||
|
Here is some introduction text for my projects
|
|
@ -1,21 +1,24 @@
|
||||||
{{ 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 -->
|
|
||||||
|
|
||||||
<!-- Everything below fades in two! -->
|
|
||||||
<div class="section {{ if .Site.Params.fadeIn }} fade-in two {{ end }}">
|
|
||||||
{{ partial "nav.html" . }}
|
|
||||||
<!-- Begin blurb -->
|
|
||||||
<div class="container {{ if .Site.Params.fadeIn }} fade-in two {{ end }} top-pad">
|
|
||||||
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 Title -->
|
||||||
|
<!-- Everything below fades in two! -->
|
||||||
<div class="container top-pad"><hr></div>
|
<div class="section {{ if .Site.Params.fadeIn }} fade-in two {{ end }}">
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "nav.html" . }}
|
||||||
</div><!-- End parent section -->
|
<!-- Begin blurb -->
|
||||||
|
<div class="container {{ if .Site.Params.fadeIn }} fade-in two {{ end }} top-pad">
|
||||||
|
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>
|
||||||
|
<!-- End blurb -->
|
||||||
|
<div class="container top-pad">
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
|
</div>
|
||||||
|
<!-- End parent section -->
|
||||||
|
|
|
@ -1,29 +1,23 @@
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
<!-- Parent section -->
|
||||||
<div class="section" id="top">
|
<div class="section" id="top">
|
||||||
<!-- Parent section -->
|
<!-- Begin Title -->
|
||||||
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}">
|
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}">
|
||||||
<!-- Begin Title -->
|
|
||||||
<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>
|
||||||
|
<!-- Begin Blog container -->
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- Begin Blog 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>
|
||||||
|
|
|
@ -1,22 +1,17 @@
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<!-- Parent section -->
|
||||||
<div class="section" id="top">
|
<div class="section" id="top">
|
||||||
<!-- Parent section -->
|
<!-- Begin Title -->
|
||||||
|
|
||||||
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}">
|
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}">
|
||||||
<!-- Begin Title -->
|
|
||||||
<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" . }}
|
||||||
|
<!-- Begin blog post content -->
|
||||||
<div class="container markdown {{ if .Site.Params.fadeIn }} fade-in two {{ end }} top-pad">
|
<div class="container markdown {{ if .Site.Params.fadeIn }} fade-in two {{ end }} top-pad">
|
||||||
<!-- Begin blog post content -->
|
|
||||||
{{ 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>
|
||||||
|
|
|
@ -1,29 +1,22 @@
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
<!-- Parent section -->
|
||||||
<div class="section" id="top">
|
<div class="section" id="top">
|
||||||
<!-- Parent section -->
|
<!-- Begin Title -->
|
||||||
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}">
|
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}">
|
||||||
<!-- Begin Title -->
|
|
||||||
<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>
|
||||||
|
<!-- Begin Blog container -->
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- Begin Blog 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>
|
||||||
|
|
|
@ -1,57 +1,31 @@
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<!-- Parent section -->
|
||||||
|
<div class="section" id="top">
|
||||||
|
<!-- Begin Title -->
|
||||||
|
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}">
|
||||||
|
<h1 class="bold-title is-1">{{ .Title }}</h1>
|
||||||
|
</div>
|
||||||
|
<!-- End Title -->
|
||||||
|
|
||||||
<div class="section" id="top">
|
<!-- Everything below fades in two! -->
|
||||||
<!-- Parent section -->
|
<div class="section no-padding {{ if .Site.Params.fadeIn }} fade-in two {{ end }}">
|
||||||
<div class="container hero {{ if .Site.Params.fadeIn }} fade-in one {{ end }}">
|
{{ partial "nav.html" . }}
|
||||||
<!-- Begin Title -->
|
<article>
|
||||||
<h1 class="bold-title is-1">{{ .Title }}</h1>
|
{{ .Content }}
|
||||||
</div>
|
</article>
|
||||||
<!-- End Title -->
|
<div class="container">
|
||||||
|
<div class="section tags-list">
|
||||||
<!-- Everything below fades in two! -->
|
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
|
||||||
<div class="section no-padding {{ if .Site.Params.fadeIn }} fade-in two {{ end }}">
|
<a class="tag-cloud" href="{{"tags/" | relLangURL }}{{ $name | urlize }}">{{ lower $name }} ({{ len $taxonomy }})</a>
|
||||||
|
{{ end }}
|
||||||
{{ partial "nav.html" . }}
|
|
||||||
|
|
||||||
<article>
|
|
||||||
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
|
|
||||||
{{ .Content }}
|
|
||||||
</article>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<div class="section tags-list">
|
|
||||||
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
|
|
||||||
<a class="tag-cloud" href="{{"tags/" | relLangURL }}{{ $name | urlize }}">{{ lower $name }} ({{ len $taxonomy }})</a>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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" . }}
|
|
||||||
</div>
|
</div>
|
||||||
<!-- End fade in two -->
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 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>
|
|
||||||
|
|
||||||
|
{{ partial "top-icon-with-hr.html" . }}
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
|
</div>
|
||||||
|
<!-- End fade in two -->
|
||||||
|
</div>
|
||||||
|
<!-- End parent section -->
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,65 +1,49 @@
|
||||||
{{ 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">
|
||||||
|
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
|
||||||
<div class="container"><!-- Begin Blog container -->
|
{{ .Content }}
|
||||||
|
|
||||||
{{ if .Site.Params.showLatest }}
|
|
||||||
<h2 class="title is-2 top-pad">Latest Post</h2>
|
|
||||||
{{ range first 1 (where .Data.Pages.ByPublishDate.Reverse "Section" "blog") }}
|
|
||||||
<div class="summary">{{ .Date.Format (.Site.Params.dateForm | default "Jan 02, 2006") }}
|
|
||||||
<h3 class="title is-3 strong-post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
|
|
||||||
<div class="markdown">
|
|
||||||
{{ .Summary }}
|
|
||||||
{{ if .Truncated }}
|
|
||||||
<a href="{{ .RelPermalink }}">...Read More</a>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
<!-- Begin Blog container -->
|
||||||
{{ end }}
|
<div class="container">
|
||||||
|
{{ if .Site.Params.showLatest }}
|
||||||
<h2 class="title is-2 top-pad">All Posts</h2>
|
<h2 class="title is-2 top-pad">Latest Post</h2>
|
||||||
<ul>
|
{{ range first 1 (where .Data.Pages.ByPublishDate.Reverse "Section" "blog") }}
|
||||||
{{ range .Data.Pages.ByPublishDate }}
|
<div class="summary">{{ .Date.Format (.Site.Params.dateForm | default "Jan 02, 2006") }}
|
||||||
{{ if eq .Section "blog" }}
|
<h3 class="title is-3 strong-post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
|
||||||
{{ partial "li.html" . }}
|
<div class="markdown">
|
||||||
|
{{ .Summary }}
|
||||||
|
{{ if .Truncated }}
|
||||||
|
<a href="{{ .RelPermalink }}">...Read More</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
<h2 class="title is-2 top-pad">All Posts</h2>
|
||||||
</ul>
|
<ul>
|
||||||
|
{{ range .Data.Pages.ByPublishDate }}
|
||||||
</div><!-- End Blog container -->
|
{{ if eq .Section "blog" }}
|
||||||
|
{{ partial "li.html" . }}
|
||||||
<div class="container has-text-centered top-pad">
|
{{ end }}
|
||||||
<hr>
|
{{ end }}
|
||||||
<a href="{{ .Permalink }}#top"><i class="fa fa-arrow-up"></i></a>
|
</ul>
|
||||||
<hr>
|
</div>
|
||||||
|
<!-- End Blog container -->
|
||||||
|
{{ partial "top-icon-with-hr.html" . }}
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
|
</div>
|
||||||
|
<!-- End fade in two -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- End parent section -->
|
||||||
{{ partial "footer.html" . }}
|
|
||||||
</div><!-- End fade in two -->
|
|
||||||
</div><!-- 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>
|
||||||
|
|
|
@ -1,88 +1,69 @@
|
||||||
{{ 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 }}">
|
||||||
<div class="container {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}"><!-- Begin blog title container -->
|
<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>
|
|
||||||
|
|
||||||
{{ if .Site.Params.shareButtons }}
|
|
||||||
<div class="blog-share">
|
|
||||||
Share this:
|
|
||||||
{{ if .Site.Params.shareTwitter }}
|
|
||||||
<a class="twitter-share-button" href="https://twitter.com/intent/tweet?text=Read%20{{ .Title }}%20{{ .Permalink }}"
|
|
||||||
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
|
|
||||||
<i class="fa fa-twitter"></i>
|
|
||||||
<span class="hidden">Twitter</span>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
{{ if .Site.Params.shareFacebook }}
|
|
||||||
<a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}"
|
|
||||||
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
|
|
||||||
<i class="fa fa-facebook"></i>
|
|
||||||
<span class="hidden">Facebook</span>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
{{ if .Site.Params.sharePinterest }}
|
|
||||||
<a class="icon-pinterest" href="http://pinterest.com/pin/create/button/?url={{ .Permalink }}{{ if .Params.pinterestMedia }}&media={{ .Site.BaseURL }}{{ .Params.pinterestMedia }}{{ end }}&description={{ .Title | safeHTML}}"
|
|
||||||
onclick="window.open(this.href, 'pinterest-share','width=580,height=296');return false;">
|
|
||||||
<i class="fa fa-pinterest"></i>
|
|
||||||
<span class="hidden">Pinterest</span>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
{{ if .Site.Params.shareGooglePlus }}
|
|
||||||
<a class="icon-google-plus" href="https://plus.google.com/share?url={{ .Permalink }}"
|
|
||||||
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
|
|
||||||
<i class="fa fa-google-plus"></i>
|
|
||||||
<span class="hidden">Google+</span>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ if .Site.Params.shareButtons }}
|
||||||
|
<div class="blog-share">
|
||||||
</div><!-- End blog title container -->
|
Share this:
|
||||||
|
{{ if .Site.Params.shareTwitter }}
|
||||||
<div class="container markdown {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }} top-pad"><!-- Begin blog post content -->
|
<a class="twitter-share-button" href="https://twitter.com/intent/tweet?text=Read%20{{ .Title }}%20{{ .Permalink }}"
|
||||||
{{ .Content }}
|
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
|
||||||
</div><!-- End blog post content -->
|
<i class="fa fa-twitter"></i>
|
||||||
|
<span class="hidden">Twitter</span>
|
||||||
<div class="disqus">
|
</a>
|
||||||
{{ template "_internal/disqus.html" . }}
|
{{ end }}
|
||||||
|
{{ if .Site.Params.shareFacebook }}
|
||||||
|
<a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}"
|
||||||
|
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
|
||||||
|
<i class="fa fa-facebook"></i>
|
||||||
|
<span class="hidden">Facebook</span>
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Site.Params.sharePinterest }}
|
||||||
|
<a class="icon-pinterest" href="http://pinterest.com/pin/create/button/?url={{ .Permalink }}{{ if .Params.pinterestMedia }}&media={{ .Site.BaseURL }}{{ .Params.pinterestMedia }}{{ end }}&description={{ .Title | safeHTML}}"
|
||||||
|
onclick="window.open(this.href, 'pinterest-share','width=580,height=296');return false;">
|
||||||
|
<i class="fa fa-pinterest"></i>
|
||||||
|
<span class="hidden">Pinterest</span>
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Site.Params.shareGooglePlus }}
|
||||||
|
<a class="icon-google-plus" href="https://plus.google.com/share?url={{ .Permalink }}"
|
||||||
|
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
|
||||||
|
<i class="fa fa-google-plus"></i>
|
||||||
|
<span class="hidden">Google+</span>
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<!-- End blog title container -->
|
||||||
|
<!-- Begin blog post content -->
|
||||||
|
<div class="container markdown {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }} top-pad">
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
||||||
|
<!-- End blog post content -->
|
||||||
|
<div class="disqus">
|
||||||
|
{{ template "_internal/disqus.html" . }}
|
||||||
|
</div>
|
||||||
|
{{ partial "top-icon-with-hr.html" . }}
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
</div>
|
</div>
|
||||||
|
<!-- End fade in two -->
|
||||||
<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 parent section -->
|
||||||
{{ partial "footer.html" . }}
|
|
||||||
</div><!-- End fade in two -->
|
|
||||||
</div><!-- 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>
|
||||||
|
|
|
@ -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 }}
|
{{.Content}}
|
||||||
{{if eq .Title "About" }}
|
|
||||||
{{.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 }}
|
{{ partial "projects.html" . }}
|
||||||
<div class="section" id="projects">
|
|
||||||
{{ 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 }}
|
{{ partial "blogsection.html" . }}
|
||||||
<div class="section" id="blog">
|
|
||||||
{{ 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 }}
|
{{.Content}}
|
||||||
{{if eq .Title "Contact" }}
|
|
||||||
{{.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>
|
||||||
|
|
|
@ -1,33 +1,37 @@
|
||||||
<div class="container"><!-- Begin Blog container -->
|
{{ with .Site.GetPage "section" "blog" }}
|
||||||
|
<div class="section" id="blog">
|
||||||
{{ if .Site.Params.showLatest }}
|
<!-- Begin Blog container -->
|
||||||
<h2 class="title is-2 has-text-centered">Latest Post</h2>
|
<div class="container">
|
||||||
{{ range first 1 (where .Data.Pages.ByPublishDate.Reverse "Section" "blog") }}
|
{{ if .Site.Params.showLatest }}
|
||||||
<div class="summary">{{ .Date.Format (.Site.Params.dateForm | default "Jan 02, 2006") }}
|
<h2 class="title is-2 has-text-centered">Latest Post</h2>
|
||||||
<h3 class="title is-3 latest-post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
|
{{ range first 1 (where .Data.Pages.ByPublishDate.Reverse "Section" "blog") }}
|
||||||
<div class="markdown">
|
<div class="summary">{{ .Date.Format (.Site.Params.dateForm | default "Jan 02, 2006") }}
|
||||||
{{ .Summary }}
|
<h3 class="title is-3 latest-post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
|
||||||
{{ if .Truncated }}
|
<div class="markdown">
|
||||||
<a href="{{ .RelPermalink }}">...Read More</a>
|
{{ .Summary }}
|
||||||
{{ end }}
|
{{ if .Truncated }}
|
||||||
|
<a href="{{ .RelPermalink }}">...Read More</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{ end }}
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if .Site.Params.showAllPosts }}
|
|
||||||
<h2 class="title is-2 has-text-centered top-pad">All Posts</h2>
|
|
||||||
<ul>
|
|
||||||
{{ range .Data.Pages.ByPublishDate }}
|
|
||||||
{{ if eq .Section "blog" }}
|
|
||||||
{{ partial "li.html" . }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
|
||||||
</ul>
|
{{ if .Site.Params.showAllPosts }}
|
||||||
{{ else }}
|
<h2 class="title is-2 has-text-centered top-pad">All Posts</h2>
|
||||||
<div class="container has-text-centered top-pad"><a href="/blog">ALL BLOG POSTS</a></div>
|
<ul>
|
||||||
|
{{ range .Pages }}
|
||||||
|
{{ partial "li.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ else }}
|
||||||
|
<div class="container has-text-centered top-pad"><a href={{ "/blog" | relURL }}>ALL BLOG POSTS</a></div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<!-- End Blog container -->
|
||||||
|
{{ partial "top-icon.html" . }}
|
||||||
|
</div>
|
||||||
|
<!-- End Blog section -->
|
||||||
|
|
||||||
|
<div class="container"><hr></div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
</div><!-- End Blog container -->
|
|
||||||
|
|
||||||
<div class="container has-text-centered top-pad"><a href="#top"><i class="fa fa-arrow-up"></i></a></div>
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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 "/" }}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -1,70 +1,71 @@
|
||||||
<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 }}
|
||||||
<div class="column is-one-third"> {{ end }}
|
<div class="column is-one-third"> {{ end }}
|
||||||
<!-- Hey Vicky, show half column if number is even. -->
|
<!-- Hey Vicky, show half column if number is even. -->
|
||||||
<div {{ if not .Params.external_link }} id="project{{ $card := .Title | urlize }}{{ replace $card "%" ""}}" {{ end }} class="card">
|
<div {{ if not .Params.external_link }} id="project{{ $card := .Title | urlize }}{{ replace $card "%" ""}}" {{ end }} class="card">
|
||||||
<div class="card-image">
|
<div class="card-image">
|
||||||
<figure class="image is-3by2">
|
<figure class="image is-3by2">
|
||||||
<a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}>
|
<a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}>
|
||||||
<img src="{{ if .Params.image }}{{ .Params.image | relURL }}{{ else }}{{ (.Site.Params.placeHolderimg | default "/img/workday.jpg") | relURL }}{{ end }}">
|
<img src="{{ if .Params.image }}{{ .Params.image | relURL }}{{ else }}{{ (.Site.Params.placeHolderimg | default "/img/workday.jpg") | relURL }}{{ end }}">
|
||||||
</a>
|
</a>
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-content has-text-centered top-pad">
|
<div class="card-content has-text-centered top-pad">
|
||||||
<a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}>
|
<a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}>
|
||||||
{{ .Title }}
|
{{ .Title }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{ end }}
|
||||||
{{ end }} {{ end }}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- End Projects container -->
|
|
||||||
|
|
||||||
<!-- Projects modals -->
|
|
||||||
{{ range sort .Pages }} {{ if eq .Section "projects" }} {{ if not .Params.external_link }}
|
|
||||||
<div class="modal" id="modal{{ $card := .Title | urlize }}{{ replace $card "%" ""}}">
|
|
||||||
<div class="modal-background"></div>
|
|
||||||
<div class="modal-card">
|
|
||||||
{{ with .Title }}
|
|
||||||
<header class="modal-card-header bottom-pad">
|
|
||||||
<p class="modal-card-title has-text-centered">{{ . }}</p>
|
|
||||||
</header>
|
|
||||||
{{ end }}
|
|
||||||
{{ if .Params.image }}
|
|
||||||
<img src="{{ .Params.image | relURL }}" class="img-responsive img-centered">
|
|
||||||
{{ end }}
|
|
||||||
{{ if .Content }}
|
|
||||||
<section class="modal-card-body markdown">
|
|
||||||
{{ .Content }}
|
|
||||||
</section>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
</div>
|
||||||
<button class="modal-close is-large" aria-label="close" id="close{{ $card := .Title | urlize }}{{ replace $card "%" ""}}"></button>
|
<!-- End Projects container -->
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
$('#project{{ $card := .Title | urlize }}{{ replace $card "%" ""}}').click(function() {
|
|
||||||
$('#modal{{ $card := .Title | urlize }}{{ replace $card "%" ""}}').addClass('is-active');
|
|
||||||
});
|
|
||||||
$('#close{{ $card := .Title | urlize }}{{ replace $card "%" ""}}').click(function() {
|
|
||||||
$('#modal{{ $card := .Title | urlize }}{{ replace $card "%" ""}}').removeClass('is-active');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{{ end }} {{ end }} {{ end }}
|
|
||||||
|
|
||||||
|
<!-- Projects modals -->
|
||||||
<div class="container has-text-centered top-pad">
|
{{ range sort .Pages }}
|
||||||
<a href="#top">
|
{{ if not .Params.external_link }}
|
||||||
<i class="fa fa-arrow-up"></i>
|
<div class="modal" id="modal{{ $card := .Title | urlize }}{{ replace $card "%" ""}}">
|
||||||
</a>
|
<div class="modal-background"></div>
|
||||||
|
<div class="modal-card">
|
||||||
|
{{ with .Title }}
|
||||||
|
<header class="modal-card-header bottom-pad">
|
||||||
|
<p class="modal-card-title has-text-centered">{{ . }}</p>
|
||||||
|
</header>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Params.image }}
|
||||||
|
<img src="{{ .Params.image | relURL }}" class="img-responsive img-centered">
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Content }}
|
||||||
|
<section class="modal-card-body markdown">
|
||||||
|
{{ .Content }}
|
||||||
|
</section>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<button class="modal-close is-large" aria-label="close" id="close{{ $card := .Title | urlize }}{{ replace $card "%" ""}}"></button>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$('#project{{ $card := .Title | urlize }}{{ replace $card "%" ""}}').click(function() {
|
||||||
|
$('#modal{{ $card := .Title | urlize }}{{ replace $card "%" ""}}').addClass('is-active');
|
||||||
|
});
|
||||||
|
$('#close{{ $card := .Title | urlize }}{{ replace $card "%" ""}}').click(function() {
|
||||||
|
$('#modal{{ $card := .Title | urlize }}{{ replace $card "%" ""}}').removeClass('is-active');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{{ end }} {{ end }}
|
||||||
|
{{ partial "top-icon.html" . }}
|
||||||
</div>
|
</div>
|
||||||
|
<!-- End Projects section -->
|
||||||
|
|
||||||
|
<div class="container"><hr></div>
|
||||||
|
{{ end }}
|
||||||
|
|
7
layouts/partials/top-icon-with-hr.html
Normal file
7
layouts/partials/top-icon-with-hr.html
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<div class="container top-pad">
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
{{ partial "top-icon.html" . }}
|
||||||
|
<div class="container top-pad">
|
||||||
|
<hr>
|
||||||
|
</div>
|
5
layouts/partials/top-icon.html
Normal file
5
layouts/partials/top-icon.html
Normal 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>
|
Loading…
Reference in a new issue