diff --git a/package-lock.json b/package-lock.json index 15563d1b..11cb23b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@kth/monitor": "^4.2.1", "@kth/server": "^4.1.0", "@kth/session": "^3.0.9", - "@kth/style": "^0.18.6", + "@kth/style": "^1.4.2", "axios": "^1.6.7", "body-parser": "^1.20.2", "cookie-parser": "^1.4.6", @@ -3345,9 +3345,9 @@ } }, "node_modules/@kth/style": { - "version": "0.18.6", - "resolved": "https://registry.npmjs.org/@kth/style/-/style-0.18.6.tgz", - "integrity": "sha512-BUTL9kilpFAQXLwmevhLZJ9g6VzTWRLyVuzH8kIyR2pNaxH+4WhrObIdl9huWxuJIfYFQy4COPLtyg3M8r5GtA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@kth/style/-/style-1.4.2.tgz", + "integrity": "sha512-Z6EhjUVzhw+QITpnFsdLu51xogsgEXQiB1E+hEI2HsaFxTOrxkq6qbnN/uK1WWeTuKfi+A6szaVubPXswWRtyw==", "peerDependencies": { "react": "*" } diff --git a/package.json b/package.json index ef09f48d..ed8d39a5 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@kth/monitor": "^4.2.1", "@kth/server": "^4.1.0", "@kth/session": "^3.0.9", - "@kth/style": "^0.18.6", + "@kth/style": "^1.4.2", "axios": "^1.6.7", "body-parser": "^1.20.2", "cookie-parser": "^1.4.6", diff --git a/server/views/helpers/index.js b/server/views/helpers/index.js index cbd93e9e..70be326d 100644 --- a/server/views/helpers/index.js +++ b/server/views/helpers/index.js @@ -1,5 +1,5 @@ 'use strict' - +const handlebars = require('handlebars') const registerHeaderContentHelper = require('@kth/kth-node-web-common/lib/handlebars/helpers/headerContent') const { registerBreadcrumbHelper } = require('@kth/kth-node-web-common/lib/handlebars/helpers/breadcrumbs') const { registerLanguageLinkHelper } = require('@kth/kth-node-web-common/lib/handlebars/helpers/languageLink') @@ -44,3 +44,5 @@ require('@kth/kth-node-web-common/lib/handlebars/helpers/contentedit') const i18n = require('../../../i18n') require('@kth/kth-node-web-common/lib/handlebars/helpers/createI18nHelper')(i18n) require('@kth/kth-node-web-common/lib/handlebars/helpers/safe') + +handlebars.registerHelper('eq', (var1, var2) => var1.toString() === var2.toString()) diff --git a/server/views/partials/headerLogotype.handlebars b/server/views/partials/headerLogotype.handlebars index f9e8d7b7..6239219e 100644 --- a/server/views/partials/headerLogotype.handlebars +++ b/server/views/partials/headerLogotype.handlebars @@ -1,6 +1,9 @@
- Till KTH:s startsida + {{#if (eq theme "external")}} Till KTH:s startsida + {{else}} + Till KTH:s startsida + {{/if}}
\ No newline at end of file