Skip to content

Commit

Permalink
Merge pull request #373 from KTH/issues/KUI-1261-kth-style
Browse files Browse the repository at this point in the history
feat(KUI-1261): upgrade to KTH Style 10
  • Loading branch information
karlandindrakryggen authored Apr 18, 2024
2 parents dfd792a + 4e65047 commit fd38e36
Show file tree
Hide file tree
Showing 39 changed files with 1,584 additions and 1,439 deletions.
3 changes: 2 additions & 1 deletion .azure/prod.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"SERVER_PORT": "3000",
"SERVICE_PUBLISH": "/kurs-pm",
"SESSION_USE_REDIS": "true",
"STDOUT_ENABLED": "true"
"STDOUT_ENABLED": "true",
"TOOLBAR_URL": "https://www.kth.se/social/toolbar/widget.js"
}
},
"monitorPath": {
Expand Down
3 changes: 2 additions & 1 deletion .azure/ref.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"SERVER_PORT": "3000",
"SERVICE_PUBLISH": "/kurs-pm",
"SESSION_USE_REDIS": "true",
"STDOUT_ENABLED": "true"
"STDOUT_ENABLED": "true",
"TOOLBAR_URL": "https://www-r.referens.sys.kth.se/social/toolbar/widget.js"
}
},
"monitorPath": {
Expand Down
4 changes: 4 additions & 0 deletions config/serverSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ module.exports = {
redisOptions: unpackRedisConfig('REDIS_URI', devRedis),
},

toolbar: {
url: getEnv('TOOLBAR_URL', devDefaults('https://www-r.referens.sys.kth.se/social/toolbar/widget.js')),
},

// APPLICATION INSIGHTS IN AZURE
appInsights: {
instrumentationKey: getEnv('APPINSIGHTS_INSTRUMENTATIONKEY', ''),
Expand Down
4 changes: 4 additions & 0 deletions i18n/messages.en.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ module.exports = {
* General stuff
*/
date_format_short: '%d-%b-%Y',
language_link_lang_sv: 'Svenska',
menu_panel_search: 'Search',
menu_panel_close: 'Close',
menu_panel_menu: 'Menu',

/**
* Error messages
Expand Down
4 changes: 4 additions & 0 deletions i18n/messages.se.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ module.exports = {
* General stuff
*/
date_format_short: '%Y-%m-%d',
language_link_lang_en: 'English',
menu_panel_search: 'Sök',
menu_panel_close: 'Stäng',
menu_panel_menu: 'Meny',

/**
* Error messages
Expand Down
38 changes: 30 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@
"dependencies": {
"@kth/api-call": "^4.1.0",
"@kth/kth-node-response": "^1.0.7",
"@kth/kth-node-web-common": "^9.2.0",
"@kth/kth-node-web-common": "^9.3.0",
"@kth/kth-reactstrap": "^0.4.78",
"@kth/log": "^4.0.7",
"@kth/monitor": "^4.2.1",
"@kth/server": "^4.1.0",
"@kth/session": "^3.0.9",
"@kth/style": "^0.18.6",
"applicationinsights": "^2.9.5",
"axios": "^1.6.7",
"body-parser": "^1.20.2",
Expand All @@ -52,7 +53,7 @@
"kth-node-express-routing": "^2.2.0",
"kth-node-i18n": "^1.0.18",
"kth-node-redis": "^3.3.0",
"kth-style": "^9.1.1",
"kth-style": "^10.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.12.0",
Expand Down
22 changes: 22 additions & 0 deletions public/css/_fix.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@use '~@kth/style/scss/components/button.scss';

// Fix for modal opened by HeadingAsteriskModal
// Should be fixed in @kth/kth-reactstraps?

.modal {
.modal-header {
button {
@extend .kth-icon-button;
@extend .close;
span {
display: none;
}
}
}
.modal-footer {
.btn.btn-secondary {
@extend .kth-button;
@extend .secondary;
}
}
}
102 changes: 102 additions & 0 deletions public/css/_print.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
@use '~@kth/style/scss/utils/prose.scss';

// Spacing, make sure this is the same as $spacer from bootstrap
$spacer: 1.3rem;

@media print {
@page {
margin: 13mm;
}
#app {
padding: 0;
}
#klaro,
.kth-local-navigation,
.kth-local-navigation--mobile,
.kth-mega-menu,
.kth-header__tools,
.kth-content.articleNavigation {
display: none !important;
}
.p-print-0 {
padding: 0 !important;
}
.p-print-1 {
padding: $spacer * 0.25 !important;
}
.p-print-2 {
padding: $spacer * 0.5 !important;
}
.p-print-3 {
padding: $spacer * 0.75 !important;
}
.p-print-4 {
padding: $spacer * 1 !important;
}
.p-print-5 {
padding: $spacer * 1.3 !important;
}

h1 {
font-size: 32pt;
margin-bottom: 12pt;
}

.memo-subtitle {
font-size: 24pt;
font-weight: 600;
}
.mainLogo {
margin: 0 !important;
padding: 0 !important;
img {
width: 26mm !important;
height: auto !important;
}
}
.cover-page {
margin-top: 17mm;
margin-left: 13mm;
margin-right: 13mm;
break-after: page;
p {
margin-bottom: 1rem;
}
h1 {
line-height: 3.5rem;
}
h2 {
font-size: 32pt;
margin-top: 28px;
margin-bottom: 14px;
}
}
.cover-page-links {
margin-top: 82px; // h2: 28+40+14
}
.kth-content {
max-width: none !important;
min-width: 0 !important;
margin: 0 !important;
padding: 0 !important;
}
.col-print-12 {
position: relative;
flex: 0 0 100%;
width: 100%;
max-width: 100%;
padding-right: 15px;
padding-left: 15px;
}
.person {
img {
display: none;
}
}
.section-wrapper article > h3:first-of-type {
margin-block-start: 2rem !important;
}
.print-contacts {
@include prose.prose;
}
}
Loading

0 comments on commit fd38e36

Please sign in to comment.