summaryrefslogtreecommitdiff
path: root/actualités.css
diff options
context:
space:
mode:
Diffstat (limited to 'actualités.css')
-rw-r--r--actualités.css115
1 files changed, 80 insertions, 35 deletions
diff --git a/actualités.css b/actualités.css
index 26e147e..9df8593 100644
--- a/actualités.css
+++ b/actualités.css
@@ -1,15 +1,6 @@
-main {
- display: grid;
- grid-template-columns: 60% 40%;
-}
-
-main > div {
- padding: 1em;
- overflow: auto;
-}
-
#event-list {
max-height: 60vh;
+ overflow: auto;
scrollbar-width: thin;
scrollbar-color: darkblue #8ad;
}
@@ -29,46 +20,100 @@ main > div {
.events {
display: grid;
- grid-auto-rows: 12em;
- grid-template-columns: repeat(auto-fit, minmax(14em, 1fr));
+ grid-auto-rows: var(--cell-height);
+ grid-template-columns: repeat(auto-fit, minmax(var(--cell-width), 1fr));
grid-gap: 0.8em;
}
.event a {
- position: relative;
display: flex;
- align-items: center;
justify-content: center;
- height: 100%;
+ align-items: center;
width: 100%;
- text-decoration: none;
-}
-
-.event img {
- position: absolute;
- object-position: center;
- object-fit: cover;
height: 100%;
- width: 100%;
- transition: 0.5s;
-}
-
-.event:hover img {
- filter: grayscale(0.8) brightness(0.4);
+ text-decoration: none;
}
.event .summary {
- opacity: 0;
- z-index: 1;
font-weight: bold;
color: white;
- transition: 0.5s;
}
-.event:hover .summary {
- opacity: 1;
+@media (min-width: 40em) {
+ main {
+ display: grid;
+ grid-template-columns: 60% 40%;
+ }
+
+ main > div {
+ padding: 1em;
+ }
+
+ .events {
+ --cell-width: 14em;
+ --cell-height: 12em;
+ }
+
+ .event a {
+ position: relative;
+ }
+
+ .event img {
+ position: absolute;
+ object-position: center;
+ object-fit: cover;
+ height: 100%;
+ width: 100%;
+ transition: 0.5s;
+ }
+
+ .event:hover img {
+ filter: grayscale(0.8) brightness(0.4);
+ }
+
+ .event .summary {
+ opacity: 0;
+ z-index: 1;
+ transition: 0.5s;
+ }
+
+ .event:hover .summary {
+ opacity: 1;
+ }
+
+ .details.active > *:first-child {
+ margin-top: 0;
+ }
}
-.details.active > *:first-child {
- margin-top: 0;
+@media (max-width: 40em) {
+ main {
+ padding-left: 0.8em;
+ padding-right: 0.8em;
+ }
+
+ .events {
+ --cell-width: 10em;
+ --cell-height: 8em;
+ }
+
+ .event {
+ position: relative;
+ }
+
+ .event img {
+ object-position: center;
+ object-fit: cover;
+ height: 100%;
+ width: 100%;
+ }
+
+ .event .summary {
+ position: absolute;
+ text-align: center;
+ bottom: 0;
+ margin: 0;
+ width: 100%;
+ background: #0008;
+ }
}