Skip to content

Commit 0f405ba

Browse files
authored
Merge pull request #2300 from citizenos/#1537
#1537
2 parents 7bd6b42 + 0507759 commit 0f405ba

File tree

6 files changed

+164
-10
lines changed

6 files changed

+164
-10
lines changed

src/app/public-topics/components/topicbox/topicbox.component.html

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,27 @@
106106
<div class="image">
107107
<div class="image_overlay"></div>
108108
<img *ngIf="topic.imageUrl" [src]="topic.imageUrl">
109-
<div class="no_image" *ngIf="!topic.imageUrl">
110-
<svg width="37" height="41" viewBox="0 0 37 41" fill="none" xmlns="http://www.w3.org/2000/svg">
111-
<path fill-rule="evenodd" clip-rule="evenodd"
112-
d="M29.307 5.5918C30.9953 5.5918 32.3766 7.08292 32.3766 8.90541V32.1007C32.3766 33.9232 30.9953 35.4143 29.307 35.4143H7.81962C6.13133 35.4143 4.75 33.9232 4.75 32.1007V8.90541C4.75 7.08292 6.13133 5.5918 7.81962 5.5918H29.307ZM17.0285 27.9752L13.1915 22.9882L7.81962 30.4439H29.307L22.4003 20.503L17.0285 27.9752Z"
113-
fill="#4D5C6A" />
114-
</svg>
115-
</div>
109+
<ng-container *ngIf="!topic.imageUrl">
110+
<ng-container
111+
*ngIf="['inProgress', 'voting', 'ideation', 'followUp'].includes(topic.status); else default_no_image">
112+
<div class="no_image" [ngClass]="{
113+
discussion: topic.status === 'inProgress',
114+
voting: topic.status === 'voting',
115+
ideation: topic.status === 'ideation',
116+
follow_up: topic.status === 'followUp'
117+
}">
118+
</div>
119+
</ng-container>
120+
<ng-template #default_no_image>
121+
<div class="no_image">
122+
<svg width="37" height="41" viewBox="0 0 37 41" fill="none" xmlns="http://www.w3.org/2000/svg">
123+
<path fill-rule="evenodd" clip-rule="evenodd"
124+
d="M29.307 5.5918C30.9953 5.5918 32.3766 7.08292 32.3766 8.90541V32.1007C32.3766 33.9232 30.9953 35.4143 29.307 35.4143H7.81962C6.13133 35.4143 4.75 33.9232 4.75 32.1007V8.90541C4.75 7.08292 6.13133 5.5918 7.81962 5.5918H29.307ZM17.0285 27.9752L13.1915 22.9882L7.81962 30.4439H29.307L22.4003 20.503L17.0285 27.9752Z"
125+
fill="#4D5C6A" />
126+
</svg>
127+
</div>
128+
</ng-template>
129+
</ng-container>
116130
</div>
117131
<div class="topic_content">
118132
<div class="icon_area">
@@ -162,7 +176,9 @@
162176
</div>
163177
<div class="last_edit">
164178
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
165-
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.51592 10.5893C2.08608 8.1127 2.93461 4.94595 5.41116 3.51611C7.88771 2.08627 11.0545 2.9348 12.4843 5.41135C13.9141 7.8879 13.0656 11.0547 10.5891 12.4845C9.77102 12.9568 8.87985 13.18 8.00069 13.1792C7.58647 13.1788 7.25037 13.5143 7.24997 13.9285C7.24957 14.3427 7.58504 14.6788 7.99925 14.6792C9.13512 14.6803 10.2865 14.3912 11.3391 13.7835C14.533 11.9395 15.6274 7.85534 13.7833 4.66135C11.9393 1.46736 7.85515 0.373023 4.66116 2.21707C1.46717 4.06112 0.372828 8.14526 2.21688 11.3393C2.2329 11.367 2.25043 11.3933 2.2693 11.4182L0.511719 12.433L4.50545 13.5031L5.57556 9.50936L3.5581 10.6741C3.54599 10.6454 3.53194 10.617 3.51592 10.5893ZM8 4.25036C8.41421 4.25036 8.75 4.58614 8.75 5.00036V7.25036H10C10.4142 7.25036 10.75 7.58614 10.75 8.00036C10.75 8.41457 10.4142 8.75036 10 8.75036H7.25V5.00036C7.25 4.58614 7.58579 4.25036 8 4.25036Z" fill="#2C3B47"/>
179+
<path fill-rule="evenodd" clip-rule="evenodd"
180+
d="M3.51592 10.5893C2.08608 8.1127 2.93461 4.94595 5.41116 3.51611C7.88771 2.08627 11.0545 2.9348 12.4843 5.41135C13.9141 7.8879 13.0656 11.0547 10.5891 12.4845C9.77102 12.9568 8.87985 13.18 8.00069 13.1792C7.58647 13.1788 7.25037 13.5143 7.24997 13.9285C7.24957 14.3427 7.58504 14.6788 7.99925 14.6792C9.13512 14.6803 10.2865 14.3912 11.3391 13.7835C14.533 11.9395 15.6274 7.85534 13.7833 4.66135C11.9393 1.46736 7.85515 0.373023 4.66116 2.21707C1.46717 4.06112 0.372828 8.14526 2.21688 11.3393C2.2329 11.367 2.25043 11.3933 2.2693 11.4182L0.511719 12.433L4.50545 13.5031L5.57556 9.50936L3.5581 10.6741C3.54599 10.6454 3.53194 10.617 3.51592 10.5893ZM8 4.25036C8.41421 4.25036 8.75 4.58614 8.75 5.00036V7.25036H10C10.4142 7.25036 10.75 7.58614 10.75 8.00036C10.75 8.41457 10.4142 8.75036 10 8.75036H7.25V5.00036C7.25 4.58614 7.58579 4.25036 8 4.25036Z"
181+
fill="#2C3B47" />
166182
</svg>
167183
<span>{{topic.lastActivity | amTimeAgo}}</span>
168184
</div>

src/app/public-topics/components/topicbox/topicbox.component.scss

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,25 @@
135135
align-items: center;
136136
justify-content: center;
137137
background-color: var(--color-border);
138+
background-position: center;
139+
background-repeat: no-repeat;
140+
background-size: cover;
141+
142+
&.discussion {
143+
background-image: url("/assets/imgs/no_image_discussion.svg");
144+
}
145+
146+
&.voting {
147+
background-image: url("/assets/imgs/no_image_voting.svg");
148+
}
149+
150+
&.ideation {
151+
background-image: url("/assets/imgs/no_image_ideation.svg");
152+
}
153+
154+
&.follow_up {
155+
background-image: url("/assets/imgs/no_image_follow_up.svg");
156+
}
138157
}
139158

140159
.image_overlay {
@@ -268,11 +287,10 @@
268287
height: 100%;
269288
align-items: center;
270289
justify-content: center;
271-
background-color: rgba(255,255,255, 0.5);
290+
background-color: rgba(255, 255, 255, 0.5);
272291

273292
button {
274293
z-index: 99;
275294
gap: 8px;
276295
}
277296
}
278-

0 commit comments

Comments
 (0)