Skip to content

Commit

Permalink
Adjust projected motion/topic/election to new detail view (#3693)
Browse files Browse the repository at this point in the history
  • Loading branch information
Elblinator committed Aug 22, 2024
1 parent 6bab999 commit 648d67d
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h1>{{ data.data.title }}</h1>
<h2>{{ 'Election' | translate }}</h2>
</div>
@if (data.data.description) {
<div [innerHTML]="data.data.description | trust: 'html'"></div>
<div class="detail-view-text" [innerHTML]="data.data.description | trust: 'html'"></div>
}
<h3>{{ 'Candidates' | translate }}</h3>
@if (data.data.candidates && data.data.candidates.length) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import 'src/assets/styles/mixins/detail-view-appearance.scss';

.detail-view-text ::ng-deep {
@include detail-view-appearance;
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h2 class="projector_h2">
</div>
</div>
@if (showText) {
<div id="text-wrapper">
<section id="text-wrapper">
<div id="text" [ngStyle]="textDivStyles">
<!-- Text -->
@if (isParagraphBasedAmendment() || formattedMotionTextPlain) {
Expand All @@ -106,7 +106,10 @@ <h2 class="projector_h2">
</div>
}
@if (formattedMotionTextPlain) {
<div [innerHTML]="formattedMotionTextPlain | trust: 'html'"></div>
<div
class="detail-view-text"
[innerHTML]="formattedMotionTextPlain | trust: 'html'"
></div>
}
</div>
}
Expand Down Expand Up @@ -146,20 +149,28 @@ <h3 class="amendment-line-header">
{{ paragraph.diffLineFrom }} - {{ paragraph.diffLineTo }}:
</h3>
}
<div [innerHtml]="paragraph.text | trust: 'html'"></div>
<div class="detail-view-text" [innerHtml]="paragraph.text | trust: 'html'"></div>
</div>
}
</section>
}
<!-- Reason -->
@if (data.data.reason) {
<div>
<div class="reason-text">
<h3>{{ 'Reason' | translate }}</h3>
<div [innerHTML]="data.data.reason | trust: 'html'"></div>
<div class="detail-view-text" [innerHTML]="data.data.reason | trust: 'html'"></div>
</div>
}
</div>
</div>
</section>

<!-- Reason -->
@if (data.data.reason) {
<div>
<h3>{{ 'Reason' | translate }}</h3>
<div [innerHTML]="data.data.reason | trust: 'html'"></div>
</div>
}
}
</div>
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
@import 'src/app/site/pages/meetings/pages/motions/styles/motion-common-styles';
@import 'src/assets/styles/mixins/detail-view-appearance.scss';

.paragraph-context {
opacity: 0.5;
}

.motion-text,
.motion-text-diff,
.reason-text {
.detail-view-text {
@include detail-view-appearance;
}
}

#sidebox {
width: 260px;
right: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ <h1 class="projector_h1">
}
{{ data.data.title }}
</h1>
<div [innerHTML]="data.data.text | trust: 'html'"></div>
<div class="detail-view-text" [innerHTML]="data.data.text | trust: 'html'"></div>
</div>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import 'src/assets/styles/mixins/detail-view-appearance.scss';

.detail-view-text ::ng-deep {
@include detail-view-appearance;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
@import 'src/assets/styles/mixins/detail-view-appearance.scss';

.motion-text {
ins,
.insert {
color: green;
color: green !important;
text-decoration: underline;
a {
color: green;
Expand All @@ -10,7 +12,7 @@

del,
.delete {
color: red;
color: red !important;
text-decoration: line-through;
a {
color: red;
Expand Down Expand Up @@ -131,4 +133,6 @@
&.amendment-context .paragraphcontext {
opacity: 1;
}

@include detail-view-appearance;
}
5 changes: 5 additions & 0 deletions client/src/assets/styles/mixins/detail-view-appearance.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
@mixin detail-view-appearance {
h1 {
color: inherit;
font-weight: 400 !important;
}

h2 {
font-weight: 700 !important;
}

h3 {
Expand Down

0 comments on commit 648d67d

Please sign in to comment.