+
{
- !mobile ? (
+ !mobile ?
<>
-
- {IS_LIVE && }
+
+
+
+ {IS_LIVE && }
>
- ) : null
+ : null
}
+
-
-
diff --git a/src/components/ui/Button.astro b/src/components/ui/Button.astro
index 2300cda31..665d35baa 100644
--- a/src/components/ui/Button.astro
+++ b/src/components/ui/Button.astro
@@ -1,16 +1,22 @@
---
import Icon from "@ui/Icon.astro";
+// Destructure known props, rest goes into `restProps`
const {
url,
+ id,
class: className = "",
secondary = false,
outline = false,
disabled = false,
+ clear = false,
isExternal,
icon,
iconSvg = false,
- iconRight = true
+ iconRight = true,
+ iconSize = "",
+ title = "",
+ ...restProps // all data-*, aria-* and custom attributes
} = Astro.props;
const resolvedIsExternal = isExternal ?? url?.startsWith("http");
@@ -18,38 +24,49 @@ const resolvedIsExternal = isExternal ?? url?.startsWith("http");
const baseClasses = "font-bold text-lg px-4 py-4 rounded-lg inline-flex items-center justify-center leading-4 transition-colors duration-200 not-prose border hover:text-black";
const primaryClasses = "bg-button text-text-inverted hover:bg-button-hover border-transparent";
const secondaryClasses = "bg-primary text-white hover:bg-primary-hover border-transparent";
+const clearClasses = "bg-transparent text-primary hover:bg-transparent hover:text-primary-active border-transparent";
const outlineClasses = "border-gray-500 text-gray-700 hover:bg-gray-100 hover:bg-button-hover";
const disabledClasses = "opacity-50 pointer-events-none";
const iconClasses = "mx-2 ";
+const idName = id;
+const slotContent = await Astro.slots.render('default');
---
{url ? (
- {!iconRight && icon && }
+ {!iconRight && icon && }
- {iconRight && icon && }
- {resolvedIsExternal && }
+ {iconRight && icon && }
+ {resolvedIsExternal && }
) : (
)}
diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro
new file mode 100644
index 000000000..e0777e0e0
--- /dev/null
+++ b/src/layouts/BaseLayout.astro
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/layouts/HomePageLayout.astro b/src/layouts/HomePageLayout.astro
index c11f772ff..d03256a1b 100644
--- a/src/layouts/HomePageLayout.astro
+++ b/src/layouts/HomePageLayout.astro
@@ -1,12 +1,5 @@
---
-import Header from "../components/header/header.astro";
-import Footer from "../components/footer.astro";
-import BaseHead from "../components/BaseHead.astro";
-
-export interface Props {
- title: string;
- description: string;
-}
+import Layout from "@layouts/Layout.astro";
const { title, description } = Astro.props;
const jsonLd = JSON.stringify({
@@ -38,24 +31,7 @@ const jsonLd = JSON.stringify({
});
---
-
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index f2e786a9d..3d063112c 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -1,7 +1,15 @@
---
-import Header from "../components/header/header.astro";
-import Footer from "../components/footer.astro";
-import BaseHead from "../components/BaseHead.astro";
+import BaseHead from "@components/BaseHead.astro";
+import Header from "@components/Header.astro";
+import Footer from "@components/Footer.astro";
+import Search from "@components/Search.astro";
+
+
+import "@src/styles/global.css";
+import "@src/styles/search.css";
+import "@fontsource-variable/inter";
+import "@fortawesome/fontawesome-free/css/all.min.css";
+
export interface Props {
title: string;
@@ -15,19 +23,19 @@ const { title, description } = Astro.props;
+
+
+
Skip to main content
-
+
+
diff --git a/src/layouts/MarkdownLayout.astro b/src/layouts/MarkdownLayout.astro
new file mode 100644
index 000000000..3bf24ab4c
--- /dev/null
+++ b/src/layouts/MarkdownLayout.astro
@@ -0,0 +1,11 @@
+---
+import Layout from "@layouts/Layout.astro";
+
+import "../styles/markdown.css";
+
+const { title, description } = Astro.props;
+---
+
+
+
+
diff --git a/src/pages/[...slug].astro b/src/pages/[...slug].astro
index b31905805..8fc02504e 100644
--- a/src/pages/[...slug].astro
+++ b/src/pages/[...slug].astro
@@ -1,6 +1,6 @@
---
import { type CollectionEntry, getCollection } from "astro:content";
-import Layout from "../layouts/Layout.astro";
+import Layout from "@layouts/MarkdownLayout.astro";
import Prose from "../components/prose/prose.astro";
import ButtonLink from "../components/button-link/button-link.astro";
diff --git a/src/pages/test_components.astro b/src/pages/test_components.astro
index b3551752e..738795d55 100644
--- a/src/pages/test_components.astro
+++ b/src/pages/test_components.astro
@@ -22,6 +22,7 @@ import Icon from "@ui/Icon.astro"
+
@@ -43,6 +44,10 @@ import Icon from "@ui/Icon.astro"
+
+
+
+
diff --git a/src/styles/global.css b/src/styles/global.css
index ae6493815..130de2383 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -1,7 +1,3 @@
-@tailwind base;
-@tailwind components;
-@tailwind utilities;
-
:root {
--color-primary: #151f38;
--color-primary-hover: #7a7ebd;
@@ -50,104 +46,6 @@ body {
grid-column: 1 / 4;
}
-.prose :is(h1, h2, h3, h4, h5, h6) a {
- text-decoration: none !important;
-}
-
-.prose :is(h1, h2, h3, h4, h5, h6) a:hover {
- text-decoration: underline !important;
-}
-
-.prose :is(h1, h2, h3, h4, h5, h6) a:focus {
- outline: 4px solid #0073e6;
- outline-offset: 5px;
-}
-
-ul.milestone-done li {
- position: relative;
- list-style: none;
-}
-
-ul.milestone-done li::before {
- content: "\2705 " !important;
- background: none !important;
-}
-
-ul.milestone-todo li {
- position: relative;
- list-style: none;
-}
-
-ul.milestone-todo li::before {
- content: "\1F4DD " !important;
- background: none !important;
-}
-
-img.findaid-accent-round-marker {
- width: 120px;
- min-width: 70px;
- padding: 0 10px;
- display: inline-block;
- margin: 0;
-}
-
-table.finaid-timeline td {
- padding-bottom: 1rem;
-}
-
-div.finaid-sponsor {
- width: 50%;
- margin: 0 auto 2rem auto;
-}
-
-summary h4::after {
- content: "👇";
-}
-
-.list-disc li {
- list-style: none;
- position: relative;
-}
-
-ul.list-disc li::before {
- content: "";
- display: inline-block;
- width: 25px;
- height: 20px;
- /*background-image: url(/img/list-item.svg);*/
- background-size: 100%;
- background-repeat: no-repeat;
- background-position: 50% 50%;
- position: absolute;
- left: -30px;
- top: 0.2em;
-}
-
-ul ul.list-disc li {
- list-style: disc;
-}
-ul ul.list-disc li::before {
- display: none;
-}
-
-p.tick::before {
- content: "\2705 ";
- padding: 0.5rem;
-}
-
-p.cross::before {
- content: "\274C ";
- padding: 0.5rem;
-}
-
-p.tick::after,
-p.cross::after {
- content: "\23EC";
- display: inline-block;
- font-size: 1.3em;
- margin-left: 0.4em;
-}
-
/* typography */
.prose {
h1,
diff --git a/src/styles/markdown.css b/src/styles/markdown.css
new file mode 100644
index 000000000..ddaf57a36
--- /dev/null
+++ b/src/styles/markdown.css
@@ -0,0 +1,203 @@
+.prose :is(h1, h2, h3, h4, h5, h6) a {
+ text-decoration: none !important;
+}
+
+.prose :is(h1, h2, h3, h4, h5, h6) a:hover {
+ text-decoration: underline !important;
+}
+
+.prose :is(h1, h2, h3, h4, h5, h6) a:focus {
+ outline: 4px solid #0073e6;
+ outline-offset: 5px;
+}
+
+ul.milestone-done li {
+ position: relative;
+ list-style: none;
+}
+
+ul.milestone-done li::before {
+ content: "\2705 " !important;
+ background: none !important;
+}
+
+ul.milestone-todo li {
+ position: relative;
+ list-style: none;
+}
+
+ul.milestone-todo li::before {
+ content: "\1F4DD " !important;
+ background: none !important;
+}
+
+img.findaid-accent-round-marker {
+ width: 120px;
+ min-width: 70px;
+ padding: 0 10px;
+ display: inline-block;
+ margin: 0;
+}
+
+table.finaid-timeline td {
+ padding-bottom: 1rem;
+}
+
+div.finaid-sponsor {
+ width: 50%;
+ margin: 0 auto 2rem auto;
+}
+
+summary h4::after {
+ content: "👇";
+}
+
+.list-disc li {
+ list-style: none;
+ position: relative;
+}
+
+ul.list-disc li::before {
+ content: "";
+ display: inline-block;
+ width: 25px;
+ height: 20px;
+ /*background-image: url(/img/list-item.svg);*/
+ background-size: 100%;
+ background-repeat: no-repeat;
+ background-position: 50% 50%;
+ position: absolute;
+ left: -30px;
+ top: 0.2em;
+}
+
+ul ul.list-disc li {
+ list-style: disc;
+}
+ul ul.list-disc li::before {
+ display: none;
+}
+
+p.tick::before {
+ content: "\2705 ";
+ padding: 0.5rem;
+}
+
+p.cross::before {
+ content: "\274C ";
+ padding: 0.5rem;
+}
+
+p.tick::after,
+p.cross::after {
+ content: "\23EC";
+ display: inline-block;
+ font-size: 1.3em;
+ margin-left: 0.4em;
+}
+
+/* typography */
+.prose {
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6 {
+ position: relative;
+
+ span.heading-link {
+ font-size: 0.5em;
+ margin-left: 0.2em;
+ vertical-align: text-top;
+
+ @media (min-width: 768px) {
+ font-size: 1em;
+ margin-left: 0;
+ vertical-align: unset;
+ position: absolute;
+ left: -1em;
+ padding-right: 0.5rem;
+ color: var(--color-text);
+ text-decoration: none;
+
+ &:hover {
+ text-decoration: underline;
+ }
+ }
+ }
+ }
+
+ /* Breaking all links because we sometimes have very long links that break mobile */
+
+ a {
+ word-break: break-word;
+ }
+
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6 {
+ font-weight: bold;
+ font-family: var(--font-display);
+ line-height: 1.25;
+
+ /* https://css-tricks.com/linearly-scale-font-size-with-css-clamp-based-on-the-viewport/ */
+
+ --min-fs: 1;
+ --max-fs: 1.5;
+ --min-vw: 20;
+ --max-vw: 45;
+
+ --min-fs-rem: var(--min-fs) * 1rem;
+ --max-fs-rem: var(--max-fs) * 1rem;
+ --min-vw-rem: var(--min-vw) * 1rem;
+
+ --slope: (var(--max-fs) - var(--min-fs)) * (100vw - var(--min-vw-rem)) /
+ (var(--max-vw) - var(--min-vw));
+
+ font-size: clamp(
+ var(--min-fs-rem),
+ var(--min-fs-rem) + var(--slope),
+ var(--max-fs-rem)
+ );
+ }
+
+ h1 {
+ /* 36 px, 48px */
+ --min-fs: 2.25;
+ --max-fs: 3;
+ }
+
+ h2 {
+ /* 32px, 40px */
+ --min-fs: 2;
+ --max-fs: 2.5;
+ }
+
+ h3 {
+ /* 28px, 36px */
+ --min-fs: 1.75;
+ --max-fs: 2.25;
+ }
+
+ h4 {
+ /* 24px, 32px */
+ --min-fs: 1.5;
+ --max-fs: 2;
+ }
+
+ h5 {
+ /* 20px, 28px */
+ --min-fs: 1.25;
+ --max-fs: 1.75;
+ }
+
+ h6 {
+ /* 16px, 24px */
+ --min-fs: 1;
+ --max-fs: 1.5;
+ }
+}
diff --git a/src/styles/search.css b/src/styles/search.css
new file mode 100644
index 000000000..11c59e733
--- /dev/null
+++ b/src/styles/search.css
@@ -0,0 +1,67 @@
+#search {
+ padding: 10px;
+ position: relative;
+ width: 100%;
+ max-width: 48rem;
+ margin: auto;
+ overflow: auto;
+ transition: background ease-out 0.2s;
+ z-index: 2;
+}
+
+.pagefind-ui__search-input {
+ border: 1px solid #ccc;
+ border-radius: 20px;
+ padding-inline-start: 0.75rem;
+ padding-inline-end: 0.5rem;
+ background-color: #fff;
+ font-size: 16px;
+ color: #000000;
+}
+
+.pagefind-ui__result.selected {
+ background-color: #f8f8f8;
+ background-image: linear-gradient(to right, #3684b6 7px, transparent 5px);
+ -webkit-transform: translate3d(0, 0, 0);
+ transform: translate3d(0, 0, 0);
+}
+.pagefind-ui__result:hover {
+ background-color: #f8f8f8;
+}
+.pagefind-ui__message {
+ margin: 1em;
+}
+.pagefind-ui__result mark {
+ background: #f9eb5d;
+ background-image: linear-gradient(to right, #f9eb5d 10%, #fcf4a7 100%);
+ margin: 4px;
+ padding-right: 6px;
+ padding-left: 6px;
+ padding-top: 2px;
+ padding-bottom: 2px;
+ color: #000000;
+ font-family: monospace;
+ border-radius: 4px;
+}
+.pagefind-ui {
+ --pagefind-ui-scale: 1;
+ --pagefind-ui-primary: #141f36;
+ --pagefind-ui-text: black;
+ --pagefind-ui-border: #d8d8d8;
+ --pagefind-ui-border-width: 2px;
+ --pagefind-ui-border-radius: 0.5rem;
+}
+.pagefind-ui .pagefind-ui__drawer:not(.pagefind-ui__hidden) {
+ z-index: 9999;
+ position: relative;
+ overflow: auto;
+}
+.pagefind-ui__result {
+ padding: 0 2em 1em !important;
+}
+.pagefind-ui .pagefind-ui__result-link {
+ color: var(--pagefind-ui-primary);
+}
+.pagefind-ui .pagefind-ui__result-excerpt {
+ color: var(--pagefind-ui-text);
+}