From ca6e90d9381149c174380619fe8f80fae62aa55f Mon Sep 17 00:00:00 2001 From: Matti Lupari Date: Tue, 6 Feb 2024 04:56:11 +0200 Subject: [PATCH] CSCEXAM-000 Starting to make some sense to style bloat --- ui/src/app/app.component.ts | 13 +- .../section/examination-section.component.ts | 2 +- ui/src/app/facility/facility.component.html | 2 +- .../facility/machines/machines.component.html | 10 +- .../facility/machines/machines.component.ts | 7 + .../app/facility/rooms/rooms.component.scss | 4 - .../app/navigation/navigation.component.scss | 149 +- .../multiple-choice-option.component.ts | 2 +- .../basequestion/multiple-choice.component.ts | 2 +- .../basequestion/question-body.component.html | 4 +- ...ighted-multiple-choice-option.component.ts | 2 +- .../library-transfer-dialog.component.html | 52 +- .../results/library-results.component.html | 2 +- .../results/library-results.component.ts | 2 - .../picker/question-picker.component.ts | 70 +- .../review/assessment/assessment.service.ts | 7 + .../feedback/feedback.component.scss} | 15 +- .../assessment/feedback/feedback.component.ts | 97 +- .../feedback/statement.component.ts | 114 +- ui/src/assets/styles/_fonts.scss | 15 +- ui/src/assets/styles/main.scss | 9 +- ui/src/assets/styles/partial/_dashboard.scss | 3018 +++++++++-------- .../styles/partial/_datetimepicker.scss | 18 - ui/src/assets/styles/partial/_defines.scss | 421 +-- ui/src/assets/styles/partial/_exam.scss | 688 ++-- .../styles/partial/_form-validation.scss | 9 +- ui/src/assets/styles/partial/_library.scss | 209 -- ui/src/assets/styles/partial/_mainview.scss | 7 - ui/src/assets/styles/partial/_print.scss | 187 +- .../styles/partial/_question-editor.scss | 26 - 30 files changed, 2227 insertions(+), 2936 deletions(-) rename ui/src/{assets/styles/partial/_feedback.scss => app/review/assessment/feedback/feedback.component.scss} (57%) delete mode 100755 ui/src/assets/styles/partial/_datetimepicker.scss delete mode 100644 ui/src/assets/styles/partial/_library.scss delete mode 100644 ui/src/assets/styles/partial/_mainview.scss delete mode 100644 ui/src/assets/styles/partial/_question-editor.scss diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts index 6eaff5a555..aadf3cd0c8 100644 --- a/ui/src/app/app.component.ts +++ b/ui/src/app/app.component.ts @@ -37,7 +37,7 @@ import { SessionService } from './session/session.service'; @if (user) {
-
+
@@ -45,6 +45,17 @@ import { SessionService } from './session/session.service'; `, standalone: true, imports: [DevLoginComponent, NavigationComponent, NgClass, RouterOutlet], + styles: [ + ` + #mainView { + width: auto !important; + @media print { + margin: 0 15px; + max-width: 1000px; + } + } + `, + ], }) export class AppComponent implements OnInit, OnDestroy { user?: User; diff --git a/ui/src/app/examination/section/examination-section.component.ts b/ui/src/app/examination/section/examination-section.component.ts index 00f9a19394..07d838e9f6 100644 --- a/ui/src/app/examination/section/examination-section.component.ts +++ b/ui/src/app/examination/section/examination-section.component.ts @@ -65,7 +65,7 @@ import { ExaminationQuestionComponent } from '../question/examination-question.c
@for (material of section.examMaterials; track material) {
-
+
{{ material.name }} @if (material.author) { diff --git a/ui/src/app/facility/facility.component.html b/ui/src/app/facility/facility.component.html index 185ef997fb..5080da0db1 100644 --- a/ui/src/app/facility/facility.component.html +++ b/ui/src/app/facility/facility.component.html @@ -7,7 +7,7 @@ - + {{ 'i18n_edit_all_rooms' | translate }} diff --git a/ui/src/app/facility/machines/machines.component.html b/ui/src/app/facility/machines/machines.component.html index 81dc55a516..68722b2d87 100644 --- a/ui/src/app/facility/machines/machines.component.html +++ b/ui/src/app/facility/machines/machines.component.html @@ -67,12 +67,10 @@ @for (software of machine.softwareInfo; track software; let l = $last) {
  • @if (software.status !== 'DISABLED') { - - {{ software.name }} - @if (!l) { - , - } - + {{ software.name }} + @if (!l) { + + } }
  • } diff --git a/ui/src/app/facility/machines/machines.component.ts b/ui/src/app/facility/machines/machines.component.ts index 61136f4900..292fecd958 100644 --- a/ui/src/app/facility/machines/machines.component.ts +++ b/ui/src/app/facility/machines/machines.component.ts @@ -27,6 +27,13 @@ import type { ExamMachine, ExamRoom } from '../../reservation/reservation.model' selector: 'xm-machines', standalone: true, imports: [NgbPopover, NgClass, RouterLink, TranslateModule], + styles: [ + ` + li { + list-style: none; + } + `, + ], }) export class MachineListComponent implements OnInit { @Input() room!: ExamRoom; diff --git a/ui/src/app/facility/rooms/rooms.component.scss b/ui/src/app/facility/rooms/rooms.component.scss index a27e03056e..a133583d21 100644 --- a/ui/src/app/facility/rooms/rooms.component.scss +++ b/ui/src/app/facility/rooms/rooms.component.scss @@ -1,9 +1,5 @@ @import '../../shared/styles.scss'; -li { - list-style: none; -} - .selected { background-color: #d3e7a8; border-top: none; diff --git a/ui/src/app/navigation/navigation.component.scss b/ui/src/app/navigation/navigation.component.scss index c07698e12d..cacdb3e6e2 100644 --- a/ui/src/app/navigation/navigation.component.scss +++ b/ui/src/app/navigation/navigation.component.scss @@ -33,7 +33,6 @@ a { display: flex; - background-color: black; text-decoration: none; padding-left: 1.5em; border-left: 3px solid black; @@ -48,11 +47,18 @@ border: 3px solid black; border-radius: 50px; } + + &.selected { + font-weight: bold; + border-left: 3px solid $exam-dark-green; + @media (max-width: $mobile-width) { + border-left: 3px solid black; + border-radius: 50px !important; + } + } } a:hover { - text-decoration: none; - color: white; border-left: 3px solid $exam-dark-green; @media (max-width: $mobile-width) { border: 3px solid white; @@ -60,24 +66,6 @@ } } - .selected { - background-color: black; - border-left: 3px solid $exam-dark-green; - text-decoration: none; - padding-left: 1.5em; - font-family: $family-helvetica; - font-size: 16px; - color: #e7e7e7; - letter-spacing: 0.27px; - line-height: 18px; - text-align: left; - font-weight: bold; - @media (max-width: $mobile-width) { - border: 3px solid $exam-dark-green !important; - border-radius: 50px !important; - } - } - li { list-style: none; margin-bottom: 2.5em; @@ -95,7 +83,6 @@ .nav-header { background-color: black; - color: $exam-dark-grey; position: fixed; top: 0; left: 0; @@ -123,7 +110,6 @@ .nav-body { position: fixed; background-color: black; - color: $exam-dark-grey; top: 162px; bottom: 105px; overflow-y: auto; @@ -137,7 +123,6 @@ .nav-body-mobile { @media (max-width: $mobile-width) { background-color: black; - color: $exam-dark-grey; position: relative; width: 100%; } @@ -145,8 +130,6 @@ .nav-footer { background-color: $exam-medium-green; - color: $exam-dark-grey; - display: block; position: fixed; bottom: 0; width: 17.125em; @@ -162,20 +145,6 @@ } } - .minimize .nav-header { - height: 175px; - width: 50px; - } - - .minimize .nav-body { - top: 175px; - width: 50px; - } - - .minimize .nav-footer { - width: 50px; - } - .menu-item { margin: 0; @media (max-width: $mobile-width) { @@ -196,7 +165,7 @@ padding: 0.5em 1em 1em; font-family: $family-helvetica; font-size: 14px; - color: #ffffff; + color: white; letter-spacing: 0.27px; line-height: 18px; text-align: left; @@ -218,17 +187,6 @@ letter-spacing: 1px; } - .minify { - bottom: 0; - padding: 0.5em; - float: right; - color: #27b9ca; - } - - .minimize .menu-item { - display: none; - } - .locale-bar { margin-left: 1.7em; margin-top: 0.4em; @@ -245,28 +203,16 @@ color: white; padding: 0.5em; margin-left: 1.5em; - background-color: transparent; border: 0px; - text-decoration: none; @media (max-width: $mobile-width) { border: 3px solid #00000000; } - } - .locale-item:active .locale-item:hover { - font-weight: bold; - } - - .minimize .locale-item { - text-align: center; - padding: 0.3em 0 0.3em 0; - } - - .locale-item:hover { - color: white; - font-weight: bold; - @media (max-width: $mobile-width) { - border-radius: 50px; - border: 3px solid white; + :active :hover { + font-weight: bold; + @media (max-width: $mobile-width) { + border-radius: 50px; + border: 3px solid white; + } } } @@ -288,39 +234,23 @@ max-width: 165px; } - .sub-menu { - font-family: $family-helvetica; - font-size: 16px !important; - color: #e7e7e7 !important; - letter-spacing: 0.27px; - line-height: 18px; - text-align: left; - - a { - font-family: $family-helvetica; - font-size: 16px; - color: #e7e7e7; - letter-spacing: 0.27px; - line-height: 18px; - text-align: left; - } - } - ul.submenu { - margin: 0px; margin-top: 20px; border-top: 15px; padding: 0px; border: 0px; + font-family: $family-helvetica; + font-size: 16px; + color: #e7e7e7; + letter-spacing: 0.27px; + line-height: 16px; + text-align: left; a { - font-family: $family-helvetica; - font-size: 16px; - color: #e7e7e7; - letter-spacing: 0.27px; - line-height: 18px; - text-align: left; - margin: 0 30px; + margin: 0 10px 0 10px; + @media (max-width: $mobile-width) { + margin: 0; + } } li { @@ -328,13 +258,6 @@ } div { - width: 175px; - font-family: $family-helvetica; - font-size: 16px; - color: #e7e7e7 !important; - letter-spacing: 0.27px; - line-height: 18px; - text-align: left; padding-left: 28px; text-indent: -35px; } @@ -348,24 +271,4 @@ margin-top: 10px; } } - - .sub-menu-item { - padding-left: 1em; - font-family: $family-helvetica; - font-size: 16px; - color: #e7e7e7 !important; - letter-spacing: 0.27px; - line-height: 18px; - text-align: left; - } - span.sub-menu-item { - font-family: $family-helvetica; - font-size: 16px; - color: #e7e7e7 !important; - letter-spacing: 0.27px; - line-height: 18px; - text-align: left; - text-indent: -4em; - width: 50px; - } } diff --git a/ui/src/app/question/basequestion/multiple-choice-option.component.ts b/ui/src/app/question/basequestion/multiple-choice-option.component.ts index e50e8aea83..3fa7d17ef2 100644 --- a/ui/src/app/question/basequestion/multiple-choice-option.component.ts +++ b/ui/src/app/question/basequestion/multiple-choice-option.component.ts @@ -24,7 +24,7 @@ import { QuestionDraft, QuestionService } from '../question.service'; selector: 'xm-mc-option-editor', viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], template: ` -
    +
    } @for (option of question.options; track option.id; let i = $index) { -
    +
    @if (question.type === 'MultipleChoiceQuestion') { +