Skip to content

Commit

Permalink
Merge branch 'master' into dep-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
narthur committed Mar 20, 2024
2 parents 13400c8 + 41292a0 commit 88066c7
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 939 deletions.
Binary file added public/favicon.ico
Binary file not shown.
Binary file removed public/favicon.png
Binary file not shown.
Binary file added public/icon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"icons": [
{"src": "/icon-192.png", "type": "image/png", "sizes": "192x192"},
{"src": "/icon-512.png", "type": "image/png", "sizes": "512x512"}
]
}
8 changes: 6 additions & 2 deletions scripts/puppeteer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ async function handleUrl(browser: Browser, url: string) {
const pathname = new URL(url).pathname;
console.time(pathname);

const path1 = await snap(browser, url, "base");
const path2 = await snap(browser, url.replace(base, compare), "compare");
const path1 = await snap(browser, `${url}?snap`, "base");
const path2 = await snap(
browser,
`${url.replace(base, compare)}?snap`,
"compare",
);
const img1 = readScreenshot(path1);
const img2 = readScreenshot(path2);
const meta1 = await img1.metadata();
Expand Down
4 changes: 3 additions & 1 deletion src/components/Shadowbox.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
interface Props {
padding?: number;
class?: string | undefined;
id?: string | undefined;
}
const { padding = 1, class: className } = Astro.props;
const { padding = 1, class: className, id } = Astro.props;
---

<div
id={id}
class:list={["shadowbox", className]}
style={{
"--gap-multiplier": padding,
Expand Down
6 changes: 5 additions & 1 deletion src/components/Sidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ const sha: string | undefined = import.meta.env.RENDER_GIT_COMMIT;
</Shadowbox>
{
sha && (
<a class="sha" href={`https://github.com/beeminder/blog/commit/${sha}`}>
<a
id="sha"
class="sha"
href={`https://github.com/beeminder/blog/commit/${sha}`}
>
{sha.slice(0, 7)}
</a>
)
Expand Down
6 changes: 4 additions & 2 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const {
const canonicalUrl = new URL(Astro.url.pathname, Astro.site);
---

<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<link
Expand All @@ -56,7 +56,8 @@ const canonicalUrl = new URL(Astro.url.pathname, Astro.site);

<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/png" href="/favicon.png" />
<link rel="icon" type="image/png" href="/favicon.ico" />
<link rel="manifest" href="/manifest.webmanifest" />
<meta name="generator" content={Astro.generator} />

<title set:html={`${title} | Beeminder Blog`} />
Expand All @@ -82,6 +83,7 @@ const canonicalUrl = new URL(Astro.url.pathname, Astro.site);
async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>

<script src="../scripts/snap.ts"></script>
<script src="../scripts/slideshow.ts"></script>
<script src="../scripts/hotkeys.ts"></script>

Expand Down
Loading

0 comments on commit 88066c7

Please sign in to comment.