Header: flex updates
This commit is contained in:
parent
eee959d2bc
commit
308a810c51
|
@ -3,15 +3,17 @@ import HeaderLink from './HeaderLink.astro';
|
||||||
import { SITE_TITLE } from '../consts';
|
import { SITE_TITLE } from '../consts';
|
||||||
---
|
---
|
||||||
|
|
||||||
<header>
|
<header style="width: 100%" class="font-sans sticky top-0 md:static bg-white underline-offset-4 z-40">
|
||||||
<nav>
|
<nav class="hidden select-none mx-auto md:flex justify-between items-center px-6 py-3.5 text-md md:text-lg leading-6">
|
||||||
<h2><a href="/">{SITE_TITLE}</a></h2>
|
<div class="flex items-center space-x-8">
|
||||||
<div class="internal-links">
|
|
||||||
<HeaderLink href="/">Home</HeaderLink>
|
<HeaderLink href="/">Home</HeaderLink>
|
||||||
<HeaderLink href="/blog">Blog</HeaderLink>
|
<HeaderLink href="/blog">Blog</HeaderLink>
|
||||||
<HeaderLink href="/about">About</HeaderLink>
|
<HeaderLink href="/about">About</HeaderLink>
|
||||||
</div>
|
</div>
|
||||||
<div class="social-links">
|
<div class="fun-quote" style="margin: 0">
|
||||||
|
<span class="hover:underline">The QT on Wayland</span>
|
||||||
|
</div>
|
||||||
|
<div class="social-links flex space-x-8 items-center">
|
||||||
<a href="https://discord.com/users/180472559148597249" target="_blank">
|
<a href="https://discord.com/users/180472559148597249" target="_blank">
|
||||||
<span class="sr-only">Discord</span>
|
<span class="sr-only">Discord</span>
|
||||||
<svg width="32" height="32" viewBox="0 0 127.14 96.36">
|
<svg width="32" height="32" viewBox="0 0 127.14 96.36">
|
||||||
|
@ -49,7 +51,7 @@ import { SITE_TITLE } from '../consts';
|
||||||
<span class="sr-only">Github</span>
|
<span class="sr-only">Github</span>
|
||||||
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32">
|
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32">
|
||||||
<path
|
<path
|
||||||
fill="currentColor"
|
fill="#000"
|
||||||
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z" />
|
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z" />
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
|
@ -64,6 +66,8 @@ import { SITE_TITLE } from '../consts';
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
<!--
|
||||||
<style>
|
<style>
|
||||||
header {
|
header {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -105,3 +109,4 @@ import { SITE_TITLE } from '../consts';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
-->
|
||||||
|
|
|
@ -9,9 +9,10 @@ const { pathname } = Astro.url;
|
||||||
const isActive = href === pathname || href === pathname.replace(/\/$/, '');
|
const isActive = href === pathname || href === pathname.replace(/\/$/, '');
|
||||||
---
|
---
|
||||||
|
|
||||||
<a href={href} class:list={[className, { active: isActive }]} {...props}>
|
<a href={href} class="hover:underline" {...props}>
|
||||||
<slot />
|
<slot />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
a {
|
a {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
@ -10,9 +10,9 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
|
||||||
<head>
|
<head>
|
||||||
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
|
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body style="display: flex" class="font-sans flex-col items-center">
|
||||||
<Header title={SITE_TITLE} />
|
<Header class="grow" title={SITE_TITLE} />
|
||||||
<img src="/akemi_silly_transparent.png" />
|
<img width="600px" src="/akemi_silly_transparent.png" />
|
||||||
<Footer />
|
<Footer />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,52 +1,52 @@
|
||||||
/*
|
body {
|
||||||
The CSS in this style tag is based off of Bear Blog's default CSS.
|
font-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
|
||||||
https://github.com/HermanMartinus/bearblog/blob/297026a877bc2ab2b3bdfbd6b9f7961c350917dd/templates/styles/blog/default.css
|
}
|
||||||
License MIT: https://github.com/HermanMartinus/bearblog/blob/master/LICENSE.md
|
/*/
|
||||||
*/
|
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--accent: #2337ff;
|
--accent: #2337ff;
|
||||||
--accent-dark: #000d8a;
|
--accent-dark: #000d8a;
|
||||||
--black: 15, 18, 25;
|
--black: 15, 18, 25;
|
||||||
--gray: 96, 115, 159;
|
--gray: 96, 115, 159;
|
||||||
--gray-light: 229, 233, 240;
|
--gray-light: 229, 233, 240;
|
||||||
--gray-dark: 34, 41, 57;
|
--gray-dark: 34, 41, 57;
|
||||||
--gray-gradient: rgba(var(--gray-light), 50%), #fff;
|
--gray-gradient: rgba(var(--gray-light), 50%), #fff;
|
||||||
--box-shadow: 0 2px 6px rgba(var(--gray), 25%), 0 8px 24px rgba(var(--gray), 33%),
|
--box-shadow: 0 2px 6px rgba(var(--gray), 25%), 0 8px 24px rgba(var(--gray), 33%),
|
||||||
0 16px 32px rgba(var(--gray), 33%);
|
0 16px 32px rgba(var(--gray), 33%);
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Atkinson';
|
font-family: 'Atkinson';
|
||||||
src: url('/fonts/atkinson-regular.woff') format('woff');
|
src: url('/fonts/atkinson-regular.woff') format('woff');
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Atkinson';
|
font-family: 'Atkinson';
|
||||||
src: url('/fonts/atkinson-bold.woff') format('woff');
|
src: url('/fonts/atkinson-bold.woff') format('woff');
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
font-family: 'Atkinson', sans-serif;
|
font-family: 'Atkinson', sans-serif;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
background: linear-gradient(var(--gray-gradient)) no-repeat;
|
background: linear-gradient(var(--gray-gradient)) no-repeat;
|
||||||
background-size: 100% 600px;
|
background-size: 100% 600px;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
color: rgb(var(--gray-dark));
|
color: rgb(var(--gray-dark));
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
line-height: 1.7;
|
line-height: 1.7;
|
||||||
}
|
}
|
||||||
main {
|
main {
|
||||||
width: 720px;
|
width: 720px;
|
||||||
max-width: calc(100% - 2em);
|
max-width: calc(100% - 2em);
|
||||||
margin: auto;
|
margin: auto;
|
||||||
padding: 3em 1em;
|
padding: 3em 1em;
|
||||||
}
|
}
|
||||||
h1,
|
h1,
|
||||||
h2,
|
h2,
|
||||||
|
@ -54,101 +54,98 @@ h3,
|
||||||
h4,
|
h4,
|
||||||
h5,
|
h5,
|
||||||
h6 {
|
h6 {
|
||||||
margin: 0 0 0.5rem 0;
|
margin: 0 0 0.5rem 0;
|
||||||
color: rgb(var(--black));
|
color: rgb(var(--black));
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 3.052em;
|
font-size: 3.052em;
|
||||||
}
|
}
|
||||||
h2 {
|
h2 {
|
||||||
font-size: 2.441em;
|
font-size: 2.441em;
|
||||||
}
|
}
|
||||||
h3 {
|
h3 {
|
||||||
font-size: 1.953em;
|
font-size: 1.953em;
|
||||||
}
|
}
|
||||||
h4 {
|
h4 {
|
||||||
font-size: 1.563em;
|
font-size: 1.563em;
|
||||||
}
|
}
|
||||||
h5 {
|
h5 {
|
||||||
font-size: 1.25em;
|
font-size: 1.25em;
|
||||||
}
|
}
|
||||||
strong,
|
strong,
|
||||||
b {
|
b {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
}
|
}
|
||||||
a:hover {
|
a:hover {
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
}
|
}
|
||||||
p {
|
p {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
.prose p {
|
.prose p {
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
}
|
}
|
||||||
textarea {
|
textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
input {
|
input {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
table {
|
table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
code {
|
code {
|
||||||
padding: 2px 5px;
|
padding: 2px 5px;
|
||||||
background-color: rgb(var(--gray-light));
|
background-color: rgb(var(--gray-light));
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
pre {
|
pre {
|
||||||
padding: 1.5em;
|
padding: 1.5em;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
pre > code {
|
pre > code {
|
||||||
all: unset;
|
all: unset;
|
||||||
}
|
}
|
||||||
blockquote {
|
blockquote {
|
||||||
border-left: 4px solid var(--accent);
|
border-left: 4px solid var(--accent);
|
||||||
padding: 0 0 0 20px;
|
padding: 0 0 0 20px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
font-size: 1.333em;
|
font-size: 1.333em;
|
||||||
}
|
}
|
||||||
hr {
|
hr {
|
||||||
border: none;
|
border: none;
|
||||||
border-top: 1px solid rgb(var(--gray-light));
|
border-top: 1px solid rgb(var(--gray-light));
|
||||||
}
|
}
|
||||||
@media (max-width: 720px) {
|
@media (max-width: 720px) {
|
||||||
body {
|
body {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
main {
|
main {
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.sr-only {
|
.sr-only {
|
||||||
border: 0;
|
border: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
/* IE6, IE7 - a 0 height clip, off to the bottom right of the visible 1px box */
|
clip: rect(1px 1px 1px 1px);
|
||||||
clip: rect(1px 1px 1px 1px);
|
clip: rect(1px, 1px, 1px, 1px);
|
||||||
/* maybe deprecated but we need to support legacy browsers */
|
clip-path: inset(50%);
|
||||||
clip: rect(1px, 1px, 1px, 1px);
|
white-space: nowrap;
|
||||||
/* modern browsers, clip-path works inwards from each corner */
|
|
||||||
clip-path: inset(50%);
|
|
||||||
/* added line to stop words getting smushed together (as they go onto seperate lines and some screen readers do not understand line feeds as a space */
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
/*/
|
||||||
|
|
Loading…
Reference in a new issue