Skip to content

Commit 75222bc

Browse files
committed
Merge upstream/main into main
2 parents 1cc6eac + 9022f38 commit 75222bc

18 files changed

Lines changed: 104 additions & 347 deletions

File tree

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"dependencies": {
7676
"@docsearch/react": "^4.6.0",
7777
"@react-spring/web": "^10.0.3",
78+
"clsx": "^2.1.1",
7879
"path-browserify": "^1.0.1",
7980
"prop-types": "^15.8.1",
8081
"react": "^19.2.4",
@@ -84,6 +85,7 @@
8485
"react-router-dom": "^7.13.1",
8586
"react-tiny-popover": "^8.1.6",
8687
"react-use": "^17.6.0",
88+
"tailwind-merge": "^3.5.0",
8789
"webpack-pwa-manifest": "^4.3.0",
8890
"workbox-window": "^7.4.0"
8991
},

src/components/CodeBlockWithCopy/CodeBlockWithCopy.jsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PropTypes from "prop-types";
22
import { useEffect, useRef, useState } from "react";
3-
import "./CodeBlockWithCopy.scss";
3+
import { cn } from "../../utilities/cn.mjs";
44

55
export default function CodeBlockWithCopy({ children }) {
66
const preRef = useRef(null);
@@ -115,10 +115,22 @@ export default function CodeBlockWithCopy({ children }) {
115115
);
116116

117117
return (
118-
<div className="code-block-wrapper">
118+
<div className="code-block-wrapper relative mb-6 group">
119119
<button
120120
onClick={handleCopy}
121-
className={`copy-button ${copyStatus}`}
121+
className={cn(
122+
"copy-button",
123+
"absolute top-2 right-2 z-10 px-[0.7rem] py-[0.4rem] rounded-[0.35rem] border-none cursor-pointer text-xs font-medium text-slate-200",
124+
"opacity-0 group-hover:opacity-100",
125+
"transition-[background-color,transform,opacity] duration-200",
126+
"active:scale-95",
127+
"focus-visible:outline-none focus-visible:opacity-100",
128+
copyStatus === "copied"
129+
? "bg-green-600 hover:bg-green-700"
130+
: copyStatus === "error"
131+
? "bg-red-500 hover:bg-red-700"
132+
: "bg-[#175d96] hover:bg-[#2f85d0]",
133+
)}
122134
aria-label="Copy code to clipboard"
123135
>
124136
{copyStatus === "copied"

src/components/CodeBlockWithCopy/CodeBlockWithCopy.scss

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/components/Footer/Footer.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ import Container from "../Container/Container.jsx";
66
import Link from "../Link/Link.jsx";
77

88
const footerLinkClasses =
9-
"text-[11px] uppercase text-[#777676] hover:text-[#333333]";
9+
"text-[11px] uppercase text-[#777676] dark:text-[#cccccc] hover:text-[#333333] dark:hover:text-[#ffffff]";
1010

1111
const Footer = () => (
1212
<footer className="w-full flex-[0_0_auto] print:hidden">
1313
<Container className="mx-auto max-w-[900px] px-5 pb-[30px] pt-[40px] text-center [&_a]:text-[#3b7eb5]">
1414
<div className="mb-[24px] flex justify-center">
1515
<a href="https://openjsf.org" target="_blank" rel="noopener noreferrer">
1616
<img
17-
className="h-[40px] w-auto"
17+
className="h-[40px] w-auto dark:invert"
1818
src={OpenJSLogo}
1919
alt="OpenJS Foundation Logo"
2020
/>
2121
</a>
2222
</div>
23-
<p className="mx-auto text-[15px] leading-[1.6] text-[#333333]">
23+
<p className="mx-auto text-[15px] leading-[1.6] text-[#333333] dark:text-[#e0e0e0]">
2424
Copyright <a href="https://openjsf.org">OpenJS Foundation</a> and
2525
webpack contributors. All rights reserved. The{" "}
2626
<a href="https://openjsf.org">OpenJS Foundation</a> has registered
@@ -36,7 +36,7 @@ const Footer = () => (
3636
holders. Use of them does not imply any affiliation with or endorsement
3737
by them.
3838
</p>
39-
<p className="mx-auto mt-[18px] text-[15px] leading-[1.6] text-[#333333]">
39+
<p className="mx-auto mt-[18px] text-[15px] leading-[1.6] text-[#333333] dark:text-[#e0e0e0]">
4040
<a href="https://openjsf.org">The OpenJS Foundation</a> |{" "}
4141
<a href="https://terms-of-use.openjsf.org">Terms of Use</a> |{" "}
4242
<a href="https://privacy-policy.openjsf.org">Privacy Policy</a> |{" "}

src/components/Page/Page.jsx

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { placeholderString } from "../Placeholder/Placeholder.jsx";
1212
import AdjacentPages from "./AdjacentPages.jsx";
1313

1414
// Load Styling
15-
import "./Page.scss";
1615

1716
export default function Page(props) {
1817
const {
@@ -117,7 +116,10 @@ export default function Page(props) {
117116
);
118117
}
119118
return (
120-
<main id="main-content" className="page">
119+
<main
120+
id="main-content"
121+
className="flex-auto relative overflow-x-hidden py-[1.5em] px-[1em] md:flex-[3] md:p-[1.5em]"
122+
>
121123
<Markdown>
122124
<h1>{title}</h1>
123125
{rest.date && pathname.startsWith("/blog/") && !isBlogIndex && (
@@ -136,19 +138,34 @@ export default function Page(props) {
136138
<div id="md-content">{contentRender}</div>
137139

138140
{rest.url === "/blog/" && (
139-
<div className="blog-list">
141+
<div className="mt-8">
140142
{(props.pages || [])
141143
.filter((post) => post.url !== "/blog/")
142144
.map((post) => (
143-
<div key={post.url} className="blog-post-item">
144-
<h2>
145-
<Link to={post.url}>{post.title}</Link>
145+
<div
146+
key={post.url}
147+
className="mb-[3rem] pb-[2rem] border-b border-gray-100 last:border-b-0 dark:border-gray-800"
148+
>
149+
<h2 className="mt-0 mb-[0.5rem] text-[1.8rem] font-bold leading-[1.2]">
150+
<Link
151+
to={post.url}
152+
className="text-blue-800 no-underline hover:text-blue-400 dark:!text-[#9ab3c0] dark:hover:!text-blue-200"
153+
>
154+
{post.title}
155+
</Link>
146156
</h2>
147157
{post.date && (
148-
<div className="blog-post-date">{post.date}</div>
158+
<div className="text-gray-500 text-[1.2rem] font-semibold mt-[0.25rem] mb-[1rem] italic dark:text-[#bbb]">
159+
{post.date}
160+
</div>
149161
)}
150-
<p>{post.teaser}</p>
151-
<Link to={post.url} className="read-more">
162+
<p className="text-gray-600 leading-[1.4] mb-[1rem] dark:text-gray-200">
163+
{post.teaser}
164+
</p>
165+
<Link
166+
to={post.url}
167+
className="text-blue-400 font-semibold no-underline hover:underline dark:text-blue-200"
168+
>
152169
Read More &rarr;
153170
</Link>
154171
</div>

src/components/Page/Page.scss

Lines changed: 0 additions & 98 deletions
This file was deleted.

src/components/Print/Print.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import PropTypes from "prop-types";
2-
import "./Print.scss";
32
import icon from "../../assets/icon-print.svg";
43
import BarIcon from "../../styles/icons/vertical-bar.svg";
54

@@ -40,14 +39,14 @@ export default function Print(props) {
4039
fill="#175d96"
4140
/>
4241
<a
43-
className="sidebar-item__title sidebar-link__print"
42+
className="sidebar-item__title flex items-center flex-nowrap"
4443
href={printUrl}
4544
rel="nofollow noopener noreferrer"
4645
title="Print"
4746
target="_blank"
4847
>
4948
Print Section
50-
<img src={icon} width={27} height={20} alt="Printer Icon" />
49+
<img src={icon} alt="Printer Icon" className="h-[20px] w-[27px]" />
5150
</a>
5251
</div>
5352
);

src/components/Print/Print.scss

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)