.gitea
assets
content
data
layouts
static
admin
config
links
previews
field-previews
page-previews
components
abiturienten-preview.js
about-preview.js
anmeldeformular-preview.js
anmeldung-preview.js
author-preview.js
blog-preview.js
cantorpreis-preview.js
chronik-index-preview.js
chronik-preview.js
contest-preview.js
event-preview.js
forms-preview.js
ganztag-preview.js
header-preview.js
index.js
kontakt-preview.js
page-preview.js
projektwoche-preview.js
styles.js
shortcodes
icons.js
index.html
data
media
schulchronik
favicon.ico
.gitignore
.mailmap
LICENSE
config.yml
go.mod
go.sum
80 lines
2.2 KiB
JavaScript
80 lines
2.2 KiB
JavaScript
import { PageHeader } from "./components/index.js";
|
|
|
|
const ChronikPreview = ({ widgetFor, widgetsFor, entry, document, window }) => {
|
|
return [
|
|
PageHeader(entry),
|
|
h(
|
|
"section",
|
|
{ className: "section" },
|
|
h(
|
|
"div",
|
|
{ className: "container" },
|
|
h(
|
|
"div",
|
|
{ className: "card-group" },
|
|
h(
|
|
"div",
|
|
{ className: "card d-flex flex-row flex-wrap" },
|
|
h("img", {
|
|
src: "https://cantorgymnasium.de/media/people/gcg.webp",
|
|
className: "rounded-circle object-cover m-3",
|
|
width: "128px",
|
|
height: "128px",
|
|
}),
|
|
h(
|
|
"div",
|
|
{ className: "flex-grow card-body min-w-0" },
|
|
h("h3", { className: "card-title" }, "Cantorpreisträger"),
|
|
h(
|
|
"p",
|
|
{ className: "h4 card-text" },
|
|
widgetFor("cantorpreisträger")
|
|
)
|
|
)
|
|
),
|
|
h(
|
|
"div",
|
|
{ className: "card d-flex flex-row flex-wrap-reverse" },
|
|
h(
|
|
"div",
|
|
{ className: "flex-grow card-body min-w-0" },
|
|
h(
|
|
"h3",
|
|
{ className: "card-title" },
|
|
"Abiturienten " + entry.data.title
|
|
),
|
|
h("p", { className: "h4 card-text" }, "Abiturdurchschnitt: 0.00")
|
|
),
|
|
h("img", {
|
|
src: "https://cantorgymnasium.de/media/people/gcg.webp",
|
|
className: "rounded-circle object-cover m-3",
|
|
width: "128px",
|
|
height: "128px",
|
|
})
|
|
)
|
|
),
|
|
h(
|
|
"div",
|
|
{ className: "kh-parent" },
|
|
h(
|
|
"div",
|
|
{ className: "kh-jahr h1" },
|
|
h("span", {}, entry.data.title)
|
|
),
|
|
widgetsFor("topics")
|
|
.sort((a, b) => b.data.title.length - a.data.title.length)
|
|
.map((topic, index) =>
|
|
h(
|
|
"div",
|
|
{ className: "kh h3", "data-id": `${index}` },
|
|
h("span", {}, topic.data.title)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
),
|
|
];
|
|
};
|
|
|
|
export default ChronikPreview;
|