From ff6cc306aff6150a924f1a647387e498d050ea9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 18 May 2021 17:04:24 +0200 Subject: [PATCH] Refactor logos, first step --- README.md | 2 +- backend/src/config/links.js | 1 + backend/src/config/logos.js | 10 +++ backend/src/config/metadata.js | 2 + .../src/middleware/email/templateBuilder.js | 3 +- webapp/components/LoginForm/LoginForm.vue | 12 ++-- webapp/components/Logo/Logo.vue | 52 ++++++++++++--- .../Registration/RegistrationSlider.vue | 4 +- .../_new/generic/BaseCard/BaseCard.story.js | 5 +- webapp/constants/links.js | 1 + webapp/constants/logos.js | 10 +++ webapp/constants/metadata.js | 3 +- webapp/layouts/basic.vue | 2 +- webapp/layouts/default.vue | 2 +- webapp/maintenance/source/pages/index.vue | 12 +--- webapp/pages/logout.vue | 7 +- webapp/pages/password-reset.vue | 4 +- .../img/custom/Logo-Horizontal-Dark.svg | 48 -------------- webapp/static/img/custom/Logo-Horizontal.svg | 2 +- ...under-maintenance.svg => logo-squared.svg} | 4 +- webapp/static/img/custom/logout.svg | 65 ------------------- webapp/static/img/custom/password-reset.svg | 65 ------------------- webapp/static/img/custom/sign-up.svg | 65 ------------------- webapp/static/img/custom/welcome.svg | 65 ------------------- 24 files changed, 103 insertions(+), 343 deletions(-) create mode 100644 backend/src/config/logos.js create mode 100644 webapp/constants/logos.js delete mode 100644 webapp/static/img/custom/Logo-Horizontal-Dark.svg rename webapp/static/img/custom/{under-maintenance.svg => logo-squared.svg} (98%) delete mode 100644 webapp/static/img/custom/logout.svg delete mode 100644 webapp/static/img/custom/password-reset.svg delete mode 100644 webapp/static/img/custom/sign-up.svg delete mode 100644 webapp/static/img/custom/welcome.svg diff --git a/README.md b/README.md index 9c948e7fb..4e1777c25 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ocelot.social is a nonprofit social, action and knowledge network that connects * **Action**: Don't just read about how to make the world a better place, but come into **Action** by following provided suggestions on the **Action** tab provided by other people or **Organisations**.

- Ocelot-Social + ocelot.social

## Live demo diff --git a/backend/src/config/links.js b/backend/src/config/links.js index 494e449ba..c6f932c82 100644 --- a/backend/src/config/links.js +++ b/backend/src/config/links.js @@ -1,3 +1,4 @@ +// this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding export default { ORGANIZATION: 'https://ocelot.social', DONATE: 'https://ocelot-social.herokuapp.com/donations', diff --git a/backend/src/config/logos.js b/backend/src/config/logos.js new file mode 100644 index 000000000..d093c7b46 --- /dev/null +++ b/backend/src/config/logos.js @@ -0,0 +1,10 @@ +// this file is duplicated in `backend/src/config/logos.js` and `webapp/constants/logos.js` and replaced on rebranding +// this are the paths in the webapp +export default { + LOGO_HEADER_PATH: '/img/custom/logo-horizontal.svg', + LOGO_SIGNUP_PATH: '/img/custom/logo-squared.svg', + LOGO_WELCOME_PATH: '/img/custom/logo-squared.svg', + LOGO_LOGOUT_PATH: '/img/custom/logo-squared.svg', + LOGO_PASSWORD_RESET_PATH: '/img/custom/logo-squared.svg', + LOGO_MAINTENACE_RESET_PATH: '/img/custom/logo-squared.svg', +} diff --git a/backend/src/config/metadata.js b/backend/src/config/metadata.js index 68d353eea..d40308e80 100644 --- a/backend/src/config/metadata.js +++ b/backend/src/config/metadata.js @@ -1,7 +1,9 @@ +// this file is duplicated in `backend/src/config/metadata.js` and `webapp/constants/metadata.js` and replaced on rebranding export default { APPLICATION_NAME: 'ocelot.social', APPLICATION_SHORT_NAME: 'ocelot', APPLICATION_DESCRIPTION: 'ocelot.social Community Network', + COOKIE_NAME: 'ocelot-social-token', ORGANIZATION_NAME: 'ocelot.social Community', ORGANIZATION_JURISDICTION: 'City of Angels', } diff --git a/backend/src/middleware/email/templateBuilder.js b/backend/src/middleware/email/templateBuilder.js index 2c7038d27..872b86b29 100644 --- a/backend/src/middleware/email/templateBuilder.js +++ b/backend/src/middleware/email/templateBuilder.js @@ -1,10 +1,11 @@ import mustache from 'mustache' import CONFIG from '../../config' +import logosWebapp from '../../config/logos.js' import * as templates from './templates' const from = CONFIG.EMAIL_DEFAULT_SENDER -const welcomeImageUrl = new URL(`/img/custom/welcome.svg`, CONFIG.CLIENT_URI) +const welcomeImageUrl = new URL(logosWebapp.LOGO_WELCOME_PATH, CONFIG.CLIENT_URI) const defaultParams = { supportUrl: CONFIG.SUPPORT_URL, diff --git a/webapp/components/LoginForm/LoginForm.vue b/webapp/components/LoginForm/LoginForm.vue index 01c3c8661..0dc1b5e8a 100644 --- a/webapp/components/LoginForm/LoginForm.vue +++ b/webapp/components/LoginForm/LoginForm.vue @@ -7,7 +7,7 @@

{{ $t('login.login') }}

@@ -56,13 +56,15 @@ diff --git a/webapp/components/Registration/RegistrationSlider.vue b/webapp/components/Registration/RegistrationSlider.vue index 0e3ae17a4..64b8d9a3f 100644 --- a/webapp/components/Registration/RegistrationSlider.vue +++ b/webapp/components/Registration/RegistrationSlider.vue @@ -3,7 +3,7 @@ @@ -47,6 +47,7 @@ import links from '~/constants/links.js' import metadata from '~/constants/metadata.js' import ComponentSlider from '~/components/ComponentSlider/ComponentSlider' import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch' +import Logo from '~/components/Logo/Logo' import RegistrationSlideCreate from './RegistrationSlideCreate' import RegistrationSlideEmail from './RegistrationSlideEmail' import RegistrationSlideInvite from './RegistrationSlideInvite' @@ -58,6 +59,7 @@ export default { components: { ComponentSlider, LocaleSwitch, + Logo, RegistrationSlideCreate, RegistrationSlideEmail, RegistrationSlideInvite, diff --git a/webapp/components/_new/generic/BaseCard/BaseCard.story.js b/webapp/components/_new/generic/BaseCard/BaseCard.story.js index 3b9e60813..928aba5e6 100644 --- a/webapp/components/_new/generic/BaseCard/BaseCard.story.js +++ b/webapp/components/_new/generic/BaseCard/BaseCard.story.js @@ -1,5 +1,6 @@ import { storiesOf } from '@storybook/vue' import helpers from '~/storybook/helpers' +import logos from '~/constants/logos.js' import BaseCard from './BaseCard.vue' storiesOf('Generic/BaseCard', module) @@ -33,7 +34,7 @@ storiesOf('Generic/BaseCard', module) template: `

I am a card heading

And I am a paragraph.

@@ -46,7 +47,7 @@ storiesOf('Generic/BaseCard', module) template: `

I am a card heading

And I am a paragraph.

diff --git a/webapp/constants/links.js b/webapp/constants/links.js index 494e449ba..c6f932c82 100644 --- a/webapp/constants/links.js +++ b/webapp/constants/links.js @@ -1,3 +1,4 @@ +// this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding export default { ORGANIZATION: 'https://ocelot.social', DONATE: 'https://ocelot-social.herokuapp.com/donations', diff --git a/webapp/constants/logos.js b/webapp/constants/logos.js new file mode 100644 index 000000000..d093c7b46 --- /dev/null +++ b/webapp/constants/logos.js @@ -0,0 +1,10 @@ +// this file is duplicated in `backend/src/config/logos.js` and `webapp/constants/logos.js` and replaced on rebranding +// this are the paths in the webapp +export default { + LOGO_HEADER_PATH: '/img/custom/logo-horizontal.svg', + LOGO_SIGNUP_PATH: '/img/custom/logo-squared.svg', + LOGO_WELCOME_PATH: '/img/custom/logo-squared.svg', + LOGO_LOGOUT_PATH: '/img/custom/logo-squared.svg', + LOGO_PASSWORD_RESET_PATH: '/img/custom/logo-squared.svg', + LOGO_MAINTENACE_RESET_PATH: '/img/custom/logo-squared.svg', +} diff --git a/webapp/constants/metadata.js b/webapp/constants/metadata.js index 20b9a5896..d40308e80 100644 --- a/webapp/constants/metadata.js +++ b/webapp/constants/metadata.js @@ -1,8 +1,9 @@ +// this file is duplicated in `backend/src/config/metadata.js` and `webapp/constants/metadata.js` and replaced on rebranding export default { APPLICATION_NAME: 'ocelot.social', APPLICATION_SHORT_NAME: 'ocelot', APPLICATION_DESCRIPTION: 'ocelot.social Community Network', + COOKIE_NAME: 'ocelot-social-token', ORGANIZATION_NAME: 'ocelot.social Community', ORGANIZATION_JURISDICTION: 'City of Angels', - COOKIE_NAME: 'ocelot-social-token', } diff --git a/webapp/layouts/basic.vue b/webapp/layouts/basic.vue index 527d5239c..9dd008c88 100644 --- a/webapp/layouts/basic.vue +++ b/webapp/layouts/basic.vue @@ -6,7 +6,7 @@ - + diff --git a/webapp/layouts/default.vue b/webapp/layouts/default.vue index 0b682f3d5..8b5e6302d 100644 --- a/webapp/layouts/default.vue +++ b/webapp/layouts/default.vue @@ -6,7 +6,7 @@ - + - Under maintenance + @@ -42,11 +38,13 @@ import emails from '~/constants/emails.js' import links from '~/constants/links.js' import metadata from '~/constants/metadata.js' import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch' +import Logo from '~/components/Logo/Logo' export default { layout: 'blank', components: { LocaleSwitch, + Logo, }, data() { return { links, metadata, supportEmail: emails.SUPPORT } @@ -55,8 +53,4 @@ export default { diff --git a/webapp/pages/logout.vue b/webapp/pages/logout.vue index 279eec511..392b66d72 100644 --- a/webapp/pages/logout.vue +++ b/webapp/pages/logout.vue @@ -3,7 +3,7 @@ - Logging out + Logging out... @@ -14,8 +14,13 @@