Skip to content

Commit

Permalink
Merge pull request #42 from lehors/update-class-names
Browse files Browse the repository at this point in the history
Update class names - fix layout
  • Loading branch information
lehors authored Nov 7, 2024
2 parents 10a0371 + 6d1c008 commit 07f6415
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions web/modules/mof/css/layout/model_list.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ table .model-updated {
width: 145px;
}

table th.badge {
width: 305px;
}

table td.badge svg {
display: block;
margin: 6px 0;
Expand Down
5 changes: 4 additions & 1 deletion web/modules/mof/src/ModelListBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ public function buildHeader(): array {
'specifier' => 'changed',
'class' => ['model-updated'],
],
'badge' => $this->t('Badge'),
'badge' => [
'data' => $this->t('Badge'),
'class' => ['badge'],
],
];
}

Expand Down
10 changes: 5 additions & 5 deletions web/modules/mof/templates/badge.html.twig
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" height="20">
<linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient>
<rect rx="3" width="250" height="20" fill="#555"/>
<rect rx="3" x="150" width="115" height="20" fill="{{ background_color }}"/>
<rect rx="3" x="180" width="115" height="20" fill="{{ background_color }}"/>
<rect rx="3" height="20" fill="url(#b)"/>
<g text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="75" y="15" fill="#000" fill-opacity=".8">{{ label }}</text>
<text x="75" y="14" fill="#fff">{{ label }}</text>
<text x="210" y="15" fill="#fff" fill-opacity=".3">{{ status }}</text>
<text x="210" y="14" fill="{{ text_color }}">{{ status }}</text>
<text x="90" y="15" fill="#000" fill-opacity=".8">{{ label }}</text>
<text x="90" y="14" fill="#fff">{{ label }}</text>
<text x="238" y="15" fill="#fff" fill-opacity=".3">{{ status }}</text>
<text x="238" y="14" fill="{{ text_color }}">{{ status }}</text>
</g>
</svg>

0 comments on commit 07f6415

Please sign in to comment.