diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/categories/list.html | 6 | ||||
| -rw-r--r-- | templates/categories/single.html | 2 | ||||
| -rw-r--r-- | templates/macros/macros.html | 2 | ||||
| -rw-r--r-- | templates/posts.html | 2 | ||||
| -rw-r--r-- | templates/shortcodes/imagehover.html | 21 | ||||
| -rw-r--r-- | templates/shortcodes/vm.html | 2 | ||||
| -rw-r--r-- | templates/shortcodes/yt.html | 2 | ||||
| -rw-r--r-- | templates/tags/list.html | 4 | ||||
| -rw-r--r-- | templates/tags/single.html | 2 |
9 files changed, 28 insertions, 15 deletions
diff --git a/templates/categories/list.html b/templates/categories/list.html index f85f732..10a8c8b 100644 --- a/templates/categories/list.html +++ b/templates/categories/list.html @@ -19,13 +19,15 @@ <div> <center> <h1>{{ terms | length }} Categories</h1> - <p>{%- for term in terms %}[<a href="#{{ term.name }}">{{ term.name }}</a>] {%- endfor %}</p> + <p>{% for term in terms %} [<a href="#{{ term.name }}">{{ term.name }}</a>] {% endfor %}</p> </center> {%- for term in terms %} <h2 id="{{ term.name }}"><a href="{{ term.permalink | safe }}">{{ term.name }}</a></h2> {%- for page in term.pages %} - <p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p> + <p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format="%F") }}</time></p> {%- endfor %} {%- endfor %} </div> {%- endblock content %} + + diff --git a/templates/categories/single.html b/templates/categories/single.html index f1c5cfe..b1cd680 100644 --- a/templates/categories/single.html +++ b/templates/categories/single.html @@ -21,7 +21,7 @@ {%- for year, posts in term.pages | group_by(attribute="year") %} <h3>{{ year }}</h3> {%- for page in posts %} - <p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p> + <p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format="%F") }}</time></p> {%- endfor %} {%- endfor %} </div> diff --git a/templates/macros/macros.html b/templates/macros/macros.html index e4fcf73..541ebfe 100644 --- a/templates/macros/macros.html +++ b/templates/macros/macros.html @@ -17,7 +17,7 @@ {%- macro footer(page) %} -<h3><a href="#">Back to top</a></h3> +<p><b><a href="#">Back to top</a></b></p> {%- endmacro footer %} diff --git a/templates/posts.html b/templates/posts.html index bd5d0d8..e4f1d54 100644 --- a/templates/posts.html +++ b/templates/posts.html @@ -23,7 +23,7 @@ {%- for year, posts in section_item.pages | group_by(attribute="year") %} <h2>{{ year }}</h2> {%- for post in posts %} - <p><a href="{{ post.permalink | safe }}" title="{{ post.title }}">{{ post.title }}</a> - {{ post.date | date(format="%F") }}</p> + <p><a href="{{ post.permalink | safe }}" title="{{ post.title }}">{{ post.title }}</a> - <time datetime="{{ post.date }}">{{ post.date | date(format="%F") }}</time></p> {%- endfor %} {%- endfor %} </div> diff --git a/templates/shortcodes/imagehover.html b/templates/shortcodes/imagehover.html index 68f25be..99dd4e4 100644 --- a/templates/shortcodes/imagehover.html +++ b/templates/shortcodes/imagehover.html @@ -8,22 +8,33 @@ {%- else %} <div id="{{ sourcename }}">## {{ sourcename }} </div> - <a onmouseover="document.getElementById('{{ sourcename }}').innerHTML='{{ bgname }}';" onmouseout="document.getElementById('{{ sourcename }}').innerHTML='{{ sourcename }}';" href="#"><div id="{{ sourcename }}image"> </div></a> + <div id="{{ sourcename }}image" alt="{{ sourcename }}"> </div> {%- endif %} {%- endfor %} +{%- if w and h and p %} + {%- set padding = h / w * p %} +{%- elif w and h %} + {%- set padding = h / w * 50 %} +{%- else %} + {%- set padding = 50 %} +{%- endif %} + <style> {%- for source in sources %} {%- set sourcename = source | split(pat=".") | first %} {%- if not loop.first %} #{{ sourcename | safe }}image { - background-image: url('{{ get_url(path="/", trailing_slash=false) }}{{ page.path | safe }}{{ source | safe }}'); - width: 560px; - height: 650px; + background-image: url('{{ get_url(path="/", trailing_slash=false) }}{{ page.path | safe }}{{ bg | safe }}'); + background-size: contain; + background-repeat: no-repeat; + width: {{ p | default(value=50) }}%; + height: 0; + padding-top: {{ padding }}%; } #{{ sourcename | safe }}image:hover { - background-image: url('{{ get_url(path="/", trailing_slash=false) }}{{ page.path | safe }}{{ bg | safe }}'); + background-image: url('{{ get_url(path="/", trailing_slash=false) }}{{ page.path | safe }}{{ source | safe }}'); } {%- endif %} {%- endfor %} diff --git a/templates/shortcodes/vm.html b/templates/shortcodes/vm.html index 230e557..70230fe 100644 --- a/templates/shortcodes/vm.html +++ b/templates/shortcodes/vm.html @@ -1,3 +1,3 @@ <div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;"> - <iframe src="https://player.vimeo.com/video/{{id}}" style="position:absolute;top:0;left:0;"></iframe> + <iframe src="https://player.vimeo.com/video/{{id}}" title="{{title | default(value="Vimeo") }}" style="position:absolute;top:0;left:0;"></iframe> </div> diff --git a/templates/shortcodes/yt.html b/templates/shortcodes/yt.html index 7816bd8..9ee9d1f 100644 --- a/templates/shortcodes/yt.html +++ b/templates/shortcodes/yt.html @@ -1,3 +1,3 @@ <div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;"> - <iframe src="https://www.youtube.com/embed/{{id}}{% if autoplay %}?autoplay=1{% endif %}" style="position:absolute;top:0;left:0;"></iframe> + <iframe src="https://www.youtube.com/embed/{{id}}{% if autoplay %}?autoplay=1{% endif %}" title="{{title | default(value="Youtube") }}" style="position:absolute;top:0;left:0;"></iframe> </div> diff --git a/templates/tags/list.html b/templates/tags/list.html index e03b6df..3559ada 100644 --- a/templates/tags/list.html +++ b/templates/tags/list.html @@ -19,12 +19,12 @@ <div> <center> <h1>{{ terms | length }} Tags</h1> - <p>{%- for term in terms %}#<a href="#{{ term.name }}">{{ term.name }}</a> {%- endfor %}</p> + <p>{% for term in terms %} #<a href="#{{ term.name }}">{{ term.name }}</a> {% endfor %}</p> </center> {%- for term in terms %} <h2 id="{{ term.name }}">#<a href="{{ term.permalink | safe }}">{{ term.name }}</a></h2> {%- for page in term.pages %} - <p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p> + <p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format="%F") }}</time></p> {%- endfor %} {%- endfor %} </div> diff --git a/templates/tags/single.html b/templates/tags/single.html index b4428ff..c8bc0a3 100644 --- a/templates/tags/single.html +++ b/templates/tags/single.html @@ -21,7 +21,7 @@ {%- for year, posts in term.pages | group_by(attribute="year") %} <h3>{{ year }}</h3> {%- for page in term.pages %} - <p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p> + <p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format="%F") }}</time></p> {%- endfor %} {%- endfor %} </div> |
