Wikiprojekt:GLAM/layout/styles.css
Wygląd
/*
* Niniejsze style dotyczą szablonów, tworzących strony wikiprojektu GLAM.
* Są one zgrupowane we wspólnym arkuszu, dzięki czemu mogą zostać dołączone raz
* i obowiązywać na całej stronie. Kolorystyka poszczególnych elementów może
* zostać nadpisana przez odrębne reguły, zdefiniowane osobno dla poszczególnych
* współprac i projektów.
*
* Instrukcja, jak zdefiniować motyw: [[Wikiprojekt:GLAM/layout/#Motyw_projektu]]
* Lista szablonów: [[Wikiprojekt:GLAM/layout/]]
*/
/* Banner: [[Wikiprojekt:GLAM/layout/Banner]] */
.glam-banner {
display: grid;
grid-template-areas: 'banner';
width: 100%;
height: 200px;
overflow: hidden;
}
.glam-banner-backplate {grid-area: banner;}
.glam-banner-backplate img {width:100%; height:auto;}
.glam-banner-shade {grid-area: banner; height: inherit;}
.glam-banner-inner {
grid-area: banner;
height: inherit;
display: grid;
grid-template-columns: auto 1fr;
grid-template-rows: 1fr auto auto 2fr;
grid-template-areas: 'logo .' 'logo headline' 'logo text' 'logo .';
gap: 0 2em;
padding: 1em 4em;
box-sizing: border-box;
z-index: 1;
}
.glam-banner-logo {
grid-area: logo;
padding-right: 2em;
border-right: 1px solid currentColor;
}
.glam-banner-logo img {width: auto; height: 100%;}
.glam-banner-headline {
grid-area: headline;
}
.glam-banner-text {
grid-area: text;
font-size: 3em;
font-family: serif;
margin-top: 0.2em;
line-height: 1.1;
justify-self: left;
text-align: center;
}
/* Menu: [[Wikiprojekt:GLAM/layout/Menu]] */
.glam-nav-menu {
line-height: 1.375;
}
.glam-nav-menu ul {
display: flex;
flex-wrap: wrap;
gap: 0 0.5em;
padding: 0;
margin: 0;
list-style: none;
font-weight: bold;
}
.glam-nav-menu li {
margin: 0;
}
.glam-nav-menu a {
color: inherit;
display: inline-block;
padding: 0.5em 0.4em;
transition: box-shadow 0.2s;
}
.glam-nav-menu a:hover {
text-decoration: none;
box-shadow: 0 -2px 0 currentColor inset;
}
/* Przycisk: [[Wikiprojekt:GLAM/layout/Button]] */
.glam-button {
display: inline-block;
border: 2px solid;
border-radius: 6px;
margin: 1em 0;
}
.glam-button:hover {
background: #fff;
color: #000;
}
.glam-button a {
display: inline-block;
color: inherit;
padding: 0.3em 0.6em !important; /* !important jest konieczne, bo inaczej MediaWiki nadpisuje przy LZ */
}
.glam-button:hover a {
text-decoration: none;
}
p > .glam-button:first-child {margin-top: 0;}
p > .glam-button:last-child {margin-bottom: 0;}
/* Pływający przycisk; "center" dodane dla spójności z pkt. widzenia użytkownika */
.glam-button.float-left {float: left;}
.glam-button.float-right {float: right;}
.glam-button.float-center {
display: block;
margin-left: auto;
margin-right: auto;
}
.glam-button.float-left::after,
.glam-button.float-right::after{
content: '';
display: block;
clear: both;
}
/* Nagłówki: [[Wikiprojekt:GLAM/layout/H2a]], [[Wikiprojekt:GLAM/layout/H2b]] */
.glam-h2 {
font-size: 1.6em;
border-width: 0 0 0 8px;
border-style: solid;
padding-left: 1em;
margin-bottom: 1em;
color: inherit;
line-height: 1.375;
}
.glam-box .glam-h2 {
border: none;
padding-left: 0;
}
/* Boksy */
.glam-box {
padding: 1em;
border-top: 2px solid transparent;
}
.glam-box + .glam-box {margin-top: 1em;}
.glam-box h2 {margin: 1em 0;}
.glam-box h2:first-child {margin-top: 0;}
.glam-box p:last-child {margin-bottom: 0;}
.glam-box-image {text-align:center;}
.glam-box-image img {
width: 100%;
height: auto;
}
.glam-box-image-caption {
font-size: 0.9em;
text-align: center;
margin-top: 0.3em;
}
.glam-box.glam-accent-background a {color: inherit; text-decoration: underline;}
.glam-box.glam-accent-background a:hover {opacity: 0.8;}
/* Wyróżniona liczba: [[Wikiprojekt:GLAM/layout/ProminentNumber]] */
.glam-number-box {text-align: center;}
.glam-number-box-number {
font-size: 5em;
font-weight: bold;
font-family: serif;
line-height:1;
}
.glam-number-box-text {
font-size: 0.9em;
font-family: serif;
text-transform: uppercase;
}
/* Aktualności: [[Wikiprojekt:GLAM/layout/News]] */
.glam-news-entry {
display: grid;
grid-template-columns: 100px 1fr;
grid-template-rows: auto auto 1fr;
gap: 0 1em;
}
.glam-news-entry + .glam-news-entry {
padding-top: 1em;
border-top: 1px solid #ccc;
}
.glam-news-entry + :not(.glam-news-entry) {
margin-top: 1em;
}
.glam-news-entry-meta {
font-size: 0.875em;
color: #54595d;
}
.glam-news-entry-title {font-weight: bold;}
.glam-news-entry-image {
grid-column: 1;
grid-row: 1 / span 3;
margin-bottom: 1em;
}
.glam-news-entry-image img {
width: 100px;
height: 100px;
object-fit: cover;
}
.glam-news-entry-excerpt {line-height: 1.4;}
.glam-news-entry.glam-collapsible:not(:hover) .glam-news-entry-excerpt {
max-height: 3.2em;
overflow-y: hidden;
}
/* Układy: [[Wikiprojekt:GLAM/layout/Columns2Hero]], [[Wikiprojekt:GLAM/layout/Columns3]] */
.glam-layout {margin: 1em 0;}
.glam-layout-horizontal {gap: 0.5rem 1rem;}
.glam-layout-columns2-hero {
display: grid;
grid-template-columns: 2fr 1fr;
}
.glam-layout-columns2 {
display: grid;
grid-template-columns: 1fr 1fr;
}
.glam-layout-columns3 {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
}
.glam-layout-grid {
display: grid;
}
.glam-layout-grid .glam-box-image img {
height: 150px !important;
width: auto;
max-width: 100%;
object-fit: contain;
}
.glam-layout-horizontal > .glam-box + .glam-box,
.glam-layout-grid > .glam-box + .glam-box{margin-top: 0;}
.glam-gallery .glam-box-image img {
height: 150px !important; /* aspect-ratio byłoby lepsze, ale wiki nie pozwala */
object-fit: cover;
width: 100%;
max-width: unset !important;
}
@media (max-width: 700px) {
.glam-layout-columns2-hero {
grid-template-columns: 1fr;
grid-template-rows: auto auto;
}
.glam-layout-columns2 {
grid-template-columns: 1fr;
grid-template-rows: auto auto;
}
.glam-layout-columns3 {
grid-template-columns: 1fr;
grid-template-rows: auto auto auto;
}
}
/* Lista zdefiniowana w elemencie wypełnionym kolorem motywu musi mieć
* regulowany kolor punktora, nie mogą to być obrazki;
* font-weight powiększa punktor do rozmiaru domyślnego w Wektorze */
.glam-accent-background ul {list-style-image: none; list-style-type: disc;}
.glam-accent-background ul > li::marker {font-weight: 900;}
/* Domyślny motyw - ciemnoszary jako kolor wiodący */
.glam-accent-background {background: #678; color: #fff;}
.glam-accent-color {color: #678;}
.glam-accent-border {border-color: #678;}
.glam-box-background {background: #ededed;}