Use third grid column in graphs layout on wide screens (#2226)

* Use third grid column on graphs page when width > 1400px

* Define column width more precisely

* Center graphs inside containers

* Fix graphs always showing 2+ columns (dae)
This commit is contained in:
Matthias Metelka 2022-12-01 07:33:52 +01:00 committed by GitHub
parent 49455b4b14
commit 9ecc0ffdc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View file

@ -9,8 +9,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export let subtitle: string | null = null;
</script>
<TitledContainer {title}>
<div class="graph">
<TitledContainer class="d-flex flex-column" {title}>
<div class="graph d-flex flex-grow-1 flex-column justify-content-center">
{#if subtitle}
<div class="subtitle">{subtitle}</div>
{/if}

View file

@ -56,9 +56,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<style lang="scss">
.graphs-container {
display: grid;
gap: 1.5em;
grid-template-columns: 50% 50%;
gap: 1em;
grid-template-columns: repeat(3, minmax(0, 1fr));
@media only screen and (max-width: 1400px) {
grid-template-columns: 50% 50%;
}
@media only screen and (max-width: 1200px) {
grid-template-columns: 100%;
}