Skip to content

Commit c004456

Browse files
committed
Merge branch 'master' into logan/const-globals
2 parents 5cda4e2 + 0ca22b0 commit c004456

3 files changed

Lines changed: 74 additions & 22 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,17 @@ name: Build and Deploy to GitHub Pages
22

33
on:
44
workflow_dispatch:
5+
pull_request:
56
push:
67
branches:
78
- "master"
89

9-
permissions:
10-
contents: read
11-
pages: write
12-
id-token: write
13-
14-
# Allow only one concurrent deployment, skipping runs queued between the run
15-
# in-progress and latest queued. However, do NOT cancel in-progress runs as we
16-
# want to allow these production deployments to complete.
17-
concurrency:
18-
group: "pages"
19-
cancel-in-progress: false
10+
defaults:
11+
run:
12+
shell: bash -euxo pipefail {0}
2013

2114
jobs:
22-
deploy:
23-
environment:
24-
name: github-pages
25-
url: ${{ steps.deployment.outputs.page_url }}
15+
test:
2616
runs-on: ubuntu-24.04
2717
steps:
2818
- name: Checkout
@@ -36,6 +26,29 @@ jobs:
3626
- name: Test
3727
run: |
3828
make test
29+
deploy:
30+
runs-on: ubuntu-24.04
31+
needs: test
32+
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
33+
environment:
34+
name: github-pages
35+
url: ${{ steps.deployment.outputs.page_url }}
36+
permissions:
37+
contents: read
38+
pages: write
39+
id-token: write
40+
# Allow only one concurrent deployment, skipping runs queued between the run
41+
# in-progress and latest queued. However, do NOT cancel in-progress runs as we
42+
# want to allow these production deployments to complete.
43+
concurrency:
44+
group: "pages"
45+
cancel-in-progress: false
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v4
49+
- name: Install dependencies
50+
run: |
51+
npm ci
3952
- name: Build
4053
run: |
4154
make build

index.html

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,43 @@
5353
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
5454
<link rel="manifest" href="/manifest.json" />
5555
</head>
56-
<body></body>
56+
<body>
57+
<style>
58+
* {
59+
margin: 0;
60+
}
61+
62+
body {
63+
padding: 0.5em;
64+
/* Fall back on vh units if svh doesn't work (i.e., not on mobile). */
65+
height: 100vh;
66+
min-height: 100vh;
67+
max-height: 100vh;
68+
/* Use svh instead of dvh so it doesn't reflow when dynamic parts move. */
69+
height: 100svh;
70+
min-height: 100svh;
71+
max-height: 100svh;
72+
}
73+
74+
div {
75+
display: flex;
76+
flex-direction: column;
77+
justify-content: center;
78+
align-items: center;
79+
gap: 1em;
80+
height: 100%;
81+
font-family: sans-serif;
82+
}
83+
</style>
84+
<div>
85+
<img
86+
width="64"
87+
height="64"
88+
src="data:image/svg+xml,%3Csvg version='1.1' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E /* @media (prefers-color-scheme: dark) %7B g %7B filter: invert(); %7D %7D */ :root %7B --offset: calc(32px - 28.734px); --offset2: calc(27.766px - 32px); %7D @keyframes orbit %7B 0%25 %7B transform: translate(0); %7D 25%25 %7B transform: translate(var(--offset), 0); %7D 50%25 %7B transform: translate(var(--offset), var(--offset)); %7D 75%25 %7B transform: translate(0, var(--offset)); %7D %7D @keyframes orbit2 %7B 0%25 %7B transform: translate(0); %7D 25%25 %7B transform: translate(var(--offset2), 0); %7D 50%25 %7B transform: translate(var(--offset2), var(--offset2)); %7D 75%25 %7B transform: translate(0, var(--offset2)); %7D %7D g:last-of-type %3E * %7B animation: orbit 5s linear infinite; animation-delay: 1s; %7D g:first-of-type %3E * %7B animation: orbit2 5s linear infinite; animation-delay: 1s; %7D %3C/style%3E%3Cg%3E%3Crect x='4.2341' y='4.2341' width='27.766' height='27.766' fill='%23000' stroke-width='.9794'/%3E%3Crect x='4.569' y='4.569' width='27.096' height='27.096' stroke='%23000' stroke-width='1.5'/%3E%3C/g%3E%3Cg stroke-width='.9794'%3E%3Crect x='0' y='0' width='28.734' height='28.734' fill='%23000'/%3E%3Crect x='.819' y='.819' width='27.096' height='27.096' fill='%23fff' stroke='%23000'/%3E%3Cpath d='m21.495 12.928h-14.256v-2.9896h14.256zm0 5.8677h-14.256v-2.9896h14.256z'/%3E%3C/g%3E%3C/svg%3E%0A"
89+
/>
90+
<p>Loading...</p>
91+
</div>
92+
</body>
5793
<script type="module">
5894
import { mount } from "svelte";
5995

@@ -70,6 +106,7 @@
70106
return undefined;
71107
})
72108
.then((urlData) => {
109+
document.body.innerHTML = "";
73110
const app = mount(App, {
74111
target: document.body,
75112
props: { urlData },

public/favicon.svg

Lines changed: 8 additions & 6 deletions
Loading

0 commit comments

Comments
 (0)