styles.css: Porovnání verzí
Z Wiki JU
založena nová stránka s textem „→Šablona:Dlaždice/styles.css (TemplateStyles, content model: Sanitized CSS): .dlazdice-polozka { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px 12px; background: #fff; border: 1px solid #e3e6ea; border-radius: 10px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; } .dlazdice-polozka:hover { tra…“ |
Bez shrnutí editace |
||
| Řádek 1: | Řádek 1: | ||
/* Šablona:Dlaždice/styles.css (TemplateStyles, content model: Sanitized CSS) */ | /* Šablona:Dlaždice/styles.css (TemplateStyles, content model: Sanitized CSS) */ | ||
/* Mřížka: výchozí = automatický počet sloupců podle šířky */ | |||
.dlazdice { | |||
display: grid; | |||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); | |||
gap: 16px; | |||
margin: 1em 0; | |||
} | |||
/* Pevný počet sloupců na desktopu (parametr sloupce, 1-8) */ | |||
.dlazdice-s1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } | |||
.dlazdice-s2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } | |||
.dlazdice-s3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } | |||
.dlazdice-s4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } | |||
.dlazdice-s5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } | |||
.dlazdice-s6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } | |||
.dlazdice-s7 { grid-template-columns: repeat(7, minmax(0, 1fr)); } | |||
.dlazdice-s8 { grid-template-columns: repeat(8, minmax(0, 1fr)); } | |||
/* Responzivita: s užší stránkou se počet sloupců snižuje */ | |||
@media (max-width: 1000px) { | |||
.dlazdice-s5, .dlazdice-s6, .dlazdice-s7, .dlazdice-s8 { | |||
grid-template-columns: repeat(4, minmax(0, 1fr)); | |||
} | |||
} | |||
@media (max-width: 720px) { | |||
.dlazdice-s3, .dlazdice-s4, .dlazdice-s5, .dlazdice-s6, .dlazdice-s7, .dlazdice-s8 { | |||
grid-template-columns: repeat(2, minmax(0, 1fr)); | |||
} | |||
} | |||
@media (max-width: 440px) { | |||
.dlazdice-s2, .dlazdice-s3, .dlazdice-s4, .dlazdice-s5, .dlazdice-s6, .dlazdice-s7, .dlazdice-s8 { | |||
grid-template-columns: repeat(1, minmax(0, 1fr)); | |||
} | |||
} | |||
.dlazdice-polozka { | .dlazdice-polozka { | ||
Verze z 9. 10. 2026, 08:09
/* Šablona:Dlaždice/styles.css (TemplateStyles, content model: Sanitized CSS) */
/* Mřížka: výchozí = automatický počet sloupců podle šířky */
.dlazdice {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 16px;
margin: 1em 0;
}
/* Pevný počet sloupců na desktopu (parametr sloupce, 1-8) */
.dlazdice-s1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.dlazdice-s2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dlazdice-s3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dlazdice-s4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dlazdice-s5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dlazdice-s6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dlazdice-s7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dlazdice-s8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
/* Responzivita: s užší stránkou se počet sloupců snižuje */
@media (max-width: 1000px) {
.dlazdice-s5, .dlazdice-s6, .dlazdice-s7, .dlazdice-s8 {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}
@media (max-width: 720px) {
.dlazdice-s3, .dlazdice-s4, .dlazdice-s5, .dlazdice-s6, .dlazdice-s7, .dlazdice-s8 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 440px) {
.dlazdice-s2, .dlazdice-s3, .dlazdice-s4, .dlazdice-s5, .dlazdice-s6, .dlazdice-s7, .dlazdice-s8 {
grid-template-columns: repeat(1, minmax(0, 1fr));
}
}
.dlazdice-polozka {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
padding: 16px 12px;
background: #fff;
border: 1px solid #e3e6ea;
border-radius: 10px;
box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.dlazdice-polozka:hover {
transform: translateY(-3px);
border-color: #36c;
box-shadow: 0 6px 16px rgba(0, 0, 0, .15);
}
.dlazdice-obrazek {
display: flex;
align-items: center;
justify-content: center;
min-height: 1em; /* 1em = velikost obrázku, nastavená přes font-size */
line-height: 0;
margin-bottom: 10px;
}
.dlazdice-obrazek img {
width: 1em;
max-width: 100%;
height: auto;
}
.dlazdice-nazev {
font-weight: 600;
font-size: 1rem;
line-height: 1.3;
}
/* Odkaz v názvu se roztáhne přes celou kartu, takže je klikací celá dlaždice */
.dlazdice-nazev a::after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
border-radius: 10px;
}
.dlazdice-nazev a,
.dlazdice-nazev a:visited {
color: inherit;
text-decoration: none;
}
.dlazdice-popis {
margin-top: 6px;
font-size: .85rem;
line-height: 1.4;
color: #5b6470;
}