diff --git a/src/components/Accordion/Item.tsx b/src/components/Accordion/Item.tsx index 1d84e1d5..d04e7b72 100644 --- a/src/components/Accordion/Item.tsx +++ b/src/components/Accordion/Item.tsx @@ -28,6 +28,11 @@ const classNames = [ "flex-col", "flex-wrap", "font-normal", + + "prose-a:text-inherit", + "hover:prose-a:text-brand-700", + "dark:prose-a:text-inherit", + "dark:hover:prose-a:text-brand-500", ]; const AccordionItem = ({ summary, open, children }: AccordionItemProps) => { diff --git a/src/components/Button/index.tsx b/src/components/Button/index.tsx index 2f830f7d..37e62a4b 100644 --- a/src/components/Button/index.tsx +++ b/src/components/Button/index.tsx @@ -6,7 +6,12 @@ type ButtonProps = Props & { variant: "primary" | "secondary"; }; -export default function Button({ children, variant, className, ...rest }: ButtonProps) { +export default function Button({ + children, + variant, + className, + ...rest +}: ButtonProps) { const Tag = "href" in rest ? Link : "button"; return ( {children} diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx index ca1d262e..5c68767b 100644 --- a/src/components/Footer/index.tsx +++ b/src/components/Footer/index.tsx @@ -22,7 +22,7 @@ function LinkItem({ item }: LinkItemProps) { : { to: toUrl, })} - className="hover:text-gray-900 hover:dark:text-gray-50" + className="text-gray-900 dark:text-gray-50 hover:text-brand-700 dark:hover:text-brand-500" {...props} > {label} diff --git a/src/components/HowToContribute/index.tsx b/src/components/HowToContribute/index.tsx index 5ab3b647..b9e1f2ba 100644 --- a/src/components/HowToContribute/index.tsx +++ b/src/components/HowToContribute/index.tsx @@ -15,7 +15,7 @@ export default function HowToContribute() { to contribute. This{" "} contribution guide {" "} diff --git a/src/components/LatestNews/index.tsx b/src/components/LatestNews/index.tsx index 664167c1..21a87ce1 100644 --- a/src/components/LatestNews/index.tsx +++ b/src/components/LatestNews/index.tsx @@ -27,7 +27,12 @@ export default function LatestNews({ recentPosts }) { {formattedDate}

- {title} + + {title} +

diff --git a/src/components/SocialIconLink/index.tsx b/src/components/SocialIconLink/index.tsx index 9425ed3f..cea7b0d1 100644 --- a/src/components/SocialIconLink/index.tsx +++ b/src/components/SocialIconLink/index.tsx @@ -27,7 +27,7 @@ export default function SocialIconLink({ return ( - + {label} diff --git a/src/components/SupportersList/index.tsx b/src/components/SupportersList/index.tsx index 96a71382..e4fb43e6 100644 --- a/src/components/SupportersList/index.tsx +++ b/src/components/SupportersList/index.tsx @@ -25,7 +25,7 @@ export default function SupportersList({ list }: SupportersListProps) { href={supporter.url} target="_blank" rel="noopener noreferrer" - className="w-1/3 text-inherit font-bold text-gray-900 dark:text-gray-100" + className="w-1/3 text-inherit font-bold text-gray-900 hover:text-brand-700 dark:text-gray-100 dark:hover:text-brand-500" aria-label={`Go to ${supporter.name} website`} > {supporter.name} diff --git a/src/components/TextContent/index.tsx b/src/components/TextContent/index.tsx index 2b40e923..25075849 100644 --- a/src/components/TextContent/index.tsx +++ b/src/components/TextContent/index.tsx @@ -5,30 +5,52 @@ type TextContentProps = HTMLProps; const classNames = [ "prose", + "dark:prose-invert", "lg:prose-lg", + "text-gray-900", "dark:text-gray-100", - "mx-auto", - "mb-10", - "px-4", - "md:px-0", - - //

- "prose-h2:text-gray-900", - "dark:prose-h2:text-gray-50", - "prose-h2:text-2xl", - "prose-h2:leading-snug", - "md:prose-h2:text-4xl", - "md:prose-h2:leading-normal", - //
  • - "prose-li:marker:text-inherit", + "marker:text-gray-600", + "dark:marker:text-gray-400", + + //
    + "prose-hr:my-6", + "prose-hr:border-gray-200", + "prose-hr:border-solid", + "dark:prose-hr:border-gray-800", + + //
    +  "prose-pre:bg-blue-900",
    +
    +  // 
    +  "prose-code:px-1.5",
    +  "prose-code:text-inherit",
    +  "dark:prose-code:text-inherit",
    +  "dark:prose-code:border-gray-600",
    +  "prose-code:before:content-none",
    +  "prose-code:after:content-none",
     
       // 
       "prose-a:text-inherit",
    +  "hover:prose-a:text-brand-700",
    +  "dark:prose-a:text-inherit",
    +  "dark:hover:prose-a:text-brand-500",
     
       // 
    -  "prose-strong:text-inherit",
    +  "prose-strong:text-current",
    +  "dark:prose-strong:text-current",
    +
    +  // 

    ,

    ,

    + "prose-h1:text-3xl", + "prose-h2:text-2xl", + "prose-h3:text-xl", + "prose-headings:text-gray-900", + "dark:prose-headings:text-gray-50", + + // , + "prose-th:px-3", + "prose-td:px-3", ]; export default function TextContent({ diff --git a/src/pages/manifesto.tsx b/src/pages/manifesto.tsx index d0e491ba..0c22ae64 100644 --- a/src/pages/manifesto.tsx +++ b/src/pages/manifesto.tsx @@ -18,7 +18,7 @@ export default function Manifesto() { The OpenTofu Manifesto - +

    Terraform was open-sourced in 2014 under the Mozilla Public License (v2.0) (the “MPL”). Over the next ~9 years, it built up a community diff --git a/src/theme/Admonition/index.tsx b/src/theme/Admonition/index.tsx index 1f0eedea..37c6bab2 100644 --- a/src/theme/Admonition/index.tsx +++ b/src/theme/Admonition/index.tsx @@ -44,19 +44,19 @@ type AdmonitionConfig = { const AdmonitionConfigs: Record = { note: { className: - "bg-sky-100 border-sky-300 text-sky-700 dark:bg-sky-950 dark:border-sky-700 dark:text-sky-200", + "bg-sky-100 border-sky-300 text-sky-800 dark:bg-sky-950 dark:border-sky-700 dark:text-sky-100", iconComponent: NoteIcon, label: "Note", }, danger: { className: - "bg-red-100 border-red-300 text-red-700 dark:bg-red-950 dark:border-red-700 dark:text-red-200", + "bg-red-100 border-red-300 text-red-800 dark:bg-red-950 dark:border-red-700 dark:text-red-100", iconComponent: DangerIcon, label: "Danger", }, warning: { className: - "bg-yellow-100 border-yellow-500 text-yellow-700 dark:bg-yellow-950 dark:border-yellow-700 dark:text-yellow-200", + "bg-yellow-100 border-yellow-500 text-yellow-800 dark:bg-yellow-950 dark:border-yellow-700 dark:text-yellow-100", iconComponent: CautionIcon, label: "Warning", }, @@ -120,7 +120,7 @@ export default function Admonition(props: Props) { return (

    {titleLabel}
    -
    {children}
    +
    {children}

  • ); } diff --git a/src/theme/BlogLastPost/index.tsx b/src/theme/BlogLastPost/index.tsx index 2432a607..80527844 100644 --- a/src/theme/BlogLastPost/index.tsx +++ b/src/theme/BlogLastPost/index.tsx @@ -26,11 +26,15 @@ export default function BlogLastPost({ item }) { > {formattedDate} - -

    + +

    + {title} -

    - + +

    {description}

    diff --git a/src/theme/BlogListItem/index.tsx b/src/theme/BlogListItem/index.tsx index ada70c43..1a7c2e58 100644 --- a/src/theme/BlogListItem/index.tsx +++ b/src/theme/BlogListItem/index.tsx @@ -21,11 +21,15 @@ export default function BlogListItem({ item }) { > {formattedDate} - -

    + +

    + {title} -

    - + +

    {description}

    diff --git a/src/theme/BlogPostItem/Content/index.tsx b/src/theme/BlogPostItem/Content/index.tsx index 596e4793..a8a879fa 100644 --- a/src/theme/BlogPostItem/Content/index.tsx +++ b/src/theme/BlogPostItem/Content/index.tsx @@ -8,7 +8,7 @@ export default function BlogPostItemContent({ children }) { const { isBlogPostPage } = useBlogPost(); return ( diff --git a/src/theme/BlogPostItem/index.tsx b/src/theme/BlogPostItem/index.tsx index 9e7b95ee..9e1f365f 100644 --- a/src/theme/BlogPostItem/index.tsx +++ b/src/theme/BlogPostItem/index.tsx @@ -50,7 +50,7 @@ function ShareButton({ platform, title, url }) { href={href} target="_blank" rel="noopener" - className="rounded-md bg-gray-100 dark:bg-gray-800 text-gray-500 dark:text-gray-300 p-2 hover:bg-gray-150 dark:hover:bg-gray-700 hover:text-gray-900 dark:hover:text-gray-150 transition-colors" + className="rounded-md bg-gray-100 dark:bg-gray-800 text-gray-500 dark:text-gray-300 p-2 hover:bg-brand-700 dark:hover:bg-brand-500 hover:text-gray-50 dark:hover:text-gray-900 transition-colors" aria-label={`Share on ${platform.name}`} >
    diff --git a/src/theme/DocBreadcrumbs/index.tsx b/src/theme/DocBreadcrumbs/index.tsx index be0ccd7b..9c6134cd 100644 --- a/src/theme/DocBreadcrumbs/index.tsx +++ b/src/theme/DocBreadcrumbs/index.tsx @@ -24,7 +24,11 @@ function BreadcrumbsItemLink({ ); } return href ? ( - + {children} ) : ( diff --git a/src/theme/DocCard/index.js b/src/theme/DocCard/index.js index bdaa808a..75ae3612 100644 --- a/src/theme/DocCard/index.js +++ b/src/theme/DocCard/index.js @@ -1,45 +1,28 @@ import React from "react"; -import clsx from "clsx"; import Link from "@docusaurus/Link"; import { findFirstCategoryLink, useDocById, } from "@docusaurus/theme-common/internal"; -import isInternalUrl from "@docusaurus/isInternalUrl"; -import { translate } from "@docusaurus/Translate"; -import styles from "./styles.module.css"; -function CardContainer({ href, children }) { + +function CardLayout({ href, title, description }) { return ( - - {children} - - ); -} -function CardLayout({ href, icon, title, description }) { - return ( - -

    - {title} +
    +

    + + + {title} +

    {description && ( -

    +

    {description}

    )} - +
    ); } function CardCategory({ item }) { @@ -49,32 +32,14 @@ function CardCategory({ item }) { return null; } return ( - + ); } function CardLink({ item }) { - const icon = isInternalUrl(item.href) ? "📄️" : "🔗"; const doc = useDocById(item.docId ?? undefined); return ( diff --git a/src/theme/DocCard/styles.module.css b/src/theme/DocCard/styles.module.css deleted file mode 100644 index 4f7ad27f..00000000 --- a/src/theme/DocCard/styles.module.css +++ /dev/null @@ -1,27 +0,0 @@ -.cardContainer { - --ifm-link-color: var(--ifm-color-emphasis-800); - --ifm-link-hover-color: var(--ifm-color-emphasis-700); - --ifm-link-hover-decoration: none; - - box-shadow: 0 1.5px 3px 0 rgb(0 0 0 / 15%); - border: 1px solid var(--ifm-color-emphasis-200); - transition: all var(--ifm-transition-fast) ease; - transition-property: border, box-shadow; -} - -.cardContainer:hover { - border-color: var(--ifm-color-primary); - box-shadow: 0 3px 6px 0 rgb(0 0 0 / 20%); -} - -.cardContainer *:last-child { - margin-bottom: 0; -} - -.cardTitle { - font-size: 1.2rem; -} - -.cardDescription { - font-size: 0.8rem; -} diff --git a/src/theme/DocCardList/index.js b/src/theme/DocCardList/index.js index 4f4cc7be..0462805e 100644 --- a/src/theme/DocCardList/index.js +++ b/src/theme/DocCardList/index.js @@ -23,9 +23,7 @@ export default function DocCardList(props) { )} > {filteredItems.map((item, index) => ( -
    - -
    + ))} ); diff --git a/src/theme/DocItem/Content.tsx b/src/theme/DocItem/Content.tsx index 534f8362..79fc2e8f 100644 --- a/src/theme/DocItem/Content.tsx +++ b/src/theme/DocItem/Content.tsx @@ -1,57 +1,11 @@ import React from "react"; -import clsx from "clsx"; import MDXContent from "@theme/MDXContent"; - -const classNames = [ - "prose", - "lg:prose-lg", - "text-gray-900", - "dark:text-gray-100", - "dark:prose-invert", - "marker:text-gray-600", - "dark:marker:text-gray-400", - "max-w-none", - - //
    - "prose-hr:my-6", - "prose-hr:border-gray-200", - "prose-hr:border-solid", - "dark:prose-hr:border-gray-800", - - //
    -  "prose-pre:bg-blue-900",
    -
    -  // 
    -  "prose-code:px-1.5",
    -  "prose-code:text-current",
    -  "dark:prose-code:text-current",
    -  "dark:prose-code:border-gray-600",
    -  "prose-code:before:content-none",
    -  "prose-code:after:content-none",
    -
    -  // 
    -  "prose-a:text-current",
    -  "hover:prose-a:text-black/50",
    -  "dark:prose-a:text-current",
    -  "dark:hover:prose-a:text-white/50",
    -
    -  // 
    -  "prose-strong:text-current",
    -  "dark:prose-strong:text-current",
    -
    -  // 

    ,

    ,

    - "prose-h1:text-4xl", - "prose-h2:text-3xl", - "prose-h3:text-2xl", - - "prose-th:px-3", - "prose-td:px-3", -]; +import TextContent from "@site/src/components/TextContent"; export default function DocItemContent({ children }) { return ( -
    + {children} -
    + ); } diff --git a/src/theme/DocSidebarItem/Category.tsx b/src/theme/DocSidebarItem/Category.tsx index ef881bc5..4b1e4591 100644 --- a/src/theme/DocSidebarItem/Category.tsx +++ b/src/theme/DocSidebarItem/Category.tsx @@ -113,13 +113,11 @@ export default function DocSidebarItemCategory({ return (
  • { diff --git a/src/theme/DocSidebarItem/Link.tsx b/src/theme/DocSidebarItem/Link.tsx index 81a2cd1a..4587ecb3 100644 --- a/src/theme/DocSidebarItem/Link.tsx +++ b/src/theme/DocSidebarItem/Link.tsx @@ -20,13 +20,11 @@ export default function DocSidebarItemLink({ return (
  • diff --git a/src/theme/Navbar/MobileSidebar/index.tsx b/src/theme/Navbar/MobileSidebar/index.tsx index 0ffaac72..d25cf534 100644 --- a/src/theme/Navbar/MobileSidebar/index.tsx +++ b/src/theme/Navbar/MobileSidebar/index.tsx @@ -16,7 +16,7 @@ function CloseButton() {