Blurhash-type of thing for articles with a banner
@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Add active state to footnotes' go back button.
|
||||
- Add active state to slider thumb.
|
||||
- Add Bahasa Melayu translation (#78).
|
||||
- Add blurred banner to the article in list, if one is present.
|
||||
- Add fading on top/bottom of the search results container.
|
||||
- Add loading animation to "Load Comments" button.
|
||||
- Add margin between comment author name and timestamp.
|
||||
|
@ -10,7 +10,7 @@
|
||||
outline-color: transparent;
|
||||
outline-style: dashed;
|
||||
outline-width: 0.125rem;
|
||||
box-shadow: var(--edge-highlight);
|
||||
box-shadow: var(--edge-highlight), var(--shadow-glass);
|
||||
border-radius: var(--rounded-corner);
|
||||
border-start-end-radius: 2.125rem;
|
||||
border-end-end-radius: 1.8125rem;
|
||||
@ -320,5 +320,16 @@
|
||||
border-block-start: max(1px, 0.0625rem) solid var(--fg-muted-2);
|
||||
padding-block-start: 0.5rem;
|
||||
}
|
||||
|
||||
.blurhash {
|
||||
position: absolute;
|
||||
opacity: var(--dim-opacity);
|
||||
z-index: -1;
|
||||
filter: var(--blurhash-blur);
|
||||
inset: 0;
|
||||
background-image: var(--blurhash);
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,10 @@
|
||||
--purple-fg: rgb(220 138 221);
|
||||
--red-fg: rgb(246 97 81);
|
||||
--yellow-fg: rgb(248 228 92);
|
||||
|
||||
// FILTERS
|
||||
--blurhash-blur: brightness(25%) blur(1rem);
|
||||
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
@ -69,6 +73,7 @@
|
||||
|
||||
// FILTERS
|
||||
--blur: saturate(180%) blur(0.75rem);
|
||||
--blurhash-blur: contrast(25%) brightness(175%) blur(1rem);
|
||||
|
||||
// FONT SIZES
|
||||
--font-size-xx-small: 0.625rem;
|
||||
@ -114,10 +119,10 @@
|
||||
--disabled-opacity: 60%;
|
||||
|
||||
// SHADOWS
|
||||
--edge-highlight: inset 0 0.0625rem 0 rgb(255 255 255 / 10%);
|
||||
--shadow: 0 0 0 0.0625rem rgb(0 0 0 / 3%), 0 0.0625rem 0.1875rem 0.0625rem rgb(0 0 0 / 7%), 0 0.125rem 0.375rem 0.125rem rgb(0 0 0 / 3%);
|
||||
--shadow-raised: 0 0 0 0.0625rem rgb(0 0 0 / 6%), 0 0.125rem 0.375rem 0.125rem rgb(0 0 0 / 14%), 0 0.25rem 0.75rem 0.25rem rgb(0 0 0 / 6%);
|
||||
--shadow-glass: 0 0.75rem 1.5rem -1rem rgb(0 0 0 / 50%);
|
||||
--edge-highlight: inset 0 0.0625rem 0 rgb(255 255 255 / 10%);
|
||||
|
||||
// STATES
|
||||
--hover: scale(110%);
|
||||
|
BIN
static/processed_images/banner.826a4b69b346b5d4.jpg
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
static/processed_images/banner.842d37f0cf47655b.png
Normal file
After Width: | Height: | Size: 460 B |
BIN
static/processed_images/banner.85f993cdc35ace32.jpg
Normal file
After Width: | Height: | Size: 652 B |
BIN
static/processed_images/banner.8deb3c618a299ab6.jpg
Normal file
After Width: | Height: | Size: 684 B |
BIN
static/processed_images/banner.bec8a672e7b17fb6.jpg
Normal file
After Width: | Height: | Size: 826 B |
BIN
static/processed_images/banner.ed0678c0bce42ad1.webp
Normal file
After Width: | Height: | Size: 484 B |
BIN
static/processed_images/banner.ef59d6bceabab042.webp
Normal file
After Width: | Height: | Size: 855 KiB |
BIN
static/processed_images/banner.f518e108c1e70a95.jpg
Normal file
After Width: | Height: | Size: 983 B |
@ -72,6 +72,11 @@
|
||||
</small>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{%- if page.extra.banner -%}
|
||||
{%- set blurhash = resize_image(path=page.colocated_path ~ page.extra.banner, width=16, height=8, op="fill", format="webp") -%}
|
||||
<div class="blurhash" style="--blurhash: url('{{ blurhash.url }}')"></div>
|
||||
{%- endif -%}
|
||||
|
||||
</article>
|
||||
{%- endfor %}
|
||||
</div>
|
||||
|