mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-22 14:35:43 -06:00
added layoutBackgroundBlur parameter to articles
This commit is contained in:
parent
837cb9c19e
commit
1b0c182819
9 changed files with 1299 additions and 206 deletions
|
@ -1,6 +1,6 @@
|
|||
/*! Blowfish v0.0.1 | MIT License | https://github.com/nunocoracao/blowfish */
|
||||
/*! Blowfish | MIT License | https://github.com/nunocoracao/blowfish */
|
||||
|
||||
/*! tailwindcss v3.2.1 | MIT License | https://tailwindcss.com */
|
||||
/*! tailwindcss v3.2.3 | MIT License | https://tailwindcss.com */
|
||||
|
||||
/*
|
||||
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
||||
|
@ -30,6 +30,7 @@
|
|||
2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
3. Use a more readable tab size.
|
||||
4. Use the user's configured `sans` font-family by default.
|
||||
5. Use the user's configured `sans` font-feature-settings by default.
|
||||
*/
|
||||
|
||||
html {
|
||||
|
@ -44,6 +45,8 @@ html {
|
|||
/* 3 */
|
||||
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
/* 4 */
|
||||
font-feature-settings: normal;
|
||||
/* 5 */
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -629,53 +632,6 @@ select {
|
|||
--tw-backdrop-sepia: ;
|
||||
}
|
||||
|
||||
::-webkit-backdrop {
|
||||
--tw-border-spacing-x: 0;
|
||||
--tw-border-spacing-y: 0;
|
||||
--tw-translate-x: 0;
|
||||
--tw-translate-y: 0;
|
||||
--tw-rotate: 0;
|
||||
--tw-skew-x: 0;
|
||||
--tw-skew-y: 0;
|
||||
--tw-scale-x: 1;
|
||||
--tw-scale-y: 1;
|
||||
--tw-pan-x: ;
|
||||
--tw-pan-y: ;
|
||||
--tw-pinch-zoom: ;
|
||||
--tw-scroll-snap-strictness: proximity;
|
||||
--tw-ordinal: ;
|
||||
--tw-slashed-zero: ;
|
||||
--tw-numeric-figure: ;
|
||||
--tw-numeric-spacing: ;
|
||||
--tw-numeric-fraction: ;
|
||||
--tw-ring-inset: ;
|
||||
--tw-ring-offset-width: 0px;
|
||||
--tw-ring-offset-color: #fff;
|
||||
--tw-ring-color: rgb(59 130 246 / 0.5);
|
||||
--tw-ring-offset-shadow: 0 0 #0000;
|
||||
--tw-ring-shadow: 0 0 #0000;
|
||||
--tw-shadow: 0 0 #0000;
|
||||
--tw-shadow-colored: 0 0 #0000;
|
||||
--tw-blur: ;
|
||||
--tw-brightness: ;
|
||||
--tw-contrast: ;
|
||||
--tw-grayscale: ;
|
||||
--tw-hue-rotate: ;
|
||||
--tw-invert: ;
|
||||
--tw-saturate: ;
|
||||
--tw-sepia: ;
|
||||
--tw-drop-shadow: ;
|
||||
--tw-backdrop-blur: ;
|
||||
--tw-backdrop-brightness: ;
|
||||
--tw-backdrop-contrast: ;
|
||||
--tw-backdrop-grayscale: ;
|
||||
--tw-backdrop-hue-rotate: ;
|
||||
--tw-backdrop-invert: ;
|
||||
--tw-backdrop-opacity: ;
|
||||
--tw-backdrop-saturate: ;
|
||||
--tw-backdrop-sepia: ;
|
||||
}
|
||||
|
||||
::backdrop {
|
||||
--tw-border-spacing-x: 0;
|
||||
--tw-border-spacing-y: 0;
|
||||
|
@ -1204,151 +1160,6 @@ select {
|
|||
border-radius: 0.12rem;
|
||||
}
|
||||
|
||||
.prose-sm :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 0.5714286em;
|
||||
margin-bottom: 0.5714286em;
|
||||
}
|
||||
|
||||
.prose-sm :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 1.1428571em;
|
||||
}
|
||||
|
||||
.prose-sm :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-bottom: 1.1428571em;
|
||||
}
|
||||
|
||||
.prose-sm :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 1.1428571em;
|
||||
}
|
||||
|
||||
.prose-sm :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-bottom: 1.1428571em;
|
||||
}
|
||||
|
||||
.prose-sm :where(.prose > :first-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.prose-sm :where(.prose > :last-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.prose-base :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 0.75em;
|
||||
margin-bottom: 0.75em;
|
||||
}
|
||||
|
||||
.prose-base :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 1.25em;
|
||||
}
|
||||
|
||||
.prose-base :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-bottom: 1.25em;
|
||||
}
|
||||
|
||||
.prose-base :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 1.25em;
|
||||
}
|
||||
|
||||
.prose-base :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-bottom: 1.25em;
|
||||
}
|
||||
|
||||
.prose-base :where(.prose > :first-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.prose-base :where(.prose > :last-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.prose-lg :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 0.8888889em;
|
||||
margin-bottom: 0.8888889em;
|
||||
}
|
||||
|
||||
.prose-lg :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 1.3333333em;
|
||||
}
|
||||
|
||||
.prose-lg :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-bottom: 1.3333333em;
|
||||
}
|
||||
|
||||
.prose-lg :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 1.3333333em;
|
||||
}
|
||||
|
||||
.prose-lg :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-bottom: 1.3333333em;
|
||||
}
|
||||
|
||||
.prose-lg :where(.prose > :first-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.prose-lg :where(.prose > :last-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.prose-xl :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
|
||||
.prose-xl :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 1.2em;
|
||||
}
|
||||
|
||||
.prose-xl :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-bottom: 1.2em;
|
||||
}
|
||||
|
||||
.prose-xl :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 1.2em;
|
||||
}
|
||||
|
||||
.prose-xl :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-bottom: 1.2em;
|
||||
}
|
||||
|
||||
.prose-xl :where(.prose > :first-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.prose-xl :where(.prose > :last-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.prose-2xl :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 0.8333333em;
|
||||
margin-bottom: 0.8333333em;
|
||||
}
|
||||
|
||||
.prose-2xl :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 1.3333333em;
|
||||
}
|
||||
|
||||
.prose-2xl :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-bottom: 1.3333333em;
|
||||
}
|
||||
|
||||
.prose-2xl :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 1.3333333em;
|
||||
}
|
||||
|
||||
.prose-2xl :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-bottom: 1.3333333em;
|
||||
}
|
||||
|
||||
.prose-2xl :where(.prose > :first-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.prose-2xl :where(.prose > :last-child):not(:where([class~="not-prose"] *)) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*! Blowfish v0.0.1 | MIT License | https://github.com/nunocoracao/blowfish */
|
||||
/*! Blowfish | MIT License | https://github.com/nunocoracao/blowfish */
|
||||
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
|
|
1283
assets/lib/mermaid/mermaid.min.js
vendored
1283
assets/lib/mermaid/mermaid.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -44,6 +44,7 @@ enableCodeCopy = true
|
|||
showAuthor = true
|
||||
showHero = true
|
||||
heroStyle = "basic" # valid options: basic, big, background
|
||||
layoutBackgroundBlur = false # only used when heroStyle equals background
|
||||
showBreadcrumbs = true
|
||||
showDraftLabel = true
|
||||
showEdit = true
|
||||
|
|
|
@ -44,6 +44,7 @@ mainSections = ["docs"]
|
|||
showAuthor = true
|
||||
showHero = true
|
||||
heroStyle = "background" # valid options: basic, big, background
|
||||
layoutBackgroundBlur = true # only used when heroStyle equals background
|
||||
showBreadcrumbs = true
|
||||
showDraftLabel = true
|
||||
showEdit = true
|
||||
|
|
|
@ -159,6 +159,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
| `article.showAuthor` | `true` | Whether or not the author box is displayed in the article footer. |
|
||||
| `article.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each article page. |
|
||||
| `article.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`. |
|
||||
| `article.layoutBackgroundBlur` | `false` | Makes the background image in the background article heroStyle blur with the scroll |
|
||||
| `article.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the article header. |
|
||||
| `article.showDraftLabel` | `true` | Whether or not the draft indicator is shown next to articles when site is built with `--buildDrafts`. |
|
||||
| `article.showEdit` | `false` | Whether or not the link to edit the article content should be displayed. |
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
class="absolute inset-0 opacity-30 dark:opacity-60 bg-gradient-to-t from-neutral dark:from-neutral-800 to-neutral dark:to-neutral-800 mix-blend-normal">
|
||||
</div>
|
||||
</div>
|
||||
{{ if $.Site.Params.article.layoutBackgroundBlur | default false }}
|
||||
<div id="background-blur" class="fixed opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom backdrop-blur-2xl"></div>
|
||||
<script>
|
||||
window.addEventListener('scroll', function (e) {
|
||||
|
@ -21,4 +22,5 @@
|
|||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
14
package-lock.json
generated
14
package-lock.json
generated
|
@ -16,7 +16,7 @@
|
|||
"commander": "^9.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/typography": "^0.5.7",
|
||||
"@tailwindcss/typography": "^0.5.8",
|
||||
"chart.js": "^3.9.1",
|
||||
"fuse.js": "^6.6.2",
|
||||
"katex": "^0.16.3",
|
||||
|
@ -102,9 +102,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@tailwindcss/typography": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.7.tgz",
|
||||
"integrity": "sha512-JTTSTrgZfp6Ki4svhPA4mkd9nmQ/j9EfE7SbHJ1cLtthKkpW2OxsFXzSmxbhYbEkfNIyAyhle5p4SYyKRbz/jg==",
|
||||
"version": "0.5.8",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.8.tgz",
|
||||
"integrity": "sha512-xGQEp8KXN8Sd8m6R4xYmwxghmswrd0cPnNI2Lc6fmrC3OojysTBJJGSIVwPV56q4t6THFUK3HJ0EaWwpglSxWw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lodash.castarray": "^4.4.0",
|
||||
|
@ -2064,9 +2064,9 @@
|
|||
}
|
||||
},
|
||||
"@tailwindcss/typography": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.7.tgz",
|
||||
"integrity": "sha512-JTTSTrgZfp6Ki4svhPA4mkd9nmQ/j9EfE7SbHJ1cLtthKkpW2OxsFXzSmxbhYbEkfNIyAyhle5p4SYyKRbz/jg==",
|
||||
"version": "0.5.8",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.8.tgz",
|
||||
"integrity": "sha512-xGQEp8KXN8Sd8m6R4xYmwxghmswrd0cPnNI2Lc6fmrC3OojysTBJJGSIVwPV56q4t6THFUK3HJ0EaWwpglSxWw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash.castarray": "^4.4.0",
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/nunocoracao/blowfish#readme",
|
||||
"devDependencies": {
|
||||
"@tailwindcss/typography": "^0.5.7",
|
||||
"@tailwindcss/typography": "^0.5.8",
|
||||
"chart.js": "^3.9.1",
|
||||
"fuse.js": "^6.6.2",
|
||||
"katex": "^0.16.3",
|
||||
|
|
Loading…
Reference in a new issue