Skip to content

DT-6539 Logos for social media share links #5439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: v3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/configurations/config.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ export default {
locale: 'en_US',

image: {
url: '/img/default-social-share.png',
url: 'img/default-social-share.png',
width: 2400,
height: 1260,
},
Expand Down
7 changes: 6 additions & 1 deletion app/configurations/config.hameenlinna.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,19 @@ export default configMerger(walttiConfig, {
twitter: {
site: '@hmlkaupunki',
},
image: {
url: 'assets/hameenlinna-logo.png',
width: 800,
height: 352,
},
},

title: APP_TITLE,

favicon: './app/configurations/images/hameenlinna/hameenlinna-favicon.png',

// Navbar logo
logo: 'hameenlinna/logo.png',
logo: 'hameenlinna/hameenlinna-logo.png',
secondaryLogo: 'hameenlinna/secondary-logo.png',

feedIds: ['Hameenlinna'],
Expand Down
2 changes: 1 addition & 1 deletion app/configurations/config.hsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export default {
description: APP_DESCRIPTION,

image: {
url: '/img/hsl-social-share.png',
url: 'img/hsl-social-share.png',
width: 400,
height: 400,
},
Expand Down
5 changes: 5 additions & 0 deletions app/configurations/config.joensuu.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export default configMerger(walttiConfig, {
socialMedia: {
title: APP_TITLE,
description: APP_DESCRIPTION,
image: {
url: 'assets/joensuu-favicon.png',
width: 346,
height: 80,
},
},

areaPolygon: [
Expand Down
5 changes: 5 additions & 0 deletions app/configurations/config.jyvaskyla.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ export default configMerger(walttiConfig, {
socialMedia: {
title: APP_TITLE,
description: APP_DESCRIPTION,
image: {
url: 'assets/jyvaskyla-favicon.png',
width: 443,
height: 443,
},
},

title: APP_TITLE,
Expand Down
5 changes: 5 additions & 0 deletions app/configurations/config.kouvola.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ export default configMerger(walttiConfig, {
twitter: {
site: '@kouvolakaupunki',
},
image: {
url: 'assets/social-share-kouvola.png',
width: 134,
height: 134,
},
},

title: APP_TITLE,
Expand Down
7 changes: 6 additions & 1 deletion app/configurations/config.kuopio.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export default configMerger(walttiConfig, {
socialMedia: {
title: APP_TITLE,
description: APP_DESCRIPTION,
image: {
url: 'img/social-share-kuopio.png',
width: 760,
height: 224,
},
},

title: APP_TITLE,
Expand All @@ -30,7 +35,7 @@ export default configMerger(walttiConfig, {

// Navbar logo
logo: 'kuopio/logo.png',
secondaryLogo: 'kuopio/secondary-logo.png',
secondaryLogo: 'kuopio/kuopio-secondary-logo.png',

feedIds: ['Kuopio', 'digitraffic'],

Expand Down
5 changes: 5 additions & 0 deletions app/configurations/config.lahti.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ export default configMerger(walttiConfig, {
twitter: {
site: '@LSL_fi',
},
image: {
url: 'assets/secondary-lahti-logo.png',
width: 751,
height: 301,
},
},

title: APP_TITLE,
Expand Down
5 changes: 5 additions & 0 deletions app/configurations/config.lappeenranta.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export default configMerger(walttiConfig, {
socialMedia: {
title: APP_TITLE,
description: APP_DESCRIPTION,
image: {
url: 'assets/lappeenranta-favicon.jpg',
width: 591,
height: 591,
},
},

title: APP_TITLE,
Expand Down
5 changes: 5 additions & 0 deletions app/configurations/config.matka.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ export default {
title: APP_TITLE,
description: APP_DESCRIPTION,
locale: 'fi_FI',
image: {
url: 'img/social-share-matka.png',
width: 505,
height: 84,
},
},

title: APP_TITLE,
Expand Down
5 changes: 5 additions & 0 deletions app/configurations/config.oulu.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ export default configMerger(walttiConfig, {
twitter: {
site: '@oulunkaupunki',
},
image: {
url: 'assets/secondary-oulu-logo.png',
width: 1181,
height: 472,
},
},

title: APP_TITLE,
Expand Down
5 changes: 5 additions & 0 deletions app/configurations/config.pori.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export default configMerger(walttiConfig, {
socialMedia: {
title: APP_TITLE,
description: APP_DESCRIPTION,
image: {
url: 'assets/social-share-pori.png',
width: 400,
height: 116,
},
},

title: APP_TITLE,
Expand Down
5 changes: 5 additions & 0 deletions app/configurations/config.raasepori.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ export default configMerger(walttiConfig, {
socialMedia: {
title: APP_TITLE,
description: APP_DESCRIPTION,
image: {
url: 'assets/raasepori_logo_musta.png',
width: 1528,
height: 650,
},
},

title: APP_TITLE,
Expand Down
5 changes: 5 additions & 0 deletions app/configurations/config.rovaniemi.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ export default configMerger(walttiConfig, {
socialMedia: {
title: APP_TITLE,
description: APP_DESCRIPTION,
image: {
url: 'assets/rovaniemi-favicon.png',
width: 504,
height: 426,
},
},

title: APP_TITLE,
Expand Down
5 changes: 5 additions & 0 deletions app/configurations/config.tampere.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ export default configMerger(walttiConfig, {
socialMedia: {
title: APP_TITLE,
description: APP_DESCRIPTION,
image: {
url: 'img/social-share-tampere.png',
width: 400,
height: 400,
},
},

title: APP_TITLE,
Expand Down
5 changes: 5 additions & 0 deletions app/configurations/config.turku.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ export default configMerger(walttiConfig, {
twitter: {
site: '@Turkukaupunki',
},
image: {
url: 'img/social-share-foli.png',
width: 339,
height: 78,
},
},

meta: {
Expand Down
7 changes: 6 additions & 1 deletion app/configurations/config.vaasa.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ export default configMerger(walttiConfig, {
socialMedia: {
title: APP_TITLE,
description: APP_DESCRIPTION,
image: {
url: 'img/social-share-vaasa.png',
width: 1280,
height: 400,
},

twitter: {
site: '@vaasavasa',
Expand All @@ -42,7 +47,7 @@ export default configMerger(walttiConfig, {
title: APP_TITLE,

logo: 'vaasa/vaasa-favicon.png',
secondaryLogo: 'vaasa/secondary-logo.png',
secondaryLogo: 'vaasa/vaasa-secondary-logo.png',

feedIds: ['Vaasa'],

Expand Down
5 changes: 5 additions & 0 deletions app/configurations/config.varely.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ export default configMerger(walttiConfig, {
socialMedia: {
title: APP_TITLE,
description: APP_DESCRIPTION,
image: {
url: 'assets/social-share-seutuplus.png',
width: 611,
height: 225,
},
},

meta: {
Expand Down
5 changes: 5 additions & 0 deletions app/configurations/config.walttiOpas.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export default configMerger(walttiConfig, {
socialMedia: {
title: APP_TITLE,
description: APP_DESCRIPTION,
image: {
url: 'assets/waltti-logo-secondary.png',
width: 1795,
height: 1313,
},
},

title: APP_TITLE,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 11 additions & 2 deletions app/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ export default function getMetadata(lang, host, url, config) {
const path = config.iconPath || 'icons';
const iconPath = `${root}/${path}`;
const imageHost = config.URL.ASSET_URL || `https://${host}`;
let manifest = {};
try {
// eslint-disable-next-line global-require, import/no-unresolved
manifest = require('../manifest.json');
} catch (e) {
manifest = {};
}
const socialImage =
manifest?.[config.socialMedia.image.url] || config.socialMedia.image.url;

const baseData = {
title: config.title,
Expand Down Expand Up @@ -51,7 +60,7 @@ export default function getMetadata(lang, host, url, config) {
},
{
property: 'og:image',
content: `${imageHost}${config.socialMedia.image.url}`,
content: `${imageHost}/${socialImage}`,
},
{
property: 'og:image:width',
Expand Down Expand Up @@ -87,7 +96,7 @@ export default function getMetadata(lang, host, url, config) {
},
{
property: 'twitter:image',
content: `${imageHost}${config.socialMedia.image.url}`,
content: `${imageHost}/${socialImage}`,
},
],
link: [
Expand Down
Binary file modified static/img/hsl-social-share.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/social-share-foli.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/social-share-kuopio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/social-share-matka.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/social-share-tampere.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/social-share-vaasa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.