🔧 Updated AboutUs and locale config

This commit is contained in:
Moritz Kröger 2019-03-28 23:09:58 +01:00
parent 45ac49a80d
commit 9041d7c051
8 changed files with 113 additions and 157 deletions

View file

@ -20,13 +20,14 @@ collections:
fields:
- label: "Language"
name: "language"
hint: "Select the language for this page."
widget: "select"
options:
- {label: "English", value: "en"}
- {label: "Deutsch", value: "de"}
- {label: "Français", value: "fr"}
- {label: "Polski", value: "pl"}
- {label: "Site Name", name: "title", widget: "string"}
- {label: "Site Name", name: "title", widget: "string", hint: "The name that will appear in the browser tab."}
- {label: "Headline", name: "headline", widget: "string"}
- {label: "Content", name: "content", widget: "markdown"}
- {label: "Button Label", name: "button", widget: "string"}
@ -41,14 +42,15 @@ collections:
fields:
- label: "Language"
name: "language"
hint: "Select the language for this page."
widget: "select"
options:
- {label: "English", value: "en"}
- {label: "Deutsch", value: "de"}
- {label: "Français", value: "fr"}
- {label: "Polski", value: "pl"}
- {label: "Page URL", name: "url", widget: "string"}
- {label: "Site Name", name: "title", widget: "string"}
- {label: "Page URL", name: "url", widget: "string", hint: "An optional, localised URL (e.g. https://euromat.info/#/<THIS_URL>", optional: true}
- {label: "Site Name", name: "title", widget: "string", hint: "The name that will appear in the browser tab."}
- {label: "Subtitle", name: "subtitle", widget: "string"}
- {label: "Label: Back button", name: "backButtonLabel", widget: "string"}
- {label: "Label: Legend", name: "legendLabel", widget: "string"}
@ -73,22 +75,11 @@ collections:
- {label: "Deutsch", value: "de"}
- {label: "Français", value: "fr"}
- {label: "Polski", value: "pl"}
- {label: "Page URL", name: "url", hint: "An optional, localised URL", widget: "string", optional: true}
- {label: "Site Name", name: "title", widget: "string"}
- {label: "Page URL", name: "url", widget: "string", hint: "An optional, localised URL (e.g. https://euromat.info/#/<THIS_URL>", optional: true}
- {label: "Site Name", name: "title", widget: "string", hint: "The name that will appear in the browser tab."}
- {label: "Headline", name: "headline", widget: "string"}
- {label: "Content", name: "content", widget: "markdown"}
- label: "Polis180 Member"
name: "pulse"
widget: "list"
fields:
- {label: "Name", name: "name", widget: "string"}
- {label: "URL to profile", name: "profile", widget: "string"}
- label: "Puls of Europe Member"
name: "poe"
widget: "list"
fields:
- {label: "Name", name: "name", widget: "string"}
- {label: "URL to profile", name: "profile", widget: "string"}
- {label: "Label for development and design", name: "devDesign", widget: "string"}
# FAQ
- name: "faq"
label: "[Page] FAQ"
@ -100,14 +91,15 @@ collections:
fields:
- label: "Language"
name: "language"
hint: "Select the language for this page."
widget: "select"
options:
- {label: "English", value: "en"}
- {label: "Deutsch", value: "de"}
- {label: "Français", value: "fr"}
- {label: "Polski", value: "pl"}
- {label: "Page URL", name: "url", widget: "string"}
- {label: "Site Name", name: "title", widget: "string"}
- {label: "Page URL", name: "url", widget: "string", hint: "An optional, localised URL (e.g. https://euromat.info/#/<THIS_URL>", optional: true}
- {label: "Site Name", name: "title", widget: "string", hint: "The name that will appear in the browser tab."}
- {label: "Headline", name: "headline", widget: "string"}
- label: "Questions"
name: "questions"
@ -126,14 +118,15 @@ collections:
fields:
- label: "Language"
name: "language"
hint: "Select the language for this page."
widget: "select"
options:
- {label: "English", value: "en"}
- {label: "Deutsch", value: "de"}
- {label: "Français", value: "fr"}
- {label: "Polski", value: "pl"}
- {label: "Page URL", name: "url", widget: "string"}
- {label: "Site Name", name: "title", widget: "string"}
- {label: "Page URL", name: "url", widget: "string", hint: "An optional, localised URL (e.g. https://euromat.info/#/<THIS_URL>", optional: true}
- {label: "Site Name", name: "title", widget: "string", hint: "The name that will appear in the browser tab."}
- {label: "Headline", name: "headline", widget: "string"}
- {label: "Content", name: "content", widget: "markdown"}
# DATA PRIVACY
@ -147,14 +140,15 @@ collections:
fields:
- label: "Language"
name: "language"
hint: "Select the language for this page."
widget: "select"
options:
- {label: "English", value: "en"}
- {label: "Deutsch", value: "de"}
- {label: "Français", value: "fr"}
- {label: "Polski", value: "pl"}
- {label: "Page URL", name: "url", widget: "string"}
- {label: "Site Name", name: "title", widget: "string"}
- {label: "Page URL", name: "url", widget: "string", hint: "An optional, localised URL (e.g. https://euromat.info/#/<THIS_URL>", optional: true}
- {label: "Site Name", name: "title", widget: "string", hint: "The name that will appear in the browser tab."}
- {label: "Headline", name: "headline", widget: "string"}
- label: "Topics"
name: "topics"
@ -173,14 +167,15 @@ collections:
fields:
- label: "Language"
name: "language"
hint: "Select the language for this page."
widget: "select"
options:
- {label: "English", value: "en"}
- {label: "Deutsch", value: "de"}
- {label: "Français", value: "fr"}
- {label: "Polski", value: "pl"}
- {label: "Page URL", name: "url", widget: "string"}
- {label: "Site Name", name: "title", widget: "string"}
- {label: "Page URL", name: "url", widget: "string", hint: "An optional, localised URL (e.g. https://euromat.info/#/<THIS_URL>", optional: true}
- {label: "Site Name", name: "title", widget: "string", hint: "The name that will appear in the browser tab."}
- {label: "Headline", name: "headline", widget: "string"}
- label: "Content"
name: "content"
@ -199,13 +194,14 @@ collections:
fields:
- label: "Language"
name: "language"
hint: "Select the language for this page."
widget: "select"
options:
- {label: "English", value: "en"}
- {label: "Deutsch", value: "de"}
- {label: "Français", value: "fr"}
- {label: "Polski", value: "pl"}
- {label: "Site Name", name: "title", widget: "string"}
- {label: "Site Name", name: "title", widget: "string", hint: "The name that will appear in the browser tab."}
- {label: "Headline", name: "headline", widget: "string"}
- {label: "Content", name: "content", widget: "markdown"}
- {label: "Button Label", name: "button", widget: "string"}

View file

@ -4,36 +4,34 @@
<div class="about-content">
<div class="about-text">
<p v-for="txt of $t('about.content')" :key="txt">
{{ txt }}
</p>
<v-markdown :source="$t('about.content')" />
</div>
<div class="about-people">
<div class="people-group polis">
<div class="group-inner">
<h2>
<a :href="$t('about.teamLabel.polis.url')" target="_blank">
<a :href="teamLabel.polis.url" target="_blank">
<img
class="team-logo polis"
:src="polisLogo"
width="150"
height="100"
>
<span hidden>{{ $t('about.teamLabel.polis.label') }}</span>
<span hidden>{{ teamLabel.polis.label }}</span>
</a>
</h2>
<ul>
<li v-for="(member, index) of $t('about.members.polis')" :key="'member-polis-' + index">
<li v-for="(member, index) of members.polis" :key="'member-polis-' + index">
<a
v-if="member.profile"
:href="$t(`about.members.polis[${index}].profile`)"
:href="member.profile"
target="_blank"
>
{{ $t(`about.members.polis[${index}].name`) }}
{{ member.name }}
<feather-external-link />
</a>
<span v-else>{{ $t(`about.members.polis[${index}].name`) }}</span>
<span v-else>{{ member.name }}</span>
</li>
</ul>
</div>
@ -42,27 +40,27 @@
<div class="people-group poe">
<div class="group-inner">
<h2>
<a :href="$t('about.teamLabel.poe.url')" target="_blank">
<a :href="teamLabel.poe.url" target="_blank">
<img
class="team-logo poe"
:src="poeLogo"
width="400"
height="60"
>
<span hidden>{{ $t('about.teamLabel.poe.label') }}</span>
<span hidden>{{ teamLabel.poe.label }}</span>
</a>
</h2>
<ul>
<li v-for="(member, index) of $t('about.members.poe')" :key="'member-poe-' + index">
<li v-for="(member, index) of members.poe" :key="'member-poe-' + index">
<a
v-if="member.profile"
:href="$t(`about.members.poe[${index}].profile`)"
:href="member.profile"
target="_blank"
>
{{ $t(`about.members.poe[${index}].name`) }}
{{ member.name }}
<feather-external-link />
</a>
<span v-else>{{ $t(`about.members.poe[${index}].name`) }}</span>
<span v-else>{{ member.name }}</span>
</li>
</ul>
</div>
@ -70,18 +68,18 @@
<div class="people-group dev">
<div class="group-inner dark">
<h2>{{ $t('about.teamLabel.dev') }}</h2>
<h2>{{ $t('about.devDesign') }}</h2>
<ul>
<li v-for="(member, index) of $t('about.members.dev')" :key="'member-dev-' + index">
<li v-for="(member, index) of members.dev" :key="'member-dev-' + index">
<a
v-if="member.profile"
:href="$t(`about.members.dev[${index}].profile`)"
:href="member.profile"
target="_blank"
>
{{ $t(`about.members.dev[${index}].name`) }}
{{ member.name }}
<feather-external-link />
</a>
<span v-else>{{ $t(`about.members.dev[${index}].name`) }}</span>
<span v-else>{{ member.name }}</span>
</li>
</ul>
</div>
@ -104,7 +102,32 @@
data () {
return {
polisLogo: require('@/assets/svg/polis-colored-logo.svg'),
poeLogo: require('@/assets/svg/poe-colored-logo.svg')
poeLogo: require('@/assets/svg/poe-colored-logo.svg'),
members: {
polis: [
{ name: 'Susanne Zels', profile: 'https://www.linkedin.com/in/susannezels/' },
{ name: 'Stephan Kreutzer', profile: 'https://www.linkedin.com/in/stephan-kreutzer-905a0635/' },
{ name: 'Benjamin Lenzing', profile: null },
{ name: 'Johannes John', profile: null }
],
poe: [
{ name: 'Eva Podgoršek', profile: 'https://twitter.com/evapodg' },
{ name: 'Peter Funk', profile: 'https://twitter.com/funk67' }
],
dev: [
{ name: 'Moritz Kröger', profile: 'http://moritz.berlin' }
]
},
teamLabel: {
polis: {
label: 'Polis180',
url: 'https://polis180.org/'
},
poe: {
label: 'Pulse of Europe',
url: 'https://pulseofeurope.eu'
}
}
}
}
}
@ -131,6 +154,10 @@
flex-direction: column;
}
.about-text {
margin-bottom: $base-gap;
}
.about-people {
display: flex;
justify-content: center;

View file

@ -3,5 +3,6 @@
"url": "uber-uns",
"title": "Über uns",
"headline": "Wer steckt eigentlich hinter dem EUROMAT?",
"content": "Als digitaler Wahl-Freund hat der EUROMAT zwar einiges auf dem Kasten. Dennoch besteht seine DNA vor allem aus Einsen und Nullen. An der Umsetzung hat ein engagiertes Team zusammengearbeitet, die Thesen erarbeitet, die Stellungnahmen der Parteien eingeholt, und den Euromaten technisch umgesetzt. Dieses Team kam durch eine Kooperation zwischen dem Berliner Organisationsteam von Pulse of Europe e.V. und dem ebenfalls in Berlin ansässigen Think Tank Polis 180 zusammen."
"content": "Als digitaler Wahl-Freund hat der EUROMAT zwar einiges auf dem Kasten. Dennoch besteht seine DNA vor allem aus Einsen und Nullen. An der Umsetzung hat ein engagiertes Team zusammengearbeitet, die Thesen erarbeitet, die Stellungnahmen der Parteien eingeholt, und den Euromaten technisch umgesetzt. Dieses Team kam durch eine Kooperation zwischen dem Berliner Organisationsteam von Pulse of Europe e.V. und dem ebenfalls in Berlin ansässigen Think Tank Polis 180 zusammen.",
"devDesign": "Umsetzung und Design"
}

View file

@ -3,5 +3,6 @@
"url": "about-us",
"title": "About us",
"headline": "Whos behind EUROMAT?",
"content": "As your digital election buddy the EUROMAT certainly has plenty of grey matter. However, its DNA still consists of mainly Ones and Zeros. Yet, for the right composition it needs a dedicated team who works on the questions, collects the parties replies and finally works the technical magic. This team has been brought together through a collaboration between the Berlin organising team of Pulse of Europe e.V. and the likewise Berlin-based Think Tank Polis 180."
"content": "As your digital election buddy the EUROMAT certainly has plenty of grey matter. However, its DNA still consists of mainly Ones and Zeros. Yet, for the right composition it needs a dedicated team who works on the questions, collects the parties replies and finally works the technical magic. This team has been brought together through a collaboration between the Berlin organising team of Pulse of Europe e.V. and the likewise Berlin-based Think Tank Polis 180.",
"devDesign": "Development and design"
}

View file

@ -1,76 +1,6 @@
export default {
de: {
about: {
pageTitle: 'Über uns',
members: {
polis: [
{ name: 'Susanne Zels', profile: 'https://www.linkedin.com/in/susannezels/' },
{ name: 'Stephan Kreutzer', profile: 'https://www.linkedin.com/in/stephan-kreutzer-905a0635/' },
{ name: 'Benjamin Lenzing', profile: false },
{ name: 'Johannes John', profile: false }
],
poe: [
{ name: 'Eva Podgoršek', profile: 'https://twitter.com/evapodg' },
{ name: 'Peter Funk', profile: 'https://twitter.com/funk67' }
],
dev: [
{ name: 'Moritz Kröger', profile: 'http://moritz.berlin' }
]
},
headline: 'Wer steckt eigentlich hinter dem EUROMAT?',
content: [
'Als digitaler Wahl-Freund hat der EUROMAT zwar einiges auf dem Kasten. Dennoch besteht seine DNA vor allem aus Einsen und Nullen.',
'An der Umsetzung hat ein engagiertes Team zusammengearbeitet, die Thesen erarbeitet, die Stellungnahmen der Parteien eingeholt, und den Euromaten technisch umgesetzt.',
'Dieses Team kam durch eine Kooperation zwischen dem Berliner Organisationsteam von Pulse of Europe e.V. und dem ebenfalls in Berlin ansässigen Think Tank Polis 180 zusammen.'
],
teamLabel: {
polis: {
label: 'Polis180',
url: 'https://polis180.org/'
},
poe: {
label: 'Pulse of Europe',
url: 'https://pulseofeurope.eu'
},
dev: 'Umsetzung und Design'
}
}
},
en: {
about: {
pageTitle: 'About',
members: {
polis: [
{ name: 'Susanne Zels', profile: 'https://www.linkedin.com/in/susannezels/' },
{ name: 'Stephan Kreutzer', profile: 'https://www.linkedin.com/in/stephan-kreutzer-905a0635/' },
{ name: 'Benjamin Lenzing', profile: false },
{ name: 'Johannes John', profile: false }
],
poe: [
{ name: 'Eva Podgoršek', profile: 'https://twitter.com/evapodg' },
{ name: 'Peter Funk', profile: 'https://twitter.com/funk67' }
],
dev: [
{ name: 'Moritz Kröger', profile: 'http://moritz.berlin' }
]
},
headline: 'Whos behind EUROMAT?',
content: [
'As your digital election buddy the EUROMAT certainly has plenty of grey matter. However, its DNA still consists of mainly Ones and Zeros.',
'Yet, for the right composition it needs a dedicated team who works on the questions, collects the parties replies and finally works the technical magic.',
'This team has been brought together through a collaboration between the Berlin organising team of Pulse of Europe e.V. and the likewise Berlin-based Think Tank Polis 180.'
],
teamLabel: {
polis: {
label: 'Polis180',
url: 'https://polis180.org/'
},
poe: {
label: 'Pulse of Europe',
url: 'https://pulseofeurope.eu'
},
dev: 'Development and design'
}
}
}
}
import { loadContent } from '@/helper/content'
export default loadContent(
'about',
require.context('./content', false, /\.json$/)
)

View file

@ -1,16 +1,15 @@
import { DEFAULT_LOCALE } from '@/config'
import { getTranslatedTitles, getTranslatedAliases } from '@/helper/content'
import i18n from './i18n'
export default [
{
path: '/uber-uns',
alias: '/about-us',
path: '/' + i18n[DEFAULT_LOCALE].about.url,
alias: getTranslatedAliases(i18n, 'about'),
name: 'about',
component: () => import('./components/index' /* webpackChunkName: "about" */),
meta: {
title: {
de: i18n.de.about.pageTitle,
en: i18n.en.about.pageTitle
}
title: getTranslatedTitles(i18n, 'about')
}
}
]

View file

@ -1 +1,10 @@
export const DEFAULT_LOCALE = 'de'
export const LOCALE_GERMAN = 'de'
export const LOCALE_ENGLISH = 'en'
export const LOCALE_FRENCH = 'fr'
export const LOCALE_POLISH = 'pl'
export const DEFAULT_LOCALE = LOCALE_GERMAN
export const LOCALES = [
LOCALE_GERMAN,
LOCALE_ENGLISH
]

View file

@ -11,35 +11,28 @@ import { i18n as press } from '@/app/press'
import { i18n as imprint } from '@/app/imprint'
import { i18n as privacy } from '@/app/privacy'
import { DEFAULT_LOCALE } from '@/config'
import { DEFAULT_LOCALE, LOCALES } from '@/config'
Vue.use(VueI18n)
const messages = [
intro, euromat, party,
about, fourzerofour, faq,
press, imprint, privacy
]
function getLanguage (lang) {
return messages.reduce((acc, cur) => ({
...acc,
...cur[lang]
}), {})
}
export default new VueI18n({
locale: localStorage.getItem('euromat-locale') || DEFAULT_LOCALE,
fallbackLocale: DEFAULT_LOCALE,
messages: {
de: {
...intro.de,
...euromat.de,
...party.de,
...about.de,
...fourzerofour.de,
...faq.de,
...press.de,
...imprint.de,
...privacy.de
},
en: {
...intro.en,
...euromat.en,
...party.en,
...about.en,
...fourzerofour.en,
...faq.en,
...press.en,
...imprint.en,
...privacy.en
}
}
messages: LOCALES.reduce((acc, cur) => ({
...acc,
[cur]: getLanguage(cur)
}), {})
})