-
-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
theme: fix flash of non-default variant, part II #757
adapt the variant generator to previous changes; interestingly, the new mechanism caused the variant generator to be greatly simplified; something, I didn't expect beforehand
- Loading branch information
Showing
22 changed files
with
328 additions
and
343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
exampleSite/content/configuration/branding/generator/_index.pir.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
exampleSite/layouts/partials/dependencies/variantgenerator.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{{- $page := .page }} | ||
{{- $location := .location }} | ||
{{- if eq $location "header" }} | ||
{{- with $page }} | ||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }} | ||
<script src="{{"js/variant.js" | relURL}}{{ $assetBusting }}"></script> | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{{ partial "shortcodes/notice.html" (dict | ||
"page" .Page | ||
"style" "note" | ||
"content" "The <code>CODE-theme</code> parameter can be changed in the generator but the change will not be reflected dynamically in the page preview." | ||
)}} | ||
{{ partial "shortcodes/button.html" (dict | ||
"page" .Page | ||
"href" "javascript:window.variants&&variants.getStylesheet();this.blur();" | ||
"style" "secondary" | ||
"icon" "download" | ||
"content" "Download variant" | ||
)}} | ||
{{ partial "shortcodes/button.html" (dict | ||
"page" .Page | ||
"href" "javascript:window.variants&&variants.resetVariant();this.blur();" | ||
"style" "warning" | ||
"icon" "trash" | ||
"content" "Reset variant" | ||
)}} | ||
<div id="R-vargenerator" class="mermaid zoomable" style="background-color: var(--INTERNAL-MAIN-TEXT-color);"> | ||
Graph | ||
</div> | ||
{{ partial "shortcodes/button.html" (dict | ||
"page" .Page | ||
"href" "javascript:window.variants&&variants.getStylesheet();this.blur();" | ||
"style" "secondary" | ||
"icon" "download" | ||
"content" "Download variant" | ||
)}} | ||
{{ partial "shortcodes/button.html" (dict | ||
"page" .Page | ||
"href" "javascript:window.variants&&variants.resetVariant();this.blur();" | ||
"style" "warning" | ||
"icon" "trash" | ||
"content" "Reset variant" | ||
)}} | ||
<script> | ||
window.variants && variants.generator( '#R-vargenerator' ); | ||
</script> | ||
{{- /* the variant generator also requires Mermaid; so as there is no Mermaid | ||
shortcode involved here to create the graph, we have to take care | ||
to load it our self; the quickest way to do this is, to set the | ||
Mermaid dependency as well */}} | ||
{{- .Page.Store.Set "hasMermaid" true }} | ||
{{- .Page.Store.Set "hasVariantGenerator" true }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
7.1.1+2c5ac2b60022b3ec8e9e275bfeb2d5ebc77d9bc0 | ||
7.1.1+0505b36141f2a69dc36be8589c0678783cad98a9 |
Oops, something went wrong.