Implement configuration of internal pages

This commit is contained in:
Wolfgang Huß 2021-07-29 16:54:20 +02:00
parent 656e840d3e
commit 0b1bdc495f
11 changed files with 207 additions and 12 deletions

View File

@ -1,6 +1,7 @@
// this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding by https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/constants/ // this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding by https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/constants/
export default { export default {
LANDING_PAGE: '/login', // examples: '/login', '/registration', '/organization', or external 'https://ocelot.social' // Wolle LANDING_PAGE: '/login', // examples: '/login', '/registration', '/organization', or external 'https://ocelot.social'
LANDING_PAGE: '/organization', // examples: '/login', '/registration', '/organization', or external 'https://ocelot.social'
// you can find and store templates at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/ // you can find and store templates at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/

View File

@ -1,17 +1,135 @@
// this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding by https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/constants/ // this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding by https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/constants/
export default {
LANDING_PAGE: '/login', // examples: '/login', '/registration', '/organization', or external 'https://ocelot.social'
// you can find and store templates at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/ const ORGANIZATION = {
name: 'organization',
// Wolle externalLink: 'https://ocelot.social',
externalLink: null, // if string is defined and not empty it's dominating
// in case internal page content is here 'webapp/locales/html/'
internalLink: '/organization', // static, don't change! internal page in case no external is defined
internalPage: {
footerIdent: 'site.made', // localized string identifier
// Wolle headlineIdent: null, // on null default is used, on empty string it's hidden
headlineIdent: '', // localized string identifier. on null default is used, on empty string it's hidden
hasBaseCard: true,
hasLoginInHeader: true,
},
}
const DONATE = {
name: 'donate',
// Wolle externalLink: 'https://ocelot-social.herokuapp.com/donations', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly
externalLink: '', // if string is defined and not empty it's dominating
// in case internal page content is here 'webapp/locales/html/'
internalLink: '/donate', // static, don't change! internal page in case no external is defined
internalPage: {
footerIdent: 'site.donate', // localized string identifier
headlineIdent: null, // localized string identifier. on null default is used, on empty string it's hidden
hasBaseCard: true,
hasLoginInHeader: true,
},
}
const IMPRINT = {
name: 'imprint',
// Wolle externalLink: 'https://ocelot-social.herokuapp.com/imprint', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly
externalLink: '', // if string is defined and not empty it's dominating
// in case internal page content is here 'webapp/locales/html/'
internalLink: '/imprint', // static, don't change! internal page in case no external is defined
internalPage: {
footerIdent: 'site.imprint', // localized string identifier
headlineIdent: null, // localized string identifier. on null default is used, on empty string it's hidden
hasBaseCard: true,
hasLoginInHeader: true,
},
}
const TERMS_AND_CONDITIONS = {
name: 'terms-and-conditions',
externalLink: null, // if string is defined and not empty it's dominating
// in case internal page content is here 'webapp/locales/html/'
internalLink: '/terms-and-conditions', // static, don't change! internal page in case no external is defined
internalPage: {
footerIdent: 'site.termsAndConditions', // localized string identifier
headlineIdent: null, // localized string identifier. on null default is used, on empty string it's hidden
hasBaseCard: true,
hasLoginInHeader: true,
},
}
const CODE_OF_CONDUCT = {
name: 'code-of-conduct',
externalLink: null, // if string is defined and not empty it's dominating
// in case internal page content is here 'webapp/locales/html/'
internalLink: '/code-of-conduct', // static, don't change! internal page in case no external is defined
internalPage: {
footerIdent: 'site.code-of-conduct', // localized string identifier
headlineIdent: null, // localized string identifier. on null default is used, on empty string it's hidden
hasBaseCard: true,
hasLoginInHeader: true,
},
}
const DATA_PRIVACY = {
name: 'data-privacy',
externalLink: null, // if string is defined and not empty it's dominating
// in case internal page content is here 'webapp/locales/html/'
internalLink: '/data-privacy', // static, don't change! internal page in case no external is defined
internalPage: {
footerIdent: 'site.data-privacy', // localized string identifier
headlineIdent: null, // localized string identifier. on null default is used, on empty string it's hidden
hasBaseCard: true,
hasLoginInHeader: true,
},
}
const FAQ = {
name: 'faq',
// Wolle externalLink: 'https://ocelot.social',
externalLink: null, // if string is defined and not empty it's dominating
// in case internal page content is here 'webapp/locales/html/'
internalLink: '/faq', // static, don't change! internal page in case no external is defined
internalPage: {
footerIdent: 'site.faq', // localized string identifier
// Wolle headlineIdent: null, // on null default is used, on empty string it's hidden
headlineIdent: null, // localized string identifier. on null default is used, on empty string it's hidden
hasBaseCard: true,
hasLoginInHeader: true,
},
}
export default {
// Wolle LANDING_PAGE: '/login', // examples: '/login', '/registration', '/organization', or external 'https://ocelot.social'
LANDING_PAGE: '/organization', // examples: '/login', '/registration', '/organization', or external 'https://ocelot.social'
// you can find and store templates for 👇🏼 at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/
SUPPORT: 'https://ocelot.social', // example for internal support page: 'https://staging.ocelot.social/support'. set a full URL please, because it is used in e-mails as well! SUPPORT: 'https://ocelot.social', // example for internal support page: 'https://staging.ocelot.social/support'. set a full URL please, because it is used in e-mails as well!
// on null or empty strings internal pages are used, see 'webapp/locales/html/' ORGANIZATION,
ORGANIZATION: 'https://ocelot.social', DONATE,
DONATE: 'https://ocelot-social.herokuapp.com/donations', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly IMPRINT,
IMPRINT: 'https://ocelot-social.herokuapp.com/imprint', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly TERMS_AND_CONDITIONS,
TERMS_AND_CONDITIONS: null, CODE_OF_CONDUCT,
CODE_OF_CONDUCT: null, DATA_PRIVACY,
DATA_PRIVACY: null, FAQ,
FAQ: 'https://ocelot.social',
FOOTER_LINK_LIST: [
ORGANIZATION,
TERMS_AND_CONDITIONS,
CODE_OF_CONDUCT,
DATA_PRIVACY,
FAQ,
// DONATE,
// Wolle
DONATE,
IMPRINT,
],
} }

View File

@ -781,6 +781,7 @@
"contact": "Kontakt", "contact": "Kontakt",
"data-privacy": "Datenschutzerklärung", "data-privacy": "Datenschutzerklärung",
"director": "Geschäftsführer", "director": "Geschäftsführer",
"donate": "Spenden",
"error-occurred": "Ein Fehler ist aufgetreten.", "error-occurred": "Ein Fehler ist aufgetreten.",
"faq": "FAQ", "faq": "FAQ",
"germany": "Deutschland", "germany": "Deutschland",

View File

@ -781,6 +781,7 @@
"contact": "Contact", "contact": "Contact",
"data-privacy": "Data privacy", "data-privacy": "Data privacy",
"director": "Managing Director", "director": "Managing Director",
"donate": "Donate",
"error-occurred": "An error occurred.", "error-occurred": "An error occurred.",
"faq": "FAQ", "faq": "FAQ",
"germany": "Germany", "germany": "Germany",

View File

@ -0,0 +1,5 @@
<!-- this file is replaced on rebranding by https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/locales/html/ -->
<!-- you can find and store templates at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/ -->
<br>
<p>Hier steht was zu den Spenden.</p>

View File

@ -5,6 +5,7 @@ import codeOfConduct from './code-of-conduct.html'
import dataPrivacy from './data-privacy.html' import dataPrivacy from './data-privacy.html'
import faq from './faq.html' import faq from './faq.html'
import imprint from './imprint.html' import imprint from './imprint.html'
import donate from './donate.html'
export default { export default {
organization, organization,
@ -14,4 +15,5 @@ export default {
dataPrivacy, dataPrivacy,
faq, faq,
imprint, imprint,
donate,
} }

View File

@ -0,0 +1,5 @@
<!-- this file is replaced on rebranding by https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/locales/html/ -->
<!-- you can find and store templates at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/ -->
<br>
<p>Here's what it says about donations.</p>

View File

@ -5,6 +5,7 @@ import codeOfConduct from './code-of-conduct.html'
import dataPrivacy from './data-privacy.html' import dataPrivacy from './data-privacy.html'
import faq from './faq.html' import faq from './faq.html'
import imprint from './imprint.html' import imprint from './imprint.html'
import donate from './donate.html'
export default { export default {
organization, organization,
@ -14,4 +15,5 @@ export default {
dataPrivacy, dataPrivacy,
faq, faq,
imprint, imprint,
donate,
} }

View File

@ -45,6 +45,7 @@ export default {
'imprint', 'imprint',
'data-privacy', 'data-privacy',
'faq', 'faq',
'donate',
], ],
// pages to keep alive // pages to keep alive
keepAlivePages: ['index'], keepAlivePages: ['index'],

View File

@ -0,0 +1,38 @@
import { mount } from '@vue/test-utils'
import Donate from './donate.vue'
import VueMeta from 'vue-meta'
const localVue = global.localVue
localVue.use(VueMeta, { keyName: 'head' })
describe('donate.vue', () => {
let wrapper
let mocks
beforeEach(() => {
mocks = {
$t: (t) => t,
}
})
describe('mount', () => {
const Wrapper = () => {
return mount(Donate, {
mocks,
localVue,
})
}
beforeEach(() => {
wrapper = Wrapper()
})
it('renders', () => {
expect(wrapper.is('div')).toBe(true)
})
it('has correct <head> content', () => {
expect(wrapper.vm.$metaInfo.title).toBe('site.donate')
})
})
})

21
webapp/pages/donate.vue Normal file
View File

@ -0,0 +1,21 @@
<template>
<div>
<ds-space margin="small">
<ds-heading tag="h2">{{ $t('site.donate') }}</ds-heading>
</ds-space>
<ds-container>
<div v-html="$t('html.donate')" />
</ds-container>
</div>
</template>
<script>
export default {
layout: 'basic',
head() {
return {
title: this.$t('site.donate'),
}
},
}
</script>