Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
maehr committed Sep 4, 2023
1 parent 82d28ab commit 1ac4e90
Show file tree
Hide file tree
Showing 8 changed files with 149 additions and 67 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/Stadt-Geschichte-Basel/stadtgeschichtebasel.ch/compare/...HEAD)

- feat: SvelteKit and Skeleton-UI by @maehr
- feat: Architecture by @maehr, @flicksolutions and @thgie
- feat: UX by @maehr, @thgie and @amaehr
- feat: blog via MDsveX and Wordpress API (https://sgb.hypotheses.org/wp-json/wp/v2/) by @maehr and @flicksolutions
- feat: agenda via Agendabasel.ch API (https://www.kulturzueri.ch/xmlexport/kzexport-basel.xml)
- feat: map via svelte-maplibre by @koilebeit and @maehr
46 changes: 13 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,39 +34,19 @@ This project is maintained by [@maehr](https://github.com/maehr). Please underst

## Roadmap

- [x] Basic layout (inspired by <https://sveltekit-mdsvex-starter-blog.vercel.app/posts>)
- [x] Download all posts and pages from sgb.hypotheses.org
- [x] Download all assets from sgb.hypotheses.org
- [x] Implement blog functionality
- [x] Implement page functionality
- [x] Add robots.txt
- [x] Add fonts
- [x] Add Meta-Tag, Twitter Card and OpenGraph Generator
- [ ] Add search functionality via lunr or elasticlunr (or similar)
- [ ] Collapse search on mobile
- [ ] ~~Read params from url~~
- [ ] ~~Add newsletter functionality~~
- [ ] Add wcag accessibility functionality and logo
- [x] Add copyright info
- [ ] Add sitemap
- [x] Add agenda page <https://github.com/vkurko/calendar>
- [x] Add map page
- [ ] ~~Add dark mode~~
- [x] Add breadcrumb
- [ ] ~~Add confirmation page for newsletter subscription~~
- [ ] ~~Remove mdsvex dependency if no longer needed~~
- [ ] ~~Remove turndown dependency if no longer needed~~
- [ ] <https://toc.janosh.dev/?ref=madewithsvelte.com>
- [ ] <https://a11y.digitaldialog.swiss/checklist>
- [ ] <https://www.neurodiversity.design/>
- [ ] Add metadata to svg <https://www.w3.org/TR/SVGTiny12/metadata.html>
- [x] Add "@vite-pwa/sveltekit": "^0.2.1",
- [x] <https://github.com/n1kk/rehype-mdsvex-image-autoimport>
- [x] <rehypeAutolinkHeadings>
- [ ] https://sveltekit-static-blog-template.vercel.app/
- [ ] ~~https://github.com/matfantinel/image-transmutation~~
- [x] make all page prerenderable
- [ ] Cloudflare rule für weiterleitungen www.stadtgeschichtebasel.ch/index... stadtgeschichtebasel.ch/index (siehe kernreaktor.ch/\* Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://web.archive.org/web/kernreaktor.ch/$1))
- [ ] feat: improved accessability
- [ ] feat: wcag 2.1 compliance <https://a11y.digitaldialog.swiss/checklist>
- [ ] feat: <https://www.neurodiversity.design/>
- [ ] feat: Add toc to long pages <https://toc.janosh.dev/?ref=madewithsvelte.com>
- [ ] feat: link to research data platform
- [ ] feat: lunr.js bases search
- [ ] feat: improved SEO
- [ ] feat: sitemap.xml
- [ ] feat: rss.xml (via <https://github.com/matfantinel/sveltekit-static-blog-template/blob/main/src/routes/rss.xml/%2Bserver.ts>)
- [ ] feat: atom.xml
- [ ] fix: improved meta-tags
- [ ] fix: Add metadata to svg images <https://www.w3.org/TR/SVGTiny12/metadata.html>
- [ ] fix: better description for old page redirects

## Contributing

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"commit": "cz",
"prepare": "svelte-kit sync && husky install",
"prebuild": "node ./src/lib/downloadPostsPagesAssets.mjs",
"postbuild": "jampack ./build"
"postbuild": "jampack ./build && npx svelte-sitemap --domain https://beta.stadtgeschichtebasel.ch"
},
"devDependencies": {
"@divriots/jampack": "^0.13.0",
Expand Down Expand Up @@ -60,6 +60,7 @@
"svelte": "^3.59.2",
"svelte-check": "^3.5.1",
"svelte-maplibre": "^0.3.4",
"svelte-sitemap": "^2.6.0",
"tailwindcss": "^3.3.3",
"turndown": "^7.1.2",
"typescript": "^5.2.2",
Expand Down
76 changes: 76 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/lib/components/Container.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<section class="p-4 lg:p-10 prose lg:prose-xl">
<section class="p-4 lg:p-10 prose lg:prose-xl" role="main">
<slot />
</section>
2 changes: 1 addition & 1 deletion src/lib/components/Navigation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
</script>

<nav class="list-nav p-4 text-xl">
<nav class="list-nav p-4 text-xl" aria-label="Hauptmenü">
<ul>
<li aria-current={$page.url.pathname === base + '/' ? 'page' : undefined}>
<a
Expand Down
3 changes: 2 additions & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<p class="description">{post.excerpt} <a href="/blog/{post.slug}">weiterlesen</a></p>
</article>
{/each}

<nav aria-label="Blognavigation">
<Paginator bind:settings={paginationSettings} showNumerals amountText="Einträge"/>
</nav>
</Container>
77 changes: 47 additions & 30 deletions src/routes/agenda/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import Container from '$lib/components/Container.svelte';
/** @type {import('./$types').PageData} */
export let data;
const events = data.events.filter(({ startDate }) => new Date(startDate) > new Date())
const events = data.events.filter(({ startDate }) => new Date(startDate) > new Date());
events.forEach((date) => {
const startDate = new Date(date.startDate);
const endDate = new Date(date.endDate);
Expand All @@ -26,38 +26,55 @@

<Container>
<h1>Agenda</h1>
<h2>Veranstaltungen</h2>
<ul>
{#each paginatedEvents as { owner, title, shortDescription, originUrl, startDate, startTime, endTime }}
<li>
<hgroup>
<h3>{owner}: {title}</h3>
<p>
{startDate} {#if startTime}
({startTime} {#if endTime}- {endTime}{/if}){/if}
<section>
<h2>Veranstaltungen</h2>

{#each paginatedEvents as event}
<article class="card">
<h3 class="card-header">{event.owner}: {event.title}</h3>

<p class="card-footer">
<time datetime={event.startDate}>{event.startDate}</time>
{#if event.startTime}
(<time>{event.startTime}</time>
{#if event.endTime}- <time>{event.endTime}</time>{/if})
{/if}
{event.shortDescription} <a href={event.originUrl}>Mehr Infos</a>
</p>
</hgroup>
<p>{shortDescription} <a href={originUrl}>Mehr Infos</a></p>
</li>

</article>
{/each}
<Paginator bind:settings={paginationSettings} showNumerals amountText="Veranstaltungen" />
</ul>
<h2>Dauerausstellungen</h2>
<ul>
{#each exhibitions as { owner, title, shortDescription, longDescription, originUrl }}
<li>
<h3>{owner}: {title}</h3>
<p>
{#if longDescription}
{longDescription}
{:else}
{#if shortDescription}
{shortDescription}
{/if}
<nav aria-label="Veranstaltungsnavigation">
<Paginator bind:settings={paginationSettings} showNumerals amountText="Veranstaltungen" />
</nav>
</section>
<section>
<h2>Dauerausstellungen</h2>

{#each exhibitions as exhibition}
<article class="card">
<h3 class="card-header">{exhibition.owner}: {exhibition.title}</h3>
<p class="card-footer">
{#if exhibition.longDescription}
{exhibition.longDescription}
{:else if exhibition.shortDescription}
{exhibition.shortDescription}
{/if}
<a href={originUrl}>Mehr Infos</a>
<a href={exhibition.originUrl}>Mehr Infos</a>
</p>
</li>
</article>
{/each}
</ul>
</section>
<section>
<h2>Agendabasel.ch</h2>
<p>
Alle Daten auf dieser Seite stammen von <a href="https://agendabasel.ch">agendabasel.ch</a>
und werden der Stiftung Stadt.Geschichte.Basel im Rahmen einer Kooperation kostenlos zur Verfügung
gestellt. Falls Sie eine Veranstaltung oder Ausstellung auf Stadt.Geschichte.Basel publizieren
möchten, wenden Sie sich bitte direkt an agendabasel.ch oder an
<a href="mailto:[email protected]">[email protected]</a>.
Die Stiftung Stadt.Geschichte.Basel übernimmt keine Verantwortung für die Richtigkeit der
Daten.
</p>
</section>
</Container>

0 comments on commit 1ac4e90

Please sign in to comment.