diff --git a/config.toml b/config.toml index a37976d..7580424 100644 --- a/config.toml +++ b/config.toml @@ -97,7 +97,9 @@ show_feed = true links = [ { url = "@/blog/_index.md", name = "Blog" }, { url = "@/demo/index.md", name = "Demo" }, + { url = "@/tricks/index.md", name = "Tricks" }, { url = "https://codeberg.org/daudix/duckquill", name = "Repo" }, + ] [extra.footer] @@ -106,6 +108,7 @@ links = [ links = [ { url = "@/blog/_index.md", name = "Blog" }, { url = "@/demo/index.md", name = "Demo" }, + { url = "@/tricks/index.md", name = "Tricks" }, { url = "https://codeberg.org/daudix/duckquill", name = "Repo" }, ] # Social links in the footer. diff --git a/content/_index.md b/content/_index.md index a3b4035..fac792d 100644 --- a/content/_index.md +++ b/content/_index.md @@ -138,10 +138,6 @@ primary_color_dark_alpha = "rgba(255, 120, 0, 0.2)" Files named `favicon.png` and `apple-touch-icon.png` are used as favicon and apple touch icon respectively. For animated favicon you can use APNG with `png` file extension. -## Test Pages - -- [Demo page](@/demo/index.md) - ## In the Wild
diff --git a/content/tricks/index.ar.md b/content/tricks/index.ar.md new file mode 100644 index 0000000..f1f4da8 --- /dev/null +++ b/content/tricks/index.ar.md @@ -0,0 +1,5 @@ ++++ +title = "Tricks (العربية)" ++++ + +# Tricks (العربية) diff --git a/content/tricks/index.md b/content/tricks/index.md new file mode 100644 index 0000000..d14841c --- /dev/null +++ b/content/tricks/index.md @@ -0,0 +1,123 @@ ++++ +title = "Tricks" ++++ + +# Tricks + +Several lesser known Duckquill thingies. + +## Styling + +Duckquill is pretty easy to restyle with just a few lines of SCSS in the [appropriate location](@/_index.md#custom-stylesheets). Let's see some examples. + +### Navbar + +You can make navbar have more classic look: + +![clasic navabr](https://files.catbox.moe/udj332.png) + +```scss +#site-nav { + top: 0; + margin-top: 0; + box-shadow: 0 0.75rem 1.5rem -1rem rgba(0, 0, 0, 0.5); + border-radius: 0; + width: 100%; + max-width: 100%; + + nav, + #search-container { + margin: 0 auto; + width: min(var(--container-width), 90%); + } + + nav ul li a, + nav ul li#search button, + nav ul li#language-switcher details summary { + border-radius: var(--rounded-corner); + } + #search-container { + #search-bar { + border-radius: var(--rounded-corner); + } + } +} +``` + +Or you can make it sticked to top: + +![sticked navabr](https://files.catbox.moe/wkweqh.png) + +```scss +#site-nav { + top: 0; + margin-top: 0; + box-shadow: 0 0.75rem 1.5rem -1rem rgba(0, 0, 0, 0.5); + border-radius: 0 0 1.625rem 1.625rem; +} +``` + +### Headings + +Default headings might not fit your taste, that's understandable. Good thing that we can ~~make them boring~~ fix them: + +![boring headings](https://files.catbox.moe/gwa9cc.png) + +```scss +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: bold; + font-family: var(--font-system-ui); +} + +h1 { + font-weight: 900; +} +``` + +### Strikethrough + +The default strikethrough style is too much for you? Let's sort this out: + +![plain strikethrough](https://files.catbox.moe/y2tbwm.png) + +```scss +del { + box-shadow: none; + border-radius: unset; + background-color: unset; + padding: 0; + color: inherit; +} +``` + +### Edge Highlights + +Hate the skeuomorphic edge highlight on all semi-transparent elements? It's easy to get rid of them: + +```scss +:root { + --edge-highlight: 0 0 0 transparent; +} +``` + +### Horizontal Rule + +Don't like that fancy horizontal rule? Let's make it more modern: + +![modern horizontal rule](https://files.catbox.moe/qyqzoy.png) + +```scss +hr { + border-top: 0.25rem solid var(--fg-muted-2); + width: 50%; + + &::after { + display: none; + } +} +``` diff --git a/content/tricks/index.ru.md b/content/tricks/index.ru.md new file mode 100644 index 0000000..1664f22 --- /dev/null +++ b/content/tricks/index.ru.md @@ -0,0 +1,5 @@ ++++ +title = "Tricks (Русский)" ++++ + +# Tricks (Русский) diff --git a/i18n/ar.toml b/i18n/ar.toml index 9faf2af..9a43e07 100644 --- a/i18n/ar.toml +++ b/i18n/ar.toml @@ -11,6 +11,7 @@ date_locale = "ar_SA" # Should match the names in config.extra.nav.links and config.extra.footer.links. Blog = "المدونة" Demo = "العرض" +Tricks = "الحيل" Repo = "المستودع" all_tags = "انظر جميع العلامات" diff --git a/i18n/en.toml b/i18n/en.toml index b733672..4f6d52e 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -11,6 +11,7 @@ date_locale = "en_US" # Should match the names in config.extra.nav.links and config.extra.footer.links. Blog = "Blog" Demo = "Demo" +Tricks = "Tricks" Repo = "Repo" all_tags = "See all tags" diff --git a/i18n/ru.toml b/i18n/ru.toml index c5a5c0f..678e3a8 100644 --- a/i18n/ru.toml +++ b/i18n/ru.toml @@ -15,6 +15,7 @@ date_locale = "ru_RU" # Should match the names in config.extra.nav.links and config.extra.footer.links. Blog = "Блог" Demo = "Демо" +Tricks = "Трюки" Repo = "Репо" all_tags = "Показать все теги" diff --git a/sass/_nav.scss b/sass/_nav.scss index f3a2792..2e5ff52 100644 --- a/sass/_nav.scss +++ b/sass/_nav.scss @@ -290,7 +290,7 @@ gap: 0.5rem; backdrop-filter: var(--blur); box-shadow: var(--edge-highlight), 0 0.75rem 1.5rem -1rem rgba(0, 0, 0, 0.5); - border-radius: 1.125rem; + border-radius: calc(var(--rounded-corner) + 0.5rem); background-color: var(--nav-bg); padding: 0.5rem; width: 100%;