diff --git a/package-lock.json b/package-lock.json index 4f745037..f3f7c209 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@kth/monitor": "^4.3.1", "@kth/server": "^4.1.0", "@kth/session": "^3.0.9", - "@kth/style": "^0.18.12", + "@kth/style": "^1.4.2", "@kth/ug-rest-api-helper": "^1.0.26", "axios": "^1.7.2", "body-parser": "^1.20.2", @@ -3539,9 +3539,9 @@ } }, "node_modules/@kth/style": { - "version": "0.18.12", - "resolved": "https://registry.npmjs.org/@kth/style/-/style-0.18.12.tgz", - "integrity": "sha512-QtRdFEJcpHNgtUdqrpCn9EVXOQw9Iu6tYLsFO0qgCfgbWWMzSq8d52NoV6rJ6JSNeqhA8tnwdXHprhtLTstA/w==", + "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 9c41771e..07a4a1c8 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@kth/monitor": "^4.3.1", "@kth/server": "^4.1.0", "@kth/session": "^3.0.9", - "@kth/style": "^0.18.12", + "@kth/style": "^1.4.2", "@kth/ug-rest-api-helper": "^1.0.26", "axios": "^1.7.2", "body-parser": "^1.20.2", diff --git a/server/views/helpers/index.js b/server/views/helpers/index.js index 66658a90..ee1d44ff 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') @@ -41,3 +41,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