[#773,website][m]: mdx pages now use a lighter color on dark mode, increased the contrast on the navbar links, fixed # headings color
This commit is contained in:
parent
e26ee8ea1e
commit
8c8674c4ef
@ -38,7 +38,7 @@ const features: { title: string; description: string; icon: string }[] = [
|
|||||||
export default function Features() {
|
export default function Features() {
|
||||||
return (
|
return (
|
||||||
<div className="lg:max-w-8xl mx-auto px-4 lg:px-8 xl:px-12">
|
<div className="lg:max-w-8xl mx-auto px-4 lg:px-8 xl:px-12">
|
||||||
<h2 className="text-3xl font-bold">How Portal.JS works?</h2>
|
<h2 className="text-3xl font-bold text-primary dark:text-primary-dark">How Portal.JS works?</h2>
|
||||||
<p className="text-lg mt-8">
|
<p className="text-lg mt-8">
|
||||||
Portal.JS is built in JavaScript and React on top of the popular Next.js
|
Portal.JS is built in JavaScript and React on top of the popular Next.js
|
||||||
framework, assuming a "decoupled" approach where the frontend is a
|
framework, assuming a "decoupled" approach where the frontend is a
|
||||||
@ -55,7 +55,7 @@ export default function Features() {
|
|||||||
<div className="absolute -inset-px rounded-xl border-2 border-transparent opacity-0 [background:linear-gradient(var(--quick-links-hover-bg,theme(colors.sky.50)),var(--quick-links-hover-bg,theme(colors.sky.50)))_padding-box,linear-gradient(to_top,theme(colors.blue.300),theme(colors.blue.400),theme(colors.blue.500))_border-box] group-hover:opacity-100 dark:[--quick-links-hover-bg:theme(colors.slate.800)]" />
|
<div className="absolute -inset-px rounded-xl border-2 border-transparent opacity-0 [background:linear-gradient(var(--quick-links-hover-bg,theme(colors.sky.50)),var(--quick-links-hover-bg,theme(colors.sky.50)))_padding-box,linear-gradient(to_top,theme(colors.blue.300),theme(colors.blue.400),theme(colors.blue.500))_border-box] group-hover:opacity-100 dark:[--quick-links-hover-bg:theme(colors.slate.800)]" />
|
||||||
<div className="relative overflow-hidden rounded-xl p-6">
|
<div className="relative overflow-hidden rounded-xl p-6">
|
||||||
<img src={feature.icon} alt="" className="h-24 w-auto" />
|
<img src={feature.icon} alt="" className="h-24 w-auto" />
|
||||||
<h2 className="mt-4 font-display text-base text-slate-900 dark:text-white">
|
<h2 className="mt-4 font-display text-base text-primary dark:text-primary-dark">
|
||||||
<span className="absolute -inset-px rounded-xl" />
|
<span className="absolute -inset-px rounded-xl" />
|
||||||
{feature.title}
|
{feature.title}
|
||||||
</h2>
|
</h2>
|
||||||
|
|||||||
@ -11,7 +11,7 @@ export default function MDXPage({ source, frontMatter }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="prose mx-auto prose-a:text-primary dark:prose-a:text-primary-dark prose-strong:text-primary dark:prose-strong:text-primary-dark prose-code:text-primary dark:prose-code:text-primary-dark prose-headings:text-primary dark:prose-headings:text-primary-dark prose text-primary dark:text-primary-dark prose-headings:font-headings dark:prose-invert prose-a:break-words">
|
<div className="prose mx-auto prose-a:text-primary dark:prose-a:text-primary-dark prose-strong:text-primary dark:prose-strong:text-primary-dark prose-code:text-primary dark:prose-code:text-primary-dark prose-headings:text-primary dark:prose-headings:text-primary-dark text-primary dark:text-primary-dark prose-headings:font-headings dark:prose-invert prose-a:break-words">
|
||||||
<header>
|
<header>
|
||||||
<div className="mb-6">
|
<div className="mb-6">
|
||||||
{/* Default layout */}
|
{/* Default layout */}
|
||||||
|
|||||||
@ -29,12 +29,12 @@ export default function NavItem({ item }) {
|
|||||||
{Object.prototype.hasOwnProperty.call(item, "href") ? (
|
{Object.prototype.hasOwnProperty.call(item, "href") ? (
|
||||||
<Link
|
<Link
|
||||||
href={item.href}
|
href={item.href}
|
||||||
className="text-slate-500 inline-flex items-center mr-2 px-1 pt-1 text-sm font-medium hover:text-slate-600"
|
className="text-slate-600 dark:text-slate-400 inline-flex items-center mr-2 px-1 pt-1 text-sm font-medium hover:text-slate-500"
|
||||||
>
|
>
|
||||||
{item.name}
|
{item.name}
|
||||||
</Link>
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<div className="text-slate-500 inline-flex items-center mr-2 px-1 pt-1 text-sm font-medium hover:text-slate-600 fill-slate-500 hover:fill-slate-600">
|
<div className="text-slate-600 dark:text-slate-400 inline-flex items-center mr-2 px-1 pt-1 text-sm font-medium hover:text-slate-500 fill-slate-500 hover:fill-slate-600">
|
||||||
{item.name}
|
{item.name}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import rehypeAutolinkHeadings from "rehype-autolink-headings";
|
|||||||
import rehypeKatex from "rehype-katex";
|
import rehypeKatex from "rehype-katex";
|
||||||
import rehypeSlug from "rehype-slug";
|
import rehypeSlug from "rehype-slug";
|
||||||
import rehypePrismPlus from "rehype-prism-plus";
|
import rehypePrismPlus from "rehype-prism-plus";
|
||||||
|
import * as tw from "../tailwind.config";
|
||||||
|
|
||||||
import { serialize } from "next-mdx-remote/serialize";
|
import { serialize } from "next-mdx-remote/serialize";
|
||||||
|
|
||||||
@ -65,7 +66,7 @@ const parse = async function (source, format, scope) {
|
|||||||
"svg",
|
"svg",
|
||||||
{
|
{
|
||||||
xmlns: "http:www.w3.org/2000/svg",
|
xmlns: "http:www.w3.org/2000/svg",
|
||||||
fill: "#ab2b65",
|
fill: tw.theme.extend.colors.secondary.DEFAULT,
|
||||||
viewBox: "0 0 20 20",
|
viewBox: "0 0 20 20",
|
||||||
className: "w-5 h-5",
|
className: "w-5 h-5",
|
||||||
},
|
},
|
||||||
|
|||||||
@ -32,12 +32,12 @@ module.exports = {
|
|||||||
dark: colors.slate[950],
|
dark: colors.slate[950],
|
||||||
},
|
},
|
||||||
primary: {
|
primary: {
|
||||||
DEFAULT: colors.gray[700],
|
DEFAULT: colors.gray[800],
|
||||||
dark: colors.gray[300],
|
dark: colors.gray[100],
|
||||||
},
|
},
|
||||||
secondary: {
|
secondary: {
|
||||||
DEFAULT: "",
|
DEFAULT: "#60a5fa",
|
||||||
dark: "",
|
dark: "#60a5fa",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user