Skip to content

Commit 50157f8

Browse files
author
Dominik Grenz
committed
Change grid layout to table
1 parent a061554 commit 50157f8

File tree

1 file changed

+56
-53
lines changed

1 file changed

+56
-53
lines changed
Lines changed: 56 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,48 @@
11
<template>
22
<muc-intro
3-
tagline="Checkliste"
4-
:title="checklist.title"
5-
:img="getChecklistIconByTitle(checklist.title)"
6-
imgAlt=""
3+
tagline="Checkliste"
4+
:title="checklist.title"
5+
:img="getChecklistIconByTitle(checklist.title)"
6+
imgAlt=""
77
>
8-
<p style="padding-bottom: 16px">
9-
<b>Erstellungsdatum: </b
10-
>{{ props.checklist.lastUpdated.toLocaleString().split(",")[0] }}
11-
</p>
12-
<div class="taskcontainer">
13-
<div class="task">Aufgaben:</div>
14-
<div class="chip">
15-
<muc-chip
16-
v-if="todoCount"
17-
style="margin-right: 8px"
18-
background-color="#FDD1AC"
19-
>
20-
{{ todoCount }} offen
21-
<svg
22-
style="margin-left: 8px; width: 20px; height: 20px"
23-
aria-hidden="true"
24-
class="m-button__icon"
25-
>
26-
<use href="#icon-pencil" />
27-
</svg>
28-
</muc-chip>
29-
</div>
30-
31-
<div class="chip">
32-
<muc-chip
33-
v-if="doneCount"
34-
background-color="#B7D2B7"
35-
>
36-
{{ doneCount }} erledigt
37-
<svg
38-
style="margin-left: 8px; width: 20px; height: 20px"
39-
aria-hidden="true"
40-
class="m-button__icon"
41-
>
42-
<use href="#icon-check" />
43-
</svg>
44-
</muc-chip>
45-
</div>
8+
<div style="padding-bottom: 16px; padding-left: 3px">
9+
<b>Erstellungsdatum: </b>{{ props.checklist.lastUpdated.toLocaleString().split(",")[0] }}
4610
</div>
11+
<table>
12+
<tr>
13+
<td class="task">Aufgaben:</td>
14+
<td>
15+
<div class="chips-container">
16+
<muc-chip
17+
v-if="todoCount"
18+
background-color="#FDD1AC"
19+
>
20+
{{ todoCount }} offen
21+
<svg
22+
style="margin-left: 8px; width: 20px; height: 20px"
23+
aria-hidden="true"
24+
class="m-button__icon"
25+
>
26+
<use href="#icon-pencil" />
27+
</svg>
28+
</muc-chip>
29+
<muc-chip
30+
v-if="doneCount"
31+
background-color="#B7D2B7"
32+
>
33+
{{ doneCount }} erledigt
34+
<svg
35+
style="margin-left: 8px; width: 20px; height: 20px"
36+
aria-hidden="true"
37+
class="m-button__icon"
38+
>
39+
<use href="#icon-check" />
40+
</svg>
41+
</muc-chip>
42+
</div>
43+
</td>
44+
</tr>
45+
</table>
4746
</muc-intro>
4847
</template>
4948

@@ -99,21 +98,25 @@ const doneCount = computed(() => {
9998
margin-bottom: 8px !important;
10099
}
101100
102-
.taskcontainer {
103-
display: grid;
104-
grid-template-columns: 100px 100px 100px;
105-
gap: 8px;
106-
}
107-
108101
.task {
109-
padding-top: 3px;
110-
text-align: left;
111102
font-weight: bold;
103+
vertical-align: baseline;
104+
padding-right: 8px;
105+
white-space: nowrap;
106+
}
107+
108+
.chips-container {
109+
display: flex;
110+
gap: 8px;
111+
flex-wrap: nowrap;
112112
}
113113
114114
@media (max-width: 450px) {
115-
.chip:nth-child(3) {
116-
grid-column: 2;
115+
.chips-container {
116+
flex-wrap: wrap;
117+
flex-direction: column;
118+
gap: 8px;
117119
}
118120
}
119-
</style>
121+
122+
</style>

0 commit comments

Comments
 (0)