From 31964d84288c7170005ea75781372d2281985e8e Mon Sep 17 00:00:00 2001 From: Krzysztof <66274761+malezjaa@users.noreply.github.com> Date: Fri, 7 Jul 2023 03:28:00 +0200 Subject: [PATCH] docs: website margin improvements (#821) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @malezjaa I can live with that! Merged⛵ Thank you for your help and congrats on your first ArkType PR!🎊 --- dev/arktype.io/src/components/contents.tsx | 3 +- dev/arktype.io/src/components/features.tsx | 4 +- dev/arktype.io/src/components/homeDemo.tsx | 75 ++++++++++--------- .../src/components/installationBlock.tsx | 2 +- dev/arktype.io/src/css/custom.css | 55 ++++++++++++-- 5 files changed, 91 insertions(+), 48 deletions(-) diff --git a/dev/arktype.io/src/components/contents.tsx b/dev/arktype.io/src/components/contents.tsx index 5a9596019f..5774a18101 100644 --- a/dev/arktype.io/src/components/contents.tsx +++ b/dev/arktype.io/src/components/contents.tsx @@ -15,7 +15,6 @@ export const Contents = () => {
{ color={ colorMode === "dark" ? "primary.light" : "primary.dark" } - style={{ marginTop: "2rem", marginBottom: "2rem" }} + className="contents" fontSize="1.3rem" > {/* @blockFrom:README.md:intro */} diff --git a/dev/arktype.io/src/components/features.tsx b/dev/arktype.io/src/components/features.tsx index 9301c24400..14968e26da 100644 --- a/dev/arktype.io/src/components/features.tsx +++ b/dev/arktype.io/src/components/features.tsx @@ -210,7 +210,9 @@ const Feature = (props: FeatureProps) => { > {props.description} -
{props.image ?? null}
+
+ {props.image ?? null} +
) } diff --git a/dev/arktype.io/src/components/homeDemo.tsx b/dev/arktype.io/src/components/homeDemo.tsx index 78094e4f52..aec3ffd84d 100644 --- a/dev/arktype.io/src/components/homeDemo.tsx +++ b/dev/arktype.io/src/components/homeDemo.tsx @@ -16,43 +16,46 @@ export const HomeDemo = () => { const [isActive, setIsActive] = useState(pathname.includes("try")) const backgroundColor = isDarkMode ? "#ffffff00" : "#000000aa" return ( - - + {isActive ? "$ wq!" : "$ code demo.ts"} + + _ + + + + {isActive ? ( @@ -66,7 +69,7 @@ export const HomeDemo = () => { /> )} - + typescript@4.9.5 in VS Code— no extensions or plugins required ( { ) - + ) } diff --git a/dev/arktype.io/src/components/installationBlock.tsx b/dev/arktype.io/src/components/installationBlock.tsx index 5b1140acde..c369fe7aac 100644 --- a/dev/arktype.io/src/components/installationBlock.tsx +++ b/dev/arktype.io/src/components/installationBlock.tsx @@ -15,7 +15,7 @@ export const FloatingInstallationBlock = () => { } as const satisfies Parameters<(typeof controls)["start"]>[0] scrollY.onChange((value) => { controls.start( - value ? { position: "fixed", top: "50%", width: 250 } : initial + value ? { position: "fixed", top: "50%", width: 340 } : initial ) }) return ( diff --git a/dev/arktype.io/src/css/custom.css b/dev/arktype.io/src/css/custom.css index 9ab0f0d833..47a3f06da5 100644 --- a/dev/arktype.io/src/css/custom.css +++ b/dev/arktype.io/src/css/custom.css @@ -20,12 +20,29 @@ font-size: x-large; } +.navbar__link { + font-size: x-large; + color: #ffffff; + text-decoration: none; + transition: color 0.3s ease; +} + +.navbar-versions { + font-size: 21px !important; +} + +.navbar__logo:hover { + scale: 1.1; + transition: all 0.2s ease-out; +} + .dropdown { - padding: 0px; + padding: 2px; } .navbar-github:hover { opacity: 0.6; + transition: all 0.2s ease; } .navbar-github::before { @@ -53,7 +70,7 @@ header { text-align: center; position: relative; overflow: hidden; - background: #085b92; + background: #0c5c91; } [data-theme="dark"] .navbar { @@ -88,17 +105,39 @@ header { .installationTabs { overflow: hidden; - height: 2.6rem; - margin-top: -1.5rem; + height: 2.1rem; + margin-top: -1.3rem; --ifm-tabs-color: #8a8a8a; + border-radius: 10px; } .subTabs { - height: 3rem; - margin-top: -1.5rem; + height: 2.5rem; + margin-top: -1.3rem; --ifm-tabs-color: #8a8a8a; } +.margin-top--md { + margin-top: 0.8rem !important; +} + +.tabs__item { + border-top-right-radius: 10px; + border-top-left-radius: 10px; + margin: 0 0.5rem; + padding: 0.5rem 1rem; + font-size: 1rem; + cursor: pointer; + transition: all 0.2s ease; +} + +@media only screen and (max-width: 768px) { + .contents { + margin-left: 2rem !important; + margin-right: 2rem !important; + } +} + .npmTab { --ifm-tabs-color-active: #ff3939; --ifm-tabs-color-active-border: #ff3939; @@ -116,13 +155,13 @@ header { .theme-code-block { --prism-background-color: #1b1b1baa; - --ifm-pre-padding: 0.5rem; + --ifm-pre-padding: 1rem; } .inferable-code { position: relative; - background: #fffff0; border-radius: 0.5rem; + background: #fffff0; } .inferable-code .theme-code-block {