order and background on mobile
This commit is contained in:
parent
8d9cdc92d5
commit
f44012353d
2 changed files with 81 additions and 38 deletions
|
|
@ -18,18 +18,16 @@ const localeDate = formatLocalizedDateString(postData.date);
|
|||
|
||||
<Main>
|
||||
<div id="background">
|
||||
<div id="article-header">
|
||||
<Image id="titleImg" src={titleImg} alt={postData.image.alt} />
|
||||
<div>
|
||||
<div class="info">
|
||||
<span>{localeDate} | </span>
|
||||
<span>Autor: {postData.author} | </span>
|
||||
<span>Lesezeit: {postData.time2read}</span>
|
||||
</div>
|
||||
<h1>{postData.title}</h1>
|
||||
<h3>{postData.subtitle}</h3>
|
||||
<div id="header">
|
||||
<Image id="title-img" src={titleImg} alt={postData.image.alt} />
|
||||
<div class="info">
|
||||
<span>{localeDate} | </span>
|
||||
<span>Autor: {postData.author} | </span>
|
||||
<span>Lesezeit: {postData.time2read}</span>
|
||||
</div>
|
||||
<span>{postData.introduction}</span>
|
||||
<h1 id="title">{postData.title}</h1>
|
||||
<h3 id="subtitle">{postData.subtitle}</h3>
|
||||
<span id="introduction">{postData.introduction}</span>
|
||||
</div>
|
||||
<article class="markdown-content">
|
||||
<slot />
|
||||
|
|
@ -61,12 +59,16 @@ const localeDate = formatLocalizedDateString(postData.date);
|
|||
padding: 0 20%;
|
||||
}
|
||||
|
||||
#article-header {
|
||||
#header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: white;
|
||||
max-width: 900px;
|
||||
padding: 0 64px;
|
||||
font-size: 1.5rem;
|
||||
line-height: 1.6;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
article {
|
||||
|
|
@ -77,12 +79,51 @@ const localeDate = formatLocalizedDateString(postData.date);
|
|||
background-color: white;
|
||||
}
|
||||
|
||||
#titleImg {
|
||||
#title-img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
object-fit: cover;
|
||||
object-position: center;
|
||||
order: 1;
|
||||
}
|
||||
|
||||
#header .info,
|
||||
#header #introduction {
|
||||
font-size: 1.5rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
#header #title {
|
||||
font-size: 2.5rem;
|
||||
padding: 0 64px;
|
||||
}
|
||||
|
||||
#header #subtitle {
|
||||
font-size: 1.8rem;
|
||||
padding: 0 64px;
|
||||
}
|
||||
|
||||
.info {
|
||||
padding: 32px 64px 0 64px;
|
||||
font-size: medium;
|
||||
order: 2;
|
||||
}
|
||||
|
||||
#title {
|
||||
margin-bottom: 0;
|
||||
order: 3;
|
||||
}
|
||||
|
||||
#subtitle {
|
||||
margin-top: 0;
|
||||
font-weight: lighter;
|
||||
order: 4;
|
||||
}
|
||||
|
||||
#introduction {
|
||||
padding: 32px 64px 0 64px;
|
||||
order: 5;
|
||||
}
|
||||
|
||||
.markdown-content {
|
||||
|
|
@ -93,21 +134,6 @@ const localeDate = formatLocalizedDateString(postData.date);
|
|||
cursor: zoom-in;
|
||||
}
|
||||
}
|
||||
|
||||
.info {
|
||||
padding-top: 16px;
|
||||
font-size: medium;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-top: 0;
|
||||
font-weight: lighter;
|
||||
}
|
||||
|
||||
.disclaimer {
|
||||
padding: 64px 0 16px 0;
|
||||
margin: 0;
|
||||
|
|
@ -151,19 +177,36 @@ const localeDate = formatLocalizedDateString(postData.date);
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
#article-header {
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
#header {
|
||||
background-image: linear-gradient(
|
||||
to bottom,
|
||||
var(--primary-dark),
|
||||
var(--primary-color)
|
||||
);
|
||||
color: white;
|
||||
* {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
.info {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
#title-img {
|
||||
order: 4;
|
||||
}
|
||||
|
||||
#title {
|
||||
margin: 0;
|
||||
order: 2;
|
||||
}
|
||||
|
||||
#subtitle {
|
||||
order: 3;
|
||||
}
|
||||
|
||||
#introduction {
|
||||
order: 5;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import SingleImage from '../../components/blog/SingleImage.astro'
|
|||
import DoubleImage from '../../components/blog/DoubleImage.astro'
|
||||
|
||||
|
||||
|
||||
<br />
|
||||
---
|
||||
<br />
|
||||
## Zurück im warmen
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue