CSS Updates and View Transitions
This commit is contained in:
parent
795d1e8c13
commit
5c2ef4127a
@ -1,14 +1,15 @@
|
|||||||
---
|
---
|
||||||
|
import { ViewTransitions } from 'astro:transitions'
|
||||||
import '../styles/fonts.css'
|
import '../styles/fonts.css'
|
||||||
import '../styles/global.css'
|
import '../styles/global.css'
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
title: string;
|
title: string
|
||||||
description: string;
|
description: string
|
||||||
permalink: string;
|
permalink: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const { title, description, permalink } = Astro.props;
|
const { title, description, permalink } = Astro.props
|
||||||
const socialUrl = Astro.site.href + 'assets/social.png'
|
const socialUrl = Astro.site.href + 'assets/social.png'
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -17,7 +18,6 @@ const socialUrl = Astro.site.href + 'assets/social.png'
|
|||||||
<meta name="viewport" content="width=device-width" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
||||||
|
|
||||||
|
|
||||||
<!-- Primary Meta Tags -->
|
<!-- Primary Meta Tags -->
|
||||||
<title>{title}</title>
|
<title>{title}</title>
|
||||||
<meta name="title" content={title} />
|
<meta name="title" content={title} />
|
||||||
@ -37,13 +37,18 @@ const socialUrl = Astro.site.href + 'assets/social.png'
|
|||||||
<meta property="twitter:description" content={description} />
|
<meta property="twitter:description" content={description} />
|
||||||
<meta property="twitter:image" content={socialUrl} />
|
<meta property="twitter:image" content={socialUrl} />
|
||||||
|
|
||||||
|
<ViewTransitions />
|
||||||
|
|
||||||
<!-- This is intentionally inlined to avoid FOUC -->
|
<!-- This is intentionally inlined to avoid FOUC -->
|
||||||
<script>
|
<script is:inline>
|
||||||
const root = document.documentElement;
|
const root = document.documentElement
|
||||||
const theme = localStorage.getItem('theme');
|
const theme = localStorage.getItem('theme')
|
||||||
if (theme === 'dark' || (!theme) && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
if (
|
||||||
root.classList.add('theme-dark');
|
theme === 'dark' ||
|
||||||
|
(!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)
|
||||||
|
) {
|
||||||
|
root.classList.add('theme-dark')
|
||||||
} else {
|
} else {
|
||||||
root.classList.remove('theme-dark');
|
root.classList.remove('theme-dark')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -3,8 +3,14 @@
|
|||||||
display: block;
|
display: block;
|
||||||
width: 75px;
|
width: 75px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 520px) {
|
||||||
|
img {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<a href="/">
|
<a href="/">
|
||||||
<img alt="Blog Logo" src="/assets/logo.webp" width="75" height="50">
|
<img alt="Blog Logo" src="/assets/logo.webp" width="75" height="50" />
|
||||||
</a>
|
</a>
|
||||||
|
@ -14,6 +14,17 @@
|
|||||||
--primary-color: #548e9b;
|
--primary-color: #548e9b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
@supports (scrollbar-gutter: stable) {
|
||||||
|
html {
|
||||||
|
overflow-y: auto;
|
||||||
|
scrollbar-gutter: stable;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
*,
|
*,
|
||||||
*:before,
|
*:before,
|
||||||
*:after {
|
*:after {
|
||||||
|
Loading…
Reference in New Issue
Block a user