Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust colors/format for web docs. #1237

Merged
merged 1 commit into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions web/components/Docs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface DocsProps {
export default function Docs({ docs, braces, assign }: DocsProps) {
const router = useRouter()
return (
<div className="prose dark:prose-invert prose-lg lg:prose-xl">
<div className="prose dark:prose-invert prose-lg">
<div dangerouslySetInnerHTML={{ __html: docs.desc_md }} />
<div className="divide-y divide-gray-700/25 dark:divide-gray-300/25">
{docs.values.map((doc) => {
Expand All @@ -22,9 +22,11 @@ export default function Docs({ docs, braces, assign }: DocsProps) {
id={doc.name}
key={doc.name}
className={
target
? 'pt-4 scroll-mt-16 bg-rose-300 dark:bg-rose-900 hover:bg-slate-100 dark:hover:bg-slate-800'
: 'pt-4 scroll-mt-16 target:bg-rose-300 target:dark:bg-rose-900 hover:bg-slate-100 dark:hover:bg-slate-800'
'pt-4 scroll-mt-16 ' +
(target
? 'bg-rose-300 dark:bg-rose-900'
: 'bg-slate-200 dark:bg-slate-800 target:bg-rose-300 target:dark:bg-rose-900') +
' hover:bg-opacity-25 dark:hover:bg-opacity-25 hover:ring-1 ring-black dark:ring-white ring-inset'
}
>
<div className="flex">
Expand Down
4 changes: 2 additions & 2 deletions web/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const NavLink: React.FunctionComponent<NavLinkProps> = (props) => {
return (
<Link href={props.href}>
<a
className={`p-1 self-end hover:self-center hover:bg-rose-300 dark:hover:bg-rose-700 ${bg} rounded`}
className={`m-0.5 p-1 self-end hover:ring-1 ring-black dark:ring-white hover:bg-rose-300 dark:hover:bg-rose-700 ${bg} rounded`}
>
{props.name}
</a>
Expand Down Expand Up @@ -60,7 +60,7 @@ export default function Header({
<NavLink href="/lua" name="Lua" />
</div>
)}
<LineChart width={400} height={40} darkMode={darkMode} />
<LineChart width={380} height={40} darkMode={darkMode} />
<Search index={searchIndex} />
<div className="flex">
<div className="border-r mx-1 px-1 border-slate-700">
Expand Down
4 changes: 2 additions & 2 deletions web/components/LineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const LineChart = ({ width, height, darkMode }: LineChartProps) => {
(update) =>
update
.transition()
.duration(500)
.duration(1000)
.style(
'stroke',
darkMode ? stroke.lighten().toHex() : stroke.darken().toHex()
Expand All @@ -103,7 +103,7 @@ export const LineChart = ({ width, height, darkMode }: LineChartProps) => {

timerRef.current = setTimeout(() => {
doIt(data)
}, 500)
}, 1000)
}

doIt(data)
Expand Down