Skip to content

Commit 7792d46

Browse files
authored
Fix summarization UI styles (#86)
1 parent 939b129 commit 7792d46

3 files changed

Lines changed: 41 additions & 15 deletions

File tree

adhocracy-plus/assets/scss/components/_project_header.scss

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@
133133
align-items: center;
134134
text-align: center;
135135
padding: 2rem;
136-
border: 2px dashed $silver-fog;
136+
border: 2px dashed $gray-lightest;
137137
width: 80%;
138138
margin: auto;
139139
}
140140

141141
.btn--summary {
142-
border: 2px solid $black;
142+
border: 2px solid $gray-lightest;
143143
}
144144

145145
.summary-text {
@@ -177,12 +177,13 @@
177177
}
178178

179179
&__header-text {
180-
font-size: 1.5rem;
181-
font-weight: bold;
180+
font-size: $font-size-lg;
181+
font-weight: $headings-font-weight;
182182
}
183183

184184
&__accordion {
185185
border-top: 0;
186+
border-color: $gray-lightest;
186187
}
187188

188189
&__results-link {
@@ -203,8 +204,8 @@
203204
}
204205

205206
&__title {
206-
font-size: 1.75rem;
207-
font-weight: bold;
207+
font-size: $font-size-lg;
208+
font-weight: $headings-font-weight;
208209
text-decoration: none !important;
209210
}
210211

@@ -223,6 +224,10 @@
223224
flex-shrink: 0;
224225
}
225226

227+
&__info-icon {
228+
font-size: 20px;
229+
}
230+
226231
&__arrow-toggle {
227232
padding-bottom: 0.15em;
228233
display: flex;
@@ -233,7 +238,7 @@
233238
width: 90%;
234239
margin: auto;
235240
padding: 1rem;
236-
border: 1px solid $silver-fog;
241+
border: 1px solid $gray-lightest;
237242
border-radius: 0.375rem;
238243
}
239244

@@ -243,11 +248,23 @@
243248
}
244249

245250
&__section-container {
246-
border-top: 1px solid grey;
251+
border-top: 1px solid $gray-lightest;
247252
margin-top: 0.5em;
248253
padding-top: 1em;
249254
}
250255

256+
hr {
257+
border: 0;
258+
border-top: 1px solid $gray-lightest;
259+
opacity: 1;
260+
}
261+
262+
&__feedback-divider {
263+
border: 0;
264+
border-top: 1px solid $gray-lightest;
265+
opacity: 1;
266+
}
267+
251268
&__stats {
252269
background-color: $liqd-blue;
253270
font-size: 1.5rem;
@@ -334,7 +351,7 @@
334351
}
335352

336353
&__container {
337-
border-top: 1px solid $silver-fog;
354+
border-top: 1px solid $gray-lightest;
338355
padding-top: 1em;
339356
}
340357

@@ -368,6 +385,7 @@
368385
display: inline-flex;
369386
align-items: center;
370387
gap: 0.5rem;
388+
color: $print-black;
371389
flex-wrap: wrap; // erlaubt, dass Label und Button-Gruppe getrennt umbrechen
372390
}
373391

@@ -377,6 +395,10 @@
377395
white-space: nowrap; // beide Buttons bleiben in einer Zeile
378396
}
379397

398+
.feedback-btn {
399+
color: $print-black;
400+
}
401+
380402
// Mobile / Tablet behaviour for AI summary elements
381403
@media (max-width: $breakpoint-md) {
382404
// Summary-Block auf mobilen Geräten: volle Breite wie Module darunter

apps/projects/templates/a4_candy_projects/_generate_summary_button.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
<style>
22
.loading-spinner {
33
display: none;
4+
flex-direction: column;
5+
align-items: center;
6+
justify-content: center;
7+
gap: 0.75rem;
48
}
59
.htmx-request .hide-when-loading {
610
display: none;
711
}
812
.htmx-request .loading-spinner {
9-
display: block !important;
13+
display: flex !important;
1014
}
1115
</style>
1216

@@ -40,10 +44,10 @@
4044
</div>
4145
</div>
4246
<div class="htmx-indicator loading-spinner">
43-
<div class="spinner-border spinner-border-sm" role="status">
47+
<div class="spinner-border text-primary" role="status">
4448
<span class="a4-sr-only">Loading...</span>
4549
</div>
46-
<span class="ml-2">Generating AI summary...</span>
50+
<span>{% trans 'Generating AI summary...' %}</span>
4751
</div>
4852
</div>
4953
<div id="summary-content" class="summary__container"></div>

apps/projects/templates/a4_candy_projects/_summary_fragment.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<a href="{{ settings.a4_candy_cms_settings.ImportantPages.ai_explanation.url }}"
2323
class="summary__info-link" target="_blank"
2424
aria-label="{% trans 'Explanation of the AI summary' %}">
25-
<i class="fas fa-info-circle" aria-hidden="true" style="font-size: 20px;"></i>
25+
<i class="fas fa-info-circle summary__info-icon" aria-hidden="true"></i>
2626
</a>
2727
{% endif %}
2828
</div>
@@ -115,8 +115,8 @@
115115

116116
<!-- Feedback -->
117117
{% if project %}
118-
<hr class="my-4">
119-
<div class="d-flex justify-content-end align-items-center text-muted small">
118+
<hr class="my-4 summary__feedback-divider">
119+
<div class="d-flex justify-content-end align-items-center small">
120120
{% include "a4_candy_projects/_feedback_icons.html" with summary_id=summary_id user_feedback=user_feedback %}
121121
</div>
122122
{% endif %}

0 commit comments

Comments
 (0)