src/layouts/Layout.astro (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
---
import "../css/index.css";
---
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="icon" href="/favicon.ico" />
<meta name="generator" content={Astro.generator} />
<title>viii</title>
</head>
<body>
<div class="viewport">
<header class="left panel">
<div class="inner">
<slot name="left" />
</div>
</header>
<main class="right panel">
<div class="inner">
<slot name="right" />
</div>
</main>
</div>
</body>
</html>
<style is:global>
body {
height: 100%;
}
.viewport {
display: flex;
flex-direction: row;
align-items: flex-start;
gap: 0.5rem;
padding: 0.5rem;
height: 100%;
max-width: 1167px;
width: 100%;
margin: 1rem auto;
.panel {
--padding: 0.5rem;
--radii: 1.5rem;
--inner-radii: calc(var(--radii) - var(--padding));
padding: var(--padding);
border: 0.5px solid hsla(var(--overlay0) / 0.1);
min-height: 0;
overflow: none;
background-color: hsla(var(--mantle) / 1);
border-radius: var(--radii);
flex: 1;
display: inline-flex;
flex-direction: column;
.inner {
display: inline-flex;
flex-direction: column;
gap: 1rem;
border-radius: var(--inner-radii);
overflow-y: auto;
border: 4px solid hsla(var(--accent) / 1);
}
}
}
.left {
flex: 1 1 auto;
max-width: 400px;
position: sticky;
top: 0.5rem;
padding: var(--padding);
img {
width: 100%;
object-fit: cover;
}
}
.right {
.inner {
padding-bottom: 2rem;
}
.header-section {
h1 {
font-size: 2rem;
font-weight: 900;
line-height: 1;
}
}
.link-section {
.links {
display: inline-flex;
flex-direction: row;
gap: 0.25rem;
}
}
}
header.page-head {
position: relative;
padding: 1rem 0.75rem;
background-color: hsl(var(--accent));
z-index: 1;
&::after {
--height: 0.5rem;
content: "";
position: absolute;
top: calc(100%);
left: 0;
display: block;
width: 100%;
height: var(--height);
background-color: hsl(var(--accent));
mask-image: url("../assets/line.svg");
mask-size: calc(var(--height) * 5) 100%;
mask-repeat: repeat-x;
}
.title {
display: flex;
align-items: center;
gap: 1ch;
h1 {
font-size: 2.5rem;
font-weight: 900;
color: hsl(var(--on-accent));
line-height: 1;
}
.pronouns {
background: hsl(var(--surface0));
color: hsl(var(--text));
font-size: 0.75rem;
padding: 0.1rem 0.5rem;
border-radius: 5rem;
user-select: none;
}
}
p.subtitle {
font-size: 1.25rem;
font-weight: 500;
color: hsl(var(--on-accent));
}
}
</style>
|