Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jpescador/hugo-future-imperfect.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Collins <thepatrickcollins@gmail.com>2017-10-16 02:21:01 +0300
committerGitHub <noreply@github.com>2017-10-16 02:21:01 +0300
commit9bf1513d24b3cd0faea021c28109c2295b2dc863 (patch)
treedb2a1b3522baab748258cff530501c4a45d635a1
parentd62e961d0c52a9452d3dd22fc363ae8e15de350c (diff)
Css animation patch (#64)
* Fix image tags and adjust featured alt * Disable "is-loading" class.
-rw-r--r--layouts/partials/img-path.html2
-rw-r--r--layouts/partials/sidebar.html6
-rw-r--r--layouts/post/featured.html4
-rw-r--r--layouts/shortcodes/img-fit.html2
-rw-r--r--layouts/shortcodes/img-post.html6
-rw-r--r--static/js/main.js13
6 files changed, 20 insertions, 13 deletions
diff --git a/layouts/partials/img-path.html b/layouts/partials/img-path.html
index dabfa61..8f82671 100644
--- a/layouts/partials/img-path.html
+++ b/layouts/partials/img-path.html
@@ -10,6 +10,8 @@
otherwise use the explicit path provided by the user
-->
{{ $path := $.Scratch.Get "path" }}
+{{ $alt := $.Scratch.Get "featuredalt" }}
+{{ $img := $.Scratch.Get "featured" }}
{{ $structType := $.Scratch.Get "structType" }}
{{ if eq $path "title" }}
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index d872e75..ae61b84 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -6,11 +6,11 @@
{{ $pic := .Site.Params.intro.pic }}
{{ with $pic.src }}
{{ if $pic.circle }}
- <img src="{{ . }}" class="intro-circle" width="{{ $pic.width }}" alt="{{ $pic.alt }}" />
+ <img src="{{ . }}" class="intro-circle" width="{{ $pic.width }}" alt="{{ $pic.alt }}">
{{ else if $pic.imperfect }}
<a href="/" class="logo"><img src="{{ . }}" alt="{{ $pic.alt }}" /></a>
{{ else }}
- <img src="{{ . }}" width="{{ $pic.width }}" alt="{{ $pic.alt }}" />
+ <img src="{{ . }}" width="{{ $pic.width }}" alt="{{ $pic.alt }}">
{{ end }}
{{ end }}
{{ with .Site.Params.intro }}
@@ -91,6 +91,7 @@
{{ end }}
{{ range $key, $value := $.Scratch.Get "categories" }}
+ <p>
<article>
<header>
{{ if ne $value.Name "" }}
@@ -102,6 +103,7 @@
{{ end }}
</header>
</article>
+ </p>
{{ end }}
</section>
{{ end }}
diff --git a/layouts/post/featured.html b/layouts/post/featured.html
index 7b7aa42..191c3aa 100644
--- a/layouts/post/featured.html
+++ b/layouts/post/featured.html
@@ -5,9 +5,11 @@
{{ $.Scratch.Set "structType" "page" }}
{{ partial "img-path" . }}
{{ $path := $.Scratch.Get "path" }}
+ {{ $alt := $.Scratch.Get "alt" }}
+ {{ $img := $.Scratch.Get "img" }}
<a href="{{ .Permalink }}" class="image featured">
- <img src="{{ $path }}/{{ .Params.featured }}" alt="{{ .Params.featuredalt }}" />
+ <img src="{{ $path }}/{{ .Params.featured }}" alt="{{ $alt }}">
</a>
{{ end }}
{{ end }}
diff --git a/layouts/shortcodes/img-fit.html b/layouts/shortcodes/img-fit.html
index 08e8224..91493c3 100644
--- a/layouts/shortcodes/img-fit.html
+++ b/layouts/shortcodes/img-fit.html
@@ -63,7 +63,7 @@
{{ else }}
{{ if ne ($.Scratch.Get "imgFile") "" }}
<img src='{{ $path }}/{{ $.Scratch.Get "imgFile" }}'
- alt="{{ . }}" />
+ alt="{{ . }}">
</span></div>
{{ end }}
{{ $.Scratch.Set "count" 0 }}
diff --git a/layouts/shortcodes/img-post.html b/layouts/shortcodes/img-post.html
index 6143696..7eda2ad 100644
--- a/layouts/shortcodes/img-post.html
+++ b/layouts/shortcodes/img-post.html
@@ -54,15 +54,15 @@
{{ if eq $type "left" }}
<span class="image left">
- <img src="{{ $path }}/{{ $file }}" alt="{{ $alt }}" />
+ <img src="{{ $path }}/{{ $file }}" alt="{{ $alt }}">
</span>
{{ else if eq $type "right" }}
<span class="image right">
- <img src="{{ $path }}/{{ $file }}" alt="{{ $alt }}" />
+ <img src="{{ $path }}/{{ $file }}" alt="{{ $alt }}">
</span>
{{ else }}
<p><span class="image center">
- <img src="{{ $path }}/{{ $file }}" alt="{{ $alt }}" />
+ <img src="{{ $path }}/{{ $file }}" alt="{{ $alt }}">
</span></p>
{{ end }}
{{ end }}
diff --git a/static/js/main.js b/static/js/main.js
index 6da34cc..b0649f6 100644
--- a/static/js/main.js
+++ b/static/js/main.js
@@ -23,14 +23,15 @@
$sidebar = $('#sidebar'),
$main = $('#main');
+ // TODO: Fix this, or implement lazy load.
// Disable animations/transitions until the page has loaded.
- $body.addClass('is-loading');
+ // $body.addClass('is-loading');
- $window.on('load', function() {
- window.setTimeout(function() {
- $body.removeClass('is-loading');
- }, 100);
- });
+ // $window.on('load', function() {
+ // window.setTimeout(function() {
+ // $body.removeClass('is-loading');
+ // }, 100);
+ // });
// Fix: Placeholder polyfill.
$('form').placeholder();