✨ feat: allow setting default theme
This commit is contained in:
commit
42293b2868
11
config.toml
11
config.toml
@ -133,10 +133,17 @@ language_name.ca = "Català"
|
|||||||
language_name.en = "English"
|
language_name.en = "English"
|
||||||
language_name.es = "Español"
|
language_name.es = "Español"
|
||||||
|
|
||||||
# Enable JavaScript theme toggler for dark/light mode (and automatic switching).
|
# Enable JavaScript theme toggler to allow users to switch between dark/light mode.
|
||||||
# The default setting is the light theme.
|
# Also enables automatic switching based on user's OS-level theme settings.
|
||||||
|
# If disabled, your site will only use the theme specified in the `default_theme` variable.
|
||||||
theme_switcher = true
|
theme_switcher = true
|
||||||
|
|
||||||
|
# This setting determines the default theme ("light" or "dark").
|
||||||
|
# If you wish to use only a dark or light theme, disable the `theme_switcher` above and set this variable.
|
||||||
|
# If `theme_switcher` is enabled, this will be the theme that is visible to users who have JavaScript disabled.
|
||||||
|
# Defaults to "light", if unset.
|
||||||
|
default_theme = "light"
|
||||||
|
|
||||||
# Add a "copy" button to codeblocks (loads ~700 bytes of JavaScript).
|
# Add a "copy" button to codeblocks (loads ~700 bytes of JavaScript).
|
||||||
copy_button = true
|
copy_button = true
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
+++
|
+++
|
||||||
title = "Exemples de Markdown"
|
title = "Exemples de Markdown"
|
||||||
date = 2023-01-31
|
date = 2023-01-31
|
||||||
updated = 2023-08-02
|
updated = 2023-08-06
|
||||||
description = "Aquesta publicació mostra alguns exemples de format en Markdown, incloent-hi una taula, blocs de codi i etiquetes, citacions, taules i notes a peu de pàgina."
|
description = "Aquesta publicació mostra alguns exemples de format en Markdown, incloent-hi una taula, blocs de codi i etiquetes, citacions, taules i notes a peu de pàgina."
|
||||||
|
|
||||||
[taxonomies]
|
[taxonomies]
|
||||||
@ -67,7 +67,7 @@ A Rust, declares una variable mutable amb `let mut x = 5;`, mentre que a Python,
|
|||||||
|
|
||||||
## Quote
|
## Quote
|
||||||
|
|
||||||
> "La vida, perquè sigui vida, s'ha de viure a poc a poc…"
|
> «La vida, perquè sigui vida, s'ha de viure a poc a poc…»
|
||||||
>
|
>
|
||||||
> — Mercè Rodoreda, La plaça del Diamant
|
> — Mercè Rodoreda, La plaça del Diamant
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
+++
|
+++
|
||||||
title = "Ejemplos de Markdown"
|
title = "Ejemplos de Markdown"
|
||||||
date = 2023-01-31
|
date = 2023-01-31
|
||||||
updated = 2023-08-02
|
updated = 2023-08-06
|
||||||
description = "Esta publicación muestra algunos ejemplos de formato Markdown, incluyendo una tabla, bloques de código y etiquetas, citas, tablas y notas al pie de página."
|
description = "Esta publicación muestra algunos ejemplos de formato Markdown, incluyendo una tabla, bloques de código y etiquetas, citas, tablas y notas al pie de página."
|
||||||
|
|
||||||
[taxonomies]
|
[taxonomies]
|
||||||
@ -67,7 +67,7 @@ En Rust, declaras una variable mutable con `let mut x = 5;`, mientras que en Pyt
|
|||||||
|
|
||||||
## Cita
|
## Cita
|
||||||
|
|
||||||
> "A mí me sobra el cuerpo, Orfeo, me sobra el cuerpo porque me falta alma."
|
> «A mí me sobra el cuerpo, Orfeo, me sobra el cuerpo porque me falta alma.»
|
||||||
>
|
>
|
||||||
> — Miguel de Unamuno, Niebla
|
> — Miguel de Unamuno, Niebla
|
||||||
|
|
||||||
|
@ -60,11 +60,9 @@
|
|||||||
--bg-3: #d8dcdd;
|
--bg-3: #d8dcdd;
|
||||||
--hover-color: white;
|
--hover-color: white;
|
||||||
--primary-color: #087E96;
|
--primary-color: #087E96;
|
||||||
--primary-color-dark: #10668b;
|
|
||||||
--divider-color: #d7d7d7;
|
--divider-color: #d7d7d7;
|
||||||
--text-color: #222226;
|
--text-color: #222226;
|
||||||
--text-color-high-contrast: #313333;
|
--text-color-high-contrast: #313333;
|
||||||
--quote-color: #355f62;
|
|
||||||
--border-color: #727272;
|
--border-color: #727272;
|
||||||
--meta-color: #5b5b65;
|
--meta-color: #5b5b65;
|
||||||
--codeblock-bg: #272430;
|
--codeblock-bg: #272430;
|
||||||
@ -81,11 +79,9 @@
|
|||||||
--bg-3: #535555;
|
--bg-3: #535555;
|
||||||
--hover-color: black;
|
--hover-color: black;
|
||||||
--primary-color: #91e0ee;
|
--primary-color: #91e0ee;
|
||||||
--primary-color-dark: #69bace;
|
|
||||||
--divider-color: #4a4a4a;
|
--divider-color: #4a4a4a;
|
||||||
--text-color: #D4D4D4;
|
--text-color: #D4D4D4;
|
||||||
--text-color-high-contrast: #eceeef;
|
--text-color-high-contrast: #eceeef;
|
||||||
--quote-color: #a9c5c7;
|
|
||||||
--border-color: black;
|
--border-color: black;
|
||||||
--meta-color: #B0B0B0;
|
--meta-color: #B0B0B0;
|
||||||
--codeblock-bg: #151515;
|
--codeblock-bg: #151515;
|
||||||
|
@ -71,8 +71,7 @@ hr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
border-left: 0.2rem solid var(--primary-color);
|
border-left: 0.3rem solid var(--primary-color);
|
||||||
color: var(--quote-color);
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
}
|
}
|
||||||
@ -149,9 +148,8 @@ hr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.info-box {
|
.info-box {
|
||||||
border: 1px solid #087E96;
|
border: 1px solid var(--primary-color);
|
||||||
border-left-width: 0.3rem;
|
border-left-width: 0.3rem;
|
||||||
background-color: #d1f3f8;
|
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
|
@ -256,7 +256,7 @@ h4.isso-thread-heading {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.isso-post-action > input:hover {
|
.isso-post-action > input:hover {
|
||||||
background-color: var(--primary-color-dark);
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ========================================================================== */
|
/* ========================================================================== */
|
||||||
|
2
static/isso.min.css
vendored
2
static/isso.min.css
vendored
@ -1 +1 @@
|
|||||||
#isso-thread *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#isso-thread{padding:0;margin:0 auto;color:var(--text-color);font-family:var(--sans-serif-font);font-size:.9em;width:100%}h4.isso-thread-heading{font-size:1.2rem;color:var(--text-color);padding-bottom:.2em}.isso-feedlink,.isso-note{float:right}.isso-feedlink a{font-size:.8em;vertical-align:bottom}.isso-comment{max-width:68em;margin:0 auto}.isso-preview .isso-comment{padding-top:0;margin:0}.isso-comment:not(:first-of-type),.isso-follow-up .isso-comment{border-top:1px solid rgba(0,0,0,.1);margin-bottom:.5em}.isso-avatar{display:block;float:left;margin:.95em .95em 0}.isso-avatar svg{max-width:48px;max-height:48px;width:100%;height:100%;border:1px solid rgba(0,0,0,.2);border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1)}.isso-text-wrapper{display:block;padding:.3em}.isso-follow-up{padding-left:calc(7% + 20px)}.isso-comment-header{font-size:.85em}.isso-comment-header a{text-decoration:none}.isso-comment-header .isso-spacer{padding:0 6px}.isso-note,.isso-parent,.isso-permalink,.isso-spacer{color:var(--meta-color);font-weight:400;text-shadow:none}.isso-note:hover,.isso-parent:hover,.isso-permalink:hover,.isso-spacer:hover{color:#606060}.isso-author{font-weight:500;color:var(--text-color)}.isso-page-author-suffix{font-weight:700;color:var(--text-color-high-contrast)}.isso-input-wrapper input,.isso-preview,.isso-textarea{font-family:var(--sans-serif-font);color:var(--text-color);background-color:var(--bg-2)}.isso-is-page-author>.isso-text-wrapper{background-color:var(--bg-1)}.isso-preview,.isso-textarea{padding:10px;border:none;font-size:.8em}.isso-text p{margin-top:-.4em}.isso-text p:last-child{margin-bottom:.2em}.isso-text h1,.isso-text h2,.isso-text h3,.isso-text h4,.isso-text h5,.isso-text h6{font-size:130%;font-weight:700}.isso-comment-footer{font-size:.8em;color:gray;clear:left}.isso-comment-footer a,.isso-feedlink{font-weight:700;text-decoration:none;margin:.4em;padding:.1em}.isso-comment-footer .isso-votes{color:gray}.isso-downvote svg,.isso-upvote svg{position:relative;top:.2em}.isso-comment .isso-postbox{margin-top:.8em}.isso-comment.isso-no-votes>*>.isso-comment-footer .isso-votes,.isso-post-action input[name=edit],.isso-postbox.isso-preview-mode>.isso-form-wrapper .isso-textarea,.isso-postbox.isso-preview-mode>.isso-form-wrapper input[name=preview],.isso-preview{display:none}.isso-postbox{max-width:68em;margin:0 auto 2em;clear:right}.isso-form-wrapper{display:flex;flex-direction:column}.isso-preview,.isso-textarea{margin-top:.2em;width:100%;border:var(--border-color);border-radius:5px;box-shadow:0 0 2px #888}.isso-textarea{outline:0;width:100%;resize:none}.isso-form-wrapper input[type=checkbox]{vertical-align:middle;position:relative;bottom:1px;margin-left:0}.isso-notification-section{font-size:.9em;padding-top:.3em;display:none;padding-bottom:10px}.isso-auth-section{display:flex;flex-direction:row}.isso-auth-section input:focus,.isso-textarea:focus{border-color:rgba(0,0,0,.8)}.isso-input-wrapper{display:inline-block;position:relative;font-family:var(--sans-serif-font);font-size:.9em;max-width:25%;margin:0}.isso-input-wrapper input{max-width:100%;line-height:1.2em;padding:.3em;border-radius:5px;width:90%;border:var(--border-color);box-shadow:0 0 2px #888}.isso-input-wrapper label{display:inline-block;line-height:1.4em;height:1.4em}.isso-post-action{display:block;margin:0 auto .3em;align-self:flex-end}.isso-post-action>input{font-size:.8rem;background-color:var(--primary-color);color:var(--background-color);border:none;border-radius:5px;padding:.6em 1em;margin:.1em;cursor:pointer}.isso-post-action>input:hover{background-color:var(--primary-color-dark)}.isso-postbox.isso-preview-mode>.isso-form-wrapper .isso-preview{display:block}.isso-postbox.isso-preview-mode>.isso-form-wrapper input[name=edit]{display:inline}.isso-preview{background-color:var(--bg-0);background:repeating-linear-gradient(-45deg,var(--bg-0),var(--bg-0) 10px,var(--bg-2) 10px,var(--bg-2) 20px)}.isso-target{animation:5s ease-out isso-target-fade}@keyframes isso-target-fade{0%{background-color:var(--divider-color)}}@media screen and (max-width:600px){.isso-auth-section{flex-direction:column;text-align:center}.isso-input-wrapper{display:block;max-width:100%;margin:0 0 .4em}.isso-input-wrapper input{width:100%}.isso-post-action{margin:.4em auto;width:60%}}
|
#isso-thread *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#isso-thread{padding:0;margin:0 auto;color:var(--text-color);font-family:var(--sans-serif-font);font-size:.9em;width:100%}h4.isso-thread-heading{font-size:1.2rem;color:var(--text-color);padding-bottom:.2em}.isso-feedlink,.isso-note{float:right}.isso-feedlink a{font-size:.8em;vertical-align:bottom}.isso-comment{max-width:68em;margin:0 auto}.isso-preview .isso-comment{padding-top:0;margin:0}.isso-comment:not(:first-of-type),.isso-follow-up .isso-comment{border-top:1px solid rgba(0,0,0,.1);margin-bottom:.5em}.isso-avatar{display:block;float:left;margin:.95em .95em 0}.isso-avatar svg{max-width:48px;max-height:48px;width:100%;height:100%;border:1px solid rgba(0,0,0,.2);border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1)}.isso-text-wrapper{display:block;padding:.3em}.isso-follow-up{padding-left:calc(7% + 20px)}.isso-comment-header{font-size:.85em}.isso-comment-header a{text-decoration:none}.isso-comment-header .isso-spacer{padding:0 6px}.isso-note,.isso-parent,.isso-permalink,.isso-spacer{color:var(--meta-color);font-weight:400;text-shadow:none}.isso-note:hover,.isso-parent:hover,.isso-permalink:hover,.isso-spacer:hover{color:#606060}.isso-author{font-weight:500;color:var(--text-color)}.isso-page-author-suffix{font-weight:700;color:var(--text-color-high-contrast)}.isso-input-wrapper input,.isso-preview,.isso-textarea{font-family:var(--sans-serif-font);color:var(--text-color);background-color:var(--bg-2)}.isso-is-page-author>.isso-text-wrapper{background-color:var(--bg-1)}.isso-preview,.isso-textarea{padding:10px;border:none;font-size:.8em}.isso-text p{margin-top:-.4em}.isso-text p:last-child{margin-bottom:.2em}.isso-text h1,.isso-text h2,.isso-text h3,.isso-text h4,.isso-text h5,.isso-text h6{font-size:130%;font-weight:700}.isso-comment-footer{font-size:.8em;color:gray;clear:left}.isso-comment-footer a,.isso-feedlink{font-weight:700;text-decoration:none;margin:.4em;padding:.1em}.isso-comment-footer .isso-votes{color:gray}.isso-downvote svg,.isso-upvote svg{position:relative;top:.2em}.isso-comment .isso-postbox{margin-top:.8em}.isso-comment.isso-no-votes>*>.isso-comment-footer .isso-votes,.isso-post-action input[name=edit],.isso-postbox.isso-preview-mode>.isso-form-wrapper .isso-textarea,.isso-postbox.isso-preview-mode>.isso-form-wrapper input[name=preview],.isso-preview{display:none}.isso-postbox{max-width:68em;margin:0 auto 2em;clear:right}.isso-form-wrapper{display:flex;flex-direction:column}.isso-preview,.isso-textarea{margin-top:.2em;width:100%;border:var(--border-color);border-radius:5px;box-shadow:0 0 2px #888}.isso-textarea{outline:0;width:100%;resize:none}.isso-form-wrapper input[type=checkbox]{vertical-align:middle;position:relative;bottom:1px;margin-left:0}.isso-notification-section{font-size:.9em;padding-top:.3em;display:none;padding-bottom:10px}.isso-auth-section{display:flex;flex-direction:row}.isso-auth-section input:focus,.isso-textarea:focus{border-color:rgba(0,0,0,.8)}.isso-input-wrapper{display:inline-block;position:relative;font-family:var(--sans-serif-font);font-size:.9em;max-width:25%;margin:0}.isso-input-wrapper input{max-width:100%;line-height:1.2em;padding:.3em;border-radius:5px;width:90%;border:var(--border-color);box-shadow:0 0 2px #888}.isso-input-wrapper label{display:inline-block;line-height:1.4em;height:1.4em}.isso-post-action{display:block;margin:0 auto .3em;align-self:flex-end}.isso-post-action>input{font-size:.8rem;background-color:var(--primary-color);color:var(--background-color);border:none;border-radius:5px;padding:.6em 1em;margin:.1em;cursor:pointer}.isso-post-action>input:hover{opacity: 0.8}.isso-postbox.isso-preview-mode>.isso-form-wrapper .isso-preview{display:block}.isso-postbox.isso-preview-mode>.isso-form-wrapper input[name=edit]{display:inline}.isso-preview{background-color:var(--bg-0);background:repeating-linear-gradient(-45deg,var(--bg-0),var(--bg-0) 10px,var(--bg-2) 10px,var(--bg-2) 20px)}.isso-target{animation:5s ease-out isso-target-fade}@keyframes isso-target-fade{0%{background-color:var(--divider-color)}}@media screen and (max-width:600px){.isso-auth-section{flex-direction:column;text-align:center}.isso-input-wrapper{display:block;max-width:100%;margin:0 0 .4em}.isso-input-wrapper input{width:100%}.isso-post-action{margin:.4em auto;width:60%}}
|
||||||
|
@ -9,7 +9,10 @@
|
|||||||
{% import "macros/add_comments.html" as macros_add_comments %}
|
{% import "macros/add_comments.html" as macros_add_comments %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ lang }}">
|
<html lang="{{ lang }}" {% if config.extra.default_theme -%}
|
||||||
|
data-theme="{{config.extra.default_theme}}"
|
||||||
|
{%- endif -%}>
|
||||||
|
|
||||||
{% include "partials/header.html" %}
|
{% include "partials/header.html" %}
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@ -71,12 +71,12 @@
|
|||||||
<meta http-equiv="Content-Security-Policy"
|
<meta http-equiv="Content-Security-Policy"
|
||||||
content="default-src 'self'
|
content="default-src 'self'
|
||||||
{%- if config.extra.allowed_domains -%}
|
{%- if config.extra.allowed_domains -%}
|
||||||
;
|
;
|
||||||
{# Check if a comment system is enabled to allow the necessary domains and directives #}
|
{#- Check if a comment system is enabled to allow the necessary domains and directives -#}
|
||||||
{% set utterances_enabled = config.extra.utterances.enabled_for_all_posts or page.extra.utterances %}
|
{%- set utterances_enabled = config.extra.utterances.enabled_for_all_posts or page.extra.utterances -%}
|
||||||
{% set giscus_enabled = config.extra.giscus.enabled_for_all_posts or page.extra.giscus %}
|
{%- set giscus_enabled = config.extra.giscus.enabled_for_all_posts or page.extra.giscus -%}
|
||||||
{% set hyvortalk_enabled = config.extra.hyvortalk.enabled_for_all_posts or page.extra.hyvortalk %}
|
{%- set hyvortalk_enabled = config.extra.hyvortalk.enabled_for_all_posts or page.extra.hyvortalk -%}
|
||||||
{% set isso_enabled = config.extra.isso.enabled_for_all_posts or page.extra.isso %}
|
{%- set isso_enabled = config.extra.isso.enabled_for_all_posts or page.extra.isso -%}
|
||||||
|
|
||||||
{% if hyvortalk_enabled %}
|
{% if hyvortalk_enabled %}
|
||||||
connect-src talk.hyvor.com;
|
connect-src talk.hyvor.com;
|
||||||
|
11
theme.toml
11
theme.toml
@ -26,10 +26,17 @@ language_name.ca = "Català"
|
|||||||
language_name.en = "English"
|
language_name.en = "English"
|
||||||
language_name.es = "Español"
|
language_name.es = "Español"
|
||||||
|
|
||||||
# Enable JavaScript theme toggler for dark/light mode (and automatic switching).
|
# Enable JavaScript theme toggler to allow users to switch between dark/light mode.
|
||||||
# The default setting is the light theme.
|
# Also enables automatic switching based on user's OS-level theme settings.
|
||||||
|
# If disabled, your site will only use the theme specified in the `default_theme` variable.
|
||||||
theme_switcher = true
|
theme_switcher = true
|
||||||
|
|
||||||
|
# This setting determines the default theme ("light" or "dark").
|
||||||
|
# If you wish to use only a dark or light theme, disable the `theme_switcher` above and set this variable.
|
||||||
|
# If `theme_switcher` is enabled, this will be the theme that is visible to users who have JavaScript disabled.
|
||||||
|
# Defaults to "light", if unset.
|
||||||
|
default_theme = "light"
|
||||||
|
|
||||||
# Add a "copy" button to codeblocks (loads ~700 bytes of JavaScript).
|
# Add a "copy" button to codeblocks (loads ~700 bytes of JavaScript).
|
||||||
copy_button = true
|
copy_button = true
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user