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