Full-bleed media
This commit is contained in:
23
config.toml
23
config.toml
@ -8,7 +8,7 @@ generate_feeds = true
|
|||||||
# Only the first file will be used in the navbar feed button,
|
# Only the first file will be used in the navbar feed button,
|
||||||
# other feeds will still be available in page's head.
|
# other feeds will still be available in page's head.
|
||||||
feed_filenames = ["rss.xml", "atom.xml"]
|
feed_filenames = ["rss.xml", "atom.xml"]
|
||||||
build_search_index = false
|
build_search_index = true
|
||||||
author = "Duck Quack"
|
author = "Duck Quack"
|
||||||
|
|
||||||
# Based on https://github.com/welpo/tabi
|
# Based on https://github.com/welpo/tabi
|
||||||
@ -24,6 +24,18 @@ default_language = "en"
|
|||||||
|
|
||||||
taxonomies = [{ name = "tags", feed = true }]
|
taxonomies = [{ name = "tags", feed = true }]
|
||||||
|
|
||||||
|
[markdown]
|
||||||
|
highlight_code = true
|
||||||
|
highlight_theme = "css"
|
||||||
|
highlight_themes_css = [
|
||||||
|
{ theme = "solarized-dark", filename = "syntax-theme-dark.css" },
|
||||||
|
{ theme = "solarized-light", filename = "syntax-theme-light.css" },
|
||||||
|
]
|
||||||
|
smart_punctuation = true
|
||||||
|
|
||||||
|
[search]
|
||||||
|
index_format = "elasticlunr_javascript"
|
||||||
|
|
||||||
[languages.ru]
|
[languages.ru]
|
||||||
title = "Duckquill"
|
title = "Duckquill"
|
||||||
description = "Современная, симпатичная и аккуратная тема."
|
description = "Современная, симпатичная и аккуратная тема."
|
||||||
@ -38,15 +50,6 @@ generate_feeds = true
|
|||||||
|
|
||||||
taxonomies = [{ name = "tags", feed = true }]
|
taxonomies = [{ name = "tags", feed = true }]
|
||||||
|
|
||||||
[markdown]
|
|
||||||
highlight_code = true
|
|
||||||
highlight_theme = "css"
|
|
||||||
highlight_themes_css = [
|
|
||||||
{ theme = "solarized-dark", filename = "syntax-theme-dark.css" },
|
|
||||||
{ theme = "solarized-light", filename = "syntax-theme-light.css" },
|
|
||||||
]
|
|
||||||
smart_punctuation = true
|
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
# Sets theme and browser theme color.
|
# Sets theme and browser theme color.
|
||||||
# See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color
|
# See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color
|
||||||
|
@ -179,6 +179,7 @@ Available variables are:
|
|||||||
- `url_min`: URL to compressed version of an image, original can be opened by clicking on the image.
|
- `url_min`: URL to compressed version of an image, original can be opened by clicking on the image.
|
||||||
- `alt`: Alt text, same as if the text were inside square brackets in Markdown.
|
- `alt`: Alt text, same as if the text were inside square brackets in Markdown.
|
||||||
- `full`: Forces image to be full-width.
|
- `full`: Forces image to be full-width.
|
||||||
|
- `full_bleed`: Forces image to fill all the available screen width. Removes shadow, rounded corners and zoom on hover.
|
||||||
- `start`: Float image to the start of paragraph and scale it down.
|
- `start`: Float image to the start of paragraph and scale it down.
|
||||||
- `end`: Float image to the end of paragraph and scale it down.
|
- `end`: Float image to the end of paragraph and scale it down.
|
||||||
- `pixels`: Uses nearest neighbor algorithm for scaling, useful for keeping pixel-art sharp.
|
- `pixels`: Uses nearest neighbor algorithm for scaling, useful for keeping pixel-art sharp.
|
||||||
@ -200,6 +201,7 @@ Variables should be comma-separated and be inside the brackets.
|
|||||||
Alternatively, you can append the following URL anchors. It can be more handy in some cases, e.g such images will render normally in any Markdown editor, opposed to the Zola shortcodes.
|
Alternatively, you can append the following URL anchors. It can be more handy in some cases, e.g such images will render normally in any Markdown editor, opposed to the Zola shortcodes.
|
||||||
|
|
||||||
- `#full`: Forces image to be full-width.
|
- `#full`: Forces image to be full-width.
|
||||||
|
- `#full-bleed`: Forces image to fill all the available screen width. Removes shadow, rounded corners and zoom on hover.
|
||||||
- `#start`: Float image to the start of paragraph and scale it down.
|
- `#start`: Float image to the start of paragraph and scale it down.
|
||||||
- `#end`: Float image to the end of paragraph and scale it down.
|
- `#end`: Float image to the end of paragraph and scale it down.
|
||||||
- `#pixels`: Uses nearest neighbor algorithm for scaling, useful for keeping pixel-art sharp.
|
- `#pixels`: Uses nearest neighbor algorithm for scaling, useful for keeping pixel-art sharp.
|
||||||
@ -214,6 +216,9 @@ Alternatively, you can append the following URL anchors. It can be more handy in
|
|||||||

|

|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim aeque doleamus animo, cum corpore dolemus, fieri tamen permagna accessio potest, si aliquod aeternum et infinitum impendere malum nobis opinemur.
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim aeque doleamus animo, cum corpore dolemus, fieri tamen permagna accessio potest, si aliquod aeternum et infinitum impendere malum nobis opinemur.
|
||||||
|
|
||||||
|
\
|
||||||
|

|
||||||
|
|
||||||
#### Video
|
#### Video
|
||||||
|
|
||||||
Same as images, but with a few differences: `no_hover` and `url_min` are not available.
|
Same as images, but with a few differences: `no_hover` and `url_min` are not available.
|
||||||
|
@ -11,6 +11,14 @@ video {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.full-bleed,
|
||||||
|
&[src*="#full-bleed"] {
|
||||||
|
margin-right: calc((-100vw + 100%) / 2);
|
||||||
|
margin-left: calc((-100vw + 100%) / 2);
|
||||||
|
width: 100vw;
|
||||||
|
max-width: 100vw;
|
||||||
|
}
|
||||||
|
|
||||||
&.start,
|
&.start,
|
||||||
&.end,
|
&.end,
|
||||||
&[src*="#start"],
|
&[src*="#start"],
|
||||||
@ -56,7 +64,9 @@ video {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.transparent,
|
&.transparent,
|
||||||
&[src*="#transparent"] {
|
&.full-bleed,
|
||||||
|
&[src*="#transparent"],
|
||||||
|
&[src*="#full-bleed"] {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
@ -65,7 +75,7 @@ video {
|
|||||||
img {
|
img {
|
||||||
transition: var(--transition-longer);
|
transition: var(--transition-longer);
|
||||||
|
|
||||||
&:not(.no-hover, &[src*="#no-hover"]) {
|
&:not(.no-hover, .full-bleed, &[src*="#no-hover"], &[src*="#full-bleed"]) {
|
||||||
cursor: zoom-in;
|
cursor: zoom-in;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@ -90,12 +100,5 @@ img {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.transparent,
|
|
||||||
&[src*="#transparent"] {
|
|
||||||
&:hover {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<a href="{{ url }}">
|
<a href="{{ url }}">
|
||||||
<img class="
|
<img class="
|
||||||
{% if full %}full{% endif %}
|
{% if full %}full{% endif %}
|
||||||
|
{% if full_bleed %}full_bleed{% endif %}
|
||||||
{% if start %}start{% endif %}
|
{% if start %}start{% endif %}
|
||||||
{% if end %}end{% endif %}
|
{% if end %}end{% endif %}
|
||||||
{% if pixels %}pixels{% endif %}
|
{% if pixels %}pixels{% endif %}
|
||||||
@ -14,6 +15,7 @@
|
|||||||
{%- else -%}
|
{%- else -%}
|
||||||
<img class="
|
<img class="
|
||||||
{% if full %}full{% endif %}
|
{% if full %}full{% endif %}
|
||||||
|
{% if full_bleed %}full_bleed{% endif %}
|
||||||
{% if start %}start{% endif %}
|
{% if start %}start{% endif %}
|
||||||
{% if end %}end{% endif %}
|
{% if end %}end{% endif %}
|
||||||
{% if pixels %}pixels{% endif %}
|
{% if pixels %}pixels{% endif %}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
<video class="
|
<video class="
|
||||||
{% if full %}full{% endif %}
|
{% if full %}full{% endif %}
|
||||||
|
{% if full_bleed %}full_bleed{% endif %}
|
||||||
{% if start %}start{% endif %}
|
{% if start %}start{% endif %}
|
||||||
{% if end %}end{% endif %}
|
{% if end %}end{% endif %}
|
||||||
{% if pixels %}pixels{% endif %}
|
{% if pixels %}pixels{% endif %}
|
||||||
{% if transparent %}transparent{% endif %}
|
{% if transparent %}transparent{% endif %}
|
||||||
"
|
"
|
||||||
{%- if alt -%}alt="{{ alt }}"{%- endif -%}
|
{%- if alt -%}alt="{{ alt }}"{%- endif -%}
|
||||||
controls src="{{ url }}"></video>
|
controls src="{{ url }}"></video>
|
||||||
|
Reference in New Issue
Block a user