diff --git a/packages/nnk/src/components/controllers/App/index.js b/packages/nnk/src/components/controllers/App/index.js index 5f4b5b0..77237fc 100644 --- a/packages/nnk/src/components/controllers/App/index.js +++ b/packages/nnk/src/components/controllers/App/index.js @@ -26,7 +26,9 @@ import { MainArea } from './styles'; const App = ({ state, actions }) => { const { colors, language } = state.theme; const data = state.source.get(state.router.link); - + const now = new Date(); + const parsedNowISOString = now.toISOString(); + const locale = `${language}_${language.toUpperCase()}`; useEffect(() => { actions.theme.updateRead(updatedReadPosts()); }, []); @@ -35,12 +37,53 @@ const App = ({ state, actions }) => { <>
+ + -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + const { language } = state.theme; const data = state.source.get(state.router.link); let { title } = state.frontity; @@ -20,11 +22,21 @@ const Title = ({ state }) => { title = `${cleanTitle} - ${state.frontity.title}`; } else if (data.is404) { title = `404 Not Found - ${state.frontity.title}`; + } else if (state.router.link === '/') { + title = `${state.frontity.title} - ${ + PAGES_SEO[language][state.router.link] + }`; + } else { + title = `${PAGES_SEO[language][state.router.link]} - ${ + state.frontity.title + }`; } return (
+ + ); }; diff --git a/packages/nnk/src/db/index.js b/packages/nnk/src/db/index.js index 0a72421..c9e8dc6 100644 --- a/packages/nnk/src/db/index.js +++ b/packages/nnk/src/db/index.js @@ -7,6 +7,7 @@ export { default as HOMEPAGE_TEXTS } from './homepage.json'; export { default as JTTF_TEXTS } from './jttf.json'; export { default as MAIN_SECTIONS } from './nav.json'; export { default as NEWS_SECTIONS } from './news.json'; +export { default as PAGES_SEO } from './pages.json'; export { default as PRIVACY_TEXTS } from './privacy.json'; export { default as VOLUNTEER_TEXTS } from './volunteer.json'; export { default as WHAT_TEXTS } from './what.json'; diff --git a/packages/nnk/src/db/pages.json b/packages/nnk/src/db/pages.json new file mode 100644 index 0000000..a9806f1 --- /dev/null +++ b/packages/nnk/src/db/pages.json @@ -0,0 +1,20 @@ +{ + "en": { + "/": "Supporting people on the move", + "/help-us/": "Support the movement", + "/join-us/": "Volunteer - Jump to the field", + "/news/": "No Name News", + "/what/": "What? Our projects to fight injustice", + "/where/": "Where? Where we are", + "/why/": "Why? Disobey injustice" + }, + "es": { + "/": "Supporting people on the move", + "/help-us/": "Apoya el movimiento", + "/join-us/": "Voluntariado - Yendo al terreno", + "/news/": "No Name News - Noticias", + "/what/": "¿Qué? Nuestros programas contra la injusticia", + "/where/": "¿Dónde? Dónde estamos", + "/why/": "¿Por qué? Desobedecer a la injusticia" + } +} \ No newline at end of file