Refactor style (among other things) #24

Merged
Tetrakern merged 94 commits from refactor_colors into main 2024-03-03 02:47:35 +08:00
145 changed files with 3731 additions and 4868 deletions

View File

@ -127,22 +127,22 @@ font-size: clamp(1.35em, 1vw + 18.4px, 1.75em); // CSS
* hsl_code(hue, saturation, lightness) returns a dynamic HSL code.
*/
--bg-500: #{hsl_code(222, 13, 27)}; // SCSS
--bg-500: hsl(calc(220deg + var(--hue-rotate)) calc(9% * var(--saturation)) clamp(23%, 46% * var(--darken), 73%)); // CSS
--bg-500: #{hsl_code(222, 13, 26.5)}; // SCSS
--bg-500: hsl(calc(222deg + var(--hue-rotate)) calc(13% * var(--saturation)) clamp(13.25%, 26.5% * var(--darken), 53%)); // CSS
/*
* hsl_code_free(hue, saturation, lightness) returns a dynamic HSL code but without the HSL wrapper.
*/
--bg-900-free: #{hsl_code_free(222, 15, 17)}; // SCSS
--bg-900-free: calc(222deg + var(--hue-rotate)) calc(15% * var(--saturation)) clamp(8.5%, 17% * var(--darken), 58.5%) // CSS
--bg-900-free: #{hsl_code_free(219, 15, 17)}; // SCSS
--bg-900-free: calc(219deg + var(--hue-rotate)) calc(15% * var(--saturation)) clamp(8.5%, 17% * var(--darken), 58.5%) // CSS
/*
* hsl_font_code(hue, saturation, lightness) returns a dynamic HSL font code.
*/
--fg-500: #{hsl_font_code(222, 14, 69)}; // SCSS
--fg-500: hsl(calc(215deg + var(--hue-rotate)) calc(28% * (var(--font-saturation) + var(--saturation) - 1)) 17%); // CSS
--fg-500: #{hsl_font_code(222, 18, 76)}; // SCSS
--fg-500: hsl(calc(222deg + var(--hue-rotate)) max(calc(18% * (var(--font-saturation) + var(--saturation) - 1)), 0%) clamp(0%, 76%, 100%)); // CSS
```
## JavaScript
@ -317,6 +317,7 @@ Fictioneer customizes WordPress by using as many standard action and filter hook
| `style_loader_tag` | `fictioneer_add_font_awesome_integrity`
| `the_content` | `fictioneer_embed_consent_wrappers`, `fictioneer_add_lightbox_to_post_images`, `fictioneer_add_chapter_paragraph_id`
| `the_password_form` | `fictioneer_password_form`
| `the_content_more_link` | `fictioneer_wrap_read_more_link`
| `theme_templates` | `fictioneer_disallow_page_template_select`
| `update_post_metadata` | `fictioneer_prevent_page_template_update`
| `upload_size_limit` | `fictioneer_upload_size_limit`

View File

@ -156,7 +156,7 @@ Filters the default chapter formatting settings. The passed array is empty becau
---
### `apply_filters( 'fictioneer_filter_chapter_identity', $output, $args )`
Filters the intermediate output array in the `_chapter_-header.php` partial before it is imploded and rendered. Contains the HTML for the story link, chapter title (safe), and author meta nodes (see `fictioneer_get_chapter_author_nodes()`). Any of these items may be missing depending on the chapters configuration.
Filters the intermediate output array in the `_chapter-header.php` partial before it is imploded and rendered. Contains the HTML for the story link, chapter title (safe), and author meta nodes (see `fictioneer_get_chapter_author_nodes()`). Any of these items may be missing depending on the chapters configuration.
**$output:**
* $link (string) HTML for the story back link. Unsafe.
@ -738,12 +738,14 @@ Filters the RSS link returned by the `fictioneer_get_rss_link( $post_type, $post
---
### `apply_filters( 'fictioneer_filter_safe_title', $title, $post_id )`
### `apply_filters( 'fictioneer_filter_safe_title', $title, $post_id, $context, $args )`
Filters the string returned by the `fictioneer_get_safe_title( $post_id )` function, after all tags and line breaks have been stripped. No further sanitization is applied here, so you can add HTML again.
**Parameters:**
* $title (string) The sanitized title of the post.
* $post_id (int) The post ID.
* $context (string|null) - Context regarding where or how the title is used. Unsafe.
* $args (array) - Optional additional arguments.
**Hooked Filters:**
* `fictioneer_prefix_sticky_safe_title( $comments )` Prepends icon to sticky blog posts.

View File

@ -771,17 +771,17 @@ Quite often, you need to apply specific styles depending on the theme mode or sc
```css
/* Make the *sticky* navigation background 10% transparent (always). */
:root {
--navigation-background-sticky-end-opacity: 0.9;
--navigation-background-end-opacity: 0.9;
}
/* Make the *sticky* navigation background 10% transparent (only in dark mode). */
:root[data-mode="dark"] {
--navigation-background-sticky-end-opacity: 0.9;
--navigation-background-end-opacity: 0.9;
}
/* Make the navigation background always visible. */
:root {
--navigation-background-sticky-start-opacity: 1;
--navigation-background-start-opacity: 1;
}
```
@ -791,8 +791,8 @@ Assuming you have set the **Header Style** to **top** or **split**, the followin
```css
:root {
--layout-top-header-background-color: hsl(calc(221deg + var(--hue-rotate)) calc(16% * var(--saturation)) clamp(10%, 20% * var(--darken), 60%) / 70%); /* Example dynamic HSL color with 70% opacity; rgb(43 48 59 / 70%). */
--navigation-background-sticky-start-opacity: 1;
--top-header-background: hsl(calc(221deg + var(--hue-rotate)) calc(16% * var(--saturation)) clamp(10%, 20% * var(--darken), 60%) / 70%); /* Example dynamic HSL color with 70% opacity; rgb(43 48 59 / 70%). */
--navigation-background-start-opacity: 1;
}
.top-header {
@ -915,8 +915,8 @@ You want the navigation on top of the header image? Just go to **Appearance > Cu
```css
/* Semi-transparent navigation bar. */
.header-style-overlay .main-navigation {
--navigation-background-sticky-start-opacity: .72;
--navigation-background-sticky-end-opacity: .9;
--navigation-background-start-opacity: .72;
--navigation-background-end-opacity: .9;
backdrop-filter: blur(4px); /* Blurs everything behind the bar; can decrease render performance. */
-webkit-backdrop-filter: blur(4px); /* ... same but works in Safari. */
}
@ -975,7 +975,7 @@ A good starting point for masks is [haikai](https://app.haikei.app/), but add `p
/* Example: Wave page style */
:root.page-style-mask-image-wave-a:not(.minimal) .main__background {
filter: var(--layout-main-drop-shadow);
filter: var(--page-drop-shadow);
}
:root.page-style-mask-image-wave-a:not(.minimal) .main__background::before {
@ -991,7 +991,7 @@ A good starting point for masks is [haikai](https://app.haikei.app/), but add `p
/* Example: Battered page style */
:root.page-style-polygon-chamfered:not(.minimal) .main__background {
filter: var(--layout-main-drop-shadow);
filter: var(--page-drop-shadow);
}
:root.page-style-polygon-chamfered:not(.minimal) .main__background::before {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
.card._combined{--card-style-secant-width: 0}.card._combined .card__footer._article .card__footer-box,.card._combined .card__body>.card__footer .card__footer-box:is(._left,:last-child){padding:calc(var(--this-padding)*.5) var(--this-padding) var(--this-padding)}.card._combined .rating-letter-label{font-weight:700;opacity:.5}
:root,:root[data-theme=base]{--card-footer-color: var(--fg-700);--card-footer-icon-color: var(--fg-900)}:root[data-mode=light]{--card-footer-color: var(--fg-700);--card-footer-icon-color: var(--fg-800)}.card._combined{--card-style-border-width: 0}.card._combined .card__footer._article .card__footer-box,.card._combined .card__body>.card__footer .card__footer-box:is(._left,:last-child){padding:calc(var(--this-padding)*.5) var(--this-padding) var(--this-padding)}.card._combined .rating-letter-label{font-weight:700;opacity:.5}

View File

@ -1 +1 @@
.card:where(._unfolded,._combined):is(._small,._article) .card__body>.card__footer{margin-top:0}.card:where(._unfolded,._combined) .card__body{padding:0}.card:where(._unfolded,._combined) .card__body._article .card__tag-list._scrolling{padding:0 var(--this-padding);margin-top:calc(-1*var(--card-footer-margin-top, 1em));margin-bottom:0}.card:where(._unfolded,._combined) .card__body>.card__footer{gap:0}.card:where(._unfolded,._combined) .card__body>.card__footer .card__footer-box{background:none;border-top:var(--card-style-secant-width, 1.5px) solid var(--secant);border-radius:0}.card:where(._unfolded,._combined) .card__body>.card__footer .card__footer-box._right{border-left:var(--card-style-secant-width, 1.5px) solid var(--secant);min-width:9cqw}.card:where(._unfolded,._combined) .card__header{padding:var(--this-padding) var(--this-padding) 0}.card:where(._unfolded,._combined) .card__main{padding:0 var(--this-padding)}.card:where(._unfolded,._combined) .card__main:is(._small,._article,._hidden-result){padding:var(--this-padding)}.card:where(._unfolded,._combined)._recommendation .card__main{padding-bottom:var(--this-padding)}.card:where(._unfolded,._combined) .card__footer._article .card__footer-box,.card:where(._unfolded,._combined) .card__body>.card__footer .card__footer-box:is(._left,:last-child){padding:calc(var(--this-padding)*.75) var(--this-padding)}
:root,:root[data-theme=base]{--card-footer-color: var(--fg-600);--card-footer-icon-color: var(--fg-800)}:root[data-mode=light]{--card-footer-icon-color: var(--fg-700);--card-style-border-color: var(--bg-400)}.card:where(._unfolded,._combined):is(._small,._article) .card__body>.card__footer{margin-top:0}.card:where(._unfolded,._combined) .card__body{padding:0}.card:where(._unfolded,._combined) .card__body._article .card__tag-list._scrolling{padding:0 var(--this-padding);margin-top:calc(-1*var(--card-footer-margin-top, 1em));margin-bottom:0}.card:where(._unfolded,._combined) .card__body>.card__footer{gap:0}.card:where(._unfolded,._combined) .card__body>.card__footer .card__footer-box{background:none;border-top:var(--card-style-border-width, 1.5px) solid var(--card-style-border-color, var(--bg-900));border-radius:0}.card:where(._unfolded,._combined) .card__body>.card__footer .card__footer-box._right{border-left:var(--card-style-border-width, 1.5px) solid var(--card-style-border-color, var(--bg-900));min-width:9cqw}.card:where(._unfolded,._combined) .card__header{padding:var(--this-padding) var(--this-padding) 0}.card:where(._unfolded,._combined) .card__main{padding:0 var(--this-padding)}.card:where(._unfolded,._combined) .card__main:is(._small,._article,._hidden-result){padding:var(--this-padding)}.card:where(._unfolded,._combined)._recommendation .card__main{padding-bottom:var(--this-padding)}.card:where(._unfolded,._combined) .card__footer._article .card__footer-box,.card:where(._unfolded,._combined) .card__body>.card__footer .card__footer-box:is(._left,:last-child){padding:calc(var(--this-padding)*.75) var(--this-padding)}

View File

@ -1 +1 @@
:is(:root,:root.minimal) .content-list-style-free{--content-list-item-background: none}:is(:root,:root.minimal) .content-list-style-free :is(.chapter-group__list-item,.story__blog-list-item){border-radius:0;border-bottom:none}
:is(:root,:root.minimal) .content-list-style-free{--content-li-background: none;--card-content-li-background: none}:is(:root,:root.minimal) .content-list-style-free :is(.chapter-group__list-item,.story__blog-list-item){border-radius:0;border-bottom:none}

View File

@ -1 +1 @@
:root:not(.minimal) .content-list-style-full{--content-list-item-background: var(--content-list-item-background-full)}:root:not(.minimal) .content-list-style-full .chapter-group__list-item{padding:.5rem 8px .5rem 6px}:root:not(.minimal) .content-list-style-full .story__blog-list-item{padding:.5rem 8px}:root:not(.minimal) .content-list-style-full .card__link-list-item{padding-left:.35em}
:root:not(.minimal) .content-list-style-full{--card-content-li-background: var(--card-content-li-background-full);--content-li-background: var(--content-li-background-full)}:root:not(.minimal) .content-list-style-full .chapter-group__list-item{padding:.5rem 8px .5rem 6px}:root:not(.minimal) .content-list-style-full .story__blog-list-item{padding:.5rem 8px}:root:not(.minimal) .content-list-style-full .card__link-list-item{padding-left:.35em}

View File

@ -1 +1 @@
:is(:root,:root.minimal) .content-list-style-lines{--content-list-item-background: none}:is(:root,:root.minimal) .content-list-style-lines :is(.chapter-group__list-item,.story__blog-list-item,.card__link-list-item){border-radius:0;border-bottom:1.5px solid var(--layout-color-separator)}:is(:root,:root.minimal) .content-list-style-lines .card__link-list-item:last-child{border-bottom:none}
:is(:root,:root.minimal) .content-list-style-lines{--content-li-background: none;--card-content-li-background: none}:is(:root,:root.minimal) .content-list-style-lines :is(.chapter-group__list-item,.story__blog-list-item,.card__link-list-item){border-radius:0;border-bottom:var(--content-li-hr-border)}:is(:root,:root.minimal) .content-list-style-lines .card__link-list-item:last-child{border-bottom:none}

View File

@ -1 +1 @@
.footer._footer-isolated{--layout-link-hover: var(--fg-d200);background-color:var(--bg-isolated-footer);color:var(--fg-isolated-footer);margin-top:3rem}.footer._footer-isolated .footer__wrapper{margin:2rem auto}.footer._footer-isolated .breadcrumbs{color:var(--fg-isolated-footer)}
.footer._footer-isolated{--layout-link-color-hover: var(--fg-isolated-footer-hover);background:var(--bg-isolated-footer);color:var(--fg-isolated-footer);margin-top:3rem}.footer._footer-isolated .footer__wrapper{margin:2rem auto}.footer._footer-isolated .breadcrumbs{color:var(--fg-isolated-footer)}

View File

@ -1 +1 @@
.top-header{background:var(--layout-top-header-background-color);width:100%;contain:style layout}.top-header__content{display:flex;align-items:center;justify-content:center;gap:1rem;padding:1rem 1rem .5rem;margin:0 auto;max-width:var(--site-width)}@media only screen and (min-width: 1024px){.top-header__content{justify-content:flex-start;padding-bottom:.25rem}}.top-header .custom-logo-link{flex:0 0 auto}.top-header .custom-logo{display:block;height:var(--layout-site-logo-height);max-height:calc(var(--site-title-font-size) + var(--site-title-tagline-font-size) + 1rem);width:auto;object-fit:contain}.top-header._no-tagline .custom-logo{max-height:calc(var(--site-title-font-size) + .75rem)}.top-header._no-title .custom-logo{max-height:unset}.top-header__title{flex:0 1 auto}.top-header__heading{font:700 var(--site-title-font-size)/1.3 var(--ff-site-title);letter-spacing:0}.top-header__heading a{color:var(--site-title-heading-color)}.top-header__tagline{color:var(--site-title-tagline-color);font:400 var(--site-title-tagline-font-size)/1.3 var(--ff-site-title);letter-spacing:0}.top-header._no-logo{text-align:center}@media only screen and (min-width: 1024px){.top-header._no-logo{text-align:left}}
.top-header{background:var(--top-header-background);width:100%;contain:style layout}.top-header__content{display:flex;align-items:center;justify-content:center;gap:1rem;padding:1rem 1rem .5rem;margin:0 auto;max-width:var(--site-width)}@media only screen and (min-width: 1024px){.top-header__content{justify-content:flex-start;padding-bottom:.25rem}}.top-header .custom-logo-link{flex:0 0 auto}.top-header .custom-logo{display:block;height:var(--header-logo-height);max-height:calc(var(--site-title-font-size) + var(--site-title-tagline-font-size) + 1rem);width:auto;object-fit:contain}.top-header._no-tagline .custom-logo{max-height:calc(var(--site-title-font-size) + .75rem)}.top-header._no-title .custom-logo{max-height:unset}.top-header:not(._no-text-shadow) .top-header__title{text-shadow:var(--site-title-text-shadow)}.top-header__title{flex:0 1 auto}.top-header__heading{font:700 var(--site-title-font-size)/1.3 var(--ff-site-title);letter-spacing:0}.top-header__heading a{color:var(--site-title-heading-color)}.top-header__tagline{color:var(--site-title-tagline-color);font:400 var(--site-title-tagline-font-size)/1.3 var(--ff-site-title);letter-spacing:0}.top-header._no-logo{text-align:center}@media only screen and (min-width: 1024px){.top-header._no-logo{text-align:left}}

View File

@ -1 +1 @@
:root.page-style-polygon-battered:not(.minimal) .main__background{filter:var(--layout-main-drop-shadow)}:root.page-style-polygon-battered:not(.minimal) .main__background::before{clip-path:var(--polygon-battered-half)}@media only screen and (min-width: 768px){:root.page-style-polygon-battered:not(.minimal) .main__background::before{left:4px;right:4px;clip-path:var(--polygon-battered)}}@media only screen and (min-width: 1024px){:root.page-style-polygon-battered:not(.minimal) .main__background::before{left:0;right:0}}
:root.page-style-polygon-battered:not(.minimal) .main__background{filter:var(--page-drop-shadow)}:root.page-style-polygon-battered:not(.minimal) .main__background::before{clip-path:var(--polygon-battered-half)}@media only screen and (min-width: 768px){:root.page-style-polygon-battered:not(.minimal) .main__background::before{left:4px;right:4px;clip-path:var(--polygon-battered)}}@media only screen and (min-width: 1024px){:root.page-style-polygon-battered:not(.minimal) .main__background::before{left:0;right:0}}

View File

@ -1 +1 @@
:root.page-style-polygon-chamfered:not(.minimal) .main__background{filter:var(--layout-main-drop-shadow)}:root.page-style-polygon-chamfered:not(.minimal) .main__background::before{--m: clamp(6px, 1.3392857143vw + 1.7142857143px, 12px);clip-path:polygon(0% var(--m), var(--m) 0%, calc(100% - var(--m)) 0%, 100% var(--m), 100% calc(100% - var(--m)), calc(100% - var(--m)) 100%, var(--m) 100%, 0% calc(100% - var(--m)))}
:root.page-style-polygon-chamfered:not(.minimal) .main__background{filter:var(--page-drop-shadow)}:root.page-style-polygon-chamfered:not(.minimal) .main__background::before{--m: clamp(6px, 1.3392857143vw + 1.7142857143px, 12px);clip-path:polygon(0% var(--m), var(--m) 0%, calc(100% - var(--m)) 0%, 100% var(--m), 100% calc(100% - var(--m)), calc(100% - var(--m)) 100%, var(--m) 100%, 0% calc(100% - var(--m)))}

View File

@ -1 +1 @@
:root.page-style-polygon-interface-a:not(.minimal) .main__background{filter:var(--layout-main-drop-shadow)}:root.page-style-polygon-interface-a:not(.minimal) .main__background::before{--o: clamp(0px, 1.2326656394vw - 4.6224961479px, 8px);--m: clamp(6px, 0.4464285714vw + 4.5714285714px, 8px);--g: calc(100% - clamp(140px, 40.1785714286vw + 11.4285714286px, 320px));--s: clamp(0px, 7.1428571429vw - 22.8571428571px, 32px);--p: clamp(92px, 30.8035714286vw - 6.5714285714px, 230px);--i: 0px;clip-path:polygon(0% calc(var(--o) + var(--m)), var(--o) var(--m), calc(var(--s)) var(--m), calc(var(--m) + var(--s)) 0%, calc(var(--m) + var(--s) + var(--p)) 0%, calc(2 * var(--m) + var(--s) + var(--p)) var(--m), calc(50% - 48px) var(--m), calc(50% - 44px) calc(var(--m) + var(--i)), calc(50% - 36px) calc(var(--m) + var(--i)), calc(50% - 32px) var(--m), calc(50% - 16px) var(--m), calc(50% - 12px) calc(var(--m) + var(--i)), calc(50% - 4px) calc(var(--m) + var(--i)), 50% var(--m), calc(50% + 16px) var(--m), calc(50% + 20px) calc(var(--m) + var(--i)), calc(50% + 28px) calc(var(--m) + var(--i)), calc(50% + 32px) var(--m), var(--g) var(--m), calc(var(--g) + 1 * var(--m)) 0%, calc(var(--g) + 3 * var(--m)) 0%, calc(var(--g) + 2 * var(--m)) var(--m), calc(var(--g) + 2.5 * var(--m)) var(--m), calc(var(--g) + 3.5 * var(--m)) 0%, calc(var(--g) + 5.5 * var(--m)) 0%, calc(var(--g) + 4.5 * var(--m)) var(--m), calc(var(--g) + 5 * var(--m)) var(--m), calc(var(--g) + 6 * var(--m)) 0%, calc(var(--g) + 8 * var(--m)) 0%, calc(var(--g) + 7 * var(--m)) var(--m), calc(var(--g) + 7.5 * var(--m)) var(--m), calc(var(--g) + 8.5 * var(--m)) 0%, calc(var(--g) + 11 * var(--m)) 0%, calc(var(--g) + 11.5 * var(--m)) calc(0.5 * var(--m)), calc(100% - 5.5 * var(--m)) calc(0.5 * var(--m)), calc(100% - 5 * var(--m)) 0%, calc(100% - 1 * var(--m)) 0%, 100% var(--m), 100% calc(100% - 1 * var(--m)), calc(100% - 1 * var(--m)) 100%, var(--m) 100%, 0% calc(100% - 1 * var(--m)))}@media only screen and (min-width: 1024px){:root.page-style-polygon-interface-a:not(.minimal) .main__background::before{--i: 4px}}
:root.page-style-polygon-interface-a:not(.minimal) .main__background{filter:var(--page-drop-shadow)}:root.page-style-polygon-interface-a:not(.minimal) .main__background::before{--o: clamp(0px, 1.2326656394vw - 4.6224961479px, 8px);--m: clamp(6px, 0.4464285714vw + 4.5714285714px, 8px);--g: calc(100% - clamp(140px, 40.1785714286vw + 11.4285714286px, 320px));--s: clamp(0px, 7.1428571429vw - 22.8571428571px, 32px);--p: clamp(92px, 30.8035714286vw - 6.5714285714px, 230px);--i: 0px;clip-path:polygon(0% calc(var(--o) + var(--m)), var(--o) var(--m), calc(var(--s)) var(--m), calc(var(--m) + var(--s)) 0%, calc(var(--m) + var(--s) + var(--p)) 0%, calc(2 * var(--m) + var(--s) + var(--p)) var(--m), calc(50% - 48px) var(--m), calc(50% - 44px) calc(var(--m) + var(--i)), calc(50% - 36px) calc(var(--m) + var(--i)), calc(50% - 32px) var(--m), calc(50% - 16px) var(--m), calc(50% - 12px) calc(var(--m) + var(--i)), calc(50% - 4px) calc(var(--m) + var(--i)), 50% var(--m), calc(50% + 16px) var(--m), calc(50% + 20px) calc(var(--m) + var(--i)), calc(50% + 28px) calc(var(--m) + var(--i)), calc(50% + 32px) var(--m), var(--g) var(--m), calc(var(--g) + 1 * var(--m)) 0%, calc(var(--g) + 3 * var(--m)) 0%, calc(var(--g) + 2 * var(--m)) var(--m), calc(var(--g) + 2.5 * var(--m)) var(--m), calc(var(--g) + 3.5 * var(--m)) 0%, calc(var(--g) + 5.5 * var(--m)) 0%, calc(var(--g) + 4.5 * var(--m)) var(--m), calc(var(--g) + 5 * var(--m)) var(--m), calc(var(--g) + 6 * var(--m)) 0%, calc(var(--g) + 8 * var(--m)) 0%, calc(var(--g) + 7 * var(--m)) var(--m), calc(var(--g) + 7.5 * var(--m)) var(--m), calc(var(--g) + 8.5 * var(--m)) 0%, calc(var(--g) + 11 * var(--m)) 0%, calc(var(--g) + 11.5 * var(--m)) calc(0.5 * var(--m)), calc(100% - 5.5 * var(--m)) calc(0.5 * var(--m)), calc(100% - 5 * var(--m)) 0%, calc(100% - 1 * var(--m)) 0%, 100% var(--m), 100% calc(100% - 1 * var(--m)), calc(100% - 1 * var(--m)) 100%, var(--m) 100%, 0% calc(100% - 1 * var(--m)))}@media only screen and (min-width: 1024px){:root.page-style-polygon-interface-a:not(.minimal) .main__background::before{--i: 4px}}

View File

@ -1 +1 @@
:root.page-style-mask-image-layered-peaks-a:not(.minimal) .main__background{filter:var(--layout-main-drop-shadow)}:root.page-style-mask-image-layered-peaks-a:not(.minimal) .main__background::before{--mp: top left, top clamp(15px, 2.0356234097vw + 7.3664122137px, 23px) left 0;--ms: 100% clamp(16px, 2.0356234097vw + 8.3664122137px, 24px), 100% calc(100% - clamp(15px, 2.0356234097vw + 7.3664122137px, 23px));--mr: repeat-x, no-repeat;--mi: url("data:image/svg+xml,%3Csvg id='visual' viewBox='0 0 900 24' width='900' height='24' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'%3E%3Cpath d='M0 6L39 0L78 0L117 17L157 3L196 14L235 9L274 19L313 14L352 12L391 3L430 6L470 19L509 3L548 12L587 19L626 7L665 12L704 2L743 8L783 17L822 5L861 9L900 1L900 25L861 25L822 25L783 25L743 25L704 25L665 25L626 25L587 25L548 25L509 25L470 25L430 25L391 25L352 25L313 25L274 25L235 25L196 25L157 25L117 25L78 25L39 25L0 25Z' fill='rgba(0,0,0,0.5)'%3E%3C/path%3E%3Cpath d='M0 8L39 17L78 20L117 6L157 13L196 17L235 17L274 7L313 17L352 18L391 21L430 19L470 14L509 15L548 17L587 11L626 18L665 8L704 19L743 17L783 13L822 7L861 6L900 9L900 25L861 25L822 25L783 25L743 25L704 25L665 25L626 25L587 25L548 25L509 25L470 25L430 25L391 25L352 25L313 25L274 25L235 25L196 25L157 25L117 25L78 25L39 25L0 25Z' fill='rgba(0,0,0,0.75)'%3E%3C/path%3E%3Cpath d='M0 12L39 14L78 17L117 14L157 16L196 17L235 19L274 20L313 20L352 16L391 16L430 12L470 22L509 22L548 17L587 13L626 11L665 18L704 13L743 23L783 21L822 16L861 17L900 21L900 25L861 25L822 25L783 25L743 25L704 25L665 25L626 25L587 25L548 25L509 25L470 25L430 25L391 25L352 25L313 25L274 25L235 25L196 25L157 25L117 25L78 25L39 25L0 25Z' fill='%23000000'%3E%3C/path%3E%3C/svg%3E%0A"), var(--data-image-2x2-black)}
:root.page-style-mask-image-layered-peaks-a:not(.minimal) .main__background{filter:var(--page-drop-shadow)}:root.page-style-mask-image-layered-peaks-a:not(.minimal) .main__background::before{--mp: top left, top clamp(15px, 2.0356234097vw + 7.3664122137px, 23px) left 0;--ms: 100% clamp(16px, 2.0356234097vw + 8.3664122137px, 24px), 100% calc(100% - clamp(15px, 2.0356234097vw + 7.3664122137px, 23px));--mr: repeat-x, no-repeat;--mi: url("data:image/svg+xml,%3Csvg id='visual' viewBox='0 0 900 24' width='900' height='24' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'%3E%3Cpath d='M0 6L39 0L78 0L117 17L157 3L196 14L235 9L274 19L313 14L352 12L391 3L430 6L470 19L509 3L548 12L587 19L626 7L665 12L704 2L743 8L783 17L822 5L861 9L900 1L900 25L861 25L822 25L783 25L743 25L704 25L665 25L626 25L587 25L548 25L509 25L470 25L430 25L391 25L352 25L313 25L274 25L235 25L196 25L157 25L117 25L78 25L39 25L0 25Z' fill='rgba(0,0,0,0.5)'%3E%3C/path%3E%3Cpath d='M0 8L39 17L78 20L117 6L157 13L196 17L235 17L274 7L313 17L352 18L391 21L430 19L470 14L509 15L548 17L587 11L626 18L665 8L704 19L743 17L783 13L822 7L861 6L900 9L900 25L861 25L822 25L783 25L743 25L704 25L665 25L626 25L587 25L548 25L509 25L470 25L430 25L391 25L352 25L313 25L274 25L235 25L196 25L157 25L117 25L78 25L39 25L0 25Z' fill='rgba(0,0,0,0.75)'%3E%3C/path%3E%3Cpath d='M0 12L39 14L78 17L117 14L157 16L196 17L235 19L274 20L313 20L352 16L391 16L430 12L470 22L509 22L548 17L587 13L626 11L665 18L704 13L743 23L783 21L822 16L861 17L900 21L900 25L861 25L822 25L783 25L743 25L704 25L665 25L626 25L587 25L548 25L509 25L470 25L430 25L391 25L352 25L313 25L274 25L235 25L196 25L157 25L117 25L78 25L39 25L0 25Z' fill='%23000000'%3E%3C/path%3E%3C/svg%3E%0A"), var(--data-image-2x2-black)}

View File

@ -1 +1 @@
:root.page-style-mask-image-layered-steps-a:not(.minimal) .main__background{filter:var(--layout-main-drop-shadow)}:root.page-style-mask-image-layered-steps-a:not(.minimal) .main__background::before{--mp: top left, top clamp(15px, 2.0356234097vw + 7.3664122137px, 23px) left 0;--ms: 100% clamp(16px, 2.0356234097vw + 8.3664122137px, 24px), 100% calc(100% - clamp(15px, 2.0356234097vw + 7.3664122137px, 23px));--mr: repeat-x, no-repeat;--mi: url("data:image/svg+xml,%3Csvg id='visual' viewBox='0 0 900 24' width='900' height='24' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'%3E%3Cpath d='M0 12L39 12L39 4L78 4L78 2L117 2L117 8L157 8L157 9L196 9L196 17L235 17L235 7L274 7L274 15L313 15L313 13L352 13L352 7L391 7L391 19L430 19L430 11L470 11L470 13L509 13L509 19L548 19L548 14L587 14L587 10L626 10L626 6L665 6L665 17L704 17L704 11L743 11L743 2L783 2L783 19L822 19L822 19L861 19L861 2L900 2L900 6L900 25L900 25L861 25L861 25L822 25L822 25L783 25L783 25L743 25L743 25L704 25L704 25L665 25L665 25L626 25L626 25L587 25L587 25L548 25L548 25L509 25L509 25L470 25L470 25L430 25L430 25L391 25L391 25L352 25L352 25L313 25L313 25L274 25L274 25L235 25L235 25L196 25L196 25L157 25L157 25L117 25L117 25L78 25L78 25L39 25L39 25L0 25Z' fill='rgba(0,0,0,0.5)'%3E%3C/path%3E%3Cpath d='M0 10L39 10L39 11L78 11L78 12L117 12L117 16L157 16L157 13L196 13L196 20L235 20L235 16L274 16L274 7L313 7L313 16L352 16L352 12L391 12L391 8L430 8L430 9L470 9L470 12L509 12L509 10L548 10L548 20L587 20L587 12L626 12L626 12L665 12L665 9L704 9L704 11L743 11L743 14L783 14L783 8L822 8L822 13L861 13L861 20L900 20L900 14L900 25L900 25L861 25L861 25L822 25L822 25L783 25L783 25L743 25L743 25L704 25L704 25L665 25L665 25L626 25L626 25L587 25L587 25L548 25L548 25L509 25L509 25L470 25L470 25L430 25L430 25L391 25L391 25L352 25L352 25L313 25L313 25L274 25L274 25L235 25L235 25L196 25L196 25L157 25L157 25L117 25L117 25L78 25L78 25L39 25L39 25L0 25Z' fill='rgba(0,0,0,0.75)'%3E%3C/path%3E%3Cpath d='M0 14L39 14L39 18L78 18L78 20L117 20L117 20L157 20L157 19L196 19L196 15L235 15L235 18L274 18L274 18L313 18L313 15L352 15L352 21L391 21L391 13L430 13L430 20L470 20L470 21L509 21L509 17L548 17L548 18L587 18L587 12L626 12L626 14L665 14L665 21L704 21L704 17L743 17L743 18L783 18L783 14L822 14L822 17L861 17L861 15L900 15L900 16L900 25L900 25L861 25L861 25L822 25L822 25L783 25L783 25L743 25L743 25L704 25L704 25L665 25L665 25L626 25L626 25L587 25L587 25L548 25L548 25L509 25L509 25L470 25L470 25L430 25L430 25L391 25L391 25L352 25L352 25L313 25L313 25L274 25L274 25L235 25L235 25L196 25L196 25L157 25L157 25L117 25L117 25L78 25L78 25L39 25L39 25L0 25Z' fill='%23000000'%3E%3C/path%3E%3C/svg%3E%0A"), var(--data-image-2x2-black)}
:root.page-style-mask-image-layered-steps-a:not(.minimal) .main__background{filter:var(--page-drop-shadow)}:root.page-style-mask-image-layered-steps-a:not(.minimal) .main__background::before{--mp: top left, top clamp(15px, 2.0356234097vw + 7.3664122137px, 23px) left 0;--ms: 100% clamp(16px, 2.0356234097vw + 8.3664122137px, 24px), 100% calc(100% - clamp(15px, 2.0356234097vw + 7.3664122137px, 23px));--mr: repeat-x, no-repeat;--mi: url("data:image/svg+xml,%3Csvg id='visual' viewBox='0 0 900 24' width='900' height='24' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'%3E%3Cpath d='M0 12L39 12L39 4L78 4L78 2L117 2L117 8L157 8L157 9L196 9L196 17L235 17L235 7L274 7L274 15L313 15L313 13L352 13L352 7L391 7L391 19L430 19L430 11L470 11L470 13L509 13L509 19L548 19L548 14L587 14L587 10L626 10L626 6L665 6L665 17L704 17L704 11L743 11L743 2L783 2L783 19L822 19L822 19L861 19L861 2L900 2L900 6L900 25L900 25L861 25L861 25L822 25L822 25L783 25L783 25L743 25L743 25L704 25L704 25L665 25L665 25L626 25L626 25L587 25L587 25L548 25L548 25L509 25L509 25L470 25L470 25L430 25L430 25L391 25L391 25L352 25L352 25L313 25L313 25L274 25L274 25L235 25L235 25L196 25L196 25L157 25L157 25L117 25L117 25L78 25L78 25L39 25L39 25L0 25Z' fill='rgba(0,0,0,0.5)'%3E%3C/path%3E%3Cpath d='M0 10L39 10L39 11L78 11L78 12L117 12L117 16L157 16L157 13L196 13L196 20L235 20L235 16L274 16L274 7L313 7L313 16L352 16L352 12L391 12L391 8L430 8L430 9L470 9L470 12L509 12L509 10L548 10L548 20L587 20L587 12L626 12L626 12L665 12L665 9L704 9L704 11L743 11L743 14L783 14L783 8L822 8L822 13L861 13L861 20L900 20L900 14L900 25L900 25L861 25L861 25L822 25L822 25L783 25L783 25L743 25L743 25L704 25L704 25L665 25L665 25L626 25L626 25L587 25L587 25L548 25L548 25L509 25L509 25L470 25L470 25L430 25L430 25L391 25L391 25L352 25L352 25L313 25L313 25L274 25L274 25L235 25L235 25L196 25L196 25L157 25L157 25L117 25L117 25L78 25L78 25L39 25L39 25L0 25Z' fill='rgba(0,0,0,0.75)'%3E%3C/path%3E%3Cpath d='M0 14L39 14L39 18L78 18L78 20L117 20L117 20L157 20L157 19L196 19L196 15L235 15L235 18L274 18L274 18L313 18L313 15L352 15L352 21L391 21L391 13L430 13L430 20L470 20L470 21L509 21L509 17L548 17L548 18L587 18L587 12L626 12L626 14L665 14L665 21L704 21L704 17L743 17L743 18L783 18L783 14L822 14L822 17L861 17L861 15L900 15L900 16L900 25L900 25L861 25L861 25L822 25L822 25L783 25L783 25L743 25L743 25L704 25L704 25L665 25L665 25L626 25L626 25L587 25L587 25L548 25L548 25L509 25L509 25L470 25L470 25L430 25L430 25L391 25L391 25L352 25L352 25L313 25L313 25L274 25L274 25L235 25L235 25L196 25L196 25L157 25L157 25L117 25L117 25L78 25L78 25L39 25L39 25L0 25Z' fill='%23000000'%3E%3C/path%3E%3C/svg%3E%0A"), var(--data-image-2x2-black)}

View File

@ -1 +1 @@
:root.page-style-mask-image-ringbook:not(.minimal) .main__background{filter:var(--layout-main-drop-shadow)}@media only screen and (min-width: 375px){:root.page-style-mask-image-ringbook:not(.minimal) .main__background::before{--this-left: clamp(-14px, 3.5623409669vw - 27.358778626px, 0px);--this-width: clamp(22px, 1.0178117048vw + 18.1832061069px, 26px);--mi: url("../img/mask_ringbook.png"), var(--data-image-2x2-black);--mp: top 0 left var(--this-left), top 0 left calc(var(--this-width) + var(--this-left) - 1px);--ms: var(--this-width) auto, calc(100% - calc(var(--this-width) + var(--this-left) - 1px)) 100%;--mr: repeat-y, no-repeat;left:0 !important}}@media only screen and (min-width: 640px){:root.page-style-mask-image-ringbook:not(.minimal) .main__background::before{border-radius:0 var(--layout-border-radius-large) var(--layout-border-radius-large) 1.5rem}}
:root.page-style-mask-image-ringbook:not(.minimal) .main__background{filter:var(--page-drop-shadow)}@media only screen and (min-width: 375px){:root.page-style-mask-image-ringbook:not(.minimal) .main__background::before{--this-left: clamp(-14px, 3.5623409669vw - 27.358778626px, 0px);--this-width: clamp(22px, 1.0178117048vw + 18.1832061069px, 26px);--mi: url("../img/mask_ringbook.png"), var(--data-image-2x2-black);--mp: top 0 left var(--this-left), top 0 left calc(var(--this-width) + var(--this-left) - 1px);--ms: var(--this-width) auto, calc(100% - calc(var(--this-width) + var(--this-left) - 1px)) 100%;--mr: repeat-y, no-repeat;left:0 !important}}@media only screen and (min-width: 640px){:root.page-style-mask-image-ringbook:not(.minimal) .main__background::before{border-radius:0 var(--layout-border-radius-large) var(--layout-border-radius-large) 1.5rem}}

View File

@ -1 +1 @@
:root.page-style-mask-image-wave-a:not(.minimal) .main__background{filter:var(--layout-main-drop-shadow)}:root.page-style-mask-image-wave-a:not(.minimal) .main__background::before{--mp: top calc(-1 * clamp(5px, 0.7633587786vw + 2.1374045802px, 8px)) left 0, top clamp(22px, 2.2900763359vw + 13.4122137405px, 31px) left 0;--ms: 100% clamp(28px, 3.3078880407vw + 15.5954198473px, 41px), 100% calc(100% - clamp(22px, 2.2900763359vw + 13.4122137405px, 31px));--mr: repeat-x, no-repeat;--mi: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' id='svg' viewBox='0 0 1440 690' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg' class='transition duration-300 ease-in-out delay-150'%3E%3Cpath d='M 0,700 L 0,262 C 85.6267942583732,192.2488038277512 171.2535885167464,122.49760765550238 260,138 C 348.7464114832536,153.50239234449762 440.6124401913876,254.25837320574163 541,315 C 641.3875598086124,375.74162679425837 750.2966507177035,396.46889952153106 854,374 C 957.7033492822965,351.53110047846894 1056.200956937799,285.86602870813397 1153,260 C 1249.799043062201,234.133971291866 1344.8995215311006,248.06698564593302 1440,262 L 1440,700 L 0,700 Z' stroke='none' stroke-width='0' fill='%23000000' fill-opacity='1' class='transition-all duration-300 ease-in-out delay-150 path-0'%3E%3C/path%3E%3C/svg%3E"), var(--data-image-2x2-black);border-radius:56px/clamp(6px, 1.5267175573vw + 0.2748091603px, 12px)}
:root.page-style-mask-image-wave-a:not(.minimal) .main__background{filter:var(--page-drop-shadow)}:root.page-style-mask-image-wave-a:not(.minimal) .main__background::before{--mp: top calc(-1 * clamp(5px, 0.7633587786vw + 2.1374045802px, 8px)) left 0, top clamp(22px, 2.2900763359vw + 13.4122137405px, 31px) left 0;--ms: 100% clamp(28px, 3.3078880407vw + 15.5954198473px, 41px), 100% calc(100% - clamp(22px, 2.2900763359vw + 13.4122137405px, 31px));--mr: repeat-x, no-repeat;--mi: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' id='svg' viewBox='0 0 1440 690' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg' class='transition duration-300 ease-in-out delay-150'%3E%3Cpath d='M 0,700 L 0,262 C 85.6267942583732,192.2488038277512 171.2535885167464,122.49760765550238 260,138 C 348.7464114832536,153.50239234449762 440.6124401913876,254.25837320574163 541,315 C 641.3875598086124,375.74162679425837 750.2966507177035,396.46889952153106 854,374 C 957.7033492822965,351.53110047846894 1056.200956937799,285.86602870813397 1153,260 C 1249.799043062201,234.133971291866 1344.8995215311006,248.06698564593302 1440,262 L 1440,700 L 0,700 Z' stroke='none' stroke-width='0' fill='%23000000' fill-opacity='1' class='transition-all duration-300 ease-in-out delay-150 path-0'%3E%3C/path%3E%3C/svg%3E"), var(--data-image-2x2-black);border-radius:56px/clamp(6px, 1.5267175573vw + 0.2748091603px, 12px)}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
.recommendation__header{margin-bottom:2rem}.recommendation__taxonomies{margin-bottom:1.5rem}.recommendation__thumbnail{--focus-offset: 2px;float:right;max-width:clamp(100px,25.4452926209vw + 4.5801526718px,200px);margin:0 0 clamp(10px,6.4957264957vw - 14.358974359px,48px) clamp(24px,4.1025641026vw + 8.6153846154px,48px)}.recommendation__thumbnail :is(a,img){display:block;cursor:zoom-in;border-radius:var(--layout-border-radius-small)}.recommendation__thumbnail-image{width:inherit;filter:var(--figure-drop-shadow)}@media(max-width: 768px){.recommendation__thumbnail-image{height:auto}}.recommendation__tags{margin:2rem 0 3rem}.recommendation__support,.recommendation__read-on{margin-top:1.5rem}.recommendation__support h5,.recommendation__read-on h5{margin-bottom:.5rem}.recommendation__support :is(i,.icon),.recommendation__read-on :is(i,.icon){color:var(--fg-600);margin-right:.5rem}.recommendation__list-item{line-height:1.3}.recommendation__list-item:not(:last-child){margin-bottom:.5rem}.recommendation__footer{clear:both}
.recommendation__header{margin-bottom:2rem}.recommendation__taxonomies{margin-bottom:1.5rem}.recommendation__thumbnail{--focus-offset: 2px;float:right;max-width:clamp(100px,25.4452926209vw + 4.5801526718px,200px);margin:0 0 clamp(10px,6.4957264957vw - 14.358974359px,48px) clamp(24px,4.1025641026vw + 8.6153846154px,48px)}.recommendation__thumbnail :is(a,img){display:block;cursor:zoom-in;border-radius:var(--layout-border-radius-small)}.recommendation__thumbnail-image{width:inherit;box-shadow:var(--recommendation-cover-box-shadow, var(--box-shadow-xl))}@media(max-width: 768px){.recommendation__thumbnail-image{height:auto}}.recommendation__tags{margin:2rem 0 3rem}.recommendation__support,.recommendation__read-on{margin-top:1.5rem}.recommendation__support h5,.recommendation__read-on h5{margin-bottom:.5rem}.recommendation__support :is(i,.icon),.recommendation__read-on :is(i,.icon){color:var(--fg-600);margin-right:.5rem}.recommendation__list-item{line-height:1.3}.recommendation__list-item:not(:last-child){margin-bottom:.5rem}.recommendation__footer{clear:both}

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
.tax-cloud{display:flex;flex-wrap:wrap;gap:.5rem .75rem;line-height:1;margin-bottom:3rem}.tax-cloud__header{flex:1 0 100%;padding-bottom:.75rem;margin-bottom:.25rem;border-bottom:2px dashed var(--layout-color-lineart)}.tax-cloud__current{font-size:var(--fs-ml);text-transform:uppercase}.tax-cloud__current em{font-style:normal;color:var(--tax-cloud-current)}.tax-cloud__tax-description{color:var(--fg-800);font-size:var(--fs-xxs);font-style:italic;line-height:1.5;padding-top:.5rem}.tax-cloud>a{display:inline-flex;align-items:flex-end;letter-spacing:clamp(-0.02rem,0.2vw - 0.96px,0rem);height:20px}.tax-cloud>a span{margin-left:.25rem}
.tax-cloud{display:flex;flex-wrap:wrap;gap:.5rem .75rem;line-height:1;margin-bottom:3rem}.tax-cloud__header{flex:1 0 100%;padding-bottom:.75rem;margin-bottom:.25rem;border-bottom:var(--layout-hr-border-dashed)}.tax-cloud__current{font-size:var(--fs-ml);text-transform:uppercase}.tax-cloud__current em{font-style:normal;color:var(--tax-cloud-current)}.tax-cloud__tax-description{color:var(--fg-700);font-size:var(--fs-xxs);font-style:italic;line-height:1.5;padding-top:.5rem}.tax-cloud>a{display:inline-flex;align-items:flex-end;letter-spacing:clamp(-0.02rem,0.2vw - 0.96px,0rem);height:20px}.tax-cloud>a span{margin-left:.25rem}

View File

@ -174,7 +174,7 @@ if ( ! function_exists( 'fictioneer_api_get_story_node' ) ) {
$chapter['prefix'] = $prefix;
}
$chapter['title'] = fictioneer_get_safe_title( $chapter_id );
$chapter['title'] = fictioneer_get_safe_title( $chapter_id, 'api-chapter' );
if ( ! empty( $group ) ) {
$chapter['group'] = $group;

View File

@ -221,15 +221,17 @@ if ( ! function_exists( 'fictioneer_get_safe_title' ) ) {
* Returns the sanitized title and accounts for empty strings
*
* @since 4.7.0
* @since 5.12.0 - Added $context and $args parameters.
* @link https://developer.wordpress.org/reference/functions/wp_strip_all_tags/
*
* @param int|WP_Post $post The post or post ID to get the title for.
* @param boolean $no_filters Optional. Whether to ignore filters. Default false.
* @param string|null $context Optional. Context regarding where and how the title is used.
* @param array $args Optional. Additional parameters.
*
* @return string The title, never empty.
*/
function fictioneer_get_safe_title( $post, $no_filters = false ) {
function fictioneer_get_safe_title( $post, $context = null, $args = [] ) {
// Setup
$post_id = ( $post instanceof WP_Post ) ? $post->ID : $post;
@ -246,8 +248,8 @@ if ( ! function_exists( 'fictioneer_get_safe_title' ) ) {
}
// Apply filters
if ( ! $no_filters ) {
$title = apply_filters( 'fictioneer_filter_safe_title', $title, $post_id );
if ( ! ( $args['no_filters'] ?? 0 ) ) {
$title = apply_filters( 'fictioneer_filter_safe_title', $title, $post_id, $context, $args );
}
return $title;
@ -582,7 +584,7 @@ if ( ! function_exists( 'fictioneer_get_story_page_cover' ) ) {
function fictioneer_get_story_page_cover( $story ) {
return sprintf(
'<figure class="story__thumbnail"><a href="%s" %s>%s<div id="ribbon-read" class="story__thumbnail-ribbon hidden"><div class="ribbon _read">%s</div></div></a></figure>',
'<figure class="story__thumbnail"><a href="%s" %s>%s<div id="ribbon-read" class="story__thumbnail-ribbon hidden"><div class="ribbon">%s</div></div></a></figure>',
get_the_post_thumbnail_url( $story['id'], 'full' ),
fictioneer_get_lightbox_attribute(),
get_the_post_thumbnail( $story['id'], array( 200, 300 ), array(

File diff suppressed because it is too large Load Diff

View File

@ -253,8 +253,8 @@ if ( ! function_exists( 'fictioneer_hsl_font_code' ) ) {
$hsl_array = fictioneer_rgb_to_hsl( fictioneer_hex_to_rgb( $hex ), 2 );
$deg = 'calc(' . $hsl_array[0] . 'deg + var(--hue-rotate))';
$saturation = 'calc(' . $hsl_array[1] . '% * (var(--font-saturation) + var(--saturation) - 1))';
$lightness = $hsl_array[2] . '%';
$saturation = 'max(calc(' . $hsl_array[1] . '% * (var(--font-saturation) + var(--saturation) - 1)), 0%)';
$lightness = 'clamp(0%, calc(' . $hsl_array[2] . '% * var(--font-lightness, 1)), 100%)';
return "hsl($deg $saturation $lightness)";
}
@ -575,6 +575,35 @@ function fictioneer_get_customizer_css_snippet( $snippet, $filter = null ) {
return '';
}
/**
* Helper to get theme color mod with default fallback
*
* @since 5.12.0
* @global array $fictioneer_colors Default colors read from JSON file.
*
* @param string $mod The requested theme color.
* @param string|null $default Optional. Default color code.
*
* @return string The requested color code or '#ff6347' (tomato) if not found.
*/
function fictioneer_get_theme_color( $mod, $default = null ) {
global $fictioneer_colors;
if ( empty( $fictioneer_colors ) && ! is_array( $fictioneer_colors ) ) {
$json_path = get_template_directory() . '/includes/functions/colors.json';
$fictioneer_colors = json_decode( file_get_contents( $json_path ), true );
if ( ! is_array( $fictioneer_colors ) ) {
$fictioneer_colors = [];
}
}
$default = $default ?? $fictioneer_colors[ $mod ]['hex'] ?? '#ff6347'; // Tomato
return get_theme_mod( $mod, $default );
}
/**
* Builds customization stylesheet
*
@ -665,9 +694,13 @@ function fictioneer_build_customize_css( $content = null ) {
$hue_offset_dark = (int) get_theme_mod( 'hue_offset', 0 );
$saturation_offset_dark = (int) get_theme_mod( 'saturation_offset', 0 );
$lightness_offset_dark = (int) get_theme_mod( 'lightness_offset', 0 );
$font_saturation_offset_dark = (int) get_theme_mod( 'font_saturation_offset', 0 );
$font_lightness_offset_dark = (int) get_theme_mod( 'font_lightness_offset', 0 );
$hue_offset_light = (int) get_theme_mod( 'hue_offset_light', 0 );
$saturation_offset_light = (int) get_theme_mod( 'saturation_offset_light', 0 );
$lightness_offset_light = (int) get_theme_mod( 'lightness_offset_light', 0 );
$font_saturation_offset_light = (int) get_theme_mod( 'font_saturation_offset_light', 0 );
$font_lightness_offset_light = (int) get_theme_mod( 'font_lightness_offset_light', 0 );
$site_width = (int) get_theme_mod( 'site_width', 960 );
$logo_height = (int) get_theme_mod( 'logo_height', 210 );
$title_min = (int) get_theme_mod( 'site_title_font_size_min', 32 );
@ -682,6 +715,7 @@ function fictioneer_build_customize_css( $content = null ) {
$card_cover_width_mod = get_theme_mod( 'card_cover_width_mod', 1 );
$card_grid_column_gap_mod = get_theme_mod( 'card_grid_column_gap_mod', 1 );
$card_grid_row_gap_mod = get_theme_mod( 'card_grid_row_gap_mod', 1 );
$card_box_shadow = get_theme_mod( 'card_shadow', 'var(--box-shadow-m)' );
$font_primary = fictioneer_get_custom_font( 'primary_font_family_value', 'var(--ff-system)', 'Open Sans' );
$font_secondary = fictioneer_get_custom_font( 'secondary_font_family_value', 'var(--ff-base)', 'Lato' );
$font_heading = fictioneer_get_custom_font( 'heading_font_family_value', 'var(--ff-base)', 'Open Sans' );
@ -694,14 +728,19 @@ function fictioneer_build_customize_css( $content = null ) {
$font_card_body = fictioneer_get_custom_font( 'card_body_font_family_value', 'var(--ff-note)', 'default' );
$font_card_list_link = fictioneer_get_custom_font( 'card_list_link_font_family_value', 'var(--ff-note)', 'default' );
$dark_shade = fictioneer_hex_to_rgb( get_theme_mod( 'dark_shade', '000000' ) );
$dark_shade = is_array( $dark_shade ) ? $dark_shade : [0, 0, 0];
$css .= ":root {
--site-width: " . $site_width . "px;
--hue-offset: " . $hue_offset_dark . "deg;
--saturation-offset: " . $saturation_offset_dark / 100 . ";
--lightness-offset: " . $lightness_offset_dark / 100 . ";
--layout-header-background-height: " . fictioneer_get_css_clamp( $header_image_min, $header_image_max, 320, $site_width ) . ";
--layout-site-header-height: calc(" . fictioneer_get_css_clamp( $header_min, $header_max, 320, $site_width ) . " - var(--layout-main-inset-top));
--layout-site-logo-height: " . $logo_height . "px;
--font-saturation-offset: " . $font_saturation_offset_dark / 100 . ";
--font-lightness-offset: " . $font_lightness_offset_dark / 100 . ";
--header-image-height: " . fictioneer_get_css_clamp( $header_image_min, $header_image_max, 320, $site_width ) . ";
--header-height: calc(" . fictioneer_get_css_clamp( $header_min, $header_max, 320, $site_width ) . " - var(--page-inset-top));
--header-logo-height: " . $logo_height . "px;
--site-title-font-size: " . fictioneer_get_css_clamp( $title_min, $title_max, 320, $site_width ) . ";
--site-title-tagline-font-size: " . fictioneer_get_css_clamp( $tagline_min, $tagline_max, 320, $site_width ) . ";
--grid-columns-min: " . $card_grid_column_min . "px;
@ -719,6 +758,8 @@ function fictioneer_build_customize_css( $content = null ) {
--ff-card-list-link: {$font_card_list_link};
--ff-nav-item: {$font_nav_item};
--card-cover-width-mod: {$card_cover_width_mod};
--card-box-shadow: {$card_box_shadow};
--card-drop-shadow: " . str_replace( 'box-', 'drop-', $card_box_shadow ) . ";
}";
// Only light mode
@ -726,6 +767,8 @@ function fictioneer_build_customize_css( $content = null ) {
--hue-offset: " . $hue_offset_light . "deg;
--saturation-offset: " . $saturation_offset_light / 100 . ";
--lightness-offset: " . $lightness_offset_light / 100 . ";
--font-saturation-offset: " . $font_saturation_offset_light / 100 . ";
--font-lightness-offset: " . $font_lightness_offset_light / 100 . ";
}";
// --- Custom layout ---------------------------------------------------------
@ -762,7 +805,8 @@ function fictioneer_build_customize_css( $content = null ) {
--font-weight-heading: 700;
--font-weight-badge: 600;
--font-weight-post-meta: 400;
--font-weight-ribbon: 700;
--font-weight-read-ribbon: 700;
--font-weight-card-label: 600;
--font-weight-navigation: 400;
--font-letter-spacing-base: 0em;
}";
@ -771,61 +815,50 @@ function fictioneer_build_customize_css( $content = null ) {
// --- Dark mode colors ------------------------------------------------------
$css .= ":root {
--site-title-heading-color: " . fictioneer_hsl_code( get_theme_mod( 'dark_header_title_color', '#dadde2' ) ) . ";
--site-title-tagline-color: " . fictioneer_hsl_code( get_theme_mod( 'dark_header_tagline_color', '#dadde2' ) ) . ";
--site-title-heading-color: " . fictioneer_hsl_font_code( get_theme_mod( 'dark_header_title_color', '#c4cad6' ) ) . ";
--site-title-tagline-color: " . fictioneer_hsl_font_code( get_theme_mod( 'dark_header_tagline_color', '#c4cad6' ) ) . ";
}";
if ( get_theme_mod( 'use_custom_dark_mode', false ) ) {
$css .= ":root, :root[data-theme=base] {
--bg-900-free: " . fictioneer_hsl_code( get_theme_mod( 'dark_bg_900', '#252932' ), 'free' ) . ";
--bg-1000-free: " . fictioneer_hsl_code( get_theme_mod( 'dark_bg_1000', '#121317' ), 'free' ) . ";
--bg-50: " . fictioneer_hsl_code( get_theme_mod( 'dark_bg_50', '#4b505d' ) ) . ";
--bg-100: " . fictioneer_hsl_code( get_theme_mod( 'dark_bg_100', '#464c58' ) ) . ";
--bg-200: " . fictioneer_hsl_code( get_theme_mod( 'dark_bg_200', '#434956' ) ) . ";
--bg-300: " . fictioneer_hsl_code( get_theme_mod( 'dark_bg_300', '#414653' ) ) . ";
--bg-400: " . fictioneer_hsl_code( get_theme_mod( 'dark_bg_400', '#3e4451' ) ) . ";
--bg-500: " . fictioneer_hsl_code( get_theme_mod( 'dark_bg_500', '#3c414e' ) ) . ";
--bg-600: " . fictioneer_hsl_code( get_theme_mod( 'dark_bg_600', '#373c49' ) ) . ";
--bg-700: " . fictioneer_hsl_code( get_theme_mod( 'dark_bg_700', '#323743' ) ) . ";
--bg-800: " . fictioneer_hsl_code( get_theme_mod( 'dark_bg_800', '#2b303b' ) ) . ";
--theme-color-base: " . fictioneer_hsl_code( get_theme_mod( 'dark_theme_color_base', '#252932' ), 'values' ) . ";
--secant: " . fictioneer_hsl_code( get_theme_mod( 'dark_secant', '#252932' ) ) . ";
--e-overlay: " . fictioneer_hsl_code( get_theme_mod( 'dark_elevation_overlay', '#121317' ) ) . ";
--navigation-background-sticky: " . fictioneer_hsl_code( get_theme_mod( 'dark_navigation_background_sticky', '#121317' ) ) . ";
--primary-400: " . get_theme_mod( 'dark_primary_400', '#f7dd88' ) . ";
--primary-500: " . get_theme_mod( 'dark_primary_500', '#f4d171' ) . ";
--primary-600: " . get_theme_mod( 'dark_primary_600', '#f1bb74' ) . ";
--warning: " . get_theme_mod( 'dark_warning_color', '#f66055' ) . ";
--bookmark-color-alpha: " . get_theme_mod( 'dark_bookmark_color_alpha', '#767d8f' ) . ";
--bookmark-color-beta: " . get_theme_mod( 'dark_bookmark_color_beta', '#e06552' ) . ";
--bookmark-color-gamma: " . get_theme_mod( 'dark_bookmark_color_gamma', '#77BFA3' ) . ";
--bookmark-color-delta: " . get_theme_mod( 'dark_bookmark_color_delta', '#3C91E6' ) . ";
--bookmark-line: " . get_theme_mod( 'dark_bookmark_line_color', '#f4d171' ) . ";
--ins-background: " . get_theme_mod( 'dark_ins_background', '#7ebb4e' ) . ";
--del-background: " . get_theme_mod( 'dark_del_background', '#f66055' ) . ";
--badge-generic-background: " . get_theme_mod( 'dark_badge_generic_background', '#3a3f4b' ) . ";
--badge-moderator-background: " . get_theme_mod( 'dark_badge_moderator_background', '#4d628f' ) . ";
--badge-admin-background: " . get_theme_mod( 'dark_badge_admin_background', '#505062' ) . ";
--badge-author-background: " . get_theme_mod( 'dark_badge_author_background', '#505062' ) . ";
--badge-supporter-background: " . get_theme_mod( 'dark_badge_supporter_background', '#e64c66' ) . ";
--badge-override-background: " . get_theme_mod( 'dark_badge_override_background', '#3a3f4b' ) . ";
}
:root,
:root[data-theme=base],
:root .chapter-formatting,
:root[data-theme=base] .chapter-formatting {
--fg-100: " . fictioneer_hsl_font_code( get_theme_mod( 'dark_fg_100', '#dddfe3' ) ) . ";
--fg-200: " . fictioneer_hsl_font_code( get_theme_mod( 'dark_fg_200', '#d2d4db' ) ) . ";
--fg-300: " . fictioneer_hsl_font_code( get_theme_mod( 'dark_fg_300', '#c4c7cf' ) ) . ";
--fg-400: " . fictioneer_hsl_font_code( get_theme_mod( 'dark_fg_400', '#b4bac5' ) ) . ";
--fg-500: " . fictioneer_hsl_font_code( get_theme_mod( 'dark_fg_500', '#a5acbb' ) ) . ";
--fg-600: " . fictioneer_hsl_font_code( get_theme_mod( 'dark_fg_600', '#9aa1b1' ) ) . ";
--fg-700: " . fictioneer_hsl_font_code( get_theme_mod( 'dark_fg_700', '#929aaa' ) ) . ";
--fg-800: " . fictioneer_hsl_font_code( get_theme_mod( 'dark_fg_800', '#9298a5' ) ) . ";
--fg-900: " . fictioneer_hsl_font_code( get_theme_mod( 'dark_fg_900', '#787f91' ) ) . ";
--fg-1000: " . fictioneer_hsl_font_code( get_theme_mod( 'dark_fg_1000', '#121416' ) ) . ";
--fg-tinted: " . fictioneer_hsl_font_code( get_theme_mod( 'dark_fg_tinted', '#a4a9b7' ) ) . ";
}";
$css .= ":root, :root[data-theme=base] {"
.
implode( '', array_map( function( $prop ) {
return "--bg-{$prop}-free: " . fictioneer_hsl_code( fictioneer_get_theme_color( "dark_bg_{$prop}" ), 'free' ) . ';';
}, ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900', '950'] ) )
.
"
--dark-shade-rgb:" . implode( ' ', $dark_shade ) . ";
--primary-400: " . fictioneer_get_theme_color( 'dark_primary_400' ) . ";
--primary-500: " . fictioneer_get_theme_color( 'dark_primary_500' ) . ";
--primary-600: " . fictioneer_get_theme_color( 'dark_primary_600' ) . ";
--red-400: " . fictioneer_get_theme_color( 'dark_red_400' ) . ";
--red-500: " . fictioneer_get_theme_color( 'dark_red_500' ) . ";
--red-600: " . fictioneer_get_theme_color( 'dark_red_600' ) . ";
--green-400: " . fictioneer_get_theme_color( 'dark_green_400' ) . ";
--green-500: " . fictioneer_get_theme_color( 'dark_green_500' ) . ";
--green-600: " . fictioneer_get_theme_color( 'dark_green_600' ) . ";
--theme-color-base: " . fictioneer_hsl_code( fictioneer_get_theme_color( 'dark_theme_color_base' ), 'values' ) . ";
--navigation-background: " . fictioneer_hsl_code( fictioneer_get_theme_color( 'dark_navigation_background_sticky' ) ) . ";
--bookmark-color-alpha: " . fictioneer_get_theme_color( 'dark_bookmark_color_alpha' ) . ";
--bookmark-color-beta: " . fictioneer_get_theme_color( 'dark_bookmark_color_beta' ) . ";
--bookmark-color-gamma: " . fictioneer_get_theme_color( 'dark_bookmark_color_gamma' ) . ";
--bookmark-color-delta: " . fictioneer_get_theme_color( 'dark_bookmark_color_delta' ) . ";
--bookmark-line: " . fictioneer_get_theme_color( 'dark_bookmark_line_color' ) . ";
--ins-background: " . fictioneer_get_theme_color( 'dark_ins_background' ) . ";
--del-background: " . fictioneer_get_theme_color( 'dark_del_background' ) . ";"
.
implode( '', array_map( function( $prop ) {
return "--badge-{$prop}-background: " . fictioneer_get_theme_color( "dark_badge_{$prop}_background" ) . ';';
}, ['generic', 'moderator', 'admin', 'author', 'supporter', 'override'] ) )
.
"}
:root, :root[data-theme=base], :root .chapter-formatting, :root[data-theme=base] .chapter-formatting {"
.
implode( '', array_map( function( $prop ) {
return "--fg-{$prop}: " . fictioneer_hsl_font_code( fictioneer_get_theme_color( "dark_fg_{$prop}" ) ) . ';';
}, ['100', '200', '300', '400', '500', '600', '700', '800', '900', '950', 'tinted', 'inverted'] ) )
.
"}";
}
// --- Light mode colors -----------------------------------------------------
@ -835,13 +868,13 @@ function fictioneer_build_customize_css( $content = null ) {
if ( in_array( $header_style, ['default', 'overlay'] ) ) {
$css .= ":root {
--site-title-heading-color: " . fictioneer_hsl_code( $title_color_light ) . ";
--site-title-tagline-color: " . fictioneer_hsl_code( $tag_color_light ) . ";
--site-title-heading-color: " . fictioneer_hsl_font_code( $title_color_light ) . ";
--site-title-tagline-color: " . fictioneer_hsl_font_code( $tag_color_light ) . ";
}";
} else {
if ( $title_color_light !== '#fcfcfd' ) {
$css .= ":root[data-mode=light] {
--site-title-heading-color: " . fictioneer_hsl_code( $title_color_light ) . ";
--site-title-heading-color: " . fictioneer_hsl_font_code( $title_color_light ) . ";
}";
} else {
$css .= ":root[data-mode=light] {
@ -851,7 +884,7 @@ function fictioneer_build_customize_css( $content = null ) {
if ( $tag_color_light !== '#f3f5f7' ) {
$css .= ":root[data-mode=light] {
--site-title-tagline-color: " . fictioneer_hsl_code( $tag_color_light ) . ";
--site-title-tagline-color: " . fictioneer_hsl_font_code( $tag_color_light ) . ";
}";
} else {
$css .= ":root[data-mode=light] {
@ -861,55 +894,44 @@ function fictioneer_build_customize_css( $content = null ) {
}
if ( get_theme_mod( 'use_custom_light_mode', false ) ) {
$css .= ":root[data-mode=light] {
--bg-200-free: " . fictioneer_hsl_code( get_theme_mod( 'light_bg_200', '#e5e7eb' ), 'free' ) . ";
--bg-1000-free: " . fictioneer_hsl_code( get_theme_mod( 'light_bg_1000', '#111827' ), 'free' ) . ";
--bg-10: " . fictioneer_hsl_code( get_theme_mod( 'light_bg_10', '#fcfcfd' ) ) . ";
--bg-50: " . fictioneer_hsl_code( get_theme_mod( 'light_bg_50', '#f9fafb' ) ) . ";
--bg-100: " . fictioneer_hsl_code( get_theme_mod( 'light_bg_100', '#f3f4f6' ) ) . ";
--bg-300: " . fictioneer_hsl_code( get_theme_mod( 'light_bg_300', '#d1d5db' ) ) . ";
--bg-400: " . fictioneer_hsl_code( get_theme_mod( 'light_bg_400', '#9ca3b0' ) ) . ";
--bg-500: " . fictioneer_hsl_code( get_theme_mod( 'light_bg_500', '#6b7280' ) ) . ";
--bg-600: " . fictioneer_hsl_code( get_theme_mod( 'light_bg_600', '#4b5563' ) ) . ";
--bg-700: " . fictioneer_hsl_code( get_theme_mod( 'light_bg_700', '#384252' ) ) . ";
--bg-800: " . fictioneer_hsl_code( get_theme_mod( 'light_bg_800', '#1f2937' ) ) . ";
--bg-900: " . fictioneer_hsl_code( get_theme_mod( 'light_bg_900', '#111827' ) ) . ";
--theme-color-base: " . fictioneer_hsl_code( get_theme_mod( 'light_theme_color_base', '#f3f4f6' ), 'values' ) . ";
--secant: " . fictioneer_hsl_code( get_theme_mod( 'light_secant', '#e5e7eb' ) ) . ";
--e-overlay: " . fictioneer_hsl_code( get_theme_mod( 'light_elevation_overlay', '#191b1f' ) ) . ";
--navigation-background-sticky: " . fictioneer_hsl_code( get_theme_mod( 'light_navigation_background_sticky', '#fcfcfd' ) ) . ";
--primary-400: " . get_theme_mod( 'light_primary_400', '#4287f5' ) . ";
--primary-500: " . get_theme_mod( 'light_primary_500', '#3c83f6' ) . ";
--primary-600: " . get_theme_mod( 'light_primary_600', '#1e3fae' ) . ";
--warning: " . get_theme_mod( 'light_warning_color', '#eb5247' ) . ";
--bookmark-color-alpha: " . get_theme_mod( 'light_bookmark_color_alpha', '#9ca3b0' ) . ";
--bookmark-color-beta: " . get_theme_mod( 'light_bookmark_color_beta', '#f59e0b' ) . ";
--bookmark-color-gamma: " . get_theme_mod( 'light_bookmark_color_gamma', '#77bfa3' ) . ";
--bookmark-color-delta: " . get_theme_mod( 'light_bookmark_color_delta', '#dd5960' ) . ";
--bookmark-line: " . get_theme_mod( 'light_bookmark_line_color', '#3c83f6' ) . ";
--ins-background: " . get_theme_mod( 'light_ins_background', '#7ec945' ) . ";
--del-background: " . get_theme_mod( 'light_del_background', '#e96c63' ) . ";
--badge-generic-background: " . get_theme_mod( 'light_badge_generic_background', '#9ca3b0' ) . ";
--badge-moderator-background: " . get_theme_mod( 'light_badge_moderator_background', '#5369ac' ) . ";
--badge-admin-background: " . get_theme_mod( 'light_badge_admin_background', '#384252' ) . ";
--badge-author-background: " . get_theme_mod( 'light_badge_author_background', '#384252' ) . ";
--badge-supporter-background: " . get_theme_mod( 'light_badge_supporter_background', '#ed5e76' ) . ";
--badge-override-background: " . get_theme_mod( 'light_badge_override_background', '#9ca3b0' ) . ";
}
:root[data-mode=light],
:root[data-mode=light] .chapter-formatting {
--fg-100: " . fictioneer_hsl_font_code( get_theme_mod( 'light_fg_100', '#010204' ) ) . ";
--fg-200: " . fictioneer_hsl_font_code( get_theme_mod( 'light_fg_200', '#04060b' ) ) . ";
--fg-300: " . fictioneer_hsl_font_code( get_theme_mod( 'light_fg_300', '#0a0f1a' ) ) . ";
--fg-400: " . fictioneer_hsl_font_code( get_theme_mod( 'light_fg_400', '#111827' ) ) . ";
--fg-500: " . fictioneer_hsl_font_code( get_theme_mod( 'light_fg_500', '#1f2937' ) ) . ";
--fg-600: " . fictioneer_hsl_font_code( get_theme_mod( 'light_fg_600', '#384252' ) ) . ";
--fg-700: " . fictioneer_hsl_font_code( get_theme_mod( 'light_fg_700', '#4b5563' ) ) . ";
--fg-800: " . fictioneer_hsl_font_code( get_theme_mod( 'light_fg_800', '#6b7280' ) ) . ";
--fg-900: " . fictioneer_hsl_font_code( get_theme_mod( 'light_fg_900', '#9ca3b0' ) ) . ";
--fg-1000: " . fictioneer_hsl_font_code( get_theme_mod( 'light_fg_1000', '#f3f5f7' ) ) . ";
--fg-tinted: " . fictioneer_hsl_font_code( get_theme_mod( 'light_fg_tinted', '#2b3546' ) ) . ";
}";
$css .= ":root[data-mode=light] {"
.
implode( '', array_map( function( $prop ) {
return "--bg-{$prop}-free: " . fictioneer_hsl_code( fictioneer_get_theme_color( "light_bg_{$prop}" ), 'free' ) . ';';
}, ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900', '950'] ) )
.
"
--primary-400: " . fictioneer_get_theme_color( 'light_primary_400' ) . ";
--primary-500: " . fictioneer_get_theme_color( 'light_primary_500' ) . ";
--primary-600: " . fictioneer_get_theme_color( 'light_primary_600' ) . ";
--red-400: " . fictioneer_get_theme_color( 'light_red_400' ) . ";
--red-500: " . fictioneer_get_theme_color( 'light_red_500' ) . ";
--red-600: " . fictioneer_get_theme_color( 'light_red_600' ) . ";
--green-400: " . fictioneer_get_theme_color( 'light_green_400' ) . ";
--green-500: " . fictioneer_get_theme_color( 'light_green_500' ) . ";
--green-600: " . fictioneer_get_theme_color( 'light_green_600' ) . ";
--theme-color-base: " . fictioneer_hsl_code( fictioneer_get_theme_color( 'light_theme_color_base' ), 'values' ) . ";
--navigation-background: " . fictioneer_hsl_code( fictioneer_get_theme_color( 'light_navigation_background_sticky' ) ) . ";
--bookmark-color-alpha: " . fictioneer_get_theme_color( 'light_bookmark_color_alpha' ) . ";
--bookmark-color-beta: " . fictioneer_get_theme_color( 'light_bookmark_color_beta' ) . ";
--bookmark-color-gamma: " . fictioneer_get_theme_color( 'light_bookmark_color_gamma' ) . ";
--bookmark-color-delta: " . fictioneer_get_theme_color( 'light_bookmark_color_delta' ) . ";
--bookmark-line: " . fictioneer_get_theme_color( 'light_bookmark_line_color' ) . ";
--ins-background: " . fictioneer_get_theme_color( 'light_ins_background' ) . ";
--del-background: " . fictioneer_get_theme_color( 'light_del_background' ) . ";"
.
implode( '', array_map( function( $prop ) {
return "--badge-{$prop}-background: " . fictioneer_get_theme_color( "light_badge_{$prop}_background" ) . ';';
}, ['generic', 'moderator', 'admin', 'author', 'supporter', 'override'] ) )
.
"}
:root[data-mode=light], :root[data-mode=light] .chapter-formatting {"
.
implode( '', array_map( function( $prop ) {
return "--fg-{$prop}: " . fictioneer_hsl_font_code( fictioneer_get_theme_color( "light_fg_{$prop}" ) ) . ';';
}, ['100', '200', '300', '400', '500', '600', '700', '800', '900', '950', 'tinted', 'inverted'] ) )
.
"}";
}
// --- Header styles ---------------------------------------------------------
@ -956,9 +978,9 @@ function fictioneer_build_customize_css( $content = null ) {
if ( ! get_theme_mod( 'page_shadow', true ) ) {
$css .= ':root.no-page-shadow {
--layout-main-box-shadow: none;
--minimal-main-box-shadow: none;
--layout-main-drop-shadow: none;
--minimal-page-box-shadow: none;
--page-box-shadow: none;
--page-drop-shadow: none;
}';
}

View File

@ -381,7 +381,7 @@ if ( ! function_exists( 'fictioneer_add_epub_chapters' ) ) {
}
// Setup
$title = fictioneer_get_safe_title( $post->ID );
$title = fictioneer_get_safe_title( $post->ID, 'epub-chapter' );
$content = apply_filters( 'the_content', $post->post_content );
$processed = false;
$index++;

View File

@ -972,7 +972,7 @@ function fictioneer_callback_relationship_chapters( $selected, $meta_key, $args
// Build HTML
foreach ( $selected as $chapter ) {
$title = fictioneer_get_safe_title( $chapter );
$title = fictioneer_get_safe_title( $chapter, 'admin-callback-relationship-chapters' );
$classes = ['fictioneer-meta-field__relationships-item', 'fictioneer-meta-field__relationships-values-item'];
if ( get_post_meta( $chapter->ID, 'fictioneer_chapter_hidden', true ) ) {
@ -1060,7 +1060,7 @@ function fictioneer_ajax_get_relationship_chapters( $post_id, $meta_key ) {
// Build HTML for items
foreach ( $query->posts as $chapter ) {
// Chapter setup
$title = fictioneer_get_safe_title( $chapter );
$title = fictioneer_get_safe_title( $chapter, 'admin-ajax-get-relationship-chapters' );
$classes = ['fictioneer-meta-field__relationships-item', 'fictioneer-meta-field__relationships-source-item'];
// Update title if necessary
@ -1206,7 +1206,7 @@ function fictioneer_get_relationship_chapter_details( $chapter ) {
function fictioneer_callback_relationship_story_pages( $selected, $meta_key, $args = [] ) {
// Build HTML
foreach ( $selected as $page ) {
$title = fictioneer_get_safe_title( $page );
$title = fictioneer_get_safe_title( $page, 'admin-callback-relationship-story-pages' );
$classes = ['fictioneer-meta-field__relationships-item', 'fictioneer-meta-field__relationships-values-item'];
// Start HTML ---> ?>
@ -1290,7 +1290,7 @@ function fictioneer_ajax_get_relationship_story_pages( $post_id, $meta_key ) {
// Build HTML for items
foreach ( $query->posts as $item ) {
// Chapter setup
$title = fictioneer_get_safe_title( $item );
$title = fictioneer_get_safe_title( $item, 'admin-ajax-get-relationship-story-pages' );
$classes = ['fictioneer-meta-field__relationships-item', 'fictioneer-meta-field__relationships-source-item'];
// Build and append item
@ -1354,7 +1354,7 @@ function fictioneer_callback_relationship_collection( $selected, $meta_key, $arg
// Build HTML
foreach ( $selected as $item ) {
$title = fictioneer_get_safe_title( $item );
$title = fictioneer_get_safe_title( $item, 'admin-callback-relationship-collection' );
$label = esc_html( $post_type_labels[ $item->post_type ] ?? _x( '?', 'Relationship item label.', 'fictioneer' ) );
$classes = ['fictioneer-meta-field__relationships-item', 'fictioneer-meta-field__relationships-values-item'];
@ -1453,7 +1453,7 @@ function fictioneer_ajax_get_relationship_collection( $post_id, $meta_key ) {
// Build HTML for items
foreach ( $query->posts as $item ) {
// Chapter setup
$title = fictioneer_get_safe_title( $item );
$title = fictioneer_get_safe_title( $item, 'admin-ajax-get-relationship-collection' );
$label = esc_html( $post_type_labels[ $item->post_type ] ?? _x( '?', 'Relationship item label.', 'fictioneer' ) );
$classes = ['fictioneer-meta-field__relationships-item', 'fictioneer-meta-field__relationships-source-item'];
@ -1517,7 +1517,7 @@ function fictioneer_callback_relationship_featured( $selected, $meta_key, $args
// Build HTML
foreach ( $selected as $item ) {
$title = fictioneer_get_safe_title( $item );
$title = fictioneer_get_safe_title( $item, 'admin-callback-relationship-featured' );
$label = esc_html( $post_type_labels[ $item->post_type ] ?? _x( '?', 'Relationship item label.', 'fictioneer' ) );
$classes = ['fictioneer-meta-field__relationships-item', 'fictioneer-meta-field__relationships-values-item'];
@ -1599,7 +1599,7 @@ function fictioneer_ajax_get_relationship_featured( $post_id, $meta_key ) {
// Build HTML for items
foreach ( $query->posts as $item ) {
// Chapter setup
$title = fictioneer_get_safe_title( $item );
$title = fictioneer_get_safe_title( $item, 'admin-ajax-get-relationship-featured' );
$label = esc_html( $post_type_labels[ $item->post_type ] ?? _x( '?', 'Relationship item label.', 'fictioneer' ) );
$classes = ['fictioneer-meta-field__relationships-item', 'fictioneer-meta-field__relationships-source-item'];
@ -2461,7 +2461,7 @@ function fictioneer_render_chapter_meta_metabox( $post ) {
'fictioneer_chapter_short_title',
array(
'label' => _x( 'Short Title', 'Chapter short title meta field label.', 'fictioneer' ),
'description' => __( 'Shorter title, such as "Arc 15, Ch. 17".', 'fictioneer' )
'description' => __( 'Shorter title, such as "Arc 15, Ch. 17". Not used by default, intended for child themes.', 'fictioneer' )
)
);
}
@ -2626,11 +2626,11 @@ function fictioneer_render_chapter_data_metabox( $post ) {
$stories[ $story->ID ] = sprintf(
_x( '%s (%s)', 'Chapter story meta field option with status label.', 'fictioneer' ),
fictioneer_get_safe_title( $story->ID ),
fictioneer_get_safe_title( $story->ID, 'admin-render-chapter-data-metabox-selectable-suffix' ),
$status_label
);
} else {
$stories[ $story->ID ] = fictioneer_get_safe_title( $story->ID );
$stories[ $story->ID ] = fictioneer_get_safe_title( $story->ID, 'admin-render-chapter-data-metabox-selectable' );
}
}
}
@ -2662,7 +2662,7 @@ function fictioneer_render_chapter_data_metabox( $post ) {
$stories[ $current_story_id ] = sprintf(
_x( '%s %s', 'Chapter story meta field mismatched option with author and/or status label.', 'fictioneer' ),
fictioneer_get_safe_title( $current_story_id ),
fictioneer_get_safe_title( $current_story_id, 'admin-render-chapter-data-metabox-current-suffix' ),
$suffix
);
}

View File

@ -218,7 +218,7 @@ function fictioneer_log_story_chapter_changes( $story_id, $current, $previous, $
_x( '#%s %s: %s.', 'Story changelog chapter added.', 'fictioneer' ),
$post_id,
$verb ? $verb : _x( 'added', 'Story changelog verb.', 'fictioneer' ),
fictioneer_get_safe_title( $post_id )
fictioneer_get_safe_title( $post_id, 'admin-log-added-story-chapter' )
)
);
}
@ -230,7 +230,7 @@ function fictioneer_log_story_chapter_changes( $story_id, $current, $previous, $
_x( '#%s %s: %s.', 'Story changelog chapter removed.', 'fictioneer' ),
$post_id,
$verb ? $verb : _x( 'removed', 'Story changelog verb.', 'fictioneer' ),
fictioneer_get_safe_title( $post_id )
fictioneer_get_safe_title( $post_id, 'admin-log-removed-story-chapter' )
)
);
}
@ -280,7 +280,7 @@ function fictioneer_log_story_chapter_status_changes( $new_status, $old_status,
sprintf(
_x( '#%s privated: %s.', 'Story changelog chapter removed.', 'fictioneer' ),
$post->ID,
fictioneer_get_safe_title( $post->ID, true )
fictioneer_get_safe_title( $post->ID, true, 'admin-log-status-change-publish_to_private' )
)
);
@ -294,7 +294,7 @@ function fictioneer_log_story_chapter_status_changes( $new_status, $old_status,
sprintf(
_x( '#%s unprivated: %s.', 'Story changelog chapter removed.', 'fictioneer' ),
$post->ID,
fictioneer_get_safe_title( $post->ID, true )
fictioneer_get_safe_title( $post->ID, true, 'admin-log-status-change-private_to_publish' )
)
);

View File

@ -215,7 +215,7 @@ if ( ! function_exists( 'fictioneer_get_schema_node_article' ) ) {
$article_node = array(
'@type' => $type,
'@id' => "#article",
'headline' => fictioneer_get_safe_title( $post->ID ),
'headline' => fictioneer_get_safe_title( $post->ID, 'seo-schema-article-node' ),
'description' => $description,
'url' => get_the_permalink( $post->ID ),
'author' => array(

View File

@ -60,7 +60,7 @@ if ( ! function_exists( 'fictioneer_seo_fields' ) ) {
// Title
$seo_title = $seo_fields['title'] ?? '';
$seo_title_placeholder = fictioneer_get_safe_title( $post->ID );
$seo_title_placeholder = fictioneer_get_safe_title( $post->ID, 'seo-title-placeholder' );
// Description (truncated if necessary)
$seo_description = $seo_fields['description'] ?? '';
@ -334,7 +334,7 @@ if ( ! function_exists( 'fictioneer_get_seo_title' ) ) {
$seo_fields = get_post_meta( $post_id, 'fictioneer_seo_fields', true );
$seo_fields = is_array( $seo_fields ) ? $seo_fields : array( 'title' => '', 'description' => '', 'og_image_id' => 0 );
$seo_title = $seo_fields['title'] ?? '';
$title = fictioneer_get_safe_title( $post_id );
$title = fictioneer_get_safe_title( $post_id, 'seo-title' );
$default = empty( $default ) ? $title : $default;
// Special Case: Frontpage
@ -501,7 +501,7 @@ if ( ! function_exists( 'fictioneer_get_seo_description' ) ) {
$seo_fields = get_post_meta( $post_id, 'fictioneer_seo_fields', true );
$seo_fields = is_array( $seo_fields ) ? $seo_fields : array( 'title' => '', 'description' => '', 'og_image_id' => 0 );
$seo_description = $seo_fields['description'] ?? '';
$title = fictioneer_get_safe_title( $post_id );
$title = fictioneer_get_safe_title( $post_id, 'seo-title-in_description' );
$excerpt = wp_strip_all_tags( get_the_excerpt( $post_id ), true );
$excerpt = fictioneer_truncate( $excerpt, 155 );
$default = empty( $default ) ? $excerpt : $default;

View File

@ -1012,7 +1012,8 @@ function fictioneer_shortcode_chapter_list( $attr ) {
$icon = fictioneer_get_icon_field( 'fictioneer_chapter_icon', $chapter_id );
$text_icon = get_post_meta( $chapter_id, 'fictioneer_chapter_text_icon', true );
$prefix = get_post_meta( $chapter_id, 'fictioneer_chapter_prefix', true );
$title = fictioneer_get_safe_title( $chapter_id );
$title = fictioneer_get_safe_title( $chapter_id, 'shortcode-chapter-list' );
$has_password = ! empty( $post->post_password );
// Start HTML ---> ?>
<li class="chapter-group__list-item<?php echo $warning ? ' _warning' : ''; ?>" data-post-id="<?php echo $chapter_id; ?>">
@ -1022,21 +1023,26 @@ function fictioneer_shortcode_chapter_list( $attr ) {
<i class="<?php echo empty( $icon ) ? 'fa-solid fa-book' : $icon; ?> chapter-group__list-item-icon"></i>
<?php endif; ?>
<a href="<?php the_permalink( $chapter_id ); ?>" class="chapter-group__list-item-link truncate _1-1">
<?php
<a
href="<?php the_permalink( $chapter_id ); ?>"
class="chapter-group__list-item-link truncate _1-1 <?php echo $has_password ? '_password' : ''; ?>"
><?php
if ( ! empty( $prefix ) ) {
// Mind space between prefix and title
echo apply_filters( 'fictioneer_filter_list_chapter_prefix', $prefix ) . ' ';
}
echo $title;
?>
</a>
?></a>
<?php
// Chapter subrow
$chapter_data = [];
$chapter_data['id'] = $chapter_id;
$chapter_data['warning'] = $warning;
$chapter_data['password'] = ! empty( $post->post_password );
$chapter_data['password'] = $has_password;
$chapter_data['timestamp'] = get_the_time( 'c' );
$chapter_data['list_date'] = get_the_date( '' );
$chapter_data['words'] = fictioneer_get_word_count( $chapter_id );

View File

@ -13,7 +13,7 @@
function fictioneer_bring_out_legacy_trash() {
// Setup
$options = wp_cache_get( 'alloptions', 'options' );
$obsolete = ['fictioneer_disable_html_in_comments', 'fictioneer_block_subscribers_from_admin', 'fictioneer_admin_restrict_menus', 'fictioneer_admin_restrict_private_data', 'fictioneer_admin_reduce_subscriber_profile', 'fictioneer_enable_subscriber_self_delete', 'fictioneer_strip_shortcodes_for_non_administrators', 'fictioneer_restrict_media_access', 'fictioneer_subscription_enabled', 'fictioneer_patreon_badge_map', 'fictioneer_patreon_tier_as_badge', 'fictioneer_patreon_campaign_ids', 'fictioneer_patreon_campaign_id', 'fictioneer_mount_wpdiscuz_theme_styles', 'fictioneer_base_site_width', 'fictioneer_comment_form_selector', 'fictioneer_featherlight_enabled', 'fictioneer_tts_enabled', 'fictioneer_log', 'fictioneer_enable_ajax_nonce', 'fictioneer_flush_object_cache'];
$obsolete = ['fictioneer_disable_html_in_comments', 'fictioneer_block_subscribers_from_admin', 'fictioneer_admin_restrict_menus', 'fictioneer_admin_restrict_private_data', 'fictioneer_admin_reduce_subscriber_profile', 'fictioneer_enable_subscriber_self_delete', 'fictioneer_strip_shortcodes_for_non_administrators', 'fictioneer_restrict_media_access', 'fictioneer_subscription_enabled', 'fictioneer_patreon_badge_map', 'fictioneer_patreon_tier_as_badge', 'fictioneer_patreon_campaign_ids', 'fictioneer_patreon_campaign_id', 'fictioneer_mount_wpdiscuz_theme_styles', 'fictioneer_base_site_width', 'fictioneer_comment_form_selector', 'fictioneer_featherlight_enabled', 'fictioneer_tts_enabled', 'fictioneer_log', 'fictioneer_enable_ajax_nonce', 'fictioneer_flush_object_cache', 'fictioneer_enable_all_block_styles'];
// Check for most recent obsolete option...
if ( isset( $options['fictioneer_flush_object_cache'] ) ) {
@ -534,6 +534,7 @@ function fictioneer_style_queue() {
if ( ! get_option( 'fictioneer_bundle_stylesheets' ) ) {
// Setup
$post_type = get_post_type();
$template_slug = get_page_template_slug();
$application_dependencies = [];
// Properties
@ -598,7 +599,7 @@ function fictioneer_style_queue() {
}
// Comments
if ( $post_type == 'fcn_story' || comments_open() ) {
if ( $post_type == 'fcn_story' || $template_slug === 'user-profile.php' || comments_open() ) {
wp_enqueue_style(
'fictioneer-comments',
get_template_directory_uri() . '/css/comments.css',
@ -626,13 +627,6 @@ function fictioneer_style_queue() {
FICTIONEER_VERSION
);
}
// Remove Gutenberg default styles
if ( ! get_option( 'fictioneer_enable_all_block_styles' ) ) {
wp_dequeue_style( 'wp-block-library' );
wp_dequeue_style( 'wp-block-library-theme' );
wp_dequeue_style( 'wc-blocks-style' );
}
}
add_action( 'wp_enqueue_scripts', 'fictioneer_style_queue' );
@ -1276,7 +1270,7 @@ if ( ! function_exists( 'fictioneer_output_head_critical_scripts' ) ) {
function fictioneer_output_head_critical_scripts() {
// Start HTML ---> ?>
<script>!function(){if("undefined"!=typeof localStorage){const t=localStorage.getItem("fcnLightmode"),e=document.documentElement;let a,o,r=localStorage.getItem("fcnSiteSettings");if(r&&(r=JSON.parse(r))&&null!==r&&"object"==typeof r){Object.entries(r).forEach((t=>{switch(t[0]){case"minimal":e.classList.toggle("minimal",t[1]);break;case"darken":a=r.darken,o=a>=0?1+Math.pow(a,2):1-Math.pow(a,2),e.style.setProperty("--darken",o);break;case"saturation":a=r.saturation,o=a>=0?1+Math.pow(a,2):1-Math.pow(a,2),e.style.setProperty("--saturation",o);break;case"font-saturation":a=r["font-saturation"],o=a>=0?1+Math.pow(a,2):1-Math.pow(a,2),e.style.setProperty("--font-saturation",o);break;case"hue-rotate":o=Number.isInteger(r["hue-rotate"])?r["hue-rotate"]:0,e.style.setProperty("--hue-rotate",`${o}deg`);break;default:e.classList.toggle(`no-${t[0]}`,!t[1])}})),e.dataset.fontWeight=r.hasOwnProperty("font-weight")?r["font-weight"]:"default",e.dataset.theme=r.hasOwnProperty("site-theme")&&!e.dataset.forceChildTheme?r["site-theme"]:"default";let t=getComputedStyle(document.documentElement).getPropertyValue("--theme-color-base").trim().split(" "),n=r.darken?r.darken:0,s=r.saturation?r.saturation:0,i=r["hue-rotate"]?r["hue-rotate"]:0,l=n>=0?1+Math.pow(n,2):1-Math.pow(n,2);r=s>=0?1+Math.pow(s,2):1-Math.pow(s,2),t=`hsl(${(parseInt(t[0])+i)%360}deg ${(parseInt(t[1])*r).toFixed(2)}% ${(parseInt(t[2])*l).toFixed(2)}%)`,document.querySelector("meta[name=theme-color]").setAttribute("content",t)}t&&(e.dataset.mode="true"==t?"light":"dark")}}();</script>
<script>!function(){if("undefined"!=typeof localStorage){const t=localStorage.getItem("fcnLightmode"),e=document.documentElement;let a,o,r=localStorage.getItem("fcnSiteSettings");if(r&&(r=JSON.parse(r))&&null!==r&&"object"==typeof r){Object.entries(r).forEach((t=>{switch(t[0]){case"minimal":e.classList.toggle("minimal",t[1]);break;case"darken":a=r.darken,o=a>=0?1+Math.pow(a,2):1-Math.pow(a,2),e.style.setProperty("--darken",`(${o} + var(--lightness-offset))`);break;case"saturation":a=r.saturation,o=a>=0?1+Math.pow(a,2):1-Math.pow(a,2),e.style.setProperty("--saturation",`(${o} + var(--saturation-offset))`);break;case"font-saturation":a=r["font-saturation"],o=a>=0?1+Math.pow(a,2):1-Math.pow(a,2),e.style.setProperty("--font-saturation",`(${o} + var(--font-saturation-offset))`);break;case"hue-rotate":o=Number.isInteger(r["hue-rotate"])?r["hue-rotate"]:0,e.style.setProperty("--hue-rotate",`(${o}deg + var(--hue-offset))`);break;default:e.classList.toggle(`no-${t[0]}`,!t[1])}})),e.dataset.fontWeight=r.hasOwnProperty("font-weight")?r["font-weight"]:"default",e.dataset.theme=r.hasOwnProperty("site-theme")&&!e.dataset.forceChildTheme?r["site-theme"]:"default";let t=getComputedStyle(document.documentElement).getPropertyValue("--theme-color-base").trim().split(" ");const s=r.darken?r.darken:0,n=r.saturation?r.saturation:0,i=r["hue-rotate"]?r["hue-rotate"]:0,h=s>=0?1+Math.pow(s,2):1-Math.pow(s,2);r=n>=0?1+Math.pow(n,2):1-Math.pow(n,2),t=`hsl(${(parseInt(t[0])+i)%360}deg ${(parseInt(t[1])*r).toFixed(2)}% ${(parseInt(t[2])*h).toFixed(2)}%)`,document.querySelector("meta[name=theme-color]").setAttribute("content",t)}t&&(e.dataset.mode="true"==t?"light":"dark")}}();</script>
<?php // <--- End HTML
}
}

View File

@ -380,7 +380,7 @@ if ( ! function_exists( 'fictioneer_get_story_data' ) ) {
'fandoms' => $fandoms,
'warnings' => $warnings,
'genres' => $genres,
'title' => fictioneer_get_safe_title( $story_id ),
'title' => fictioneer_get_safe_title( $story_id, 'utility-get-story-data' ),
'rating' => get_post_meta( $story_id, 'fictioneer_story_rating', true ),
'rating_letter' => get_post_meta( $story_id, 'fictioneer_story_rating', true )[0],
'chapter_ids' => $visible_chapter_ids,

View File

@ -1187,4 +1187,64 @@ function fictioneer_prevent_track_and_ping_updates( $data ) {
}
add_filter( 'wp_insert_post_data', 'fictioneer_prevent_track_and_ping_updates', 1 );
// =============================================================================
// ADD CLASSES TO BLOCKS
// =============================================================================
/**
* Add default class to list blocks
*
* @since 5.12.0
*
* @param string $block_content HTML content of the block being rendered.
* @param array $block The full block array.
*
* @return string The modified block content.
*/
function fictioneer_add_class_to_list_blocks( $block_content, $block ) {
if ( $block['blockName'] === 'core/list' ) {
$pattern = '/<(ul|ol)([^>]*)>/i';
$block_content = preg_replace_callback( $pattern, function ( $matches ) {
$current_attributes = $matches[2];
$new_class = 'block-list';
if ( strpos( $current_attributes, 'class="' ) !== false ) {
$modified_tag = preg_replace(
'/class="([^"]*)"/i',
'class="$1 ' . $new_class . '"',
$current_attributes
);
} else {
$modified_tag = $current_attributes . ' class="' . $new_class . '"';
}
return '<' . $matches[1] . $modified_tag . '>';
}, $block_content );
}
return $block_content;
}
add_filter( 'render_block', 'fictioneer_add_class_to_list_blocks', 10, 2 );
// =============================================================================
// ADD WRAPPER TO READ MORE LINKS
// =============================================================================
/**
* Add wrapper with class to read more link
*
* @since 5.12.0
*
* @param string $link The HTML read more link.
*
* @return string The wrapped read more link.
*/
function fictioneer_wrap_read_more_link( $link ) {
return "<div class='more-link-wrapper'>{$link}</div>";
}
add_filter( 'the_content_more_link', 'fictioneer_wrap_read_more_link' );
?>

View File

@ -38,13 +38,14 @@
}
.range-slider__value {
cursor: not-allowed;
flex: 0 0 auto;
line-height: 20px;
text-align: center;
border-radius: 3px;
background: #dcdcde;
padding: 3px 0;
margin: 2px 0 2px 8px;
border: 1.5px dashed #dcdcde;
width: 64px;
}

View File

@ -0,0 +1,398 @@
{
"light_header_title_color": {
"hex": "#111827",
"hsl": [221, 39, 11]
},
"light_header_tagline_color": {
"hex": "#111827",
"hsl": [221, 39, 11]
},
"light_bg_50": {
"hex": "#fcfcfd",
"hsl": [240, 20, 99]
},
"light_bg_100": {
"hex": "#f9fafb",
"hsl": [210, 20, 98]
},
"light_bg_200": {
"hex": "#f4f5f6",
"hsl": [210, 10, 96]
},
"light_bg_300": {
"hex": "#e5e8eb",
"hsl": [210, 13, 91]
},
"light_bg_400": {
"hex": "#d2d5db",
"hsl": [220, 11, 84]
},
"light_bg_500": {
"hex": "#b8bdc6",
"hsl": [219, 11, 75]
},
"light_bg_600": {
"hex": "#6b7280",
"hsl": [220, 9, 46]
},
"light_bg_700": {
"hex": "#4b5563",
"hsl": [215, 14, 34]
},
"light_bg_800": {
"hex": "#1f2937",
"hsl": [215, 28, 17]
},
"light_bg_900": {
"hex": "#111827",
"hsl": [221, 39, 11]
},
"light_bg_950": {
"hex": "#030712",
"hsl": [224, 71, 4]
},
"light_fg_100": {
"hex": "#010309",
"hsl": [225, 80, 2]
},
"light_fg_200": {
"hex": "#030712",
"hsl": [224, 71, 4]
},
"light_fg_300": {
"hex": "#080f1c",
"hsl": [220, 55, 7]
},
"light_fg_400": {
"hex": "#111827",
"hsl": [221, 39, 11]
},
"light_fg_500": {
"hex": "#1e2333",
"hsl": [225, 26, 16]
},
"light_fg_600": {
"hex": "#374151",
"hsl": [217, 19, 27]
},
"light_fg_700": {
"hex": "#595f6e",
"hsl": [223, 11, 39]
},
"light_fg_800": {
"hex": "#6b7280",
"hsl": [220, 9, 46]
},
"light_fg_900": {
"hex": "#8891a0",
"hsl": [218, 11, 58]
},
"light_fg_950": {
"hex": "#9ca3af",
"hsl": [218, 11, 65]
},
"light_fg_tinted": {
"hex": "#1e293b",
"hsl": [217, 33, 17]
},
"light_fg_inverted": {
"hex": "#fcfcfd",
"hsl": [210, 20, 99]
},
"light_primary_400": {
"hex": "#6ea2f7",
"hsl": [217, 90, 70]
},
"light_primary_500": {
"hex": "#3c83f6",
"hsl": [217, 91, 60]
},
"light_primary_600": {
"hex": "#1e3fae",
"hsl": [226, 71, 40]
},
"light_green_400": {
"hex": "#a4db8a",
"hsl": [101, 53, 70]
},
"light_green_500": {
"hex": "#72bd51",
"hsl": [102, 45, 53]
},
"light_green_600": {
"hex": "#5cac39",
"hsl": [102, 50, 45]
},
"light_red_400": {
"hex": "#f98686",
"hsl": [0, 91, 75]
},
"light_red_500": {
"hex": "#f15b5b",
"hsl": [0, 84, 65]
},
"light_red_600": {
"hex": "#dd3c3c",
"hsl": [0, 70, 55]
},
"light_theme_color_base": {
"hex": "#e5e8eb",
"hsl": [210, 13, 91]
},
"light_navigation_background_sticky": {
"hex": "#fcfcfd",
"hsl": [240, 20, 99]
},
"light_bookmark_color_alpha": {
"hex": "#9ca3b0",
"hsl": [219, 11, 65]
},
"light_bookmark_color_beta": {
"hex": "#f59e0b",
"hsl": [38, 92, 50]
},
"light_bookmark_color_gamma": {
"hex": "#77BFA3",
"hsl": [157, 36, 61]
},
"light_bookmark_color_delta": {
"hex": "#dd5960",
"hsl": [357, 66, 61]
},
"light_bookmark_line_color": {
"hex": "#3c83f6",
"hsl": [217, 91, 60]
},
"light_ins_background": {
"hex": "#a4db8a",
"hsl": [101, 53, 70]
},
"light_del_background": {
"hex": "#f98686",
"hsl": [0, 91, 75]
},
"light_badge_generic_background": {
"hex": "#71717a",
"hsl": [240, 4, 46]
},
"light_badge_admin_background": {
"hex": "#7c3aed",
"hsl": [262, 83, 58]
},
"light_badge_moderator_background": {
"hex": "#576eb2",
"hsl": [225, 37, 52]
},
"light_badge_author_background": {
"hex": "#f59e0b",
"hsl": [38, 92, 50]
},
"light_badge_supporter_background": {
"hex": "#ed5e76",
"hsl": [350, 80, 65]
},
"light_badge_override_background": {
"hex": "#64748b",
"hsl": [215, 16, 47]
},
"dark_header_title_color": {
"hex": "#c4cad6",
"hsl": [220, 18, 80]
},
"dark_header_tagline_color": {
"hex": "#c4cad6",
"hsl": [220, 18, 80]
},
"dark_bg_50": {
"hex": "#c7c9d2",
"hsl": [222, 12, 80]
},
"dark_bg_100": {
"hex": "#a4a9b7",
"hsl": [222, 12, 68]
},
"dark_bg_200": {
"hex": "#7b8498",
"hsl": [222, 12, 54]
},
"dark_bg_300": {
"hex": "#565c6c",
"hsl": [222, 12, 38]
},
"dark_bg_400": {
"hex": "#454b59",
"hsl": [222, 13, 31]
},
"dark_bg_500": {
"hex": "#3b404c",
"hsl": [222, 13, 26.5]
},
"dark_bg_600": {
"hex": "#333844",
"hsl": [222, 14, 23.5]
},
"dark_bg_700": {
"hex": "#2b303b",
"hsl": [221, 16, 20]
},
"dark_bg_800": {
"hex": "#252932",
"hsl": [219, 15, 17]
},
"dark_bg_900": {
"hex": "#10121a",
"hsl": [222, 25, 8]
},
"dark_bg_950": {
"hex": "#040810",
"hsl": [222, 60, 4]
},
"dark_shade": {
"hex": "#000000",
"hsl": [0, 0, 0]
},
"dark_fg_100": {
"hex": "#e6eaf4",
"hsl": [222, 40, 93]
},
"dark_fg_200": {
"hex": "#dbe0ea",
"hsl": [222, 26, 89]
},
"dark_fg_300": {
"hex": "#d1d5e0",
"hsl": [224, 20, 85]
},
"dark_fg_400": {
"hex": "#c4cad6",
"hsl": [222, 18, 80.5]
},
"dark_fg_500": {
"hex": "#b7bdcc",
"hsl": [222, 18, 76]
},
"dark_fg_600": {
"hex": "#a8afc3",
"hsl": [224, 18, 71]
},
"dark_fg_700": {
"hex": "#989fb4",
"hsl": [224, 16, 65]
},
"dark_fg_800": {
"hex": "#9097a7",
"hsl": [222, 12, 61]
},
"dark_fg_900": {
"hex": "#7d8497",
"hsl": [222, 11, 54]
},
"dark_fg_950": {
"hex": "#727888",
"hsl": [222, 9, 49]
},
"dark_fg_tinted": {
"hex": "#b0b7ca",
"hsl": [224, 20, 74]
},
"dark_fg_inverted": {
"hex": "#0a0c0f",
"hsl": [222, 20, 5]
},
"dark_primary_400": {
"hex": "#f7dd88",
"hsl": [46, 87, 75]
},
"dark_primary_500": {
"hex": "#f4d171",
"hsl": [44, 86, 70]
},
"dark_primary_600": {
"hex": "#f1bb74",
"hsl": [34, 82, 70]
},
"dark_red_400": {
"hex": "#f26666",
"hsl": [0, 84, 67]
},
"dark_red_500": {
"hex": "#f15555",
"hsl": [0, 85, 64]
},
"dark_red_600": {
"hex": "#d94d4d",
"hsl": [0, 65, 58]
},
"dark_green_400": {
"hex": "#86a35f",
"hsl": [86, 27, 51]
},
"dark_green_500": {
"hex": "#78994d",
"hsl": [86, 33, 45]
},
"dark_green_600": {
"hex": "#6c8a45",
"hsl": [86, 33, 41]
},
"dark_theme_color_base": {
"hex": "#252932",
"hsl": [219, 15, 17]
},
"dark_navigation_background_sticky": {
"hex": "#10121a",
"hsl": [222, 25, 8]
},
"dark_bookmark_color_alpha": {
"hex": "#7d8497",
"hsl": [222, 11, 54]
},
"dark_bookmark_color_beta": {
"hex": "#e06552",
"hsl": [8, 70, 60]
},
"dark_bookmark_color_gamma": {
"hex": "#77BFA3",
"hsl": [157, 36, 61]
},
"dark_bookmark_color_delta": {
"hex": "#3C91E6",
"hsl": [210, 77, 57]
},
"dark_bookmark_line_color": {
"hex": "#f4d171",
"hsl": [44, 86, 70]
},
"dark_ins_background": {
"hex": "#86a35f",
"hsl": [86, 27, 51]
},
"dark_del_background": {
"hex": "#f26666",
"hsl": [0, 84, 67]
},
"dark_badge_generic_background": {
"hex": "#505062",
"hsl": [240, 10, 35]
},
"dark_badge_admin_background": {
"hex": "#79518d",
"hsl": [280, 27, 44]
},
"dark_badge_moderator_background": {
"hex": "#4d628f",
"hsl": [221, 30, 43]
},
"dark_badge_author_background": {
"hex": "#b1355a",
"hsl": [342, 54, 45]
},
"dark_badge_supporter_background": {
"hex": "#e4445e",
"hsl": [350, 75, 58]
},
"dark_badge_override_background": {
"hex": "#5a5a7f",
"hsl": [240, 17, 43]
}
}

View File

@ -362,7 +362,7 @@ if ( ! function_exists( 'fictioneer_comment_notification' ) ) {
array(
'[[post_id]]' => $parent->comment_post_ID,
'[[post_url]]' => get_permalink( $parent->comment_post_ID ),
'[[post_title]]' => fictioneer_get_safe_title( $parent->comment_post_ID ),
'[[post_title]]' => fictioneer_get_safe_title( $parent->comment_post_ID, 'comment-notification' ),
'[[comment_id]]' => $parent->comment_ID,
'[[comment_name]]' => $comment_author,
'[[comment_excerpt]]' => get_comment_excerpt( $parent->comment_ID ),

View File

@ -474,7 +474,7 @@ if ( ! function_exists( 'fictioneer_theme_comment' ) ) {
! $is_approved &&
! $is_report_hidden &&
! $commentcode &&
! current_user_can( 'moderate_comments' ) &&
! fictioneer_user_can_moderate( $comment ) &&
( $unapproved_comment_email != $comment->comment_author_email || empty( $unapproved_comment_email ) ) &&
! $is_new
) {

View File

@ -566,7 +566,7 @@ function fictioneer_story_chapters( $args ) {
'icon' => fictioneer_get_icon_field( 'fictioneer_chapter_icon', $chapter_id ),
'text_icon' => get_post_meta( $chapter_id, 'fictioneer_chapter_text_icon', true ),
'prefix' => get_post_meta( $chapter_id, 'fictioneer_chapter_prefix', true ),
'title' => fictioneer_get_safe_title( $chapter_id ),
'title' => fictioneer_get_safe_title( $chapter_id, 'story-chapter-list' ),
'list_title' => get_post_meta( $chapter_id, 'fictioneer_chapter_list_title', true ),
'words' => fictioneer_get_word_count( $chapter_id ),
'warning' => get_post_meta( $chapter_id, 'fictioneer_chapter_warning', true )
@ -648,19 +648,24 @@ function fictioneer_story_chapters( $args ) {
<a
href="<?php echo $chapter['link']; ?>"
class="chapter-group__list-item-link truncate _1-1 <?php echo $chapter['password'] ? '_password' : ''; ?>"
>
<?php
><?php
if ( ! empty( $chapter['prefix'] ) ) {
echo apply_filters( 'fictioneer_filter_list_chapter_prefix', $chapter['prefix'] );
// Mind space between prefix and title
echo apply_filters( 'fictioneer_filter_list_chapter_prefix', $chapter['prefix'] ) . ' ';
}
?>
<?php if ( ! empty( $chapter['list_title'] ) && $chapter['title'] !== $chapter['list_title'] ) : ?>
<span class="chapter-group__list-item-title list-view"><?php echo $chapter['title']; ?></span>
<span class="grid-view"><?php echo wp_strip_all_tags( $chapter['list_title'] ); ?></span>
<?php else : ?>
<?php echo $chapter['title']; ?>
<?php endif; ?>
</a>
if ( ! empty( $chapter['list_title'] ) && $chapter['title'] !== $chapter['list_title'] ) {
printf(
' <span class="chapter-group__list-item-title list-view">%s</span><span class="grid-view">%s</span>',
$chapter['title'],
wp_strip_all_tags( $chapter['list_title'] )
);
} else {
echo $chapter['title'];
}
?></a>
<?php if ( $chapter['password'] ) : ?>
<i class="fa-solid fa-lock icon-password grid-view"></i>

View File

@ -127,7 +127,7 @@ if ( ! function_exists( 'fictioneer_build_story_schema' ) ) {
'name' => _x( 'Chapters', 'SEO schema story chapters list node name.', 'fictioneer' ),
'description' => sprintf(
_x( 'Chapters of %s.', 'SEO schema story chapters list node description.', 'fictioneer' ),
fictioneer_get_safe_title( $post_id )
fictioneer_get_safe_title( $post_id, 'seo-schema-story-chapter-list-node' )
),
'mainEntityOfPage' => ['@id' => '#article'],
'itemListElement' => []

View File

@ -503,13 +503,6 @@ define( 'FICTIONEER_OPTIONS', array(
'label' => __( 'Enable all Gutenberg blocks', 'fictioneer' ),
'default' => 0
),
'fictioneer_enable_all_block_styles' => array(
'name' => 'fictioneer_enable_all_block_styles',
'group' => 'fictioneer-settings-general-group',
'sanitize_callback' => 'fictioneer_sanitize_checkbox',
'label' => __( 'Enable all Gutenberg block styles', 'fictioneer' ),
'default' => 0
),
'fictioneer_enable_ajax_authentication' => array(
'name' => 'fictioneer_enable_ajax_authentication',
'group' => 'fictioneer-settings-general-group',

View File

@ -117,7 +117,7 @@ function fictioneer_log_post_update( $post_id, $action ) {
$post_type_name,
$post_id,
$action,
fictioneer_get_safe_title( $post_id )
fictioneer_get_safe_title( $post_id, 'admin-log-post-update' )
);
// Log

View File

@ -950,15 +950,6 @@
?>
</div>
<div class="fictioneer-card__row">
<?php
fictioneer_settings_label_checkbox(
'fictioneer_enable_all_block_styles',
__( 'This might interfere with theme styles.', 'fictioneer' )
);
?>
</div>
<div class="fictioneer-card__row">
<?php
fictioneer_settings_label_checkbox(

View File

@ -331,9 +331,9 @@ function fictioneer_ajax_get_follows_notifications() {
<div class="follow-item <?php echo $new; ?>" data-chapter-id="<?php echo $chapter->ID; ?>" data-story-id="<?php echo $story_id; ?>" data-timestamp="<?php echo $chapter_timestamp; ?>">
<div class="follow-wrapper">
<div class="follow-title truncate _1-1">
<a class="follow-title-link" href="<?php echo get_the_permalink( $chapter->ID ); ?>"><?php echo fictioneer_get_safe_title( $chapter->ID ); ?></a>
<a class="follow-title-link" href="<?php echo get_the_permalink( $chapter->ID ); ?>"><?php echo fictioneer_get_safe_title( $chapter->ID, 'ajax-get-follows-notifications' ); ?></a>
</div>
<div class="follow-meta truncate _1-1"><?php echo $date ; ?> in <?php echo fictioneer_get_safe_title( $story_id ); ?></div>
<div class="follow-meta truncate _1-1"><?php echo $date ; ?> in <?php echo fictioneer_get_safe_title( $story_id, 'ajax-get-follows-notifications' ); ?></div>
<div class="follow-marker">&bull;</div>
</div>
</div>

File diff suppressed because one or more lines are too long

2
js/bookmarks.min.js vendored

File diff suppressed because one or more lines are too long

2
js/chapter.min.js vendored

File diff suppressed because one or more lines are too long

2
js/comments.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
!function(){if("undefined"!=typeof localStorage){const t=localStorage.getItem("fcnLightmode"),e=document.documentElement;let a,o,r=localStorage.getItem("fcnSiteSettings");if(r&&(r=JSON.parse(r))&&null!==r&&"object"==typeof r){Object.entries(r).forEach((t=>{switch(t[0]){case"minimal":e.classList.toggle("minimal",t[1]);break;case"darken":a=r.darken,o=a>=0?1+Math.pow(a,2):1-Math.pow(a,2),e.style.setProperty("--darken",o);break;case"saturation":a=r.saturation,o=a>=0?1+Math.pow(a,2):1-Math.pow(a,2),e.style.setProperty("--saturation",o);break;case"font-saturation":a=r["font-saturation"],o=a>=0?1+Math.pow(a,2):1-Math.pow(a,2),e.style.setProperty("--font-saturation",o);break;case"hue-rotate":o=Number.isInteger(r["hue-rotate"])?r["hue-rotate"]:0,e.style.setProperty("--hue-rotate",`${o}deg`);break;default:e.classList.toggle(`no-${t[0]}`,!t[1])}})),e.dataset.fontWeight=r.hasOwnProperty("font-weight")?r["font-weight"]:"default",e.dataset.theme=r.hasOwnProperty("site-theme")&&!e.dataset.forceChildTheme?r["site-theme"]:"default";let t=getComputedStyle(document.documentElement).getPropertyValue("--theme-color-base").trim().split(" "),n=r.darken?r.darken:0,s=r.saturation?r.saturation:0,i=r["hue-rotate"]?r["hue-rotate"]:0,l=n>=0?1+Math.pow(n,2):1-Math.pow(n,2);r=s>=0?1+Math.pow(s,2):1-Math.pow(s,2),t=`hsl(${(parseInt(t[0])+i)%360}deg ${(parseInt(t[1])*r).toFixed(2)}% ${(parseInt(t[2])*l).toFixed(2)}%)`,document.querySelector("meta[name=theme-color]").setAttribute("content",t)}t&&(e.dataset.mode="true"==t?"light":"dark")}}();
!function(){if("undefined"!=typeof localStorage){const t=localStorage.getItem("fcnLightmode"),e=document.documentElement;let a,o,r=localStorage.getItem("fcnSiteSettings");if(r&&(r=JSON.parse(r))&&null!==r&&"object"==typeof r){Object.entries(r).forEach((t=>{switch(t[0]){case"minimal":e.classList.toggle("minimal",t[1]);break;case"darken":a=r.darken,o=a>=0?1+Math.pow(a,2):1-Math.pow(a,2),e.style.setProperty("--darken",`(${o} + var(--lightness-offset))`);break;case"saturation":a=r.saturation,o=a>=0?1+Math.pow(a,2):1-Math.pow(a,2),e.style.setProperty("--saturation",`(${o} + var(--saturation-offset))`);break;case"font-saturation":a=r["font-saturation"],o=a>=0?1+Math.pow(a,2):1-Math.pow(a,2),e.style.setProperty("--font-saturation",`(${o} + var(--font-saturation-offset))`);break;case"hue-rotate":o=Number.isInteger(r["hue-rotate"])?r["hue-rotate"]:0,e.style.setProperty("--hue-rotate",`(${o}deg + var(--hue-offset))`);break;default:e.classList.toggle(`no-${t[0]}`,!t[1])}})),e.dataset.fontWeight=r.hasOwnProperty("font-weight")?r["font-weight"]:"default",e.dataset.theme=r.hasOwnProperty("site-theme")&&!e.dataset.forceChildTheme?r["site-theme"]:"default";let t=getComputedStyle(document.documentElement).getPropertyValue("--theme-color-base").trim().split(" ");const s=r.darken?r.darken:0,n=r.saturation?r.saturation:0,i=r["hue-rotate"]?r["hue-rotate"]:0,h=s>=0?1+Math.pow(s,2):1-Math.pow(s,2);r=n>=0?1+Math.pow(n,2):1-Math.pow(n,2),t=`hsl(${(parseInt(t[0])+i)%360}deg ${(parseInt(t[1])*r).toFixed(2)}% ${(parseInt(t[2])*h).toFixed(2)}%)`,document.querySelector("meta[name=theme-color]").setAttribute("content",t)}t&&(e.dataset.mode="true"==t?"light":"dark")}}();

View File

@ -1 +1 @@
function fcn_unsetOauth(t,e,n){const a=prompt(sprintf(_x("Are you sure? Note that if you disconnect all accounts, you may no longer be able to log back in once you log out. Enter %s to confirm.","Unset OAuth prompt.","fictioneer"),_x("delete","Prompt deletion confirmation string.","fictioneer").toUpperCase()));if(!a||a.toLowerCase()!=_x("delete","Prompt deletion confirmation string.","fictioneer").toLowerCase())return;const r=_$$$(`oauth-${e}`);r.classList.add("ajax-in-progress"),fcn_ajaxPost(payload={action:"fictioneer_ajax_unset_my_oauth",nonce:t,channel:e,id:n}).then((t=>{t.success?(r.classList.remove("_connected"),r.classList.add("_disconnected"),r.querySelector("button").remove(),fcn_showNotification(r.dataset.unset)):(r.style.background="var(--warning)",fcn_showNotification(t.data.error,5,"warning"))})).catch((t=>{t.status&&t.statusText&&(r.style.background="var(--warning)",fcn_showNotification(`${t.status}: ${t.statusText}`,5,"warning"))})).then((()=>{r.classList.remove("ajax-in-progress")}))}function fcn_deleteMyAccount(t){if(_$$$("button-delete-my-account").hasAttribute("disabled"))return;const e=prompt(sprintf(t.dataset.warning,_x("delete","Prompt deletion confirmation string.","fictioneer").toUpperCase()));e&&e.toLowerCase()==_x("delete","Prompt deletion confirmation string.","fictioneer").toLowerCase()&&(_$$$("button-delete-my-account").setAttribute("disabled",!0),fcn_ajaxPost({action:"fictioneer_ajax_delete_my_account",nonce:t.dataset.nonce,id:t.dataset.id}).then((t=>{t.success?location.reload():(fcn_showNotification(t.data.error,5,"warning"),_$$$("button-delete-my-account").innerHTML=t.data.button)})).catch((t=>{t.status&&t.statusText&&(fcn_showNotification(`${t.status}: ${t.statusText}`,5,"warning"),_$$$("button-delete-my-account").innerHTML=response.data.button)})))}_$$(".button-unset-oauth").forEach((t=>{t.addEventListener("click",(t=>{fcn_unsetOauth(t.currentTarget.dataset.nonce,t.currentTarget.dataset.channel,t.currentTarget.dataset.id)}))})),_$$$("button-delete-my-account")?.addEventListener("click",(t=>{fcn_deleteMyAccount(t.currentTarget)}));const fcn_profileDataTranslations=_$$$("profile-data-translations")?.dataset;function fcn_dataDeletionPrompt(t){const e=prompt(sprintf(t.dataset.warning,_x("delete","Prompt deletion confirmation string.","fictioneer").toUpperCase()));return!(!e||e.toLowerCase()!=_x("delete","Prompt deletion confirmation string.","fictioneer").toLowerCase())}function fcn_clearData(t,e){const n=t.closest(".card");localStorage.removeItem("fcnBookshelfContent"),n.classList.add("ajax-in-progress"),t.remove(),fcn_ajaxPost({action:e,fcn_fast_ajax:1,nonce:t.dataset.nonce}).then((t=>{t.success?n.querySelector(".card__content").innerHTML=t.data.success:fcn_showNotification(t.data.error,10,"warning")})).catch((t=>{t.status&&t.statusText&&fcn_showNotification(`${t.status}: ${t.statusText}`,10,"warning")})).then((()=>{n.classList.remove("ajax-in-progress")}))}_$(".button-clear-comments")?.addEventListener("click",(t=>{fcn_dataDeletionPrompt(t.currentTarget)&&fcn_clearData(t.currentTarget,"fictioneer_ajax_clear_my_comments")})),_$(".button-clear-comment-subscriptions")?.addEventListener("click",(t=>{fcn_dataDeletionPrompt(t.currentTarget)&&fcn_clearData(t.currentTarget,"fictioneer_ajax_clear_my_comment_subscriptions")})),_$(".button-clear-checkmarks")?.addEventListener("click",(t=>{if(!fcn_dataDeletionPrompt(t.currentTarget))return;const e=fcn_getUserData();e.checkmarks={data:{},updated:Date.now()},fcn_setUserData(e),fcn_updateCheckmarksView(),fcn_clearData(t.currentTarget,"fictioneer_ajax_clear_my_checkmarks",!0)})),_$(".button-clear-reminders")?.addEventListener("click",(t=>{if(!fcn_dataDeletionPrompt(t.currentTarget))return;const e=fcn_getUserData();e.reminders={data:{}},fcn_setUserData(e),fcn_updateRemindersView(),fcn_clearData(t.currentTarget,"fictioneer_ajax_clear_my_reminders",!0)})),_$(".button-clear-follows")?.addEventListener("click",(t=>{if(!fcn_dataDeletionPrompt(t.currentTarget))return;const e=fcn_getUserData();e.follows={data:{}},fcn_setUserData(e),fcn_updateFollowsView(),fcn_clearData(t.currentTarget,"fictioneer_ajax_clear_my_follows",!0)})),_$(".button-clear-bookmarks")?.addEventListener("click",(t=>{if(!fcn_dataDeletionPrompt(t.currentTarget))return;const e=fcn_getUserData();e.bookmarks="{}",fcn_setUserData(e),fcn_bookmarks.data={},t.currentTarget.closest(".card").querySelector(".card__content").innerHTML=fcn_profileDataTranslations.clearedSuccess,fcn_setBookmarks(fcn_bookmarks)}));
function fcn_unsetOauth(t,e,n){const a=prompt(sprintf(_x("Are you sure? Note that if you disconnect all accounts, you may no longer be able to log back in once you log out. Enter %s to confirm.","Unset OAuth prompt.","fictioneer"),_x("delete","Prompt deletion confirmation string.","fictioneer").toUpperCase()));if(!a||a.toLowerCase()!=_x("delete","Prompt deletion confirmation string.","fictioneer").toLowerCase())return;const r=_$$$(`oauth-${e}`);r.classList.add("ajax-in-progress"),fcn_ajaxPost(payload={action:"fictioneer_ajax_unset_my_oauth",nonce:t,channel:e,id:n}).then((t=>{t.success?(r.classList.remove("_connected"),r.classList.add("_disconnected"),r.querySelector("button").remove(),fcn_showNotification(r.dataset.unset)):(r.style.background="var(--notice-warning-background)",fcn_showNotification(t.data.error,5,"warning"))})).catch((t=>{t.status&&t.statusText&&(r.style.background="var(--notice-warning-background)",fcn_showNotification(`${t.status}: ${t.statusText}`,5,"warning"))})).then((()=>{r.classList.remove("ajax-in-progress")}))}function fcn_deleteMyAccount(t){if(_$$$("button-delete-my-account").hasAttribute("disabled"))return;const e=prompt(sprintf(t.dataset.warning,_x("delete","Prompt deletion confirmation string.","fictioneer").toUpperCase()));e&&e.toLowerCase()==_x("delete","Prompt deletion confirmation string.","fictioneer").toLowerCase()&&(_$$$("button-delete-my-account").setAttribute("disabled",!0),fcn_ajaxPost({action:"fictioneer_ajax_delete_my_account",nonce:t.dataset.nonce,id:t.dataset.id}).then((t=>{t.success?location.reload():(fcn_showNotification(t.data.error,5,"warning"),_$$$("button-delete-my-account").innerHTML=t.data.button)})).catch((t=>{t.status&&t.statusText&&(fcn_showNotification(`${t.status}: ${t.statusText}`,5,"warning"),_$$$("button-delete-my-account").innerHTML=response.data.button)})))}_$$(".button-unset-oauth").forEach((t=>{t.addEventListener("click",(t=>{fcn_unsetOauth(t.currentTarget.dataset.nonce,t.currentTarget.dataset.channel,t.currentTarget.dataset.id)}))})),_$$$("button-delete-my-account")?.addEventListener("click",(t=>{fcn_deleteMyAccount(t.currentTarget)}));const fcn_profileDataTranslations=_$$$("profile-data-translations")?.dataset;function fcn_dataDeletionPrompt(t){const e=prompt(sprintf(t.dataset.warning,_x("delete","Prompt deletion confirmation string.","fictioneer").toUpperCase()));return!(!e||e.toLowerCase()!=_x("delete","Prompt deletion confirmation string.","fictioneer").toLowerCase())}function fcn_clearData(t,e){const n=t.closest(".card");localStorage.removeItem("fcnBookshelfContent"),n.classList.add("ajax-in-progress"),t.remove(),fcn_ajaxPost({action:e,fcn_fast_ajax:1,nonce:t.dataset.nonce}).then((t=>{t.success?n.querySelector(".card__content").innerHTML=t.data.success:fcn_showNotification(t.data.error,10,"warning")})).catch((t=>{t.status&&t.statusText&&fcn_showNotification(`${t.status}: ${t.statusText}`,10,"warning")})).then((()=>{n.classList.remove("ajax-in-progress")}))}_$(".button-clear-comments")?.addEventListener("click",(t=>{fcn_dataDeletionPrompt(t.currentTarget)&&fcn_clearData(t.currentTarget,"fictioneer_ajax_clear_my_comments")})),_$(".button-clear-comment-subscriptions")?.addEventListener("click",(t=>{fcn_dataDeletionPrompt(t.currentTarget)&&fcn_clearData(t.currentTarget,"fictioneer_ajax_clear_my_comment_subscriptions")})),_$(".button-clear-checkmarks")?.addEventListener("click",(t=>{if(!fcn_dataDeletionPrompt(t.currentTarget))return;const e=fcn_getUserData();e.checkmarks={data:{},updated:Date.now()},fcn_setUserData(e),fcn_updateCheckmarksView(),fcn_clearData(t.currentTarget,"fictioneer_ajax_clear_my_checkmarks",!0)})),_$(".button-clear-reminders")?.addEventListener("click",(t=>{if(!fcn_dataDeletionPrompt(t.currentTarget))return;const e=fcn_getUserData();e.reminders={data:{}},fcn_setUserData(e),fcn_updateRemindersView(),fcn_clearData(t.currentTarget,"fictioneer_ajax_clear_my_reminders",!0)})),_$(".button-clear-follows")?.addEventListener("click",(t=>{if(!fcn_dataDeletionPrompt(t.currentTarget))return;const e=fcn_getUserData();e.follows={data:{}},fcn_setUserData(e),fcn_updateFollowsView(),fcn_clearData(t.currentTarget,"fictioneer_ajax_clear_my_follows",!0)})),_$(".button-clear-bookmarks")?.addEventListener("click",(t=>{if(!fcn_dataDeletionPrompt(t.currentTarget))return;const e=fcn_getUserData();e.bookmarks="{}",fcn_setUserData(e),fcn_bookmarks.data={},t.currentTarget.closest(".card").querySelector(".card__content").innerHTML=fcn_profileDataTranslations.clearedSuccess,fcn_setBookmarks(fcn_bookmarks)}));

View File

@ -124,7 +124,7 @@ $pag_args = array(
// Setup
$story_id = ( $post->post_type === 'fcn_story' ) ? $post->ID : null;
$title = fictioneer_get_safe_title( $post->ID );
$title = fictioneer_get_safe_title( $post->ID, 'card-article' );
$permalink = get_permalink();
$categories = wp_get_post_categories( $post->ID );
$tags = get_the_tags();

View File

@ -20,7 +20,7 @@
defined( 'ABSPATH' ) OR exit;
// Setup
$title = fictioneer_get_safe_title( $post->ID );
$title = fictioneer_get_safe_title( $post->ID, 'card-chapter' );
$story_id = get_post_meta( $post->ID, 'fictioneer_chapter_story', true );
$story_post = get_post( $story_id );
$story_unpublished = get_post_status( $story_id ) !== 'publish';
@ -70,6 +70,7 @@ if ( get_theme_mod( 'card_style', 'default' ) !== 'default' ) {
class="card _large _chapter <?php echo implode( ' ', $card_classes ); ?>"
data-story-id="<?php echo $story_id; ?>"
data-check-id="<?php echo $post->ID; ?>"
data-unavailable="<?php esc_attr_e( 'Unavailable', 'fictioneer' ); ?>"
>
<div class="card__body polygon">
@ -146,7 +147,7 @@ if ( get_theme_mod( 'card_style', 'default' ) !== 'default' ) {
// Content
printf(
'<div class="card__content cell-desc"><div class="truncate _cq-4-5">%1$s<span>%2$s</span>%3$s</div></div>',
'<div class="card__content cell-desc"><div class="truncate _cq-4-5">%1$s<span>%2$s</span></div></div>',
$hide_author ? '' : sprintf(
'<span class="card__by-author cq-show-below-640">%s</span> ',
sprintf(
@ -154,8 +155,7 @@ if ( get_theme_mod( 'card_style', 'default' ) !== 'default' ) {
fictioneer_get_author_node()
)
),
empty( $excerpt ) ? __( 'No description provided yet.', 'fictioneer' ) : $excerpt,
$story_unpublished ? '<div class="card__unavailable">' . __( 'Unavailable', 'fictioneer' ) . '</div>' : ''
empty( $excerpt ) ? __( 'No description provided yet.', 'fictioneer' ) : $excerpt
);
?>

View File

@ -20,7 +20,7 @@ defined( 'ABSPATH' ) OR exit;
// Setup
$list_title = trim( get_post_meta( $post->ID, 'fictioneer_collection_list_title', true ) );
$title = empty( $list_title ) ? fictioneer_get_safe_title( $post->ID ) : $list_title;
$title = empty( $list_title ) ? fictioneer_get_safe_title( $post->ID, 'card-collection' ) : $list_title;
$description = fictioneer_get_content_field( 'fictioneer_collection_description', $post->ID );
$statistics = fictioneer_get_collection_statistics( $post->ID );
$items = get_post_meta( $post->ID, 'fictioneer_collection_items', true );
@ -139,7 +139,7 @@ if ( get_theme_mod( 'card_style', 'default' ) !== 'default' ) {
if ( $list_title ) {
echo wp_strip_all_tags( $list_title );
} else {
echo fictioneer_get_safe_title( $item->ID );
echo fictioneer_get_safe_title( $item->ID, 'card-collection-list' );
}
?></a>
</div>

View File

@ -17,7 +17,7 @@
defined( 'ABSPATH' ) OR exit;
// Setup
$title = fictioneer_get_safe_title( $post->ID );
$title = fictioneer_get_safe_title( $post->ID, 'card-page' );
$comments_number = get_comments_number();
$card_classes = [];

View File

@ -17,7 +17,7 @@
defined( 'ABSPATH' ) OR exit;
// Setup
$title = fictioneer_get_safe_title( $post->ID );
$title = fictioneer_get_safe_title( $post->ID, 'card-post' );
$tags = get_the_tags();
$categories = wp_get_post_categories( $post->ID );
$card_classes = [];

View File

@ -19,7 +19,7 @@
defined( 'ABSPATH' ) OR exit;
// Setup
$title = fictioneer_get_safe_title( $post->ID );
$title = fictioneer_get_safe_title( $post->ID, 'card-recommendation' );
$links = array_merge(
fictioneer_url_list_to_array( get_post_meta( $post->ID, 'fictioneer_recommendation_urls', true ) ),
fictioneer_url_list_to_array( get_post_meta( $post->ID, 'fictioneer_recommendation_support', true ) )

View File

@ -137,7 +137,7 @@ if ( get_theme_mod( 'card_style', 'default' ) !== 'default' ) {
$list_title = trim( wp_strip_all_tags( $list_title ) );
if ( empty( $list_title ) ) {
$chapter_title = fictioneer_get_safe_title( $chapter->ID );
$chapter_title = fictioneer_get_safe_title( $chapter->ID, 'card-story-chapter-list' );
} else {
$chapter_title = $list_title;
}

View File

@ -22,6 +22,7 @@ defined( 'ABSPATH' ) OR exit;
// Setup
$header_style = get_theme_mod( 'header_style', 'default' );
$show_title_shadow = get_theme_mod( 'title_text_shadow', false );
$tag = in_array( $header_style, ['default', 'overlay'] ) ? 'header' : 'div';
?>
@ -38,7 +39,7 @@ $tag = in_array( $header_style, ['default', 'overlay'] ) ? 'header' : 'div';
<?php endif; ?>
<?php if ( display_header_text() ) : ?>
<div class="header__title">
<div class="header__title <?php if ( ! $show_title_shadow ) echo '_no-text-shadow'; ?>">
<h1 class="header__title-heading"><a href="<?php echo esc_url( home_url() ); ?>" class="header__title-link" rel="home"><?php echo get_bloginfo( 'name' ); ?></a></h1>
<?php if ( ! empty( get_bloginfo( 'description' ) ) ) : ?>
<div class="header__title-tagline"><?php echo get_bloginfo( 'description' ); ?></div>

View File

@ -35,6 +35,10 @@ if ( ! has_custom_logo() ) {
$classes[] = '_no-logo';
}
if ( ! get_theme_mod( 'title_text_shadow', false ) ) {
$classes[] = '_no-text-shadow';
}
?>
<header class="top-header <?php echo implode( ' ', $classes ); ?> hide-on-fullscreen">

View File

@ -126,7 +126,7 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
continue;
}
$title = fictioneer_get_safe_title( $post->ID );
$title = fictioneer_get_safe_title( $post->ID, 'shortcode-latest-chapters-compact' );
$story = $story_id ? fictioneer_get_story_data( $story_id, false ) : null; // Does not refresh comment count!
$text_icon = get_post_meta( $post->ID, 'fictioneer_chapter_text_icon', true );
$card_classes = [];
@ -194,7 +194,7 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
printf(
_x( 'in <a href="%1$s" class="bold-link">%2$s</a>', 'Small card: in {Link to Story}.', 'fictioneer' ),
get_permalink( $story_id ),
fictioneer_truncate( fictioneer_get_safe_title( $story_id ), 24 )
fictioneer_truncate( fictioneer_get_safe_title( $story_id, 'shortcode-latest-chapters-compact' ), 24 )
);
}
?>

View File

@ -127,7 +127,7 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
continue;
}
$title = fictioneer_get_safe_title( $post->ID );
$title = fictioneer_get_safe_title( $post->ID, 'shortcode-latest-chapters' );
$chapter_rating = get_post_meta( $post->ID, 'fictioneer_chapter_rating', true );
$story = $story_id ? fictioneer_get_story_data( $story_id, false ) : null; // Does not refresh comment count!
$text_icon = get_post_meta( $post->ID, 'fictioneer_chapter_text_icon', true );
@ -194,7 +194,7 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
printf(
_x( 'in <a href="%1$s" class="bold-link">%2$s</a>', 'Small card: in {Link to Story}.', 'fictioneer' ),
get_permalink( $story_id ),
fictioneer_truncate( fictioneer_get_safe_title( $story_id ), 24 )
fictioneer_truncate( fictioneer_get_safe_title( $story_id, 'shortcode-latest-chapters' ), 24 )
);
}

View File

@ -95,14 +95,14 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
<?php
// Setup
$title = fictioneer_get_safe_title( $post->ID );
$title = fictioneer_get_safe_title( $post->ID, 'shortcode-latest-posts' );
$label = esc_attr( sprintf( _x( 'Continue reading %s', 'Read more link aria label', 'fictioneer' ), $title ) );
if (
! get_option( 'fictioneer_show_full_post_content' ) &&
! strpos( $post->post_content, '<!--more-->' )
) {
$content = '<p>' . fictioneer_get_excerpt() . '</p><a class="more-link" href="' . get_permalink() . '" title="' . $label . '" aria-label="' . $label . '">' . fcntr( 'read_more' ) . '</a>';
$content = '<p>' . fictioneer_get_excerpt() . '</p><div class="more-link-wrapper"><a class="more-link" href="' . get_permalink() . '" title="' . $label . '" aria-label="' . $label . '">' . fcntr( 'read_more' ) . '</a></div>';
} else {
$content = apply_filters( 'the_content', get_the_content( fcntr( 'read_more' ) ) );
}

View File

@ -99,7 +99,7 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
<?php
// Setup
$title = fictioneer_get_safe_title( $post->ID );
$title = fictioneer_get_safe_title( $post->ID, 'shortcode-latest-recommendations-compact' );
$one_sentence = get_post_meta( $post->ID, 'fictioneer_recommendation_one_sentence', true );
$fandoms = get_the_terms( $post, 'fcn_fandom' );
$characters = get_the_terms( $post, 'fcn_character' );

View File

@ -100,7 +100,7 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
<?php
// Setup
$title = fictioneer_get_safe_title( $post->ID );
$title = fictioneer_get_safe_title( $post->ID, 'shortcode-latest-recommendations' );
$one_sentence = get_post_meta( $post->ID, 'fictioneer_recommendation_one_sentence', true );
$fandoms = get_the_terms( $post, 'fcn_fandom' );
$characters = get_the_terms( $post, 'fcn_character' );

View File

@ -216,7 +216,7 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
$list_title = trim( wp_strip_all_tags( $list_title ) );
if ( empty( $list_title ) ) {
$chapter_title = fictioneer_get_safe_title( $chapter->ID );
$chapter_title = fictioneer_get_safe_title( $chapter->ID, 'shortcode-latest-updates-compact' );
} else {
$chapter_title = $list_title;
}

View File

@ -217,7 +217,7 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
$list_title = trim( wp_strip_all_tags( $list_title ) );
if ( empty( $list_title ) ) {
$chapter_title = fictioneer_get_safe_title( $chapter->ID );
$chapter_title = fictioneer_get_safe_title( $chapter->ID, 'shortcode-latest-updates' );
} else {
$chapter_title = $list_title;
}

View File

@ -21,7 +21,7 @@ defined( 'ABSPATH' ) OR exit;
// Setup
$post_id = get_the_ID();
$title = fictioneer_get_safe_title( $post_id );
$title = fictioneer_get_safe_title( $post_id, 'post' );
$label = esc_attr( sprintf( _x( 'Continue reading %s', 'Read more link aria label', 'fictioneer' ), $title ) );
$nested = $args['nested'] ?? false;
@ -29,7 +29,7 @@ if (
! get_option( 'fictioneer_show_full_post_content' ) &&
! strpos( $post->post_content, '<!--more-->' )
) {
$content = '<p>' . fictioneer_get_excerpt() . '</p><a class="more-link" href="' . get_permalink() . '" title="' . $label . '" aria-label="' . $label . '">' . fcntr( 'read_more' ) . '</a>';
$content = '<p>' . fictioneer_get_excerpt() . '</p><div class="more-link-wrapper"><a class="more-link" href="' . get_permalink() . '" title="' . $label . '" aria-label="' . $label . '">' . fcntr( 'read_more' ) . '</a></div>';
} else {
$content = apply_filters( 'the_content', get_the_content( fcntr( 'read_more' ) ) );
}

View File

@ -123,7 +123,7 @@ remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
// Prepare titles
$list_title = trim( wp_strip_all_tags( $list_title ) );
$title = empty( $list_title ) ? fictioneer_get_safe_title( $post->ID ) : $list_title;
$title = empty( $list_title ) ? fictioneer_get_safe_title( $post->ID, 'shortcode-showcase' ) : $list_title;
// Prepare image arguments
$image_args = array(

View File

@ -92,18 +92,20 @@ $badge = fictioneer_get_comment_badge( $current_user, null );
</ul>
<div class="comment">
<div class="fictioneer-comment">
<div class="fictioneer-comment__container">
<div class="comment__header">
<div class="fictioneer-comment__header">
<?php if ( $avatar ) echo $avatar; ?>
<div class="comment__meta">
<div class="comment__author">
<div class="fictioneer-comment__meta">
<div class="fictioneer-comment__author truncate _1-1">
<span><?php echo $current_user->display_name; ?></span>
<?php if ( $badge ) echo $badge; ?>
</div>
<div class="comment__date-and-link"><?php
<div class="fictioneer-comment__info truncate _1-1">
<div class="fictioneer-comment__date"><?php
echo date_format(
date_create(),
sprintf(
@ -114,11 +116,13 @@ $badge = fictioneer_get_comment_badge( $current_user, null );
);
?></div>
</div>
</div>
</div>
<div class="comment__body clearfix">
<div class="fictioneer-comment__body clearfix">
<p><?php _e( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin mollis eu lectus eu pellentesque. Fusce ornare erat tellus, nec aliquet lacus sodales ut. Duis auctor vulputate dolor nec bibendum. Maecenas dapibus nibh at quam dictum porta at eu felis. Interdum et malesuada fames ac ante ipsum primis in faucibus.', 'fictioneer' ); ?></p>
</div>
</div>
</div>

View File

@ -273,7 +273,7 @@ if ( $show_advanced ) {
<?php endif; ?>
</div>
<div class="search-form__advanced">
<div class="search-form__advanced infobox">
<div class="search-form__select-group">

View File

@ -43,7 +43,7 @@ get_header( null, $header_args );
// Setup
$chapter_ids = [];
$password_class = ! empty( $post->post_password ) ? 'password' : '';
$title = fictioneer_get_safe_title( $post->ID );
$title = fictioneer_get_safe_title( $post->ID, 'single-chapter' );
$age_rating = get_post_meta( $post->ID, 'fictioneer_chapter_rating', true );
$this_breadcrumb = [ $title, get_the_permalink() ];

View File

@ -35,7 +35,7 @@ get_header( null, array( 'type' => 'fcn_collection' ) );
// Setup
$featured_list = get_post_meta( $post->ID, 'fictioneer_collection_items', true );
$featured_list = is_array( $featured_list ) ? $featured_list : [];
$title = fictioneer_get_safe_title( $post->ID );
$title = fictioneer_get_safe_title( $post->ID, 'single-collection' );
$this_breadcrumb = [$title, get_the_permalink()];
$current_page = max( 1, get_query_var( 'pg', 1 ) ?: 1 ); // Paged not available

View File

@ -29,7 +29,7 @@ get_header( null, array( 'type' => 'fcn_recommendation' ) );
<?php
// Setup
$title = fictioneer_get_safe_title( $post->ID );
$title = fictioneer_get_safe_title( $post->ID, 'single-recommendation' );
$this_breadcrumb = [ $title, get_the_permalink() ];
// Arguments for hooks and templates/etc.

View File

@ -26,7 +26,7 @@ get_header();
<?php
// Setup
$title = fictioneer_get_safe_title( $post->ID );
$title = fictioneer_get_safe_title( $post->ID, 'single-post' );
$this_breadcrumb = [ $title, get_the_permalink() ];
?>

View File

@ -30,7 +30,7 @@ get_header();
<?php
// Setup
$title = fictioneer_get_safe_title( $post_id );
$title = fictioneer_get_safe_title( $post_id, 'singular-titleless' );
$this_breadcrumb = [ $title, get_the_permalink() ];
?>

View File

@ -30,7 +30,7 @@ get_header();
<?php
// Setup
$title = fictioneer_get_safe_title( $post_id );
$title = fictioneer_get_safe_title( $post_id, 'singular' );
$this_breadcrumb = [$title, get_the_permalink()];
?>

View File

@ -45,7 +45,7 @@ function fcn_getBookshelfContent() {
function fcn_updateBookshelfView(action = null, page = null, order = null, scroll = false) {
// Setup
let fcn_bookshelfStorage = fcn_getBookshelfContent();
let storage = fcn_getBookshelfContent();
action = action ?? fcn_bookshelfTarget.dataset.action,
page = page ?? fcn_bookshelfTarget.dataset.page,
@ -55,24 +55,24 @@ function fcn_updateBookshelfView(action = null, page = null, order = null, scrol
// Storage item valid for 60 seconds
if (
! fcn_bookshelfStorage.hasOwnProperty('timestamp') ||
fcn_bookshelfStorage['timestamp'] + 60000 < Date.now()
! storage.hasOwnProperty('timestamp') ||
storage['timestamp'] + 60000 < Date.now()
) {
localStorage.removeItem('fcnBookshelfContent');
fcn_bookshelfStorage = { html: {}, count: {} };
storage = { html: {}, count: {} };
fcn_fetchBookshelfPart(action, page, order, scroll);
return;
}
// Check if content already cached
if (
fcn_bookshelfStorage.hasOwnProperty('html') &&
fcn_bookshelfStorage['html'].hasOwnProperty(htmlKey)
storage.hasOwnProperty('html') &&
storage['html'].hasOwnProperty(htmlKey)
) {
fcn_bookshelfTarget.innerHTML = fcn_bookshelfStorage['html'][htmlKey];
fcn_bookshelfTarget.innerHTML = storage['html'][htmlKey];
fcn_bookshelfTarget.classList.remove('ajax-in-progress');
fcn_bookshelfTarget.dataset.page = page;
_$('.item-number').innerHTML = `(${fcn_bookshelfStorage['count'][action]})`;
_$('.item-number').innerHTML = `(${storage['count'][action]})`;
if (scroll) {
_$$$('main').scrollIntoView({ behavior: 'smooth' });
@ -128,8 +128,8 @@ function fcn_browseBookshelfPage(page) {
function fcn_fetchBookshelfPart(action, page, order, scroll = false) {
// Setup
const htmlKey = action + page + order,
fcn_bookshelfStorage = fcn_getBookshelfContent();
const htmlKey = action + page + order;
const storage = fcn_getBookshelfContent();
// Request
fcn_ajaxGet({
@ -142,10 +142,10 @@ function fcn_fetchBookshelfPart(action, page, order, scroll = false) {
// Check for success
if (response.success) {
// Temporary remember in web storage
fcn_bookshelfStorage['timestamp'] = Date.now();
fcn_bookshelfStorage['html'][htmlKey] = response.data.html;
fcn_bookshelfStorage['count'][action] = response.data.count;
localStorage.setItem('fcnBookshelfContent', JSON.stringify(fcn_bookshelfStorage));
storage['timestamp'] = Date.now();
storage['html'][htmlKey] = response.data.html;
storage['count'][action] = response.data.count;
localStorage.setItem('fcnBookshelfContent', JSON.stringify(storage));
// Render in view
fcn_bookshelfTarget.innerHTML = response.data.html;

View File

@ -886,7 +886,7 @@ function fcn_updateHueRotate(value) {
fcn_settingHueRotateReset.classList.toggle('_modified', value != 0);
// Update hue-rotate property
fcn_theRoot.style.setProperty('--hue-rotate', `${value}deg + var(--hue-offset)`);
fcn_theRoot.style.setProperty('--hue-rotate', `(${value}deg + var(--hue-offset))`);
// Update local storage
fcn_siteSettings['hue-rotate'] = value;

View File

@ -538,15 +538,18 @@ function fcn_showBookmarkCards() {
// Use fragment to collect nodes
const fragment = document.createDocumentFragment();
// Sort bookmarks by date, newest to oldest
const sorted = Object.entries(fcn_bookmarks.data).sort((a, b) => new Date(b[1].date) - new Date(a[1].date));
// Append bookmarks to fragment (if any)
Object.entries(
fcn_bookmarks.data).forEach(([id, { color, progress, link, chapter, 'paragraph-id': paragraphId, date, image, thumb, content }]
) => {
sorted.forEach(([id, { color, progress, link, chapter, 'paragraph-id': paragraphId, date, image, thumb, content }]) => {
// Limit rendered bookmarks
if (count > -1 && count-- < 1) {
if (count == 0) {
return;
}
count--;
// Clone template and get data from JSON
const clone = fcn_bookmarksSmallCardTemplate.content.cloneNode(true);
const formattedDate = new Date(date).toLocaleDateString(

View File

@ -652,7 +652,7 @@ function fcn_setFormatting(value) {
// Update font saturation property (squared for smooth progression)
fcn_chapterFormatting.style.setProperty(
'--font-saturation',
value >= 0 ? 1 + Math.pow(value, 2) : 1 - Math.pow(value, 2)
`(${value >= 0 ? 1 + Math.pow(value, 2) : 1 - Math.pow(value, 2)} + var(--font-saturation-offset))`
);
// Update local storage

View File

@ -110,7 +110,7 @@ function fcn_moderateComment(id, operation) {
} else {
// Server action failed, mark comment with alert
menuToggleIcon.classList = 'fa-solid fa-triangle-exclamation mod-menu-toggle-icon';
menuToggleIcon.style.color = 'var(--warning)';
menuToggleIcon.style.color = 'var(--notice-warning-background)';
comment.querySelector('.popup-menu-toggle').style.opacity = '1';
if (response.data.error) {
@ -121,7 +121,7 @@ function fcn_moderateComment(id, operation) {
.catch(error => {
// Server action failed, mark comment with alert
menuToggleIcon.classList = 'fa-solid fa-triangle-exclamation mod-menu-toggle-icon';
menuToggleIcon.style.color = 'var(--warning)';
menuToggleIcon.style.color = 'var(--notice-warning-background)';
comment.querySelector('.popup-menu-toggle').style.opacity = '1';
if (error.status && error.statusText) {

View File

@ -15,21 +15,21 @@
case 'darken':
temp = settings['darken'];
modifier = temp >= 0 ? 1 + Math.pow(temp, 2) : 1 - Math.pow(temp, 2);
root.style.setProperty('--darken', modifier)
root.style.setProperty('--darken', `(${modifier} + var(--lightness-offset))`)
break;
case 'saturation':
temp = settings['saturation'];
modifier = temp >= 0 ? 1 + Math.pow(temp, 2) : 1 - Math.pow(temp, 2);
root.style.setProperty('--saturation', modifier)
root.style.setProperty('--saturation', `(${modifier} + var(--saturation-offset))`)
break;
case 'font-saturation':
temp = settings['font-saturation'];
modifier = temp >= 0 ? 1 + Math.pow(temp, 2) : 1 - Math.pow(temp, 2);
root.style.setProperty('--font-saturation', modifier)
root.style.setProperty('--font-saturation', `(${modifier} + var(--font-saturation-offset))`)
break;
case 'hue-rotate':
modifier = Number.isInteger(settings['hue-rotate']) ? settings['hue-rotate'] : 0;
root.style.setProperty('--hue-rotate', `${modifier}deg`);
root.style.setProperty('--hue-rotate', `(${modifier}deg + var(--hue-offset))`);
break;
default:
root.classList.toggle(`no-${entry[0]}`, !entry[1])
@ -39,11 +39,13 @@
root.dataset.fontWeight = settings.hasOwnProperty('font-weight') ? settings['font-weight'] : 'default';
root.dataset.theme = settings.hasOwnProperty('site-theme') && ! root.dataset.forceChildTheme ? settings['site-theme'] : 'default';
let themeColor = getComputedStyle(document.documentElement).getPropertyValue('--theme-color-base').trim().split(' '),
darken = settings['darken'] ? settings['darken'] : 0,
saturation = settings['saturation'] ? settings['saturation'] : 0,
hueRotate = settings['hue-rotate'] ? settings['hue-rotate'] : 0,
_d = darken >= 0 ? 1 + Math.pow(darken, 2) : 1 - Math.pow(darken, 2);
let themeColor = getComputedStyle(document.documentElement).getPropertyValue('--theme-color-base').trim().split(' ');
const darken = settings['darken'] ? settings['darken'] : 0;
const saturation = settings['saturation'] ? settings['saturation'] : 0;
const hueRotate = settings['hue-rotate'] ? settings['hue-rotate'] : 0;
const _d = darken >= 0 ? 1 + Math.pow(darken, 2) : 1 - Math.pow(darken, 2);
settings = saturation >= 0 ? 1 + Math.pow(saturation, 2) : 1 - Math.pow(saturation, 2);
themeColor = `hsl(${(parseInt(themeColor[0]) + hueRotate) % 360}deg ${(parseInt(themeColor[1]) * settings).toFixed(2)}% ${(parseInt(themeColor[2]) * _d).toFixed(2)}%)`;

View File

@ -53,13 +53,13 @@ function fcn_unsetOauth(nonce, channel, id) {
fcn_showNotification(connection.dataset.unset);
} else {
// Failed to unset
connection.style.background = 'var(--warning)';
connection.style.background = 'var(--notice-warning-background)';
fcn_showNotification(response.data.error, 5, 'warning');
}
})
.catch(error => {
if (error.status && error.statusText) {
connection.style.background = 'var(--warning)';
connection.style.background = 'var(--notice-warning-background)';
fcn_showNotification(`${error.status}: ${error.statusText}`, 5, 'warning');
}
})

View File

@ -1,19 +1,3 @@
:root:not(.minimal, .no-background-textures) {
.card {
.card__body {
background-image: var(--layout-background-texture-cards);
}
}
}
:root.minimal {
.card {
&__link-list-item {
padding-left: .35em;
}
}
}
.small-card-block,
.article-card-block {
container-type: inline-size;
@ -34,11 +18,12 @@
}
.card {
--layout-link-color-hover: var(--card-link-color-hover, var(--fg-300));
--this-padding: min(var(--card-body-container-padding, clamp(0.75rem, 3.25cqw, 1.25rem)), 16px);
position: relative;
border-radius: var(--layout-border-radius-small);
max-width: calc(100vw - 20px);
box-shadow: var(--container-box-shadow); // Drop-shadow filter can cause scroll lag in Chromium
box-shadow: var(--card-box-shadow, var(--box-shadow-m));
clear: both;
contain: style layout; // Improve performance
container-type: inline-size; // Enable container query units
@ -77,46 +62,31 @@
}
&._story-unpublished {
filter: var(--card-unavailable-filter);
&::before {
content: attr(data-unavailable);
position: absolute;
inset: 0;
z-index: 100;
display: grid;
place-content: center;
background: var(--card-unavailable-background, var(--card-bg-color));
color: var(--card-unavailable-color, var(--bg-400));
font: 700 max(2.5rem, 8cqw)/1 var(--ff-heading);
text-transform: uppercase;
padding-bottom: 2rem;
border-radius: var(--layout-border-radius-small);
opacity: .9;
}
:is(.card__title, .cell-desc, .cell-list, .cell-img) {
.card__body {
user-select: none;
pointer-events: none;
}
.cell-desc {
position: relative;
min-height: 32px !important;
&::after {
content: '';
position: absolute;
inset: 0;
display: grid;
place-content: center;
background: var(--e-2);
opacity: 0.85;
}
}
.card__unavailable {
position: absolute;
inset: 0;
z-index: 1;
display: grid;
place-content: center;
color: var(--fg-800);
font-family: var(--ff-heading);
font-size: var(--fs-xl);
line-height: 1;
text-transform: uppercase;
font-weight: var(--font-weight-heading);
filter: drop-shadow(0 0 8px var(--e-2)) drop-shadow(0 0 6px var(--e-2)) drop-shadow(0 0 2px var(--e-2));
filter: var(--card-unavailable-filter);
}
}
&.ajax-in-progress > div {
filter: blur(1px);
filter: var(--ajax-in-progress-filter, blur(1px));
}
&.has-last-clicked {
@ -175,7 +145,7 @@
display: flex;
flex-direction: column;
justify-content: space-between;
background-color: var(--e-2);
background-color: var(--card-bg-color);
font-family: var(--ff-card-body);
padding: var(--this-padding);
border-radius: var(--layout-border-radius-small);
@ -183,11 +153,6 @@
transition: filter var(--transition-duration);
}
&__empty {
color: var(--fg-800);
text-align: center;
}
&__header {
display: flex;
align-items: center;
@ -212,11 +177,11 @@
a {
--focus-offset: 1px;
color: var(--story-link);
color: var(--card-heading-link, var(--heading-link-color));
width: fit-content;
&:hover {
color: var(--story-link-hover);
color: var(--card-heading-link-hover, var(--heading-link-color-hover));
}
}
@ -239,7 +204,7 @@
top: 0;
right: 0;
z-index: 2;
color: var(--fg-800);
color: var(--fg-600);
font-size: 14px;
line-height: 1;
text-align: center;
@ -255,9 +220,9 @@
&__label {
cursor: default;
background: var(--card-label-type-background);
color: var(--card-label-type-text);
font: var(--card-type-font-weight) 62.5%/1 var(--ff-base);
background: var(--card-label-background);
color: var(--card-label-color);
font: var(--font-weight-card-label) 62.5%/1 var(--ff-base);
text-shadow: none;
text-transform: uppercase;
padding: .35em .55em;
@ -265,10 +230,10 @@
}
&__sticky-icon {
color: var(--fg-700);
color: var(--fg-600);
font-size: 75%;
line-height: 1;
opacity: .375;
opacity: .3;
}
&__controls {
@ -279,7 +244,7 @@
justify-content: flex-end;
gap: .625em;
flex-shrink: 0;
color: var(--fg-700);
color: var(--fg-600);
line-height: 1;
text-align: right;
padding: .625em .625em 0 0;
@ -287,7 +252,7 @@
min-width: 28px;
> :not(.popup-menu, :focus-visible) {
opacity: .375;
opacity: .3;
}
.popup-menu {
@ -303,7 +268,7 @@
&__image {
--focus-offset: 2px;
position: relative;
background: var(--placeholder-background);
background: var(--card-image-placeholder, var(--placeholder-background));
border-radius: var(--layout-border-radius-small);
overflow: hidden;
@ -331,7 +296,7 @@
text-align: center;
.text-icon {
color: var(--fg-600); // Overrides hover
color: var(--card-text-icon-color, var(--fg-700)); // Overrides hover
}
}
@ -373,12 +338,6 @@
color: var(--fg-600);
font-style: italic;
letter-spacing: 0.03em;
a {
&:hover {
color: var(--layout-link-hover);
}
}
}
&__link-list {
@ -392,7 +351,7 @@
display: flex;
justify-content: space-between;
gap: 0 1.125em;
background: var(--content-list-item-background);
background: var(--card-content-li-background);
padding: 0.175em 0.35em 0.175em 0;
border-radius: var(--layout-border-radius-small);
min-width: 0; // Fix whitespace nowrap issue
@ -421,7 +380,7 @@
.card__right {
flex: 0 0 auto;
color: var(--fg-700);
color: var(--fg-800);
font-size: var(--card-list-right-font-size, clamp(12px, 2.35cqw, 13px));
line-height: 1.5;
@ -432,12 +391,12 @@
}
&__no-taxonomies {
color: var(--fg-600);
color: var(--fg-800);
font-family: var(--ff-base);
}
&__tag-list {
color: var(--fg-800); // Separators, tags have own color
color: var(--fg-700); // Separators, tags have own color
font-family: var(--ff-base);
font-size: var(--card-tags-font-size, clamp(12px, 2.35cqw, 13px));
line-height: 1.5;
@ -454,7 +413,7 @@
position: absolute;
top: 5px;
right: 0;
background: linear-gradient(270deg, var(--e-2) 0%, transparent 100%);
background: linear-gradient(270deg, var(--card-bg-color) 0%, transparent 100%);
height: 85%;
width: 8px;
}
@ -482,16 +441,17 @@
&__footer {
display: flex;
gap: 3px;
color: var(--fg-600);
color: var(--card-footer-color, var(--fg-700));
font-size: var(--card-footer-font-size, clamp(12px, 2.25cqw, 13px));
line-height: 1;
margin-top: var(--card-footer-margin-top, 1em);
&-box {
background: var(--infobox-background);
background-color: var(--card-footer-bg-color);
}
.card-footer-icon {
color: var(--card-footer-icon-color, var(--fg-900));
margin-right: .3em;
&:not(:first-child) {
@ -504,7 +464,7 @@
flex: 0 0 auto;
display: grid;
place-content: center;
color: var(--fg-700);
color: var(--card-footer-rating-color, var(--fg-700));
font-family: var(--ff-heading);
font-weight: 600;
padding: 0 .5rem;
@ -539,7 +499,7 @@
content-visibility: hidden; // Improve performance
flex-direction: column;
justify-content: space-between;
background: var(--infobox-background);
background: var(--card-overlay-bg-color);
font-size: var(--card-overlay-font-size, clamp(12px, 2.5cqw, 14px));
line-height: 1.33;
border-radius: var(--layout-border-radius-small);
@ -555,7 +515,7 @@
.card__footer {
gap: 0;
border-top: 3px solid var(--e-2);
border-top: 3px solid var(--card-bg-color);
margin-top: 0;
> .card__footer-box {
@ -563,7 +523,7 @@
}
.card__footer-box._right {
border-left: 3px solid var(--e-2);
border-left: 3px solid var(--card-bg-color);
}
}
@ -688,7 +648,7 @@
bottom: 0;
display: block;
color: transparent;
background-color: var(--e-2);
background-color: var(--card-bg-color);
padding-left: 1px;
}
@ -712,12 +672,17 @@
transition: color var(--transition-duration);
&:hover {
color: var(--fg-500);
color: var(--fg-600);
}
}
.bold-link {
color: var(--fg-600);
font-weight: var(--font-weight-medium);
&:hover {
color: var(--fg-400);
}
}
a[data-lightbox] {

View File

@ -1,9 +1,3 @@
:root:not(.no-background-textures, .minimal) body .chapter__background {
background: {
image: var(--layout-background-texture-chapter);
}
}
.main {
&:is(._below-768, ._640-and-below) {
.chapter {
@ -110,7 +104,7 @@
padding-bottom: 2.5rem;
> a {
color: var(--fg-600);
color: var(--fg-700);
font-size: var(--fs-s);
font-weight: var(--font-weight-medium);
line-height: 1;
@ -130,9 +124,13 @@
&__author {
display: block;
color: var(--fg-600);
color: var(--fg-700);
font-size: var(--fs-xs);
margin-top: .5rem;
a:hover {
color: var(--fg-400);
}
}
&__password-note {
@ -202,7 +200,7 @@
}
&__support {
color: var(--fg-500);
color: var(--fg-400);
font-size: var(--fs-xs);
font-weight: var(--font-weight-strong);
text-align: center;
@ -211,7 +209,7 @@
&-message {
text-transform: uppercase;
opacity: .45;
opacity: .5;
}
&-links {
@ -222,7 +220,7 @@
margin: 8px -8px 0;
:is(i, .icon) {
color: var(--fg-600);
color: var(--fg-500);
margin-right: 2px;
}
@ -233,22 +231,18 @@
}
a {
color: var(--fg-500);
color: var(--fg-400);
font-size: var(--fs-xs);
line-height: 32px;
padding: 0 8px;
border-radius: var(--layout-border-radius-small);
height: 32px;
opacity: .45;
opacity: .5;
&:hover,
&:focus-visible {
background: var(--button-secondary-background-hover);
opacity: 1;
i {
color: inherit;
}
}
}
@ -266,7 +260,7 @@
}
&__warning.infobox {
color: var(--warning);
color: var(--red-400);
font-weight: var(--font-weight-medium);
p {
@ -329,7 +323,7 @@
&[data-bookmark-color=beta] {
&::before,
#button-set-bookmark {
color: var(--bookmark-button-text-active-beta);
color: var(--bookmark-button-color-active-beta);
background: var(--bookmark-color-beta);
}
}
@ -337,7 +331,7 @@
&[data-bookmark-color=gamma] {
&::before,
#button-set-bookmark {
color: var(--bookmark-button-text-active-gamma);
color: var(--bookmark-button-color-active-gamma);
background: var(--bookmark-color-gamma);
}
}
@ -345,14 +339,14 @@
&[data-bookmark-color=delta] {
&::before,
#button-set-bookmark {
color: var(--bookmark-button-text-active-delta);
color: var(--bookmark-button-color-active-delta);
background: var(--bookmark-color-delta);
}
}
#button-set-bookmark {
background: var(--button-bookmark-background-active);
color: var(--bookmark-button-text-active-alpha);
color: var(--bookmark-button-color-active-alpha);
}
}

View File

@ -5,7 +5,7 @@
z-index: 1000;
display: flex;
background: var(--consent-banner-background);
color: var(--consent-banner-text);
color: var(--consent-banner-color);
padding: 1.25rem 1rem;
width: 100%;
max-width: 100vw;

View File

@ -86,7 +86,7 @@
.follow-notifications {
position: absolute;
right: -107px;
background: var(--navigation-item-active-submenu-background);
background: var(--navigation-submenu-background);
border-radius: 0 0 var(--layout-border-radius-small) var(--layout-border-radius-small);
width: 320px;
box-shadow: var(--navigation-submenu-box-shadow);
@ -102,10 +102,10 @@
}
.follow-item {
--focus-offset: -6px;
--focus-offset: -2px;
&:not(:last-child) {
border-bottom: 1px solid var(--navigation-item-active-submenu-secant);
border-bottom: var(--navigation-subitem-divider);
}
&:not(._new) {
@ -117,22 +117,27 @@
}
.follow-wrapper {
background: var(--navigation-item-active-submenu-background);
background: var(--navigation-submenu-background);
font-size: var(--fs-xs);
padding: .35rem .75rem .45rem;
&:hover {
background: var(--navigation-subitem-active-background);
background: var(--navigation-subitem-background-hover);
}
}
:is(.follow-placeholder, .follow-meta) {
color: var(--follow-meta-color);
color: var(--follow-meta-color, var(--fg-700));
font-family: var(--ff-note);
}
.follow-title-link {
color: var(--follow-title-color);
--focus-outline: none;
color: var(--follow-title-link-color, var(--fg-400));
&:hover {
color: var(--follow-title-link-color-hover, var(--fg-200));
}
}
.follow-meta {
@ -167,7 +172,7 @@
}
.follow-meta {
color: var(--fg-600);
color: var(--fg-700);
font-size: 11px;
}

View File

@ -1,4 +1,5 @@
.footer {
--layout-link-color-hover: var(--footer-link-color-hover, var(--fg-300));
position: relative;
color: var(--fg-700);
font-size: 12px;

View File

@ -1,6 +1,6 @@
.header {
position: relative;
height: var(--layout-site-header-height);
height: var(--header-height);
width: 100%;
contain: style size; // Improves performance
@ -15,7 +15,6 @@
top: 50%;
left: 50%;
transform: translate3d(-50%, -50%, 0);
filter: var(--layout-site-logo-filter);
content-visibility: auto;
}
@ -24,8 +23,8 @@
}
.custom-logo {
height: var(--layout-site-logo-height);
max-height: calc(var(--layout-site-header-height) - 2rem);
height: var(--header-logo-height);
max-height: calc(var(--header-height) - 2rem);
width: fit-content;
object-fit: contain;
}
@ -33,11 +32,14 @@
&__title {
position: relative;
top: 40%;
text-shadow: var(--site-title-text-shadow);
padding: 16px var(--layout-spacing-horizontal);
transform: translateY(-50%);
content-visibility: auto;
&:not(._no-text-shadow) {
text-shadow: var(--site-title-text-shadow);
}
&-heading {
font: 700 var(--site-title-font-size)/1.3 var(--ff-site-title);
letter-spacing: 0;
@ -62,16 +64,15 @@
top: -6px;
left: 0;
right: 0;
height: calc(var(--layout-header-background-height) + 6px); // Offset wrapper margin
height: calc(var(--header-image-height) + 6px); // Offset wrapper margin
width: 100%;
filter: var(--layout-header-background-filter);
transform: translate3d(0, 0, 0);
backface-visibility: hidden;
content-visibility: auto;
contain: content; // Improve performance
&._shadow {
filter: var(--layout-header-background-drop-shadow);
filter: var(--header-image-drop-shadow);
}
&._fading-bottom {
@ -81,7 +82,7 @@
&__wrapper {
height: calc(100% - 6px); // Offset margin
background: var(--e-body);
background: var(--placeholder-background);
margin-top: 6px;
overflow: hidden;
transform: translateZ(0); // Safari fix

View File

@ -4,13 +4,13 @@
&__item {
display: flex;
align-items: center;
color: var(--navigation-actions-text);
color: var(--navigation-color);
font-size: inherit;
padding: 0 10px;
height: var(--navigation-height);
&:hover {
color: var(--fg-200);
color: var(--navigation-color-hover);
}
}
@ -88,15 +88,14 @@
}
&:hover {
color: var(--navigation-actions-text-hover);
background: var(--navigation-item-active-background);
background: var(--navigation-item-background-hover);
}
}
&__menu {
&:hover {
> :first-child {
background: var(--navigation-item-active-submenu-background);
background: var(--navigation-submenu-background);
}
.sub-menu {
@ -126,21 +125,22 @@
.icon-menu {
&__item {
&:focus-visible {
color: var(--navigation-actions-text-hover);
background: var(--navigation-item-active-background);
color: var(--navigation-color-hover);
background: var(--navigation-item-background-hover);
}
}
&__menu {
&:focus-within {
> :first-child {
background: var(--navigation-item-active-submenu-background);
background: var(--navigation-submenu-background);
}
> .sub-menu {
pointer-events: initial;
opacity: 1;
content-visibility: visible;
transform: scale(1);
}
}
}

View File

@ -42,7 +42,7 @@
display: grid;
place-content: center;
background: none;
color: var(--micro-menu-text);
color: var(--micro-menu-color);
font-size: 16px;
line-height: 1;
border: none;
@ -52,7 +52,7 @@
&:hover {
background: inherit;
color: var(--micro-menu-text-hover);
color: var(--micro-menu-color-hover);
}
}

View File

@ -1,14 +1,24 @@
:root.minimal {
body {
--text-shadow: none;
--mobile-menu-text-shadow: none;
--floating-shadow: none;
--container-drop-shadow: none;
--figure-drop-shadow: none;
--paragraph-tools-filter: none;
--layout-main-filter: none;
--content-list-item-background: var(--content-list-item-background-full);
--embed-box-shadow: var(--minimal-container-box-shadow);
--layout-spacing-horizontal-minimal: 10px;
--layout-spacing-vertical-minimal: 10px;
@include bp(375px) {
--layout-spacing-horizontal-minimal: 20px;
--layout-spacing-vertical-minimal: 20px;
}
@include bp(phablet) {
--layout-spacing-horizontal-minimal: 32px;
}
@include bp(tablet) {
--layout-spacing-horizontal-minimal: 48px;
--layout-spacing-vertical-minimal: 32px;
}
@include bp(desktop) {
--layout-spacing-horizontal-minimal: 80px;
--layout-spacing-vertical-minimal: 48px;
}
.custom-background {
@ -20,12 +30,8 @@
content-visibility: hidden;
}
:is(.card, .showcase__list-item, .story__thumbnail-image, .modal__wrapper, .cookies__list, .litrpg-frame) {
box-shadow: var(--minimal-container-box-shadow);
}
&:not(:fullscreen, :-webkit-full-screen) .main__background {
box-shadow: var(--minimal-main-box-shadow);
:is(.showcase__list-item, .story__thumbnail-image) {
box-shadow: none;
}
@include bp(640px) {
@ -47,6 +53,30 @@
transform: none;
}
.card {
&__link-list-item {
padding-left: .35em;
}
}
.chapter-group__list-item-link {
grid-area: 1 / 1 / 2 / 3;
padding-left: 8px;
}
.chapter-group__list-item-subrow {
grid-area: 2 / 1 / 3 / 3;
padding-left: 8px;
}
.chapter-group__list-item-icon {
display: none;
}
.story__blog-list-item {
padding: .5rem 8px;
}
:is(.progress, .header-background__wrapper) {
display: none;
content-visibility: hidden;
@ -69,74 +99,18 @@
}
.padding-left {
padding-left: 10px;
@include bp(375px) {
padding-left: 20px;
}
@include bp(phablet) {
padding-left: 32px;
}
@include bp(tablet) {
padding-left: 48px;
}
@include bp(desktop) {
padding-left: 80px;
}
padding-left: var(--layout-spacing-horizontal-minimal);
}
.padding-right {
padding-right: 10px;
@include bp(375px) {
padding-right: 20px;
}
@include bp(phablet) {
padding-right: 32px;
}
@include bp(tablet) {
padding-right: 48px;
}
@include bp(desktop) {
padding-right: 80px;
}
padding-right: var(--layout-spacing-horizontal-minimal);
}
.padding-top {
padding-top: 10px;
@include bp(375px) {
padding-top: 20px;
}
@include bp(tablet) {
padding-top: 32px;
}
@include bp(desktop) {
padding-top: 48px;
}
padding-top: var(--layout-spacing-vertical-minimal);
}
.padding-bottom {
padding-bottom: 10px;
@include bp(375px) {
padding-bottom: 20px;
}
@include bp(tablet) {
padding-bottom: 32px;
}
@include bp(desktop) {
padding-bottom: 48px;
}
padding-bottom: var(--layout-spacing-vertical-minimal);
}
}

View File

@ -14,11 +14,6 @@ $max-mobile-menu-width: 320px;
height: 134vh; // Fallback
height: 134dvh;
}
@include bp(1024px) {
height: 100vh; // Fallback
height: 100dvh;
}
}
.transformed-site {
@ -33,12 +28,6 @@ $max-mobile-menu-width: 320px;
transform: translate3d(min(75vw, #{$max-mobile-menu-width}), 0, 0) scale(.75);
}
@include bp(1024px) {
position: relative;
left: max(50% - (var(--site-width) - #{$max-mobile-menu-width}) / 2, #{$max-mobile-menu-width});
transform: translate3d(0, 0, 0);
}
> :is(nav, header, main, footer, div) {
pointer-events: none;
}
@ -64,7 +53,7 @@ body:not(.mobile-menu-open) {
inset: 0 100% -128px 0;
z-index: 100000; // Above adminbar
display: block;
background: #000;
background: var(--mobile-menu-overlay);
opacity: 0;
transition: opacity 0.3s, right 0s;
transition-delay: 0s, 0.3s; // Delay instant movement of overlay until fade is done
@ -82,11 +71,6 @@ body:not(.mobile-menu-open) {
&.advanced-mobile-menu {
overflow: hidden;
@include bp(desktop) {
left: max(50% - var(--site-width) / 2, (min(75vw, #{$max-mobile-menu-width}) / 2));
transform: translate3d(-50%, 0, 0);
}
#wpadminbar {
opacity: 0;
}
@ -102,7 +86,7 @@ body:not(.mobile-menu-open) {
#site {
&::before {
inset: 0 0 -128px;
opacity: 0.5;
opacity: 1;
transition: opacity 0.3s; // Override transition of overlay position
}
}
@ -133,12 +117,12 @@ body:not(.mobile-menu-open) {
background-color: var(--mobile-menu-background);
font-size: 15px;
line-height: 1.66; // ~ 25px @ 15px
text-shadow: var(--mobile-menu-text-shadow);
text-shadow: var(--mobile-menu-text-shadow, var(--text-shadow));
padding: 16px 16px 144px;
width: 100%;
max-width: min(75vw, #{$max-mobile-menu-width});
overflow: auto;
box-shadow: var(--mobile-menu-site-box-shadow);
box-shadow: var(--mobile-menu-box-shadow);
opacity: 0;
transition: left 0.3s, opacity 0.3s;
@ -240,7 +224,7 @@ body:not(.mobile-menu-open) {
max-width: min(calc(75vw - 32px), #{$max-mobile-menu-width - 32px});
&:not(:last-child) {
border-bottom: 1px solid var(--layout-color-lineart);
border-bottom: var(--mobile-menu-panel-border, var(--layout-hr-border));
}
&-header {
@ -248,7 +232,7 @@ body:not(.mobile-menu-open) {
align-items: center;
justify-content: space-between;
padding-bottom: 8px;
border-bottom: 1px dashed var(--layout-color-lineart);
border-bottom: var(--mobile-menu-panel-header-border, var(--layout-hr-border-dashed));
}
.icon._font-settings {
@ -376,7 +360,7 @@ body:not(.mobile-menu-open) {
.current-chapter {
position: relative;
background: var(--mobile-menu-current-chapter-background);
color: var(--mobile-menu-current-chapter-text);
color: var(--mobile-menu-current-chapter-color);
border-radius: var(--layout-border-radius-small);
width: calc(100% + 4px);
@ -399,7 +383,7 @@ body:not(.mobile-menu-open) {
&::after {
content: unicode("f0d8");
display: inline-block;
color: var(--fg-700);
color: var(--fg-800);
font-family: 'Font Awesome 6 Free';
font-size: 75%;
font-weight: 900;

View File

@ -46,7 +46,7 @@
// Case above or equal to 1024px
:root:not(.no-nav-sticky) body:not(.scrolled-to-top) .main-navigation.is-sticky {
.main-navigation__background {
opacity: var(--navigation-background-sticky-end-opacity);
opacity: var(--navigation-background-end-opacity);
}
.main-navigation__list > :is(.menu-item, .page_item) {
@ -58,7 +58,7 @@
:root:not(.no-nav-sticky, .header-style-overlay) .main-navigation.is-sticky {
.main-navigation__background {
@media only screen and (max-width: 1023px) {
opacity: var(--navigation-background-sticky-end-opacity);
opacity: var(--navigation-background-end-opacity);
}
}
}
@ -73,7 +73,7 @@
// Overlay nav
.header-style-overlay {
--navigation-height: 48px;
--navigation-background-sticky-start-opacity: 1;
--navigation-background-start-opacity: 1;
.main-navigation {
margin: 0 0 calc(-1 * var(--navigation-height));
@ -98,10 +98,9 @@
--focus-offset: -2px;
top: calc(-0.1px - var(--nav-observer-offset, 0px));
z-index: 1000;
color: var(--navigation-text);
color: var(--navigation-color);
font-size: get_clamp(14, 16, 375, 768);
font-weight: var(--font-weight-navigation);
text-shadow: var(--navigation-text-shadow);
padding: 0;
margin: 12px 0;
width: 100%;
@ -114,9 +113,9 @@
inset: 0;
z-index: -1;
display: block;
background: var(--navigation-background-sticky);
background: var(--navigation-background);
box-shadow: 0 0 1px transparent; // Safari fix to show drop-shadow
opacity: var(--navigation-background-sticky-start-opacity);
opacity: var(--navigation-background-start-opacity);
filter: var(--navigation-drop-shadow);
contain: strict; // Improve performance
}
@ -195,7 +194,7 @@
border-radius: var(--layout-border-radius-small) var(--layout-border-radius-small) 0 0;
&:hover {
background: var(--navigation-item-active-submenu-background);
background: var(--navigation-submenu-background);
}
}
}
@ -223,7 +222,7 @@
}
&:hover {
background: var(--navigation-item-active-background);
background: var(--navigation-item-background-hover);
}
&.menu-item-has-children {
@ -242,7 +241,6 @@
display: flex;
align-items: center;
justify-content: space-between;
color: var(--navigation-text);
font-family: var(--ff-nav-item);
line-height: 1.2;
letter-spacing: get_relative_clamp(-0.01, 0, 375, 480, 'vw', 'em');
@ -251,7 +249,7 @@
padding: 0 1rem;
&:hover {
color: var(--navigation-text-hover);
color: var(--navigation-color-hover);
}
}
}
@ -274,7 +272,7 @@
}
.menu-item {
background: var(--navigation-item-active-submenu-background);
background: var(--navigation-submenu-background);
&:last-child {
border-radius: 0 0 var(--layout-border-radius-small) var(--layout-border-radius-small);
@ -293,7 +291,7 @@
}
&:hover {
background: var(--navigation-subitem-active-background);
background: var(--navigation-subitem-background-hover);
}
}
@ -353,11 +351,13 @@
.main-navigation {
:is(.menu-item, .page_item) {
&:focus-within {
background: var(--navigation-item-active-background);
background: var(--navigation-item-background-hover);
> .sub-menu {
pointer-events: initial;
opacity: 1;
content-visibility: visible;
transform: scale(1);
}
}
}

Some files were not shown because too many files have changed in this diff Show More