Repository navigation
Feat/strength content #620
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| 'openscript-ch-website': minor | ||
| --- | ||
|
|
||
| Add strengths content |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,19 @@ | ||
| --- | ||
| strengthName: Kurse | ||
| strengthName: Kurse für Lernende | ||
| sprite: course | ||
| service: education | ||
| --- | ||
|
|
||
| Wissen weitergeben zu können ist für uns eine Herzensangelegenheit. Wir engagieren uns seit vielen | ||
| Jahren in der Berufsbildung, speziell bei den Informatikberufen sowie im neuen EDB-Beruf. | ||
|
|
||
| Gerne bereiten wir einen massgeschneiderten Kurs für die Bedürfnisse Ihrer Lernenden vor. | ||
|
|
||
| #### Durchgeführte Kurse | ||
|
|
||
| - HTML, CSS und JavaScript Grund- und Aufbaukurse | ||
| - React und Typescript Grundkurse | ||
| - Datenbankkurse, z.B. mit MariaDB oder MongoDB | ||
| - Java ORM Kurse, JPA | ||
| - Linux Grundlagenkurs | ||
| - Viele, viele Überbetriebliche Kurse (ÜK) des Informatikberufes | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,3 +3,14 @@ strengthName: Präsentationen | |
| sprite: presentation | ||
| service: education | ||
| --- | ||
|
|
||
| Die Welt der Informatik verändert sich so schnell wie kaum ein anderes Berufsfeld. | ||
| Täglich erscheinen neue Technologien und Frameworks. | ||
|
|
||
| Uns stetig weiterzubilden gehört deshalb zum Selbstverständnis unseres Berufes. | ||
| Wir haben Freude daran, neues auszuprobieren und teilen unsere Erkenntnisse gerne mit anderen. | ||
| In regelmässigen Abständen finden bei uns «Tech-Talks» statt, wo wir genau das machen. | ||
|
|
||
| #### Veröffentlichte Präsentationen | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ich denke das kann man später direkt mit dem index.json verknüpfen. Aber das würde ich in einem 2. Schritt machen |
||
|
|
||
| - [Content Management Frameworks](https://openscript.page/ch.openscript.bonfire-talks/20261010_content_management_frameworks/) von Robin | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,39 @@ | ||
| --- | ||
| import { currentLocale } from 'astro-nanostores-i18n:runtime'; | ||
| import { currentLocale, useI18n } from 'astro-nanostores-i18n:runtime'; | ||
| import { getCollection, render } from 'astro:content'; | ||
| import Divider from '../../components/Divider.astro'; | ||
| import { getContentAnchor } from '../../utils/paths'; | ||
| import { getContentAnchor, resolveSimplePath } from '../../utils/paths'; | ||
| import Button from '../../components/Button.astro'; | ||
|
|
||
| const locale = currentLocale.get(); | ||
| const services = await getCollection('services', (entry) => entry.data.locale === locale); | ||
| const translations = useI18n('services.view', { | ||
| strengths: 'Passende Stärken', | ||
| }); | ||
|
|
||
| const [services, strengths, strengthsPath] = await Promise.all([ | ||
| getCollection('services', (entry) => entry.data.locale === locale), | ||
| getCollection('strengths', (entry) => entry.data.locale === locale), | ||
| resolveSimplePath('main', '/present/strengths', locale), | ||
| ]); | ||
|
|
||
| services.sort((first, second) => first.data.order - second.data.order); | ||
| strengths.sort((first, second) => | ||
| first.data.strengthName.localeCompare(second.data.strengthName, locale), | ||
| ); | ||
|
|
||
| const sections = await Promise.all( | ||
| services.map(async (service) => { | ||
| const { Content } = await render(service); | ||
| return { data: service.data, Content }; | ||
| const relatedStrengths = strengths.filter( | ||
| (strength) => | ||
| strength.data.service.collection === 'services' && strength.data.service.id == service.id, | ||
| ); | ||
| return { data: service.data, Content, relatedStrengths }; | ||
| }), | ||
| ); | ||
| --- | ||
|
|
||
| {sections.map(({ data, Content }, index) => ( | ||
| {sections.map(({ data, Content, relatedStrengths }, index) => ( | ||
| <> | ||
| {index > 0 && ( | ||
| <Divider | ||
|
|
@@ -33,6 +50,23 @@ const sections = await Promise.all( | |
| <h2>{data.serviceName}</h2> | ||
| <p>{data.description}</p> | ||
| <Content /> | ||
| {data.callToAction && ( | ||
| <Button href="mailto:hi@openscript.ch" withArrow> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Allenfalls brauchen wir hier noch was besseres |
||
| {data.callToAction} | ||
| </Button> | ||
| )} | ||
| {relatedStrengths.length > 0 && ( | ||
| <div class="strengths"> | ||
| <h4>{translations.strengths}</h4> | ||
| <ul> | ||
| {relatedStrengths.map((strength) => ( | ||
| <li> | ||
| <a href={`${strengthsPath}#${strength.id}`}>{strength.data.strengthName}</a> | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| </div> | ||
| )} | ||
| </section> | ||
| </> | ||
| ))} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ich habe das explizt herausgehoben, da ich es so einen Mehrwert finde und es sich weniger mit «Workshops» überschneidet