fix build issue with search

This commit is contained in:
semanticdata 2024-01-19 10:46:44 -06:00
parent 0beb7ebcc6
commit 877e1b5c46
31 changed files with 689 additions and 1291 deletions

View File

@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea or improvement for Quartz
title: ""
labels: enhancement
assignees: ""
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

1731
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -34,16 +34,16 @@
"quartz": "./quartz/bootstrap-cli.mjs" "quartz": "./quartz/bootstrap-cli.mjs"
}, },
"dependencies": { "dependencies": {
"@clack/prompts": "^0.6.3", "@clack/prompts": "^0.7.0",
"@floating-ui/dom": "^1.4.0", "@floating-ui/dom": "^1.5.3",
"@napi-rs/simple-git": "^0.1.9", "@napi-rs/simple-git": "0.1.9",
"async-mutex": "^0.4.0", "async-mutex": "^0.4.0",
"chalk": "^5.3.0", "chalk": "^5.3.0",
"chokidar": "^3.5.3", "chokidar": "^3.5.3",
"cli-spinner": "^0.2.10", "cli-spinner": "^0.2.10",
"d3": "^7.8.5", "d3": "^7.8.5",
"esbuild-sass-plugin": "^2.12.0", "esbuild-sass-plugin": "^2.16.0",
"flexsearch": "^0.7.21", "flexsearch": "0.7.21",
"github-slugger": "^2.0.0", "github-slugger": "^2.0.0",
"globby": "^14.0.0", "globby": "^14.0.0",
"gray-matter": "^4.0.3", "gray-matter": "^4.0.3",
@ -52,10 +52,10 @@
"hast-util-to-string": "^3.0.0", "hast-util-to-string": "^3.0.0",
"is-absolute-url": "^4.0.1", "is-absolute-url": "^4.0.1",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"lightningcss": "^1.21.7", "lightningcss": "^1.22.1",
"mdast-util-find-and-replace": "^2.2.2", "mdast-util-find-and-replace": "^3.0.1",
"mdast-util-to-hast": "^12.3.0", "mdast-util-to-hast": "^13.0.2",
"mdast-util-to-string": "^3.2.0", "mdast-util-to-string": "^4.0.0",
"micromorph": "^0.4.5", "micromorph": "^0.4.5",
"preact": "^10.19.3", "preact": "^10.19.3",
"preact-render-to-string": "^6.3.1", "preact-render-to-string": "^6.3.1",
@ -97,14 +97,14 @@
"@types/hast": "^3.0.3", "@types/hast": "^3.0.3",
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"@types/node": "^20.1.2", "@types/node": "^20.1.2",
"@types/pretty-time": "^1.1.2", "@types/pretty-time": "^1.1.5",
"@types/source-map-support": "^0.5.6", "@types/source-map-support": "^0.5.10",
"@types/workerpool": "^6.4.0", "@types/workerpool": "^6.4.7",
"@types/ws": "^8.5.5", "@types/ws": "^8.5.10",
"@types/yargs": "^17.0.24", "@types/yargs": "^17.0.32",
"esbuild": "^0.19.2", "esbuild": "^0.19.9",
"prettier": "^3.0.0", "prettier": "^3.1.1",
"tsx": "^3.12.7", "tsx": "^4.6.2",
"typescript": "^5.0.4" "typescript": "^5.3.3"
} }
} }

View File

@ -20,29 +20,26 @@ export const sharedPageComponents: SharedLayout = {
// components for pages that display a single page (e.g. a single note) // components for pages that display a single page (e.g. a single note)
export const defaultContentPageLayout: PageLayout = { export const defaultContentPageLayout: PageLayout = {
beforeBody: [ beforeBody: [
// Component.Breadcrumbs(), Component.Breadcrumbs(),
Component.ArticleTitle(), Component.ArticleTitle(),
Component.ContentMeta(), Component.ContentMeta(),
// Component.TagList(), // Component.TagList(),
Component.MobileOnly(Component.TableOfContents()), Component.MobileOnly(Component.TableOfContents()),
Component.MobileOnly(Component.Spacer()), // Component.MobileOnly(Component.Spacer()),
], ],
left: [ left: [
Component.PageTitle(), Component.PageTitle(),
Component.Search(),
Component.MobileOnly(Component.Spacer()), Component.MobileOnly(Component.Spacer()),
Component.Search(),
Component.Darkmode(), Component.Darkmode(),
Component.DesktopOnly(Component.Explorer()), Component.DesktopOnly(Component.Explorer()),
Component.DesktopOnly(Component.Spacer()), // Component.DesktopOnly(Component.Spacer()),
Component.DesktopOnly(Component.Backlinks()), // Component.DesktopOnly(Component.Backlinks()),
], ],
right: [ right: [
Component.Graph(), Component.Graph(),
Component.DesktopOnly(Component.Spacer()),
Component.DesktopOnly(Component.TableOfContents()), Component.DesktopOnly(Component.TableOfContents()),
Component.MobileOnly(Component.Backlinks()), Component.MobileOnly(Component.Backlinks()),
Component.MobileOnly(Component.Spacer()),
Component.MobileOnly(Component.Explorer()),
], ],
} }
@ -51,11 +48,9 @@ export const defaultListPageLayout: PageLayout = {
beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()], beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()],
left: [ left: [
Component.PageTitle(), Component.PageTitle(),
Component.MobileOnly(Component.Spacer()),
Component.Search(), Component.Search(),
Component.Darkmode(), Component.Darkmode(),
Component.MobileOnly(Component.Spacer()),
Component.DesktopOnly(Component.Explorer())], Component.DesktopOnly(Component.Explorer())],
right: [ right: [],
Component.MobileOnly(Component.Spacer()),
Component.MobileOnly(Component.Explorer()),],
} }

View File

@ -13,7 +13,7 @@ export default ((opts?: Options) => {
return ( return (
<footer class={`${displayClass ?? ""}`}> <footer class={`${displayClass ?? ""}`}>
<hr /> <hr />
<p>© {year} Miguel Pimentel · Powered by <a href="https://quartz.jzhao.xyz/">Quartz</a>. <p>© {year} Miguel Pimentel · Created with <a href="https://quartz.jzhao.xyz/">Quartz</a>.
</p> </p>
<ul> <ul>
{Object.entries(links).map(([text, link]) => ( {Object.entries(links).map(([text, link]) => (
@ -27,6 +27,5 @@ export default ((opts?: Options) => {
} }
Footer.css = style Footer.css = style
return Footer return Footer
}) satisfies QuartzComponentConstructor }) satisfies QuartzComponentConstructor

View File

@ -57,8 +57,7 @@ export default ((opts?: GraphOptions) => {
const globalGraph = { ...defaultOptions.globalGraph, ...opts?.globalGraph } const globalGraph = { ...defaultOptions.globalGraph, ...opts?.globalGraph }
return ( return (
<div class={`graph ${displayClass ?? ""}`}> <div class={`graph ${displayClass ?? ""}`}>
{/* line bellow was h3 */} <h3>Graph View</h3>
<h2>Graph View</h2>
<div class="graph-outer"> <div class="graph-outer">
<div id="graph-container" data-cfg={JSON.stringify(localGraph)}></div> <div id="graph-container" data-cfg={JSON.stringify(localGraph)}></div>
<svg <svg

View File

@ -8,8 +8,8 @@ export default (() => {
return ( return (
<div class={`search ${displayClass ?? ""}`}> <div class={`search ${displayClass ?? ""}`}>
<div id="search-icon"> <div id="search-icon">
{/* <p>Search</p> {/* <p>Search</p> */}
<div></div> */} <div></div>
<svg <svg
tabIndex={0} tabIndex={0}
aria-labelledby="title desc" aria-labelledby="title desc"

View File

@ -194,7 +194,7 @@ export function renderPage(
) )
const doc = ( const doc = (
<html lang="en-US"> <html>
<Head {...componentData} /> <Head {...componentData} />
<body data-slug={slug}> <body data-slug={slug}>
<div id="quartz-root" class="page"> <div id="quartz-root" class="page">
@ -208,8 +208,7 @@ export function renderPage(
))} ))}
</Header> </Header>
<div class="popover-hint"> <div class="popover-hint">
{/* implement https://discord.com/channels/927628110009098281/1157949033592139866 */} {beforeBody.map((BodyComponent) => (
{slug !== "index" && beforeBody.map((BodyComponent) => (
<BodyComponent {...componentData} /> <BodyComponent {...componentData} />
))} ))}
</div> </div>

View File

@ -31,7 +31,7 @@ function setupCallout() {
if (title) { if (title) {
title.removeEventListener(`click`, toggleCallout) title.removeEventListener(`click`, toggleCallout)
title.addEventListener(`click`, toggleCallout, {passive: true}) title.addEventListener(`click`, toggleCallout)
const collapsed = div.classList.contains(`is-collapsed`) const collapsed = div.classList.contains(`is-collapsed`)
const height = collapsed ? title.scrollHeight : div.scrollHeight const height = collapsed ? title.scrollHeight : div.scrollHeight
@ -40,5 +40,5 @@ function setupCallout() {
} }
} }
document.addEventListener(`nav`, setupCallout, {passive: true}) document.addEventListener(`nav`, setupCallout)
window.addEventListener(`resize`, setupCallout, {passive: true}) window.addEventListener(`resize`, setupCallout)

View File

@ -26,8 +26,8 @@ document.addEventListener("nav", () => {
}, },
(error) => console.error(error), (error) => console.error(error),
) )
}, {passive: true}) })
els[i].prepend(button) els[i].prepend(button)
} }
} }
}, {passive: true}) })

View File

@ -16,7 +16,7 @@ document.addEventListener("nav", () => {
// Darkmode toggle // Darkmode toggle
const toggleSwitch = document.querySelector("#darkmode-toggle") as HTMLInputElement const toggleSwitch = document.querySelector("#darkmode-toggle") as HTMLInputElement
toggleSwitch.removeEventListener("change", switchTheme) toggleSwitch.removeEventListener("change", switchTheme)
toggleSwitch.addEventListener("change", switchTheme, {passive: true}) toggleSwitch.addEventListener("change", switchTheme)
if (currentTheme === "dark") { if (currentTheme === "dark") {
toggleSwitch.checked = true toggleSwitch.checked = true
} }
@ -28,5 +28,5 @@ document.addEventListener("nav", () => {
document.documentElement.setAttribute("saved-theme", newTheme) document.documentElement.setAttribute("saved-theme", newTheme)
localStorage.setItem("theme", newTheme) localStorage.setItem("theme", newTheme)
toggleSwitch.checked = e.matches toggleSwitch.checked = e.matches
}, {passive: true}) })
}, {passive: true}) })

View File

@ -86,20 +86,20 @@ function setupExplorer() {
document.getElementsByClassName("folder-button"), document.getElementsByClassName("folder-button"),
function (item) { function (item) {
item.removeEventListener("click", toggleFolder) item.removeEventListener("click", toggleFolder)
item.addEventListener("click", toggleFolder, {passive: true}) item.addEventListener("click", toggleFolder)
}, },
) )
} }
// Add click handler to main explorer // Add click handler to main explorer
explorer.removeEventListener("click", toggleExplorer) explorer.removeEventListener("click", toggleExplorer)
explorer.addEventListener("click", toggleExplorer, {passive: true}) explorer.addEventListener("click", toggleExplorer)
} }
// Set up click handlers for each folder (click handler on folder "icon") // Set up click handlers for each folder (click handler on folder "icon")
Array.prototype.forEach.call(document.getElementsByClassName("folder-icon"), function (item) { Array.prototype.forEach.call(document.getElementsByClassName("folder-icon"), function (item) {
item.removeEventListener("click", toggleFolder) item.removeEventListener("click", toggleFolder)
item.addEventListener("click", toggleFolder, {passive: true}) item.addEventListener("click", toggleFolder)
}) })
if (storageTree && useSavedFolderState) { if (storageTree && useSavedFolderState) {
@ -123,7 +123,7 @@ function setupExplorer() {
} }
} }
window.addEventListener("resize", setupExplorer, {passive: true}) window.addEventListener("resize", setupExplorer)
document.addEventListener("nav", () => { document.addEventListener("nav", () => {
setupExplorer() setupExplorer()
@ -131,10 +131,10 @@ document.addEventListener("nav", () => {
// select pseudo element at end of list // select pseudo element at end of list
const lastItem = document.getElementById("explorer-end") const lastItem = document.getElementById("explorer-end")
if (lastItem) {
observer.disconnect() observer.observe(lastItem)
observer.observe(lastItem as Element) }
}, {passive: true}) })
/** /**
* Toggles the state of a given folder * Toggles the state of a given folder

View File

@ -326,5 +326,5 @@ document.addEventListener("nav", async (e: unknown) => {
const containerIcon = document.getElementById("global-graph-icon") const containerIcon = document.getElementById("global-graph-icon")
containerIcon?.removeEventListener("click", renderGlobalGraph) containerIcon?.removeEventListener("click", renderGlobalGraph)
containerIcon?.addEventListener("click", renderGlobalGraph, {passive: true}) containerIcon?.addEventListener("click", renderGlobalGraph)
}, {passive: true}) })

View File

@ -77,6 +77,6 @@ document.addEventListener("nav", () => {
const links = [...document.getElementsByClassName("internal")] as HTMLLinkElement[] const links = [...document.getElementsByClassName("internal")] as HTMLLinkElement[]
for (const link of links) { for (const link of links) {
link.removeEventListener("mouseenter", mouseEnterHandler) link.removeEventListener("mouseenter", mouseEnterHandler)
link.addEventListener("mouseenter", mouseEnterHandler, {passive: true}) link.addEventListener("mouseenter", mouseEnterHandler)
} }
}, {passive: true}) })

View File

@ -352,4 +352,4 @@ async function fillDocument(index: Document<Item, false>, data: any) {
}) })
id++ id++
} }
} }

View File

@ -123,7 +123,7 @@ function createRouter() {
} catch (e) { } catch (e) {
window.location.assign(url) window.location.assign(url)
} }
}, {passive: true}) })
window.addEventListener("popstate", (event) => { window.addEventListener("popstate", (event) => {
const { url } = getOpts(event) ?? {} const { url } = getOpts(event) ?? {}
@ -134,7 +134,7 @@ function createRouter() {
window.location.reload() window.location.reload()
} }
return return
}, {passive: true}) })
} }
return new (class Router { return new (class Router {

View File

@ -28,11 +28,11 @@ function setupToc() {
const content = toc.nextElementSibling as HTMLElement const content = toc.nextElementSibling as HTMLElement
content.style.maxHeight = collapsed ? "0px" : content.scrollHeight + "px" content.style.maxHeight = collapsed ? "0px" : content.scrollHeight + "px"
toc.removeEventListener("click", toggleToc) toc.removeEventListener("click", toggleToc)
toc.addEventListener("click", toggleToc, {passive: true}) toc.addEventListener("click", toggleToc)
} }
} }
window.addEventListener("resize", setupToc, {passive: true}) window.addEventListener("resize", setupToc)
document.addEventListener("nav", () => { document.addEventListener("nav", () => {
setupToc() setupToc()
@ -40,4 +40,4 @@ document.addEventListener("nav", () => {
observer.disconnect() observer.disconnect()
const headers = document.querySelectorAll("h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]") const headers = document.querySelectorAll("h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]")
headers.forEach((header) => observer.observe(header)) headers.forEach((header) => observer.observe(header))
}, {passive: true}) })

View File

@ -13,9 +13,9 @@ export function registerEscapeHandler(outsideContainer: HTMLElement | null, cb:
} }
outsideContainer?.removeEventListener("click", click) outsideContainer?.removeEventListener("click", click)
outsideContainer?.addEventListener("click", click, {passive: true}) outsideContainer?.addEventListener("click", click)
document.removeEventListener("keydown", esc) document.removeEventListener("keydown", esc)
document.addEventListener("keydown", esc, {passive: true}) document.addEventListener("keydown", esc)
} }
export function removeAllChildren(node: HTMLElement) { export function removeAllChildren(node: HTMLElement) {

View File

@ -1,5 +1,4 @@
.darkmode { .darkmode {
position: relative; position: relative;
width: 20px; width: 20px;
height: 20px; height: 20px;
@ -18,7 +17,7 @@
height: 20px; height: 20px;
top: calc(50% - 10px); top: calc(50% - 10px);
fill: var(--darkgray); fill: var(--darkgray);
transition: opacity 0.3s ease; // 0.1s transition: opacity 0.1s ease;
} }
} }
@ -47,19 +46,3 @@
opacity: 0; opacity: 0;
} }
} }
@media (max-width: 1510px) {
.darkmode {
// left: 2rem;
// top: -59px;
padding-left: 0.5rem;
}
}
@media (min-width: 1511px) {
.darkmode {
left: 2rem;
top: -59px;
padding-left: 0.5rem;
}
}

View File

@ -1,9 +1,3 @@
.explorer,
.desktop-only {
position: relative;
top: -60px;
}
button#explorer { button#explorer {
all: unset; all: unset;
background-color: transparent; background-color: transparent;
@ -90,7 +84,7 @@ svg {
& div > a { & div > a {
color: var(--secondary); color: var(--secondary);
font-family: var(--headerFont); font-family: var(--headerFont);
font-size: 0.95rem; // 0.95 font-size: 0.95rem;
font-weight: 600; font-weight: 600;
line-height: 1.5rem; line-height: 1.5rem;
display: inline-block; display: inline-block;
@ -112,8 +106,8 @@ svg {
align-items: center; align-items: center;
font-family: var(--headerFont); font-family: var(--headerFont);
& p { & span {
font-size: 1.1rem; // 0.95 font-size: 0.95rem;
display: inline-block; display: inline-block;
color: var(--secondary); color: var(--secondary);
font-weight: 600; font-weight: 600;

View File

@ -1,15 +1,13 @@
footer { footer {
text-align: center; // was left text-align: left;
margin-bottom: 4rem; margin-bottom: 4rem;
opacity: 0.7; opacity: 0.7;
& p {
margin: auto; // eliminates spacing between p and ul
}
& ul { & ul {
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
display: inline-flex; // was flex display: flex;
flex-direction: row; flex-direction: row;
gap: 1rem; gap: 1rem;
margin-top: -1rem; margin-top: -1rem;

View File

@ -11,7 +11,7 @@ li.section-li {
& > .section { & > .section {
display: grid; display: grid;
// grid-template-columns: 6em 3fr 1fr; grid-template-columns: 6em 3fr 1fr;
@media all and (max-width: $mobileBreakpoint) { @media all and (max-width: $mobileBreakpoint) {
& > .tags { & > .tags {
@ -33,7 +33,7 @@ li.section-li {
// modifications in popover context // modifications in popover context
.popover .section { .popover .section {
// grid-template-columns: 6em 1fr !important; grid-template-columns: 6em 1fr !important;
& > .tags { & > .tags {
display: none; display: none;
} }

View File

@ -31,11 +31,10 @@
font-family: var(--bodyFont); font-family: var(--bodyFont);
border: 1px solid var(--lightgray); border: 1px solid var(--lightgray);
background-color: var(--light); background-color: var(--light);
border-radius: 8px; // 5px border-radius: 5px;
box-shadow: 6px 6px 36px 0 rgba(0, 0, 0, 0.25); box-shadow: 6px 6px 36px 0 rgba(0, 0, 0, 0.25);
overflow: auto; overflow: auto;
white-space: normal; white-space: normal;
// scrollbar-width: none;
} }
h1 { h1 {

View File

@ -2,12 +2,13 @@
.search { .search {
min-width: fit-content; min-width: fit-content;
min-width: auto; // min-width: auto;
max-width: 18px; max-width: 18px; // 14rem
flex-grow: 0.3; flex-grow: 0.3;
padding-right: 1rem; padding-right: 1rem;
& > #search-icon { & > #search-icon {
// background-color: var(--lightgray);
background-color: transparent; background-color: transparent;
border-radius: 4px; border-radius: 4px;
height: 2rem; height: 2rem;

View File

@ -1,6 +1,4 @@
button#toc { button#toc {
margin-top: 2rem;
all: unset;
background-color: transparent; background-color: transparent;
border: none; border: none;
text-align: left; text-align: left;
@ -44,12 +42,12 @@ button#toc {
padding: 0; padding: 0;
& > li > a { & > li > a {
color: var(--dark); color: var(--dark);
opacity: 0.7; // 0.35 opacity: 0.35;
transition: transition:
0.5s ease opacity, 0.5s ease opacity,
0.3s ease color; 0.3s ease color;
&.in-view { &.in-view {
opacity: 0.95; //0.75 opacity: 0.75;
} }
} }
} }

View File

@ -38,7 +38,7 @@ export const AliasRedirects: QuartzEmitterPlugin = () => ({
ctx, ctx,
content: ` content: `
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en-US"> <html lang="en-us">
<head> <head>
<title>${ogSlug}</title> <title>${ogSlug}</title>
<link rel="canonical" href="${redirUrl}"> <link rel="canonical" href="${redirUrl}">

View File

@ -582,7 +582,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
await mermaid.run({ await mermaid.run({
querySelector: '.mermaid' querySelector: '.mermaid'
}) })
}, {passive: true}); });
`, `,
loadTime: "afterDOMReady", loadTime: "afterDOMReady",
moduleType: "module", moduleType: "module",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -1,12 +1,11 @@
@use "variables" as *; @use "./variables.scss" as *;
@use "syntax"; @use "./syntax.scss";
@use "callouts"; @use "./callouts.scss";
// @use "custom"; // @use "custom";
* { * {
scrollbar-width: thin; scrollbar-width: thin;
} }
html { html {
scroll-behavior: smooth; scroll-behavior: smooth;
-webkit-text-size-adjust: none; -webkit-text-size-adjust: none;
@ -32,7 +31,7 @@ section {
} }
::selection { ::selection {
background: color-mix(in srgb, var(--tertiary) 50%, transparent); // 75% background: color-mix(in srgb, var(--tertiary) 75%, transparent);
color: var(--darkgray); color: var(--darkgray);
} }
@ -62,14 +61,12 @@ ul,
a { a {
font-weight: 600; font-weight: 600;
text-decoration: none; text-decoration: none;
transition: color 0.2s ease;
color: var(--secondary); color: var(--secondary);
text-decoration: underline 0.2rem transparent; display: inline-block;
transition: all 0.5s ease;
&:hover { &:hover {
color: var(--tertiary) !important; color: var(--tertiary) !important;
text-decoration-color: var(--tertiary) !important;
// text-underline-offset: 0.4em;
} }
&.internal { &.internal {
@ -98,7 +95,6 @@ a {
.desktop-only { .desktop-only {
display: initial; display: initial;
@media all and (max-width: $fullPageWidth) { @media all and (max-width: $fullPageWidth) {
display: none; display: none;
} }
@ -178,12 +174,9 @@ a {
align-items: center; align-items: center;
} }
} }
& .sidebar.right { & .sidebar.right {
right: calc(calc(100vw - $pageWidth) / 2 - $sidePanelWidth); right: calc(calc(100vw - $pageWidth) / 2 - $sidePanelWidth);
@media all and (max-width: $fullPageWidth) {
flex-direction: column;
}
& > * { & > * {
@media all and (max-width: $fullPageWidth) { @media all and (max-width: $fullPageWidth) {
flex: 1; flex: 1;
@ -487,8 +480,8 @@ video {
ul.overflow, ul.overflow,
ol.overflow { ol.overflow {
max-height: 400; // 400 max-height: 400;
overflow-y: auto; // auto, scroll overflow-y: auto;
// clearfix // clearfix
content: ""; content: "";
@ -507,9 +500,8 @@ ol.overflow {
left: 0; left: 0;
bottom: 0; bottom: 0;
opacity: 1; opacity: 1;
// Removes opacity fade transition: opacity 0.3s ease;
// transition: opacity 0.3s ease; background: linear-gradient(transparent 0px, var(--light));
// background: linear-gradient(transparent 0px, var(--light));
} }
} }

View File

@ -2,5 +2,5 @@ $pageWidth: 750px;
$mobileBreakpoint: 600px; $mobileBreakpoint: 600px;
$tabletBreakpoint: 1200px; $tabletBreakpoint: 1200px;
$sidePanelWidth: 380px; $sidePanelWidth: 380px;
$topSpacing: 4rem; // 6rem $topSpacing: 6rem;
$fullPageWidth: $pageWidth + 2 * $sidePanelWidth; $fullPageWidth: $pageWidth + 2 * $sidePanelWidth;

View File

@ -21,14 +21,17 @@ export function JSResourceToScriptElement(resource: JSResource, preserve?: boole
const spaPreserve = preserve ?? resource.spaPreserve const spaPreserve = preserve ?? resource.spaPreserve
if (resource.contentType === "external") { if (resource.contentType === "external") {
return ( return (
<script defer key={resource.src} src={resource.src} type={scriptType} spa-preserve={spaPreserve} /> <script key={resource.src} src={resource.src} type={scriptType} spa-preserve={spaPreserve} />
) )
} else { } else {
const content = resource.script const content = resource.script
return ( return (
<script defer key={randomUUID()} type={scriptType} spa-preserve={spaPreserve}> <script
{content} key={randomUUID()}
</script> type={scriptType}
spa-preserve={spaPreserve}
dangerouslySetInnerHTML={{ __html: content }}
></script>
) )
} }
} }