Skip to content

Commit a0fd7a6

Browse files
committed
Adapt layout to better support longer displaynames, close #88
1 parent d860840 commit a0fd7a6

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/main/resources/templates/appswitcher.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<style>
44
nav {
55
display: grid;
6-
grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
6+
grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
77
justify-items: center;
88
align-items: center;
99

@@ -20,22 +20,24 @@
2020
display: flex;
2121
flex-direction: column;
2222
align-items: center;
23-
justify-content: space-around;
2423
gap: 4px;
25-
height: 70px;
24+
height: 90px;
25+
width: 100%;
2626

2727
cursor: pointer;
2828

29-
aspect-ratio: 1;
3029
border-radius: 8px;
3130
padding: 6px;
3231

3332
font-family: Roboto, sans-serif;
3433
font-size: 0.875rem;
3534

3635
overflow: hidden;
37-
white-space: nowrap;
38-
text-overflow: ellipsis;
36+
}
37+
38+
.tile span {
39+
white-space: normal;
40+
text-align: center;
3941
}
4042

4143
.tile:hover {
@@ -44,6 +46,8 @@
4446

4547
img {
4648
object-fit: contain;
49+
flex-shrink: 0;
50+
height: 50px;
4751
}
4852
</style>
4953

@@ -63,9 +67,7 @@
6367
>
6468
<div class="tile">
6569
<img width="50" height="50" th:src="${app.value.imageUrl}" th:alt="${app.value.displayName}" />
66-
<span
67-
th:text="${#strings.abbreviate(app.value.displayName,15)}"
68-
></span>
70+
<span th:text="${#strings.abbreviate(app.value.displayName, 25)}"></span>
6971
</div>
7072
</a>
7173
</nav>

0 commit comments

Comments
 (0)