diff options
author | Derik Evangelista <kirederik@gmail.com> | 2017-05-05 14:03:05 +0300 |
---|---|---|
committer | Vicky <vicky@vickylai.io> | 2017-05-05 14:03:05 +0300 |
commit | 8bf5b9e365dc1889cb62d3367aba363889b9a378 (patch) | |
tree | ad73acbd191e12b0d4f803b90d57b667780ca8c3 | |
parent | b1b90a10eb96fa4059475055e76fe1d227ec3dfd (diff) |
Ability to turn off the fadein effect (#4)
* Ability to turn off the fadein effect
* Ability to disable fadein effect on blog posts
* Disable fadein on 404 and list pages
-rw-r--r-- | exampleSite/config.toml | 2 | ||||
-rw-r--r-- | layouts/404.html | 8 | ||||
-rw-r--r-- | layouts/_default/list.html | 6 | ||||
-rw-r--r-- | layouts/blog/single.html | 16 | ||||
-rw-r--r-- | layouts/index.html | 16 |
5 files changed, 28 insertions, 20 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 0075cbe..d19b463 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -33,6 +33,8 @@ highlightjs = true # Syntax highlighting lang = "en" footertext = "" # Text to show in footer (overrides default text) +fadein = true # Turn on/off the fade-in effect + showblog = true # Show Blog section on home page showallposts = false # Set 'true' to list all posts on home page, or set 'false' to link to separate blog list page showlatest = true # Show latest blog post summary diff --git a/layouts/404.html b/layouts/404.html index 145f1d5..cf5e557 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -2,21 +2,21 @@ <div class="section" id="top"><!-- Parent section --> - <div class="container hero is-medium has-text-centered fade-in one"><!-- Begin Title --> + <div class="container hero is-medium has-text-centered {{ if .Site.Params.fadein }} fade-in one {{ end }}"><!-- Begin Title --> <h1 class="bold-title is-1">404</h1> </div><!-- End Title --> <!-- Everything below fades in two! --> -<div class="section fade-in two"> +<div class="section {{ if .Site.Params.fadein }} fade-in two {{ end }}"> <div class="container"><!-- Begin Nav bar --> {{ partial "nav-single.html" . }} </div><!-- End Nav bar --> - <div class="container fade-in two top-pad"><!-- Begin blurb --> + <div class="container {{ if .Site.Params.fadein }} fade-in two {{ end }} top-pad"><!-- Begin blurb --> 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="top-pad"><hr></div> {{ partial "footer.html" . }} -</div><!-- End parent section -->
\ No newline at end of file +</div><!-- End parent section --> diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 9451479..efd79f3 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -2,12 +2,12 @@ <div class="section" id="top"><!-- Parent section --> - <div class="container hero fade-in one"><!-- Begin Title --> + <div class="container hero {{ if .Site.Params.fadein }} fade-in one {{ end }}"><!-- Begin Title --> <h1 class="bold-title is-1">{{ .Site.Params.firstname }}'s Blog</h1> </div><!-- End Title --> <!-- Everything below fades in two! --> - <div class="section no-padding fade-in two"> + <div class="section no-padding {{ if .Site.Params.fadein }} fade-in two {{ end }}"> <div class="container"><!-- Begin Nav bar --> {{ partial "nav-list.html" . }} @@ -61,4 +61,4 @@ $('a[href^="{{ .Permalink }}#"]').click(function(e) { }, 500); return false; }) -</script>
\ No newline at end of file +</script> diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 760c31d..e51c674 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -2,24 +2,24 @@ <div class="section" id="top"><!-- Parent section --> - <div class="container hero fade-in one"><!-- Begin Title --> + <div class="container hero {{ if .Site.Params.fadein }} fade-in one {{ end }}"><!-- Begin Title --> <h1 class="bold-title is-1">{{ .Site.Params.firstname }}'s Blog</h1> </div><!-- End Title --> <!-- Everything below fades in two! --> -<div class="section fade-in two"> +<div class="section {{ if .Site.Params.fadein }} fade-in two {{ end }}"> <div class="container"><!-- Begin Nav bar --> {{ partial "nav-single.html" . }} </div><!-- End Nav bar --> - <div class="container fade-in two"><!-- Begin blog title container --> + <div class="container {{ if .Site.Params.fadein }} fade-in two {{ end }}"><!-- Begin blog title container --> <h2 class="title is-1 top-pad strong-post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2> <div class="post-data"> {{ .Date.Format .Site.Params.dateform }} | {{ if eq 1 .ReadingTime }}{{ .ReadingTime }} minute read{{ else }}{{ .ReadingTime }} minutes read{{ end }} </div> - + {{ if .Site.Params.sharebuttons }} <div class="blog-share"> Share this: @@ -45,13 +45,13 @@ </a> </div> {{ end }} - + </div><!-- End blog title container --> - <div class="container markdown fade-in two top-pad"><!-- Begin blog post content --> + <div class="container markdown {{ if .Site.Params.fadein }} fade-in two {{ end }} top-pad"><!-- Begin blog post content --> {{ .Content }} </div><!-- End blog post content --> - + <div class="disqus"> {{ template "_internal/disqus.html" . }} </div> @@ -76,4 +76,4 @@ $('a[href^="{{ .Permalink }}#"]').click(function(e) { }, 500); return false; }) -</script>
\ No newline at end of file +</script> diff --git a/layouts/index.html b/layouts/index.html index f19a943..c20ad18 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -16,16 +16,22 @@ <div class="hero-body"> <div class="container has-text-centered"> <!-- Title and tagline --> - <h1 class="bold-title fade-in one">Hi, I'm {{ .Site.Params.firstname }}.</h1> - <h3 class="subtitle is-3 fade-in two">{{ .Site.Params.tagline }}</h3> + <h1 class="bold-title {{ if .Site.Params.fadein }}fade-in one{{ end }}"> + Hi, I'm {{ .Site.Params.firstname }}. + </h1> + <h3 class="subtitle is-3 {{ if.Site.Params.fadein }} fade-in two{{ end }}"> + {{ .Site.Params.tagline }} + </h3> <!-- End title and tagline --> <!-- Some social icons --> - <div class="fade-in three">{{ partial "social.html" . }}</div> + <div class="{{ if .Site.Params.fadein }}fade-in three{{ end }}"> + {{ partial "social.html" . }} + </div> <!-- End top social icons --> </div> </div> <!-- Hero body title end --> <!-- Hero foot has nav bar --> - <div class="hero-foot fade-in three"> + <div class="hero-foot {{ if .Site.Params.fadein }}fade-in three{{ end }}"> <hr> <nav class="nav-center"> <a class="nav-item" href="#about">About</a> @@ -43,7 +49,7 @@ </div><!-- End of top section --> <!-- Everything below fades in three! --> -<div class="section no-padding fade-in three"> +<div class="section no-padding {{ if .Site.Params.fadein }}fade-in three{{ end }}"> <!-- Tell them all about it! --> <div class="section" id="about"> |