Skip to content

Commit 2080560

Browse files
authored
fix: fix mobile version on safari (#95)
* fix: fix mobile version on safari * fix: fix logo backgrounds * fix: fix logo background color on smaller screens
1 parent 2fc6cf3 commit 2080560

File tree

5 files changed

+35
-10
lines changed

5 files changed

+35
-10
lines changed

src/scss/custom.scss

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ html[data-theme-override="light"] {
118118
}
119119

120120
.docs-wrapper .navbar__items {
121-
@apply bg-white dark:bg-neutral-950;
121+
// @apply bg-white dark:bg-neutral-950;
122122
}
123123

124124
.docs-wrapper .main-wrapper,
@@ -130,6 +130,13 @@ html[data-theme-override="light"] {
130130
padding: 0 2rem;
131131
}
132132

133+
.plugin-pages {
134+
.logo-container {
135+
box-shadow: none;
136+
background: none;
137+
}
138+
}
139+
133140
.navbar {
134141
transition: transform 0.25s ease-in-out;
135142
transform: translateY(0);
@@ -165,12 +172,20 @@ html[data-theme-override="light"] {
165172
.navbar-sidebar {
166173
@apply h-fit dark:bg-neutral-900;
167174

175+
.navbar-sidebar__brand {
176+
@apply relative;
177+
}
178+
179+
.navbar-sidebar__items {
180+
height: auto;
181+
}
182+
168183
.navbar-sidebar__item.menu {
169184
padding: 10px 6px !important;
170185
}
171186

172187
.color-mode-toggle {
173-
@apply absolute top-[21px] right-6 h-fit;
188+
@apply absolute top-1/2 right-6 -translate-1/2;
174189
}
175190

176191
.menu__link--sublist::after {
@@ -258,7 +273,7 @@ html[data-theme-override="light"] {
258273
@apply m-0 h-8 w-8;
259274
}
260275
b {
261-
@apply flex h-8 items-center rounded-lg px-2 font-mono hover:bg-neutral-100 dark:hover:bg-neutral-200/10;
276+
@apply flex h-8 items-center rounded-lg px-2 font-mono font-semibold hover:bg-neutral-100 dark:hover:bg-neutral-200/10;
262277
}
263278
}
264279
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
@reference '../../scss/custom.scss';
22

33
.toggle {
4-
@apply flex h-8 w-8 justify-center rounded-lg hover:bg-neutral-100 dark:hover:bg-neutral-300/10;
4+
@apply flex justify-center rounded-lg;
5+
height: 21px;
6+
width: 21px;
57
}
68

79
.toggleButton {
8-
@apply h-4 w-4;
910
align-items: center;
1011
display: flex;
1112
justify-content: center;
12-
height: 100%;
1313
transition: background var(--ifm-transition-fast);
1414
}
1515

1616
.toggleIcon {
17-
width: 1.25rem;
18-
height: 1.25rem;
17+
width: 1rem;
18+
height: 1rem;
1919
}

src/theme/Icon/Close/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export default function IconClose({
1111
return (
1212
<Xmark
1313
className={className}
14-
viewBox="0 0 15 15"
1514
width={width}
1615
height={height}
1716
{...restProps}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.logo-container {
2+
box-shadow: 0 0 18px 8px var(--tw-shadow-color);
3+
}

src/theme/Navbar/Logo/index.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@ import React from "react";
22
import TestplaneLogo from "@site/static/img/logo.svg";
33
import TestplaneLogoDark from "@site/static/img/logo-dark.svg";
44
import Link from "@docusaurus/Link";
5+
import clsx from "clsx";
6+
7+
import styles from "./index.module.css";
58

69
export default function NavbarLogo(): JSX.Element {
710
return (
8-
<div className="flex">
11+
<div
12+
className={clsx(
13+
styles["logo-container"],
14+
"logo-container flex lg:bg-white/70 lg:shadow-white/90 dark:lg:bg-neutral-950/70 dark:lg:shadow-neutral-950/90",
15+
)}
16+
>
917
<TestplaneLogo className="h-8 w-8 dark:hidden" />
1018
<TestplaneLogoDark className="hidden h-8 w-8 dark:block" />
1119
<Link

0 commit comments

Comments
 (0)