Merge branch 'main' into allow-sharing-without-description
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
public/
|
public/
|
||||||
|
.vercel
|
||||||
|
@ -1,53 +1,32 @@
|
|||||||
# Exclude the pipeline to run on the pages branch
|
# Taken from https://www.markpitblado.me/blog/deploying-to-vercel-from-codeberg
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
exclude: pages
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Check for typos
|
preview:
|
||||||
typos:
|
image: node
|
||||||
image: alpine:edge
|
environment:
|
||||||
|
VERCEL_TOKEN:
|
||||||
|
from_secret: vercel_token
|
||||||
|
VERCEL_ORG_ID:
|
||||||
|
from_secret: vercel_org_id
|
||||||
|
VERCEL_PROJECT_ID:
|
||||||
|
from_secret: vercel_project_id
|
||||||
commands:
|
commands:
|
||||||
- apk add curl jq
|
- npm install --global vercel@latest
|
||||||
- curl -s "https://api.github.com/repos/crate-ci/typos/releases/latest" | jq -r '.assets[] | select(.name | contains("unknown-linux-musl")) | .browser_download_url' | xargs -n 1 curl -L -o typos.tar.gz
|
- vercel deploy --token=$VERCEL_TOKEN
|
||||||
- tar -zxvf typos.tar.gz ./typos
|
|
||||||
- ./typos
|
|
||||||
failure: ignore
|
|
||||||
when:
|
when:
|
||||||
event: [push, pull_request, manual]
|
event: [pull_request]
|
||||||
|
|
||||||
# Build Zola static files
|
deploy:
|
||||||
build:
|
image: node
|
||||||
image: alpine:edge
|
environment:
|
||||||
|
VERCEL_TOKEN:
|
||||||
|
from_secret: vercel_token
|
||||||
|
VERCEL_ORG_ID:
|
||||||
|
from_secret: vercel_org_id
|
||||||
|
VERCEL_PROJECT_ID:
|
||||||
|
from_secret: vercel_project_id
|
||||||
commands:
|
commands:
|
||||||
- apk add zola
|
- npm install --global vercel@latest
|
||||||
- zola build
|
- vercel deploy --prod --token=$VERCEL_TOKEN
|
||||||
when:
|
|
||||||
event: [push, pull_request, manual]
|
|
||||||
|
|
||||||
publish:
|
|
||||||
image: bitnami/git
|
|
||||||
# Must be set in Woodpecker configuration
|
|
||||||
# mail: Your email address used by Codeberg
|
|
||||||
# codeberg_token: Codeberg access token with "write:repository" permission
|
|
||||||
secrets: [mail, codeberg_token]
|
|
||||||
commands:
|
|
||||||
# Configure Git
|
|
||||||
- git config --global user.email $MAIL
|
|
||||||
- git config --global user.name "Woodpecker CI"
|
|
||||||
# Clone the output branch
|
|
||||||
- git clone --branch pages https://$CODEBERG_TOKEN@codeberg.org/$CI_REPO.git $CI_REPO_NAME
|
|
||||||
# Enter the output branch
|
|
||||||
- cd $CI_REPO_NAME
|
|
||||||
# Remove old files
|
|
||||||
- git rm -r "*" || true # Don't fail if there's nothing to remove
|
|
||||||
# Copy the output of the build step
|
|
||||||
- cp -ar ../public/. .
|
|
||||||
# Copy .domains in place (Duckquill specific. you should just place it in ./static/)
|
|
||||||
- cp ../.domains .
|
|
||||||
# Commit and push all static files with the source commit hash
|
|
||||||
- git add --all
|
|
||||||
- git commit -m "Woodpecker CI ${CI_COMMIT_SHA} [SKIP CI]" --allow-empty
|
|
||||||
- git push
|
|
||||||
when:
|
when:
|
||||||
event: [push, manual]
|
event: [push, manual]
|
||||||
|
19
CHANGELOG.md
19
CHANGELOG.md
@ -5,14 +5,31 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [Unreleased](https://codeberg.org/daudix/duckquill/compare/v6.0.0...main)
|
## [Unreleased](https://codeberg.org/daudix/duckquill/compare/v6.1.1...main)
|
||||||
|
|
||||||
|
## [v6.1.1](https://codeberg.org/daudix/duckquill/compare/v6.1.0...v6.1.1)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix translation of table of contents heading.
|
||||||
|
|
||||||
|
## [v6.1.0](https://codeberg.org/daudix/duckquill/compare/v6.0.0...v6.1.0)
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Add `toc_sidebar` page/section variable for turning table of contents to a sidebar.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Don't scale down article cards when clicking on tags in them.
|
- Don't scale down article cards when clicking on tags in them.
|
||||||
- Improve performance of the page when navbar is hidden by using the `config.extra.nav.auto_hide` config variable.
|
- Improve performance of the page when navbar is hidden by using the `config.extra.nav.auto_hide` config variable.
|
||||||
|
- Improve tab title generation.
|
||||||
- Replace `config.extra.debug_*` config variables with variables under the `config.extra.debug` section.
|
- Replace `config.extra.debug_*` config variables with variables under the `config.extra.debug` section.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix navbar not scrolling with content on mobile (#109).
|
||||||
|
|
||||||
## [6.0.0](https://codeberg.org/daudix/duckquill/compare/v5.4.0...v6.0.0)
|
## [6.0.0](https://codeberg.org/daudix/duckquill/compare/v5.4.0...v6.0.0)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -181,7 +181,7 @@ csp = [
|
|||||||
|
|
||||||
[extra.nav]
|
[extra.nav]
|
||||||
# Whether to automatically hide nav when not hovered or focused
|
# Whether to automatically hide nav when not hovered or focused
|
||||||
auto_hide = true
|
# auto_hide = true
|
||||||
# Whether to show the Atom/RSS feed button in the nav
|
# Whether to show the Atom/RSS feed button in the nav
|
||||||
show_feed = true
|
show_feed = true
|
||||||
# Whether to show the manual theme switcher in the nav
|
# Whether to show the manual theme switcher in the nav
|
||||||
|
@ -66,7 +66,7 @@ It is highly recommended to switch from the `main` branch to the latest release:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd themes/duckquill
|
cd themes/duckquill
|
||||||
git checkout tags/v6.0.0
|
git checkout tags/v6.1.1
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, enable it in your `config.toml`:
|
Then, enable it in your `config.toml`:
|
||||||
@ -80,7 +80,7 @@ To update the theme, simply switch to a new tag:
|
|||||||
```bash
|
```bash
|
||||||
git submodule update --remote --merge
|
git submodule update --remote --merge
|
||||||
cd themes/duckquill
|
cd themes/duckquill
|
||||||
git checkout tags/v6.0.0
|
git checkout tags/v6.1.1
|
||||||
```
|
```
|
||||||
|
|
||||||
{% alert(important=true) %}
|
{% alert(important=true) %}
|
||||||
@ -111,6 +111,7 @@ Configuration variables from `config.toml` that can be set/overriden per page/se
|
|||||||
- `toc`: Enables table of contents. Only first 2 levels of headings are listed.
|
- `toc`: Enables table of contents. Only first 2 levels of headings are listed.
|
||||||
- `toc_inline`: Whether to render inline table of contents at the top of all pages, in addition to floating quick navigation buttons.
|
- `toc_inline`: Whether to render inline table of contents at the top of all pages, in addition to floating quick navigation buttons.
|
||||||
- `toc_ordered`: Whether to use numbered (ordered) list for table of contents.
|
- `toc_ordered`: Whether to use numbered (ordered) list for table of contents.
|
||||||
|
- `toc_sidebar`: Whether to display table of contents as a sidebar (useful for long pages).
|
||||||
|
|
||||||
Other variables:
|
Other variables:
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
title = "Mods"
|
title = "Mods"
|
||||||
[extra]
|
[extra]
|
||||||
toc = true
|
toc = true
|
||||||
|
toc_sidebar = true
|
||||||
+++
|
+++
|
||||||
|
|
||||||
Mods enhance/change some Duckquill visuals. They are updated alongside Duckquill to ensure that you don't need to manually update them every release.
|
Mods enhance/change some Duckquill visuals. They are updated alongside Duckquill to ensure that you don't need to manually update them every release.
|
||||||
|
@ -53,7 +53,7 @@ minutes_read = "阅读需要 $NUMBER 分钟"
|
|||||||
more_matches = "$MATCHES 更多匹配"
|
more_matches = "$MATCHES 更多匹配"
|
||||||
next = "下一篇"
|
next = "下一篇"
|
||||||
no_comments = "目前没有评论 :/"
|
no_comments = "目前没有评论 :/"
|
||||||
note = "注意"
|
note = "附注"
|
||||||
one_posts = "共有 $NUMBER 篇文章"
|
one_posts = "共有 $NUMBER 篇文章"
|
||||||
one_tags = "共有 $NUMBER 个标签"
|
one_tags = "共有 $NUMBER 个标签"
|
||||||
open_post = "打开帖子"
|
open_post = "打开帖子"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#site-footer {
|
#site-footer {
|
||||||
|
grid-area: footer;
|
||||||
margin-block-end: 2rem;
|
margin-block-end: 2rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
@ -13,6 +13,10 @@ body {
|
|||||||
text-wrap: pretty;
|
text-wrap: pretty;
|
||||||
display: grid; // Put footer at the bottom for short pages, such as the 404
|
display: grid; // Put footer at the bottom for short pages, such as the 404
|
||||||
grid-template-rows: auto minmax(auto, 1fr) auto; // Header, stuff, footer
|
grid-template-rows: auto minmax(auto, 1fr) auto; // Header, stuff, footer
|
||||||
|
grid-template-areas:
|
||||||
|
"nav"
|
||||||
|
"main"
|
||||||
|
"footer";
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background-color: var(--bg-color);
|
background-color: var(--bg-color);
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
@ -20,6 +24,21 @@ body {
|
|||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
font-family: var(--font-system-ui), var(--font-emoji);
|
font-family: var(--font-system-ui), var(--font-emoji);
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
|
|
||||||
|
&:has(#sidebar) {
|
||||||
|
grid-template-columns: 1fr min(var(--container-width), 90%) 1fr;
|
||||||
|
grid-template-areas:
|
||||||
|
"nav nav nav"
|
||||||
|
"sidebar main ."
|
||||||
|
"footer footer footer";
|
||||||
|
@media only screen and (max-width: 1200px) {
|
||||||
|
grid-template-areas:
|
||||||
|
"nav nav nav"
|
||||||
|
". sidebar ."
|
||||||
|
". main ."
|
||||||
|
"footer footer footer";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Style text selection to use accent color
|
// Style text selection to use accent color
|
||||||
@ -67,7 +86,52 @@ main {
|
|||||||
width: min(var(--container-width), 90%);
|
width: min(var(--container-width), 90%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#sidebar {
|
||||||
|
display: flex;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
grid-area: sidebar;
|
||||||
|
opacity: 0.2;
|
||||||
|
transition: var(--transition);
|
||||||
|
padding: 1rem;
|
||||||
|
height: 100vh;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 1200px) {
|
||||||
|
position: static;
|
||||||
|
opacity: 1;
|
||||||
|
margin-block-start: 4.25rem;
|
||||||
|
margin-block-end: -4.25rem;
|
||||||
|
padding: 0;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > div {
|
||||||
|
--mask: linear-gradient(to bottom,
|
||||||
|
transparent,
|
||||||
|
black 1rem,
|
||||||
|
black calc(100% - 1rem),
|
||||||
|
transparent);
|
||||||
|
-webkit-mask-image: var(--mask);
|
||||||
|
flex: 1;
|
||||||
|
mask-image: var(--mask);
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
& + main {
|
||||||
|
grid-area: main;
|
||||||
|
margin: 0;
|
||||||
|
margin-block-start: 4.25rem;
|
||||||
|
margin-block-end: 4rem;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion) {
|
@media (prefers-reduced-motion) {
|
||||||
|
|
||||||
*,
|
*,
|
||||||
*::before,
|
*::before,
|
||||||
*::after {
|
*::after {
|
||||||
|
@ -64,6 +64,7 @@
|
|||||||
|
|
||||||
#site-nav {
|
#site-nav {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
|
grid-area: nav;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
margin: 1rem auto 0;
|
margin: 1rem auto 0;
|
||||||
inset-block-start: 1rem;
|
inset-block-start: 1rem;
|
||||||
@ -72,6 +73,11 @@
|
|||||||
border-radius: 1.625rem;
|
border-radius: 1.625rem;
|
||||||
max-width: min(var(--container-width), 90%);
|
max-width: min(var(--container-width), 90%);
|
||||||
|
|
||||||
|
@media only screen and (max-width: 480px) {
|
||||||
|
position: relative;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
-webkit-backdrop-filter: var(--blur);
|
-webkit-backdrop-filter: var(--blur);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* Duckquill v6.0.0 (https://duckquill.daudix.one)
|
* Duckquill v6.1.1 (https://duckquill.daudix.one)
|
||||||
* Copyright 2024 David "Daudix" Lapshin
|
* Copyright 2024 David "Daudix" Lapshin
|
||||||
* Licensed under MIT (https://codeberg.org/daudix/duckquill/src/branch/main/LICENSE)
|
* Licensed under MIT (https://codeberg.org/daudix/duckquill/src/branch/main/LICENSE)
|
||||||
*/
|
*/
|
||||||
|
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 176 KiB After Width: | Height: | Size: 171 KiB |
@ -15,6 +15,13 @@
|
|||||||
{%- if config.extra.nav.links %}
|
{%- if config.extra.nav.links %}
|
||||||
{% include "partials/nav.html" %}
|
{% include "partials/nav.html" %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
{%- if page.extra.toc_sidebar or section.extra.toc_sidebar -%}
|
||||||
|
<div id="sidebar">
|
||||||
|
<div>
|
||||||
|
{%- include "partials/toc.html" -%}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{%- endif -%}
|
||||||
<main id="main-content">
|
<main id="main-content">
|
||||||
{% block custom %}{% endblock custom %}
|
{% block custom %}{% endblock custom %}
|
||||||
{% block content %}{% endblock content %}
|
{% block content %}{% endblock content %}
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
{%- include "partials/statements.html" -%}
|
{%- include "partials/statements.html" -%}
|
||||||
|
{%- if page.extra.toc and not page.extra.toc_sidebar -%}
|
||||||
{%- include "partials/toc.html" -%}
|
{%- include "partials/toc.html" -%}
|
||||||
|
{%- endif -%}
|
||||||
{{ page.content | safe }}
|
{{ page.content | safe }}
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -60,7 +60,6 @@
|
|||||||
</small>
|
</small>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
</small>
|
|
||||||
</div>
|
</div>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</article>
|
</article>
|
||||||
|
@ -1,7 +1,35 @@
|
|||||||
{%- if page.title -%}
|
{# Taken from https://github.com/welpo/tabi/blob/69713c973c11d7646c8fe56476261d96cc1978d8/templates/partials/title.html #}
|
||||||
{{- page.title }} {{ config.extra.title_separator | default(value="-") }} {{ config.title -}}
|
|
||||||
{%- elif section.title -%}
|
{#- Setup -#}
|
||||||
{{- section.title }} {{ config.extra.title_separator | default(value="-") }} {{ config.title -}}
|
{%- set suffix = config.title | safe -%}
|
||||||
|
{%- set custom_separator = config.extra.title_separator | default(value="-") -%}
|
||||||
|
{%- set separator = " " ~ custom_separator ~ " " -%}
|
||||||
|
|
||||||
|
{#- Get the base path for the current language -#}
|
||||||
|
{%- if lang != config.default_language %}
|
||||||
|
{%- set base_path = "/" ~ lang ~ "/" %}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{{- config.title -}}
|
{%- set base_path = "/" %}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{%- if current_path and current_path == base_path -%}
|
||||||
|
{%- set prefix = "" -%}
|
||||||
|
{%- set separator = "" -%}
|
||||||
|
{% elif title %}
|
||||||
|
{%- set prefix = title -%}
|
||||||
|
{% elif section.title -%}
|
||||||
|
{%- set prefix = section.title -%}
|
||||||
|
{% elif page.title %}
|
||||||
|
{%- set prefix = page.title -%}
|
||||||
|
{% elif term.name %}
|
||||||
|
{#- Individual tags -#}
|
||||||
|
{%- set prefix = term.name -%}
|
||||||
|
{% elif taxonomy.name %}
|
||||||
|
{#- List of tags -#}
|
||||||
|
{%- set prefix = macros_translate::translate(key=taxonomy.name, language_strings=language_strings) | capitalize -%}
|
||||||
|
{% else %}
|
||||||
|
{%- set prefix = "404" %}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
|
{#- Return the final concatenated string -#}
|
||||||
|
{{- prefix ~ separator ~ suffix -}}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
{%- if page.extra.toc or section.extra.toc -%}
|
{%- if page.extra.toc or section.extra.toc -%}
|
||||||
{%- if toc | length > 0 -%}
|
{%- if toc | length > 0 -%}
|
||||||
<h2>{{ macros_translate::translate(key="toc", default="Table of Contents", language_strings=language_strings) }}</h2>
|
<h2>{{ macros_translate::translate(key="table_of_contents", default="Table of Contents", language_strings=language_strings) }}</h2>
|
||||||
<{{ list_element }}>
|
<{{ list_element }}>
|
||||||
{%- for h1 in toc -%}
|
{%- for h1 in toc -%}
|
||||||
<li>
|
<li>
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{{ section.title }}</h1>
|
<h1>{{ section.title }}</h1>
|
||||||
{%- include "partials/statements.html" -%}
|
{%- include "partials/statements.html" -%}
|
||||||
|
{%- if section.extra.toc and not section.extra.toc_sidebar -%}
|
||||||
{%- include "partials/toc.html" -%}
|
{%- include "partials/toc.html" -%}
|
||||||
|
{%- endif -%}
|
||||||
{{ section.content | safe }}
|
{{ section.content | safe }}
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
Reference in New Issue
Block a user