Skip to content
Merged
52 changes: 33 additions & 19 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -512,24 +512,32 @@ hr {

.navbar__link--active,
.menu__link--active {
color: var(--selected);
color: var(--surface-brand-default);
background: var(--surface-brand-grey-strong);
}


.navbar__link--active:hover {
color: var(--selected-hover);
.navbar__link {
position: relative;
}

.navbar__link {
.navbar__item.navbar__link:not(.logo-link):not(.navbar-login-btn):hover {
position: relative;
}

.navbar__item.navbar__link:not(.logo-link):hover {
color: var(--normal-hover);
.navbar__item.navbar__link:not(.logo-link):not(.navbar-login-btn):hover::after {
position: absolute;
height: 2px;
width: 100%;
content: "";
background: var(--surface-brand-default);
bottom: -24px;
left: 0;
z-index: 2;
}


.navbar__item {
padding: 12px 16px;
padding: 8px;
border-radius: 8px;
font-family: Inter;
font-size: 16px;
Expand Down Expand Up @@ -664,24 +672,26 @@ hr {
}

.navbar__items--middle {
background: var(--navbar-items-bg);
padding: 0 16px;
border-radius: 99px;
display: flex;
gap: 16px;
margin: 0 auto;
}
.navbar__inner {
margin: auto;
background: var(--surface-primary);
padding: 16px 24px;
display: grid;
grid-template-columns: 324px 1fr auto;
gap: 40px;
grid-template-columns: auto auto 1fr;
}
@media (max-width: 1191px) {
.navbar__inner {
grid-template-columns: repeat(3, auto);
}
.header-github-link {
display: none;
}
.navbar__inner {
gap: 16px;
}
}

.navbar__items--right > :last-child {
Expand All @@ -694,19 +704,20 @@ hr {
flex-direction: row-reverse;
justify-content: space-between;
max-width: unset;
height: 48px;
}

.navbar__inner {
position: relative;
display: flex;
padding: 16px 32px;
display: flex;
}

.navbar__items--right > :last-child {
left: 32px;
left: 0;
z-index: 1;
top: calc(100% + 24px);
width: calc(100% - 64px);
top: 100%;
width: calc(100% - 16px);
}

.navbar__items--right > :last-child > * {
Expand Down Expand Up @@ -785,6 +796,9 @@ hr {
top: 50%;
transform: translateY(-50%);
}
.logo-link::before {
content: "/"
}
.logo-link:hover {
transform: translateY(-60%);
}
Expand Down Expand Up @@ -870,7 +884,7 @@ hr {
padding: 0;
backdrop-filter: blur(7px);
background: var(--navbar-gradient);
box-shadow: var(--navbar-shadow);
border-bottom: 1px solid var(--border-color);
}

@media (max-width: 996px) {
Expand Down
22 changes: 11 additions & 11 deletions src/pages/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.mainHome {
overflow: hidden;
padding: 0;
@media (max-width: 974px) {
@media (max-width: 996px) {
margin-top: 68px;
}
}
Expand Down Expand Up @@ -113,14 +113,14 @@
gap: 40px;
margin-top: 36px;
grid-template-columns: 1fr;
@media (min-width: 974px) {
@media (min-width: 996px) {
grid-template-columns: repeat(2, calc(50% - 20px));
}
.tabBox {
width: 100%;
height: 100%;
max-width: 100%;
@media (min-width: 974px) {
@media (min-width: 996px) {
height: 100%;
}
.heading {
Expand Down Expand Up @@ -210,7 +210,7 @@
line-height: 52.8px;
letter-spacing: -0.02em;
text-align: left;
@media (min-width: 974px) {
@media (min-width: 996px) {
font-size: 48px;
}
}
Expand All @@ -223,7 +223,7 @@
letter-spacing: -2%;
margin: 40px 0 24px;

@media (min-width: 974px) {
@media (min-width: 996px) {
margin: 80px 0 24px;
font-size: 36px;
}
Expand All @@ -243,7 +243,7 @@
gap: 24px;
flex-wrap: wrap;
display: grid;
@media (min-width: 974px) {
@media (min-width: 996px) {
grid-template-columns: repeat(3, 1fr);
}
}
Expand All @@ -264,7 +264,7 @@
display: grid;
gap: 40px;
grid-template-columns: 1fr;
@media (min-width: 974px) {
@media (min-width: 996px) {
grid-template-columns: repeat(3, 1fr);
}
.howItem {
Expand Down Expand Up @@ -301,7 +301,7 @@
line-height: 140%;
letter-spacing: 0%;
margin: 16px 0 0;
@media (min-width: 974px) {
@media (min-width: 996px) {
height: 98px;
}
}
Expand Down Expand Up @@ -371,7 +371,7 @@
display: grid;
gap: 40px;
grid-template-columns: 1fr;
@media (min-width: 974px) {
@media (min-width: 996px) {
grid-template-columns: repeat(3, 1fr);
}
.helpItem {
Expand Down Expand Up @@ -441,7 +441,7 @@
max-width: 1272px;
text-align: left;
padding: 40px 16px;
@media (min-width: 974px) {
@media (min-width: 996px) {
grid-template-columns: repeat(2, 1fr);
padding: 80px 16px;
}
Expand Down Expand Up @@ -469,7 +469,7 @@
justify-content: left;
align-items: center;
gap: 24px;
@media (min-width: 974px) {
@media (min-width: 996px) {
justify-content: center;
}
.link {
Expand Down
3 changes: 2 additions & 1 deletion src/theme/Navbar/Content/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ export default function NavbarContent(): ReactNode {
<>
{!mobileSidebar.disabled && <NavbarMobileSidebarToggle />}
<NavbarLogo />
<Link to={baseUrl} className="logo-link">/docs</Link>
<span className={styles.separator}>/</span>
<Link to={baseUrl} className="logo-link">docs</Link>
</>
}
middle={
Expand Down
9 changes: 9 additions & 0 deletions src/theme/Navbar/Content/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,13 @@ Hide color mode toggle in small viewports
.colorModeToggle {
display: none;
}
.separator {
display: none;
}
}

.separator {
color: var(--border-color);
font-size: 28px;
margin-right: 4px;
}
37 changes: 36 additions & 1 deletion src/theme/SearchBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
import Translate from "@docusaurus/Translate";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import translations from "@theme/SearchTranslations";

import type {
InternalDocSearchHit,
DocSearchModal as DocSearchModalType,
Expand Down Expand Up @@ -53,7 +54,7 @@ const kapaStyles = `
width: fit-content;
border: none;
background: transparent; font-size: 14px;
color: var(--docsearch-highlight-color);
color: var(--surface-brand-default);
cursor: pointer;
transition: all 0.2s ease;
position: relative;
Expand Down Expand Up @@ -127,6 +128,40 @@ const kapaStyles = `
flex-direction: column;
padding: 0 1rem 1rem;
}
.DocSearch-SearchBar {
padding: var(--docsearch-spacing) var(--docsearch-spacing) 0;
}
.DocSearch-Button {
align-items: center;
background: var(--docsearch-searchbox-background);
border: 0;
border-radius: 40px;
color: var(--docsearch-muted-color);
cursor: pointer;
display: flex;
font-weight: 500;
height: 36px;
justify-content: space-between;
margin: 0 0 0 16px;
padding: 0 8px;
-webkit-user-select: none;
user-select: none;
&:hover {
background: var(--surface-primary);
outline: 1px solid var(--border-color);
}
kbd {
background: var(--white-color);
color: var(--gray-800);
box-shadow: 0px 1px 1px rgba(47, 55, 71, 0.6), 0px 1px 4px rgba(47, 55, 71, 0.2);
border-bottom: 1px solid rgba(47, 55, 71, 0.2);
border-radius: 4px;
padding: 2px 6px;
vertical-align: baseline;
font-size: 14px !important;
font-family: "JetBrainsMono" !important;
}
}
`;

let DocSearchModal: typeof DocSearchModalType | null = null;
Expand Down
Loading