Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMS Config for Startseite #235

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cms-content
Submodule cms-content updated 91 files
+4 −4 .github/workflows/main.yml
+34 −0 content/blog/2022-dartsturnier.md
+3 −0 content/pages/startseite.yml
+3 −0 content/startseite.yml
+13 −10 content/veranstaltung/2023abenteuerfreizeit.md
+13 −7 content/veranstaltung/2023karlsminde_kurz-camp.md
+13 −9 content/veranstaltung/2023landesjungscharfreizeit_1.md
+13 −9 content/veranstaltung/2023landesjungscharfreizeit_2.md
+59 −0 content/veranstaltung/biblecamp_2023.md
+56 −0 content/veranstaltung/jugendfreizeit_2023.md
+58 −0 content/veranstaltung/juleica-grundkurs_2023.md
+53 −0 content/veranstaltung/mawoe_-_grosses_mitarbeiterwochenende.md
+56 −0 content/veranstaltung/pfingstcamp_2023.md
+62 −0 content/veranstaltung/teencamp_2023.md
+53 −0 content/veranstaltung/timeout_2023_24.md
+ static/blog/img_3224.jpg
+ static/blog/img_3224.webp
+ static/blog/img_3280.jpg
+ static/blog/img_3280.webp
+ static/blog/img_3293.jpg
+ static/blog/img_3293.webp
+ static/blog/img_3322.jpg
+ static/blog/img_3322.webp
+ static/blog/img_3515.jpg
+ static/blog/img_3515.webp
+ static/blog/img_3613.jpg
+ static/blog/img_3613.webp
+ static/blog/img_3685.jpg
+ static/blog/img_3685.webp
+ static/veranstaltungen/02.jpg
+ static/veranstaltungen/02.webp
+ static/veranstaltungen/03.jpg
+ static/veranstaltungen/03.webp
+ static/veranstaltungen/04.jpg
+ static/veranstaltungen/04.webp
+ static/veranstaltungen/20211229_143229.jpg
+ static/veranstaltungen/20211229_143229.webp
+ static/veranstaltungen/20211230_101055.jpg
+ static/veranstaltungen/20211230_101055.webp
+ static/veranstaltungen/20211231_184820.jpg
+ static/veranstaltungen/20211231_184820.webp
+ static/veranstaltungen/20211231_231903.jpg
+ static/veranstaltungen/20211231_231903.webp
+ static/veranstaltungen/20220304_210046.jpg
+ static/veranstaltungen/20220304_210046.webp
+ static/veranstaltungen/20220304_210504.jpg
+ static/veranstaltungen/20220304_210504.webp
+ static/veranstaltungen/20220410_114846.jpg
+ static/veranstaltungen/20220410_114846.webp
+ static/veranstaltungen/20220410_141651.jpg
+ static/veranstaltungen/20220410_141651.webp
+ static/veranstaltungen/20220605_215602.jpg
+ static/veranstaltungen/20220605_215602.webp
+ static/veranstaltungen/20220605_221732.jpg
+ static/veranstaltungen/20220605_221732.webp
+ static/veranstaltungen/20220708_161446.jpg
+ static/veranstaltungen/20220708_161446.webp
+ static/veranstaltungen/20220708_184348.jpg
+ static/veranstaltungen/20220708_184348.webp
+ static/veranstaltungen/dsc00116.jpg
+ static/veranstaltungen/dsc00116.webp
+ static/veranstaltungen/dsc_1749.jpg
+ static/veranstaltungen/dsc_1749.webp
+ static/veranstaltungen/dsc_1755.jpg
+ static/veranstaltungen/dsc_1755.webp
+ static/veranstaltungen/dsc_6779.jpg
+ static/veranstaltungen/dsc_6779.webp
+ static/veranstaltungen/dsc_6789.jpg
+ static/veranstaltungen/dsc_6789.webp
+ static/veranstaltungen/img_6428.jpg
+ static/veranstaltungen/img_6428.webp
+ static/veranstaltungen/img_6448.jpg
+ static/veranstaltungen/img_6448.webp
+ static/veranstaltungen/img_6454.jpg
+ static/veranstaltungen/img_6454.webp
+ static/veranstaltungen/img_6460.jpg
+ static/veranstaltungen/img_6460.webp
+ static/veranstaltungen/img_6570.jpg
+ static/veranstaltungen/img_6570.webp
+ static/veranstaltungen/lw.jpg
+ static/veranstaltungen/lw.webp
+ static/veranstaltungen/mawe-08.jpg
+ static/veranstaltungen/mawe-08.webp
+ static/veranstaltungen/mawe-19.jpg
+ static/veranstaltungen/mawe-19.webp
+ static/veranstaltungen/tc2k22-284.jpg
+ static/veranstaltungen/tc2k22-284.webp
+ static/veranstaltungen/tc2k22-361.jpg
+ static/veranstaltungen/tc2k22-361.webp
+ static/veranstaltungen/whatsapp_image_2022-03-09_at_13.22.40_1_.jpeg
+ static/veranstaltungen/whatsapp_image_2022-03-09_at_13.22.40_1_.webp
25 changes: 14 additions & 11 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.section-wrapper(v-if='pages')
div
v-img.hero-image.secondary.align-end.angle--bottom-right(
src='hero-image.jpg',
:src='heroImage',
min-height='400px',
height='60vh',
width='auto',
Expand Down Expand Up @@ -166,22 +166,20 @@ export default defineComponent({
.limit(3)
.fetch()

const countdown = {
date: '2022-11-20T14:00:00Z',
show: true
}
const { countdown, heroImage } = await $content('pages/startseite').fetch()

return { upcomingEvents, recentPosts, countdown }
return { upcomingEvents, recentPosts, countdown, heroImage }
}, undefined, 'homeData')

const pages = computed(() =>
pages_loading.value
? pages_loading.value
: {
upcomingEvents: [],
recentPosts: [],
countdown: { date: undefined, show: false },
}
upcomingEvents: [],
recentPosts: [],
countdown: { date: undefined, show: false },
heroImage: undefined
}
)

const { currentTime } = useCurrentTime()
Expand All @@ -192,10 +190,14 @@ export default defineComponent({
return new Date(countdown.date) > currentTime.value || false
})

const heroImage = computed(() => pages.value.heroImage)


return {
pages,
mail: (m) => (location.href = `mailto:${m}`),
isCountdownFuture,
heroImage
}
},
head: {
Expand Down Expand Up @@ -249,7 +251,8 @@ export default defineComponent({
}
}

.section-wrapper > div:last-child {
.section-wrapper>div:last-child {

&.angle--bottom-left,
&.angle--bottom-right,
&.angle--both-right-right,
Expand Down
32 changes: 28 additions & 4 deletions static/admin/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ backend:

publish_mode: editorial_workflow
site_url: https://www.ec-nordbund.de/
# TODO: replace with SVG image
logo_url: https://www.ec-nordbund.de/icon.png
show_preview_links: true

media_folder: static/img
Expand All @@ -23,8 +25,30 @@ slug:
sanitize_replacement: _

collections:
- name: 'blog'
label: 'Blog'
- label: 'Seiten'
name: 'pages'
preview_path: '/'
editor:
preview: false
files:
- label: 'Startseite'
name: 'startpage'
file: 'content/pages/startseite.yml'
fields:
- label: 'Titelbild'
name: 'heroImage'
widget: 'image'
allow_multiple: false
choose_url: false
- label: 'Countdown'
name: 'countdown'
widget: 'object'
summary: '{{text.vor}}{{date}}'
fields:
- { label: 'Anzeigen', name: 'show', widget: 'boolean', default: false }
- { label: 'Datum', name: 'date', widget: 'datetime', date_format: true, time_format: true }
- label: 'Blog'
name: 'blog'
label_singular: 'Beitrag'
folder: 'content/blog'
format: 'frontmatter'
Expand Down Expand Up @@ -59,8 +83,8 @@ collections:
allow_multiple: false,
}
- { label: 'Beschreibung', name: 'body', widget: 'markdown' }
- name: 'veranstaltungen'
label: 'Veranstaltungen'
- label: 'Veranstaltungen'
name: 'veranstaltungen'
label_singular: 'Veranstaltung'
folder: 'content/veranstaltung'
format: 'frontmatter'
Expand Down