Zum Inhalt springen

Vorlage:Blogpost/styles.css

Aus Matrix of Time
/* Vorlage:Blogpost/styles.css
   Styles für die Blogpost-Vorlage.
   Verwendet CSS-Custom-Properties des aktiven Skins wo möglich.
*/

/* ── Artikel-Wrapper ─────────────────────────────────── */
.blogpost {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--color-base, #202122);
}

/* ── Hero-Bild ───────────────────────────────────────── */
.blogpost-hero {
    margin: 0 -1rem 2rem;
    overflow: hidden;
    border-radius: 4px;
}

.blogpost-hero-inner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 420px;
}

/* ── Header ──────────────────────────────────────────── */
.blogpost-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color-base, #a7d7f9);
    padding-bottom: 1rem;
}

.blogpost-titel {
    font-size: 2rem;
    line-height: 1.25;
    margin: 0 0 0.5rem;
    font-weight: 700;
    color: var(--color-base, #202122);
    border: none;
}

/* ── Meta-Zeile ──────────────────────────────────────── */
.blogpost-meta {
    font-size: 0.875rem;
    color: var(--color-subtle, #54595d);
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.blogpost-trenner {
    opacity: 0.4;
    margin: 0 0.2rem;
}

.blogpost-kategorie {
    font-weight: 600;
}

/* ── Tags ────────────────────────────────────────────── */
.blogpost-tags {
    margin-top: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.blog-tag {
    display: inline-block;
    background: var(--background-color-progressive-subtle, #eaf3fb);
    color: var(--color-progressive, #3366cc);
    border: 1px solid var(--border-color-progressive, #a2b8e0);
    border-radius: 2px;
    padding: 0.1rem 0.55rem;
    font-size: 0.8rem;
    text-decoration: none;
    line-height: 1.6;
    transition: background 0.15s ease;
}

.blog-tag a {
    color: inherit;
    text-decoration: none;
}

.blog-tag:hover {
    background: var(--color-progressive, #3366cc);
    color: #fff;
    border: 1px solid var(--color-progressive, #3366cc);
}

.blog-tag:hover a {
    color: #fff;
}

/* ── Intro ───────────────────────────────────────────── */
.blogpost-intro {
    font-size: 1.15rem;
    line-height: 1.65;
    color: var(--color-subtle, #54595d);
    font-style: italic;
    margin-bottom: 1.75rem;
    padding-left: 1rem;
    border-left: 3px solid var(--color-progressive, #3366cc);
}

/* ── Inhalt ──────────────────────────────────────────── */
.blogpost-inhalt {
    margin-top: 1rem;
}

.blogpost-inhalt h2 {
    font-size: 1.4rem;
    margin-top: 2rem;
}

.blogpost-inhalt h3 {
    font-size: 1.15rem;
    margin-top: 1.5rem;
}

/* ── Kommentare ──────────────────────────────────────── */
.blogpost-kommentare {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color-base, #a7d7f9);
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
    .blogpost-titel {
        font-size: 1.5rem;
    }

    .blogpost-hero-inner img {
        max-height: 240px;
    }
}
/* Ergänzung zu Vorlage:Blogpost/styles.css
   Diese Regeln ans Ende der bestehenden styles.css anhängen.
*/

/* ── Blogkarten-Grid (Übersichtsseite) ───────────────── */
.blog-uebersicht {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
    margin: 1.5rem 0;
}

/* ── Einzelne Karte ──────────────────────────────────── */
.blogkarte {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color-base, #a7d7f9);
    border-radius: 4px;
    overflow: hidden;
    background: var(--background-color-base, #fff);
    transition: box-shadow 0.2s ease;
}

.blogkarte:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}

/* ── Kartenbild ──────────────────────────────────────── */
/* aspect-ratio wird von TemplateStyles nicht unterstützt → Padding-Hack */
.blogkarte-bild {
    overflow: hidden;
    position: relative;
    padding-top: 56.25%; /* entspricht 16:9 */
    background: var(--background-color-neutral, #eaecf0);
}

.blogkarte-bild img,
.blogkarte-bild > a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.blogkarte-bild img {
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blogkarte:hover .blogkarte-bild img {
    transform: scale(1.03);
}

.blogkarte-bild--leer {
    display: flex;
    align-items: center;
    justify-content: center;
}

.blogkarte-bild--leer::after {
    content: '\270D';
    font-size: 2rem;
    opacity: 0.2;
}

/* ── Karteninhalt ────────────────────────────────────── */
.blogkarte-inhalt {
    padding: 1rem 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blogkarte-meta {
    font-size: 0.8rem;
    color: var(--color-subtle, #54595d);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blogkarte-kategorie {
    font-weight: 600;
    color: var(--color-progressive, #3366cc);
}

.blogkarte-titel {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.3;
    border: none;
}

.blogkarte-titel a {
    color: var(--color-base, #202122);
    text-decoration: none;
}

.blogkarte-titel a:hover {
    color: var(--color-progressive, #3366cc);
}

.blogkarte-intro {
    font-size: 0.9rem;
    color: var(--color-subtle, #54595d);
    margin: 0 0 0.75rem;
    line-height: 1.55;
    flex: 1;
}

.blogkarte-link {
    margin-top: auto;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-progressive, #3366cc);
    text-decoration: none;
}

.blogkarte-link:hover {
    text-decoration: underline;
}