Fix jdd-editor overlays and faq component classes

This commit is contained in:
Kuba Orlik 2026-06-13 17:26:43 +02:00
parent 26a7aeea8a
commit 5d4a30cd34
5 changed files with 20 additions and 10 deletions

14
package-lock.json generated
View File

@ -15,7 +15,7 @@
"@sealcode/add-to-head": "^1.0.0", "@sealcode/add-to-head": "^1.0.0",
"@sealcode/file-manager": "^1.0.2", "@sealcode/file-manager": "^1.0.2",
"@sealcode/jdd": "^0.8.6", "@sealcode/jdd": "^0.8.6",
"@sealcode/jdd-editor": "^0.2.20", "@sealcode/jdd-editor": "^0.2.21",
"@sealcode/monaco-wrapper": "^0.0.4", "@sealcode/monaco-wrapper": "^0.0.4",
"@sealcode/sealgen": "^0.19.20", "@sealcode/sealgen": "^0.19.20",
"@sealcode/show-first-row": "^0.1.0", "@sealcode/show-first-row": "^0.1.0",
@ -1380,9 +1380,9 @@
} }
}, },
"node_modules/@sealcode/jdd-editor": { "node_modules/@sealcode/jdd-editor": {
"version": "0.2.20", "version": "0.2.21",
"resolved": "https://registry.npmjs.org/@sealcode/jdd-editor/-/jdd-editor-0.2.20.tgz", "resolved": "https://registry.npmjs.org/@sealcode/jdd-editor/-/jdd-editor-0.2.21.tgz",
"integrity": "sha512-FKNolZ0JFigTrv0DhiBPlLwg14IHadlyA0mZ48dmy9Az4Oh7XymlxuvXYmhanFT58+eJbR3xqhXCnm1WE7tpgw==", "integrity": "sha512-7MFT9bKc1pqCD9qEdAfSIye05jVFCL7wCOq/VHfKhkiSfg4qG8h0892jaW2kMHq0TWgQuxbIYgMgOWgexm34Cw==",
"dependencies": { "dependencies": {
"@koa/router": "^13.1.0", "@koa/router": "^13.1.0",
"@sealcode/jdd": "^0.8.6", "@sealcode/jdd": "^0.8.6",
@ -16021,9 +16021,9 @@
} }
}, },
"@sealcode/jdd-editor": { "@sealcode/jdd-editor": {
"version": "0.2.20", "version": "0.2.21",
"resolved": "https://registry.npmjs.org/@sealcode/jdd-editor/-/jdd-editor-0.2.20.tgz", "resolved": "https://registry.npmjs.org/@sealcode/jdd-editor/-/jdd-editor-0.2.21.tgz",
"integrity": "sha512-FKNolZ0JFigTrv0DhiBPlLwg14IHadlyA0mZ48dmy9Az4Oh7XymlxuvXYmhanFT58+eJbR3xqhXCnm1WE7tpgw==", "integrity": "sha512-7MFT9bKc1pqCD9qEdAfSIye05jVFCL7wCOq/VHfKhkiSfg4qG8h0892jaW2kMHq0TWgQuxbIYgMgOWgexm34Cw==",
"requires": { "requires": {
"@koa/router": "^13.1.0", "@koa/router": "^13.1.0",
"@sealcode/jdd": "^0.8.6", "@sealcode/jdd": "^0.8.6",

View File

@ -98,7 +98,7 @@
"@sealcode/add-to-head": "^1.0.0", "@sealcode/add-to-head": "^1.0.0",
"@sealcode/file-manager": "^1.0.2", "@sealcode/file-manager": "^1.0.2",
"@sealcode/jdd": "^0.8.6", "@sealcode/jdd": "^0.8.6",
"@sealcode/jdd-editor": "^0.2.20", "@sealcode/jdd-editor": "^0.2.21",
"@sealcode/monaco-wrapper": "^0.0.4", "@sealcode/monaco-wrapper": "^0.0.4",
"@sealcode/sealgen": "^0.19.20", "@sealcode/sealgen": "^0.19.20",
"@sealcode/show-first-row": "^0.1.0", "@sealcode/show-first-row": "^0.1.0",

View File

@ -65,7 +65,7 @@ export default function html({
${classes ? `class="${classes}"` : ""} ${classes ? `class="${classes}"` : ""}
> >
${!hideNavigation ? (htmlOptions?.navbar || default_navbar)(ctx) : ""} ${!hideNavigation ? (htmlOptions?.navbar || default_navbar)(ctx) : ""}
${body} ${footer(ctx)} ${body} ${htmlOptions?.showFooter ? footer(ctx) : ""}
</body> </body>
</html>`; </html>`;
} }

View File

@ -1,3 +1,4 @@
/* stylelint-disable no-descending-specificity */
.faq-component { .faq-component {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -73,11 +74,19 @@
&.question-container--accent { &.question-container--accent {
background-color: var(--color-brand-accent); background-color: var(--color-brand-accent);
color: var(--color-brand-text-on-accent); color: var(--color-brand-text-on-accent);
a {
color: var(--color-brand-link-on-accent);
}
} }
&.question-container--accent2 { &.question-container--accent2 {
background-color: var(--color-brand-accent2); background-color: var(--color-brand-accent2);
color: var(--color-brand-text-on-accent2); color: var(--color-brand-text-on-accent2);
a {
color: var(--color-brand-link-on-accent2);
}
} }
} }

View File

@ -29,13 +29,14 @@ export class FaqComponent extends Component<typeof component_arguments> {
} }
toHTML({ toHTML({
classes,
args: { title, content, faq, button, accordion_color }, args: { title, content, faq, button, accordion_color },
jdd_context: { render_markdown, language }, jdd_context: { render_markdown, language },
}: ComponentToHTMLArgs<typeof component_arguments>): FlatTemplatable { }: ComponentToHTMLArgs<typeof component_arguments>): FlatTemplatable {
const buttonText = button.buttonText.toUpperCase(); const buttonText = button.buttonText.toUpperCase();
return ( return (
<div class="faq-component"> <div class={["faq-component", ...classes]}>
<div class="container"> <div class="container">
<div class="title-container"> <div class="title-container">
<div class="title">{title} </div> <div class="title">{title} </div>