Skip to content

Commit

Permalink
Merge pull request #395 from DeterminateSystems/absorb-phid
Browse files Browse the repository at this point in the history
Absorb phid
  • Loading branch information
grahamc authored Dec 12, 2024
2 parents e9d20c3 + 3d5afa4 commit 0f750be
Show file tree
Hide file tree
Showing 27 changed files with 210 additions and 63 deletions.
5 changes: 3 additions & 2 deletions src/components/Breadcrumb.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import Link from "./Link.astro";
type Props = {
breadcrumb: {
back: {
Expand All @@ -19,9 +20,9 @@ const { breadcrumb, order, total } = Astro.props;
class="flex items-center space-x-2 text-sm md:space-x-2.5 md:text-base lg:space-x-3 lg:text-lg"
>
<span>
<a href={breadcrumb.back.href} class="hover:text-primary">
<Link href={breadcrumb.back.href} class="hover:text-primary">
{breadcrumb.back.title}
</a>
</Link>
</span>
<span class="text-lg font-bold text-primary md:text-xl lg:text-2xl">
/
Expand Down
8 changes: 6 additions & 2 deletions src/components/CookieConsent.astro
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
import Link from "./Link.astro";
---

<div
x-cloak
x-data="{ show: false }"
Expand All @@ -9,13 +13,13 @@
<p class="content m-0 px-6 py-4 text-[16px]">
We use a single, first-party analytics cookie to focus our limited time
and energy on the most important documentation. Check out our
<a
<Link
href="https://determinate.systems/policies/privacy"
class="underline"
target="_blank"
>
privacy policy
</a>
</Link>
.
</p>
<div
Expand Down
5 changes: 3 additions & 2 deletions src/components/Drawer.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import Link from "./Link.astro";
import { Icon } from "astro-icon/components";
const links: { text: string; href: string }[] = [
Expand Down Expand Up @@ -49,13 +50,13 @@ const links: { text: string; href: string }[] = [
{
links.map(({ text, href }) => (
<li>
<a
<Link
{href}
class="text-lg font-light tracking-tight hover:text-primary md:text-base lg:text-lg"
@click="drawer = false"
>
{text}
</a>
</Link>
</li>
))
}
Expand Down
5 changes: 3 additions & 2 deletions src/components/Dropdown.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import Link from "./Link.astro";
type Props = {
text: string;
pages: { title: string; href: string }[];
Expand Down Expand Up @@ -26,13 +27,13 @@ const { text, pages, ordered = false } = Astro.props;
{
pages.map(({ title, href }, idx) => (
<li>
<a
<Link
{href}
class="block px-4 py-2 text-xs tracking-tight duration-hover hover:bg-primary hover:text-dark hover:text-white dark:hover:bg-white dark:hover:text-dark md:text-sm lg:text-base"
>
{ordered && <>{idx + 1}.</>}
{title}
</a>
</Link>
</li>
))
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/ExternalSources.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import Link from "./Link.astro";
import type { ExternalSource } from "../lib/content";
import Grid3 from "./Grid3.astro";
import HoverableExternalSourceLink from "../components/HoverableExternalSourceLink.astro";
Expand All @@ -18,7 +19,7 @@ const { showTitle = false, links } = Astro.props;
class="text-xl font-semibold hover:text-gray dark:hover:text-light-gray md:text-2xl lg:text-3xl"
id="external-sources"
>
<a href="#external-sources">External sources</a>
<Link href="#external-sources">External sources</Link>
</p>
)
}
Expand Down
5 changes: 3 additions & 2 deletions src/components/Features.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import Link from "./Link.astro";
import Grid2 from "./Grid2.astro";
import { site } from "../site";
import { md } from "../lib/utils";
Expand All @@ -23,12 +24,12 @@ const { features } = site;
{links.map(({ text, href }) => (
<li class="flex items-center space-x-2 md:text-lg lg:text-xl">
<span>&rarr;</span>
<a
<Link
{href}
class="text-dark underline hover:text-primary dark:text-light-gray dark:hover:text-light-blue"
>
{text}
</a>
</Link>
</li>
))}
</ul>
Expand Down
9 changes: 5 additions & 4 deletions src/components/FeedbackBar.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import Link from "./Link.astro";
import { Icon } from "astro-icon/components";
import PageSurvey from "./PageSurvey";
import { site } from "../site";
Expand All @@ -23,14 +24,14 @@ const editUrl = `${githubUrl}/edit/main/src/content${filename}.mdx`;
class="size-3 text-dark dark:text-light-gray md:size-4 lg:size-5"
/>

<a
<Link
href={editUrl}
class="tracking-tight text-dark-gray hover:text-primary dark:text-light-gray dark:hover:text-primary"
target="_blank"
rel="noopener noreferrer"
>
Edit this page
</a>
</Link>
</span>

<span class="flex items-center space-x-3">
Expand All @@ -39,14 +40,14 @@ const editUrl = `${githubUrl}/edit/main/src/content${filename}.mdx`;
class="size-3 text-dark dark:text-light-gray md:size-4 lg:size-5"
/>

<a
<Link
href={issueUrl}
class="tracking-tight text-dark-gray hover:text-primary dark:text-light-gray dark:hover:text-primary"
target="_blank"
rel="noopener noreferrer"
>
File an issue
</a>
</Link>
</span>
</div>
</div>
5 changes: 3 additions & 2 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import Link from "./Link.astro";
import HorizontalContainer from "./HorizontalContainer.astro";
const year = new Date().getFullYear();
Expand All @@ -11,9 +12,9 @@ const year = new Date().getFullYear();
class="tracking-tight text-gray dark:text-gray md:text-base lg:text-lg"
>
Copyright &copy; {year}
<a href="https://determinate.systems" class="hover:text-primary">
<Link href="https://determinate.systems" class="hover:text-primary">
Determinate Systems, Inc.
</a>
</Link>
</p>
</div>
</HorizontalContainer>
Expand Down
15 changes: 8 additions & 7 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import Link from "./Link.astro";
import { site } from "../site";
import HeaderLink from "./HeaderLink.astro";
Expand All @@ -7,40 +8,40 @@ const { title } = site;

<header>
<nav>
<h2><a href="/">{title}</a></h2>
<h2><Link href="/">{title}</Link></h2>
<div class="internal-links">
<HeaderLink href="/">Home</HeaderLink>
<HeaderLink href="/blog">Blog</HeaderLink>
<HeaderLink href="/about">About</HeaderLink>
</div>
<div class="social-links">
<a href="https://m.webtoo.ls/@astro" target="_blank">
<Link href="https://m.webtoo.ls/@astro" target="_blank">
<span class="sr-only">Follow Astro on Mastodon</span>
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32"
><path
fill="currentColor"
d="M11.19 12.195c2.016-.24 3.77-1.475 3.99-2.603.348-1.778.32-4.339.32-4.339 0-3.47-2.286-4.488-2.286-4.488C12.062.238 10.083.017 8.027 0h-.05C5.92.017 3.942.238 2.79.765c0 0-2.285 1.017-2.285 4.488l-.002.662c-.004.64-.007 1.35.011 2.091.083 3.394.626 6.74 3.78 7.57 1.454.383 2.703.463 3.709.408 1.823-.1 2.847-.647 2.847-.647l-.06-1.317s-1.303.41-2.767.36c-1.45-.05-2.98-.156-3.215-1.928a3.614 3.614 0 0 1-.033-.496s1.424.346 3.228.428c1.103.05 2.137-.064 3.188-.189zm1.613-2.47H11.13v-4.08c0-.859-.364-1.295-1.091-1.295-.804 0-1.207.517-1.207 1.541v2.233H7.168V5.89c0-1.024-.403-1.541-1.207-1.541-.727 0-1.091.436-1.091 1.296v4.079H3.197V5.522c0-.859.22-1.541.66-2.046.456-.505 1.052-.764 1.793-.764.856 0 1.504.328 1.933.983L8 4.39l.417-.695c.429-.655 1.077-.983 1.934-.983.74 0 1.336.259 1.791.764.442.505.661 1.187.661 2.046v4.203z"
></path></svg
>
</a>
<a href="https://twitter.com/astrodotbuild" target="_blank">
</Link>
<Link href="https://twitter.com/astrodotbuild" target="_blank">
<span class="sr-only">Follow Astro on Twitter</span>
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32"
><path
fill="currentColor"
d="M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z"
></path></svg
>
</a>
<a href="https://github.com/withastro/astro" target="_blank">
</Link>
<Link href="https://github.com/withastro/astro" target="_blank">
<span class="sr-only">Go to Astro's GitHub repo</span>
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32"
><path
fill="currentColor"
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"
></path></svg
>
</a>
</Link>
</div>
</nav>
</header>
Expand Down
5 changes: 3 additions & 2 deletions src/components/HeaderLink.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import Link from "./Link.astro";
import type { HTMLAttributes } from "astro/types";
type Props = HTMLAttributes<"a">;
Expand All @@ -10,9 +11,9 @@ const subpath = pathname.match(/[^\/]+/g);
const isActive = href === pathname || href === "/" + subpath?.[0];
---

<a href={href} class:list={[className, { active: isActive }]} {...props}>
<Link href={href} class:list={[className, { active: isActive }]} {...props}>
<slot />
</a>
</Link>
<style>
a {
display: inline-block;
Expand Down
5 changes: 3 additions & 2 deletions src/components/Hero.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import Link from "./Link.astro";
import { md } from "../lib/utils";
import Breadcrumb from "./Breadcrumb.astro";
Expand Down Expand Up @@ -96,7 +97,7 @@ const largeHero = heroSize === "lg";
buttons && (
<div class="flex items-center space-x-4 pt-2">
{buttons.map(({ text, href, highlight }) => (
<a
<Link
{href}
class:list={[
"rounded-full px-4 py-2 font-bold shadow-md transition-colors duration-150 hover:bg-dark-gray hover:text-white",
Expand All @@ -105,7 +106,7 @@ const largeHero = heroSize === "lg";
]}
>
{text}
</a>
</Link>
))}
</div>
)
Expand Down
9 changes: 5 additions & 4 deletions src/components/HoverableExternalSourceLink.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import Link from "./Link.astro";
import { Icon } from "astro-icon/components";
import { md } from "../lib/utils";
Expand All @@ -18,7 +19,7 @@ const { title, href: externalSourceHref, source } = Astro.props;
class="rounded-lg border-1.5 border-light-gray px-3 py-1.5 hover:border-primary hover:bg-pale dark:border-gray dark:hover:border-primary dark:hover:bg-darker-gray md:px-4 md:py-2 lg:px-5 lg:py-2.5"
>
<div class="flex flex-col space-y-1.5">
<a
<Link
href={externalSourceHref}
class="inline-flex items-start justify-between gap-2 text-lg leading-snug hover:text-primary dark:hover:text-light-blue md:text-xl lg:text-2xl"
target="_blank"
Expand All @@ -32,18 +33,18 @@ const { title, href: externalSourceHref, source } = Astro.props;
name="fa:external-link"
class="h-3 w-3 text-primary md:h-4 md:w-4"
/>
</a>
</Link>

{
source && (
<a
<Link
href={source.href}
class="content block text-base font-light tracking-tight hover:text-primary dark:hover:text-light-blue md:text-lg"
target="_blank"
rel="noopener noreferrer"
>
{source.title}
</a>
</Link>
)
}
</div>
Expand Down
5 changes: 3 additions & 2 deletions src/components/HoverableLink.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import Link from "./Link.astro";
import { Icon } from "astro-icon/components";
type Props = {
Expand All @@ -14,7 +15,7 @@ const normalLink = size === "normal";
const smallLink = size === "sm";
---

<a
<Link
{href}
class:list={[
"rounded-lg border-1.5 border-light-gray transition-colors duration-150 hover:border-primary hover:bg-pale dark:border-gray dark:hover:border-primary dark:hover:bg-darker-gray",
Expand Down Expand Up @@ -45,4 +46,4 @@ const smallLink = size === "sm";
</span>
)
}
</a>
</Link>
Loading

0 comments on commit 0f750be

Please sign in to comment.