Skip to content

Commit

Permalink
chore(docs): fixing the breadcrumb issue (#6605)
Browse files Browse the repository at this point in the history
Ofc I had to also change the icon to be a mini Aztec logo. And btw
minified the svg. I could go on but I have to stop with these nittiest
of nits
  • Loading branch information
signorecello authored Jun 11, 2024
1 parent 4b45438 commit 2624c26
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const config = {
trailingSlash: false,
onBrokenLinks: "throw",
onBrokenMarkdownLinks: process.env.ENV === "dev" ? "warn" : "throw",
favicon: "img/Aztec_docs_icons-02.svg",
favicon: "img/Aztec_icon_minified.svg",

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
Expand Down
26 changes: 26 additions & 0 deletions docs/src/theme/DocBreadcrumbs/Items/Home/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from "react";
import Link from "@docusaurus/Link";
import useBaseUrl from "@docusaurus/useBaseUrl";
import { translate } from "@docusaurus/Translate";
import IconHome from "@theme/Icon/Home";
import styles from "./styles.module.css";
import AztecLogo from "@site/static/img/Aztec_icon_minified.svg";

export default function HomeBreadcrumbItem() {
const homeHref = useBaseUrl("/");
return (
<li className="breadcrumbs__item" itemProp="itemListElement">
<Link
aria-label={translate({
id: "theme.docs.breadcrumbs.home",
message: "Home page",
description: "The ARIA label for the home page in the breadcrumbs",
})}
className="breadcrumbs__link"
href={homeHref}
>
<AztecLogo className={styles.breadcrumbHomeIcon} />
</Link>
</li>
);
}
7 changes: 7 additions & 0 deletions docs/src/theme/DocBreadcrumbs/Items/Home/styles.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.breadcrumbHomeIcon {
position: relative;
top: 1px;
vertical-align: top;
height: 1.1rem;
width: 1.1rem;
}
16 changes: 0 additions & 16 deletions docs/static/img/Aztec_docs_icons-02.svg

This file was deleted.

1 change: 1 addition & 0 deletions docs/static/img/Aztec_icon_minified.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2624c26

Please sign in to comment.