fix: error handling & css

This commit is contained in:
Sergey Yarkov 2022-11-06 18:25:48 +03:00
parent af9a5be063
commit 1abd4b1c59
No known key found for this signature in database
GPG Key ID: E91CE1FABC619B6F
2 changed files with 8 additions and 2 deletions

View File

@ -78,6 +78,9 @@ const t = useTranslation(Astro);
<script define:vars={{ slug }}>
(async () => {
const response = await fetch(`/api/views?slug=${slug}`, { method: "POST" });
if (!response.ok) return;
const views = await response.text();
const $views = document.getElementById("views");

View File

@ -10,6 +10,7 @@
& span {
margin-left: 3.5px;
font-size: var(--font-size-sm);
color: var(--font-color-grayer);
}
}
}
@ -77,9 +78,11 @@
.article {
& header {
& div:nth-child(1) {
flex-direction: column-reverse;
row-gap: 10px;
flex-direction: column;
align-items: flex-start;
& .tags {
margin-bottom: 15px;
}
}
& .heading h1 {
font-size: 2rem;