.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
49 lines
988 B
JavaScript
49 lines
988 B
JavaScript
import {
|
|
PageHeader,
|
|
Section,
|
|
Container,
|
|
Row,
|
|
ContentJustify,
|
|
} from "./components/index.js";
|
|
|
|
const CantorpreisPreview = ({ widgetFor, entry, fields, collection }) => {
|
|
const imageField = useMemo(
|
|
() => fields.find((field) => field.name === "image"),
|
|
[fields]
|
|
);
|
|
|
|
const imageUrl = useMediaAsset(
|
|
entry.data.image,
|
|
collection,
|
|
imageField,
|
|
entry
|
|
);
|
|
|
|
return [
|
|
PageHeader(entry),
|
|
Section(
|
|
Container(
|
|
Row([
|
|
h(
|
|
"div",
|
|
{ className: "col-md-5 mb-4" },
|
|
h("img", {
|
|
className: "img-fluid w-100",
|
|
src: imageUrl,
|
|
})
|
|
),
|
|
h(
|
|
"div",
|
|
{ className: "col-md-7" },
|
|
h("h3", {}, entry.data.name),
|
|
h("h6", { className: "text-body-secondary" }, entry.data.title),
|
|
ContentJustify(widgetFor("body"))
|
|
),
|
|
])
|
|
)
|
|
),
|
|
];
|
|
};
|
|
|
|
export default CantorpreisPreview;
|