Improve accessibility of the services list.

This commit is contained in:
Adrian 2018-06-12 16:08:38 +02:00
parent a674fe4d89
commit c44995b32d
2 changed files with 215 additions and 107 deletions

View File

@ -17,33 +17,37 @@ body {
margin: auto; margin: auto;
line-height: 1.6; line-height: 1.6;
} }
/* Forces the footer to always be at the bottom,
whatever the size of the screen. */
body > section:last-of-type { body > section:last-of-type {
flex: 1; flex: 1;
} }
section { section {
padding: 1em 1em; padding: 1rem 1rem;
} }
header h1 { header h1 {
font-size: 4.0em; font-size: 4.0rem;
margin: 50px 0 20px 0; margin: 3rem 0 2rem 0;
text-align: center; text-align: center;
} }
section .description { section .description {
margin-bottom: 2em; margin-bottom: 2rem;
} }
p { p {
margin: 20px 0; margin: 1.2rem 0;
} }
footer { footer {
background-color: black; background-color: black;
color: white; color: white;
font-size: 0.9em; font-size: 0.9rem;
font-style: italic; font-style: italic;
padding: 20px; margin: 0 1rem;
padding: 1rem;
text-align: center; text-align: center;
} }
footer a { footer a {
@ -53,85 +57,121 @@ footer a {
h1 { h1 {
font-size: 2em; font-size: 2em;
} }
.services h2 { .services > h2 {
border-bottom: 2px solid black; border-bottom: 2px solid black;
margin-bottom: .5em; margin-bottom: 0.5rem;
} }
.services ul { .services > ul {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
list-style: none;
padding: 0; padding: 0;
} }
.services ul li { .card,
.card .text {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
}
.card {
background-color: #5c6bc0; background-color: #5c6bc0;
list-style: none; margin-bottom: 0.5rem;
margin-bottom: .5em; position: relative;
text-align: center; text-align: center;
width: 33%; width: 33%;
} }
.services ul li:hover { .card:nth-child(6n+2) {
box-shadow: 1px 1px 4px black;
}
.services ul li:nth-child(6n+2) {
background-color: #e84e40; background-color: #e84e40;
} }
.services ul li:nth-child(6n+3) { .card:nth-child(6n+3) {
background-color: #ec407a; background-color: #ec407a;
} }
.services ul li:nth-child(6n+4) { .card:nth-child(6n+4) {
background-color: #ab47bc; background-color: #ab47bc;
} }
.services ul li:nth-child(6n+5) { .card:nth-child(6n+5) {
background-color: #7e57c2; background-color: #7e57c2;
} }
.services ul li:nth-child(6n+6) { .card:nth-child(6n+6) {
background-color: #738ffe; background-color: #738ffe;
} }
.services ul li a {
display: block; .card a {
height: 100%; color: white;
margin: 0 0.5em 0.5em 0.5em;
text-decoration: none; text-decoration: none;
} }
.services ul li img { .card a::after {
margin: 1em 1em 0 1em; content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
.card:hover {
box-shadow: 1px 1px 4px black;
}
.card a:focus {
outline: none;
text-decoration: underline;
}
.card:focus-within {
box-shadow: 1px 1px 4px black;
}
.card:focus-within a:focus {
text-decoration: none;
}
.card .text {
color: white;
flex-grow: 1;
order: 1;
}
.card .text > * + * {
margin-top: 0.75rem;
}
.card .text :last-child {
margin-top: auto;
margin-bottom: 0.5rem;
}
.card .text :nth-last-child(2) {
margin-bottom: 0.75rem;
}
.card .img img {
margin: 1rem 1rem 0 1rem;
max-width: 150px; max-width: 150px;
width: 150px; width: 150px;
max-height: 150px; max-height: 150px;
} }
.services ul li span { .card .name {
color: white; font-size: 1.1rem;
display: block;
text-align: center;
width: 100%;
}
.services ul li .name {
font-size: 1.1em;
font-weight: bold; font-weight: bold;
text-transform: uppercase; text-transform: uppercase;
} }
.services ul li .subtitle { .card .subtitle {
border-top: 1px solid gray; width: 90%;
width: 80%; margin-left: auto;
margin: auto; margin-right: auto;
margin-top: 3px; font-size: 0.8rem;
padding-top: 3px;
font-size: 0.8em;
font-style: oblique; font-style: oblique;
} }
@media (max-width: 700px) { @media (max-width: 700px) {
.services ul li { body {
width: 90%;
}
.card {
width: 49%; width: 49%;
} }
} }
@media (max-width: 399px) { @media (max-width: 399px) {
.services ul li { .card {
width: 100%; width: 100%;
} }
} }

View File

@ -65,41 +65,72 @@
<h1>Services</h1> <h1>Services</h1>
<h2>En accès libre</h2> <h2>En accès libre</h2>
<ul> <ul>
<li> <li class="card">
<a href="https://steroids.delire.party/"> <div class="text">
<img src="img/wekan.png" alt="Logo de Wekan" /> <h3 class="name">
<span class="name">Wekan</span> <a href="https://steroids.delire.party/">
Wekan
</a>
</h3>
<span class="subtitle">
Pour mettre votre productivité
sous stéroïdes, un tableau Kanban.
</span>
<span>steroids.delire.party</span> <span>steroids.delire.party</span>
<span class="subtitle">Pour mettre votre productivité </div>
sous stéroïdes, un tableau Kanban.</span> <div class="img">
</a> <img src="img/wekan.png" alt="Logo de Wekan" />
</div>
</li> </li>
<li> <li class="card">
<a href="https://plaisir.delire.party/"> <div class="text">
<img src="img/wallabag.png" alt="Logo de Wallabag" /> <h3 class="name">
<span class="name">Wallabag</span> <a href="https://plaisir.delire.party/">
Wallabag
</a>
</h3>
<span class="subtitle">
Parce que c'est toujours un
plaisir de lire... plus tard.
</span>
<span>plaisir.delire.party</span> <span>plaisir.delire.party</span>
<span class="subtitle">Parce que c'est toujours un </div>
plaisir de lire... plus tard.</span> <div class="img">
</a> <img src="img/wallabag.png" alt="Logo de Wallabag" />
</div>
</li> </li>
<li> <li class="card">
<a href="https://urss.delire.party/"> <div class="text">
<img src="img/freshrss.png" alt="Logo de FreshRSS" /> <h3 class="name">
<span class="name">FreshRSS</span> <a href="https://urss.delire.party/">
FreshRSS
</a>
</h3>
<span class="subtitle">
Pour lire vos fl'URSS, euh, vos flux RSS.
</span>
<span>urss.delire.party</span> <span>urss.delire.party</span>
<span class="subtitle">Pour lire vos fl'URSS, euh, vos </div>
flux RSS.</span> <div class="img">
</a> <img src="img/freshrss.png" alt="Logo de FreshRSS" />
</div>
</li> </li>
<li> <li class="card">
<a href="https://colle.delire.party/"> <div class="text">
<img src="img/privatebin.png" alt="Logo de PrivateBin" /> <h3 class="name">
<span class="name">PrivateBin</span> <a href="https://colle.delire.party/">
PrivateBin
</a>
</h3>
<span class="subtitle">
Partager des textes courts et
sniffer de la colle, toujours aussi délire.
</span>
<span>colle.delire.party</span> <span>colle.delire.party</span>
<span class="subtitle">Partager des textes courts et </div>
sniffer de la colle, toujours aussi délire.</span> <div class="img">
</a> <img src="img/privatebin.png" alt="Logo de PrivateBin" />
</div>
</li> </li>
</ul> </ul>
</section> </section>
@ -107,50 +138,87 @@
<section class="services"> <section class="services">
<h2>Restreints (nous demander pour l'inscription)</h2> <h2>Restreints (nous demander pour l'inscription)</h2>
<ul> <ul>
<li> <li class="card">
<a href="https://meilleurtube.delire.party/"> <div class="text">
<img src="img/peertube.svg" alt="Logo de PeerTube" /> <h3 class="name">
<span class="name">PeerTube</span> <a href="https://meilleurtube.delire.party/">
PeerTube
</a>
</h3>
<span class="subtitle">
Le meilleur du Peer (to peer), pour
partager des vidéos complètement délires.
</span>
<span>meilleurtube.delire.party</span> <span>meilleurtube.delire.party</span>
<span class="subtitle">Le meilleur du Peer (to peer), pour </div>
partager des vidéos complètement délires.</span> <div class="img">
</a> <img src="img/peertube.svg" alt="Logo de PeerTube" />
</div>
</li> </li>
<li> <li class="card">
<a href="https://tutut.delire.party/"> <div class="text">
<img src="img/mastodon.png" alt="Logo de Mastodon" /> <h3 class="name">
<span class="name">Mastodon</span> <a href="https://tutut.delire.party/">
Mastodon
</a>
</h3>
<span class="subtitle">
Une instance du média social de micro-blogging,
pour faire toot-toot, les rageux.
</span>
<span>tutut.delire.party</span> <span>tutut.delire.party</span>
<span class="subtitle">Une instance du média social de </div>
micro-blogging, pour faire toot-toot, les <div class="img">
rageux.</span> <img src="img/mastodon.png" alt="Logo de Mastodon" />
</a> </div>
</li> </li>
<li> <li class="card">
<a href="https://nuage.delire.party/"> <div class="text">
<img src="img/nextcloud.png" alt="Logo de NextCloud" /> <h3 class="name">
<span class="name">NextCloud</span> <a href="https://nuage.delire.party/">
<span>nuage.delire.party</span> NextCloud
</a>
</h3>
<span class="subtitle">J'ai la tête dans le cloud.</span> <span class="subtitle">J'ai la tête dans le cloud.</span>
</a> <span>nuage.delire.party</span>
</div>
<div class="img">
<img src="img/nextcloud.png" alt="Logo de NextCloud" />
</div>
</li> </li>
<li> <li class="card">
<a href="https://osef.delire.party/"> <div class="text">
<img src="img/mattermost.png" alt="Logo de Mattermost" /> <h3 class="name">
<span class="name">Mattermost</span> <a href="https://osef.delire.party/">
Mattermost
</a>
</h3>
<span class="subtitle">
What matters most? Pouvoir
discuter ensemble et dire osef.
</span>
<span>osef.delire.party</span> <span>osef.delire.party</span>
<span class="subtitle">What matters most? Pouvoir </div>
discuter ensemble et dire osef.</span> <div class="img">
</a> <img src="img/mattermost.png" alt="Logo de Mattermost" />
</div>
</li> </li>
<li> <li class="card">
<a href="https://vip.delire.party/"> <div class="text">
<img src="img/thelounge.png" alt="Logo de The Lounge" /> <h3 class="name">
<span class="name">The Lounge</span> <a href="https://vip.delire.party/">
The Lounge
</a>
</h3>
<span class="subtitle">
Un bouncer IRC très sélect, pour
les nostalgiques des années 70.
</span>
<span>vip.delire.party</span> <span>vip.delire.party</span>
<span class="subtitle">Un bouncer IRC très sélect, pour </div>
les nostalgiques des années 70.</span> <div class="img">
</a> <img src="img/thelounge.png" alt="Logo de The Lounge" />
</div>
</li> </li>
</ul> </ul>
</section> </section>