-
+
sources.headerLong:
@@ -42,6 +42,7 @@
return {
templates: templates,
getTemplate: getTemplate,
+ glue: ' ' + this.$t('template.or') + ' ',
}
}
}
diff --git a/components/Media.vue b/components/Media.vue
index 497cc555..ee4d2c33 100644
--- a/components/Media.vue
+++ b/components/Media.vue
@@ -5,7 +5,7 @@
links.media
diff --git a/components/Socials.vue b/components/Socials.vue
index 4f80f2b2..5a451bb5 100644
--- a/components/Socials.vue
+++ b/components/Socials.vue
@@ -5,7 +5,7 @@
links.social
diff --git a/locale/pl/config.suml b/locale/pl/config.suml
index bcf44d13..d23b27cf 100644
--- a/locale/pl/config.suml
+++ b/locale/pl/config.suml
@@ -12,7 +12,6 @@ nouns:
enabled: true
route: 'neutratywy'
-
links:
enabled: true
route: 'linki'
diff --git a/locale/pl/translations.suml b/locale/pl/translations.suml
index 422bde48..4a24480f 100644
--- a/locale/pl/translations.suml
+++ b/locale/pl/translations.suml
@@ -89,6 +89,7 @@ sources:
nouns:
header: 'Neutratywy'
headerLong: 'Słownik neutratywów'
+ description: 'Feminatywy feminatywami, ale prawdziwe wyzwanie to tworzenie neutratywów! Przedstawiamy tworzony przez społeczność słownik rzeczowników z wyszczególnieniem ich formy męskiej, żeńskiej i neutralnej.'
intro:
- >
Feminatywy feminatywami, ale prawdziwe wyzwanie to tworzenie neutratywów!
diff --git a/nuxt.config.js b/nuxt.config.js
index 3528fb0a..6ccc9960 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -1,4 +1,5 @@
import translations from './server/translations';
+import config from './server/config';
const title = translations.title;
const description = translations.description;
@@ -89,4 +90,27 @@ export default {
axios: {
baseURL: process.env.BASE_URL,
},
+ router: {
+ extendRoutes(routes, resolve) {
+ if (config.sources.enabled) {
+ routes.push({ path: '/' + config.sources.route, component: resolve(__dirname, 'routes/sources.vue') });
+ }
+
+ if (config.nouns.enabled) {
+ routes.push({ path: '/' + config.nouns.route, component: resolve(__dirname, 'routes/nouns.vue') });
+ }
+
+ if (config.links.enabled) {
+ routes.push({ path: '/' + config.links.route, component: resolve(__dirname, 'routes/links.vue') });
+ }
+
+ if (config.contact.enabled) {
+ routes.push({ path: '/' + config.contact.route, component: resolve(__dirname, 'routes/contact.vue') });
+ }
+
+ routes.push({ path: '/' + config.template.any.route, component: resolve(__dirname, 'routes/any.vue') });
+
+ routes.push({ path: '*', component: resolve(__dirname, 'routes/template.vue') });
+ },
+ },
}
diff --git a/pages/index.vue b/pages/index.vue
index 006e2ad6..bfcbb4f2 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -166,7 +166,7 @@
- template.any.header
+ template.any.header
template.any.description
@@ -271,7 +271,7 @@
diff --git a/server/banner.js b/server/banner.js
index eb99d461..43460494 100644
--- a/server/banner.js
+++ b/server/banner.js
@@ -55,7 +55,7 @@ export default async function (req, res, next) {
context.fillText(templateNameOptions.join('\n'), width / leftRatio + imageSize / 1.5, height / 2 + (templateNameOptions.length <= 2 ? 72 : 24))
} else {
context.font = 'regular 120pt Quicksand'
- context.fillText('Zaimki.pl', width / leftRatio + imageSize / 1.5, height / 2 + 48)
+ context.fillText(translations.title, width / leftRatio + imageSize / 1.5, height / 2 + 48)
}
res.setHeader('content-type', mime);
diff --git a/server/config.js b/server/config.js
new file mode 100644
index 00000000..f90562b6
--- /dev/null
+++ b/server/config.js
@@ -0,0 +1,3 @@
+import Suml from 'suml';
+const fs = require('fs');
+export default new Suml().parse(fs.readFileSync('./data/config.suml').toString());