Skip to content

Commit 13cffc8

Browse files
committed
restore table based layout
1 parent ee2f21b commit 13cffc8

7 files changed

Lines changed: 87 additions & 50 deletions

File tree

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ libs: {
1818
url: 'https://cdn.jsdelivr.net/npm/less@4.2.0/dist/less.min.js',
1919
sri: 'sha384-SlYTcCEsC10TwMfcpGjqd+bWfA2QdB0CInBtPX6erDT3NnEkhX2X3gJ83UyHtXs3'
2020
},
21-
css: '/styles/styles.min.css?v=2026030800',
21+
css: '/styles/styles.min.css?v=2026032500',
2222
bootstrap: {
2323
css: {
2424
url: 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css',

_data/downloads.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"stable": {
3-
"title": "Stable",
3+
"title": "Stable version",
4+
"titleVersion": true,
45
"packages": [
56
{
67
"package": "Dependent",
@@ -26,12 +27,14 @@
2627
]
2728
},
2829
"old-stable": {
29-
"title": "Old Stable",
30+
"title": "Old stable",
31+
"titleVersion": true,
3032
"packages": [
3133
]
3234
},
3335
"lts": {
34-
"title": "LTS",
36+
"title": "LTS versions",
37+
"titleVersion": false,
3538
"description": "Long Term Support with low maintenance mode. This means only security updates and rare fixes of serious issues will go into these release branches.",
3639
"packages": [
3740
{
@@ -44,13 +47,15 @@
4447
]
4548
},
4649
"beta": {
47-
"title": "Beta",
50+
"title": "Beta version",
51+
"titleVersion": true,
4852
"description": "We recommend to test pre-release versions on a separate environment, and don't forget to backup your data before installing.",
4953
"packages": [
5054
]
5155
},
5256
"rc": {
53-
"title": "Release Candidate",
57+
"title": "Release candidate",
58+
"titleVersion": true,
5459
"description": "We recommend to test pre-release versions on a separate environment, and don't forget to backup your data before installing.",
5560
"packages": [
5661
{

_includes/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878

7979
document.querySelectorAll('a.copy-popover-link').forEach((sumbtn) => {
8080
var popover = new bootstrap.Popover(sumbtn, {
81-
content: sumbtn.closest('div').querySelector('.copy-popover-target').innerHTML,
81+
content: sumbtn.closest('td').querySelector('.copy-popover-target').innerHTML,
8282
html: true,
8383
customClass: 'copy-popover'
8484
});

download/index.html

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,37 @@ <h1>Download your version of Roundcube</h1>
1212
{% if params.packages.size == 0 %}
1313
{% continue %}
1414
{% endif %}
15-
<h2 id="{{ id }}">{{ params.title }} <a class="anchor" href="#{{ id }}" aria-label="Link to this section: {{ params.title }}"></a></h2>
15+
<h2 id="{{ id }}">{{ params.title }}{% if params.titleVersion %} - {{ params.packages[0].version }}{% endif %} <a class="anchor" href="#{{ id }}" aria-label="Link to this section: {{ params.title }}"></a></h2>
1616

1717
{% if params.description %}
1818
<p class="text-body-secondary mb-1">{{ params.description }}</p>
1919
{% endif %}
2020

21-
<div class="download-grid grid-striped" role="table">
22-
<div class="item-header fw-bold"role="row">
23-
<div class="col-package" role="columnheader">Package</div>
24-
<div class="col-link" role="columnheader"></div>
25-
<div class="col-size" role="columnheader">Size</div>
26-
<div class="col-checksum" role="columnheader"><span class="d-none d-lg-inline">SHA-256 checksum</span></div>
27-
</div>
21+
<table class="table table-striped download-table">
22+
<thead>
23+
<tr>
24+
<th class="package" scope="col">Package</th>
25+
<td class="link"></td>
26+
<th class="size text-nowrap" scope="col">Size</th>
27+
<th class="checksum" scope="col"><span class="d-none d-lg-inline">SHA-256 checksum</span></th>
28+
</tr>
29+
</thead>
30+
<tbody>
2831
{% for package in params.packages %}
29-
<div class="item-content" role="row">
30-
<div class="col-package" role="rowheader">{{ package.version }} - {{ package.package }}{% if package.package == "Dependent" %}<sup><a href="#fn1" class="text-body-secondary">1</a></sup>{% endif %}</div>
31-
<div class="col-link" role="cell"><a href="{{ package.url }}" title="Download now!" class="btn rc-icon btn-rc-download btn-sm"><span class="d-none d-sm-inline ms-0 ms-sm-1">Download</span></a></div>
32-
<div class="col-size" role="cell">{{ package.size }}</div>
33-
<div class="col-checksum" role="cell">
32+
<tr>
33+
<th class="package fw-normal" scope="row">{% unless params.titleVersion %}{{ package.version }} - {% endunless %}{{ package.package }}{% if package.package == "Dependent" %}<sup><a href="#fn1" class="text-body-secondary">1</a></sup>{% endif %}</th>
34+
<td class="link text-center text-lg-start"><a href="{{ package.url }}" title="Download now!" class="btn rc-icon btn-rc-download btn-sm"><span>Download</span></a></td>
35+
<td class="size text-nowrap">{{ package.size }}</td>
36+
<td class="checksum font-monospace text-nowrap text-center text-lg-start pe-3">
3437
<span class="d-none d-lg-inline copy-popover-target">
35-
<span class="copy-target d-block d-md-inline-block overflow-hidden text-nowrap text-truncate py-3 py-lg-0">{{ package.checksum }}</span><span class="py-3 py-lg-0 ps-1"><a class="copy-link align-top" href="#" aria-label="Copy text"></a></span>
38+
<span class="copy-target d-block d-lg-inline text-nowrap overflow-auto py-3 py-lg-0">{{ package.checksum }}</span><span class="py-3 py-lg-0"><a class="copy-link" href="#" aria-label="Copy text"></a></span>
3639
</span>
3740
<a class="d-inline d-lg-none copy-popover-link checksum" href="#" aria-label="SHA-256 checksum" onclick="return false;" data-bs-title="SHA-256 checksum" data-bs-placement="left"></a>
38-
</div>
39-
</div>
41+
</td>
42+
</tr>
4043
{% endfor %}
41-
</div>
44+
</tbody>
45+
</table>
4246
{% endfor %}
4347

4448
<p id="fn1" class="text-body-secondary mt-4">1. Dependent packages only contain sources which are licensed under the GPL but they require some third-party

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<a href="/screens"><img src="/screens/skins/{{ skin }}/banner.png?g={{ generated }}" {% if site.data.screenshots[skin]['banner-dark'] %}data-rc-dark="/screens/skins/{{ skin }}/banner_dark.png?g={{ generated }}"{% endif %} width="647" height="390" id="bannerimg" class="img-fluid" alt="Welcome Roundcube Webmail"></a>
1616
</div>
1717
<div class="download text-center d-flex flex-column justify-content-center justify-content-lg-start align-items-center pt-xl-4">
18-
<a href="/download" class="btn rc-icon btn-rc-download btn-lg" title="Download now!"><span class="ms-1">Download</span></a>
18+
<a href="/download" class="btn rc-icon btn-rc-download btn-lg" title="Download now!"><span>Download</span></a>
1919
<span class="version text-body-secondary">Version {{ site.data.downloads.stable.packages[0].version }}</span>
2020
</div>
2121
</div>

styles/styles.less

Lines changed: 52 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@nav-height: 66px;
33
@nav-offset: 6rem;
44
@thumbnail-width: 140px;
5+
@btn-icon-margin: .25rem;
56

67
@min-width-sm: 576px;
78
@min-width-md: 768px;
@@ -54,6 +55,10 @@ html[data-bs-theme="dark"] {
5455
--bs-navbar-toggler-padding-x: 0;
5556
}
5657

58+
.table {
59+
--bs-table-striped-bg: var(--rc-color-background-alt);
60+
}
61+
5762
.bg-quote,
5863
.bg-badge {
5964
background-color: var(--rc-color-background-alt) !important;
@@ -291,11 +296,11 @@ footer {
291296
}
292297

293298
.rc-icon::before {
294-
margin-right: .25rem;
299+
margin-right: @btn-icon-margin;
295300
}
296301

297302
.rc-icon::after {
298-
margin-left: .25rem;
303+
margin-left: @btn-icon-margin;
299304
}
300305

301306
a.back-link::before {
@@ -356,6 +361,23 @@ a.current-theme::after {
356361

357362
&::before {
358363
content: @fa-var-download;
364+
margin-right: 0;
365+
}
366+
367+
> span {
368+
margin-left: @btn-icon-margin * 2;
369+
}
370+
371+
&.btn-sm {
372+
> span {
373+
display: none;
374+
}
375+
376+
@media (min-width: @min-width-sm) {
377+
> span {
378+
display: inline;
379+
}
380+
}
359381
}
360382
}
361383

@@ -434,41 +456,47 @@ div.color-modes > ul.dropdown-menu {
434456
}
435457
}
436458

437-
div.download-grid {
438-
display: grid;
439-
grid-template-columns: 57% 13% 21% 9%;
459+
table.download-table {
460+
th.package {
461+
width: 55%;
462+
}
440463

441-
div.item-header,
442-
div.item-content {
443-
display: contents;
464+
td.link,
465+
td.size {
466+
width: 20%;
467+
}
444468

445-
> div {
446-
padding: .5rem;
447-
border-bottom: var(--bs-border-width) solid var(--bs-border-color);
448-
}
469+
td.checksum {
470+
font-size: 0.9em;
449471
}
450472

451-
&.grid-striped > div:nth-of-type(even) > div {
452-
background-color: var(--rc-color-background-alt);
473+
tbody th,
474+
tbody td {
475+
vertical-align: middle;
453476
}
454477

455478
@media (min-width: @min-width-sm) {
456-
grid-template-columns: 50% 25% 15% 10%;
457-
}
479+
th.package {
480+
width: 40%;
481+
}
458482

459-
@media (min-width: @min-width-lg) {
460-
grid-template-columns: 30% 15% 10% 43%;
483+
td.link {
484+
width: 35%;
485+
}
461486

462-
div.col-checksum span.copy-target {
463-
max-width: 90%;
487+
td.size {
488+
width: 20%;
464489
}
465490
}
466491

467-
@media (min-width: @min-width-xxl) {
468-
grid-template-columns: 30% 12% 10% 48%;
492+
@media (min-width: @min-width-lg) {
493+
th.package {
494+
width: 20%;
495+
}
469496

470-
div.col-checksum span.copy-target {
471-
max-width: none;
497+
td.link,
498+
td.size {
499+
width: 15%;
472500
}
473501
}
474502
}

0 commit comments

Comments
 (0)