Skip to content

Commit 73b319b

Browse files
committed
fix: adjustment
1 parent cc1d504 commit 73b319b

File tree

9 files changed

+92
-12
lines changed

9 files changed

+92
-12
lines changed

public/scroll.svg

Lines changed: 27 additions & 1 deletion
Loading

src/components/Header/Header.astro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ const section = frontmatter?.section ?? ""
3535
<nav class="nav-wrapper" title="Top Navigation">
3636
<div class="logo flex items-center">
3737
<a href={localizePath("/")}>
38-
<img src={dark ? "/scroll-white.svg" : "/scroll.svg"} alt={CONFIG.SITE.title ?? "Documentation"} />
38+
<img
39+
style={{ height: "22px" }}
40+
src={dark ? "/scroll-white.svg" : "/scroll.svg"}
41+
alt={CONFIG.SITE.title ?? "Documentation"}
42+
/>
3943
</a>
4044
</div>
4145
<div class="right-box">

src/components/Header/Search/Search.module.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
max-height: 80vh;
1818
background: #fff;
1919
position: absolute;
20-
border-radius: 40px;
20+
border-radius: 24px;
2121
padding-top: 0;
2222
width: 100%;
2323
}
@@ -204,6 +204,10 @@
204204
padding-top: 0;
205205
}
206206

207+
#searchModal.large {
208+
border-radius: 27.5px;
209+
}
210+
207211
.queryResults {
208212
grid-template-columns: 1fr 1fr;
209213
@apply gap-4;

src/components/Header/Search/SearchInput.module.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
.wrapper.large {
1616
height: 48px;
17-
border-radius: 40px;
17+
border-radius: 24px;
1818
}
1919

2020
.input {
@@ -39,6 +39,7 @@
3939
border-bottom: none;
4040
padding-bottom: 0;
4141
background: transparent url(/svgs/search.svg) left center no-repeat;
42+
background-size: 20px auto;
4243
}
4344

4445
.input::placeholder {
@@ -68,6 +69,8 @@
6869

6970
.wrapper.large {
7071
height: 55px;
72+
border-radius: 27.5px;
73+
width: 100%;
7174
}
7275

7376
.input {
@@ -83,8 +86,9 @@
8386

8487
.input.large {
8588
height: 55px;
86-
background: transparent url(/svgs/search.svg) left 22px center no-repeat;
89+
background: transparent url(/svgs/search.svg) left 20px center no-repeat;
8790
padding-left: 60px;
91+
padding-right: 22px;
8892
}
8993

9094
.input:focus {

src/components/HomeSearch/index.module.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
cursor: pointer;
1111
width: 100%;
1212
height: 55px;
13-
border-radius: 40px;
13+
border-radius: 27.5px;
1414
font-style: italic;
1515
background: var(--white);
1616
}
@@ -26,7 +26,8 @@
2626
.searchInput {
2727
width: 100%;
2828
height: 48px;
29-
padding: 8px 18px;
29+
padding: 8px 20px;
30+
border-spacing: 24px;
3031
}
3132
.searchInput img {
3233
width: 20px;

src/layouts/HomeLayout.astro

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import HeadSEO from "../components/HeadSEO.astro"
44
import Header from "../components/Header/Header.astro"
55
import * as CONFIG from "../config"
66
import Footer from "~/components/Footer/Footer"
7+
import LeftSidebar from "../components/LeftSidebar/LeftSidebar.astro"
78
89
const { content = {}, dark } = Astro.props
9-
10+
const currentPage = new URL(Astro.request.url).pathname
1011
const formattedContentTitle = content.title
1112
? `${content.title} | ${CONFIG.SITE.title}`
1213
: `${CONFIG.PAGE.titleFallback} | ${CONFIG.SITE.title}`
@@ -18,17 +19,55 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site)
1819
<HeadCommon />
1920
<HeadSEO content={content} canonicalURL={canonicalURL} site="" />
2021
<title>{formattedContentTitle}</title>
22+
<style>
23+
body {
24+
--doc-padding: 65px;
25+
}
26+
.home-layout {
27+
margin-bottom: 0;
28+
}
29+
30+
#grid-left {
31+
position: fixed;
32+
background-color: var(--theme-bg);
33+
z-index: 10;
34+
display: none;
35+
}
36+
37+
@media (min-width: 50em) {
38+
#grid-left {
39+
display: flex;
40+
position: sticky;
41+
grid-column: 1;
42+
background: transparent;
43+
}
44+
}
45+
</style>
2146
<style is:global>
2247
.search-item {
2348
display: none !important;
2449
}
50+
.mobile-sidebar-toggle {
51+
overflow: hidden;
52+
}
53+
54+
.mobile-sidebar-toggle #grid-left {
55+
display: block;
56+
top: 2rem;
57+
left: 0;
58+
padding: 0 20px;
59+
height: calc(100vh - 2rem);
60+
}
2561
</style>
2662
</head>
2763
</html>
2864

2965
<body>
3066
<Header dark={dark} />
31-
<main>
67+
<aside id="grid-left" class="grid-sidebar" title="Site Navigation">
68+
<LeftSidebar currentPage={currentPage} {content} />
69+
</aside>
70+
<main class="home-layout">
3271
<slot />
3372
</main>
3473
<Footer />

src/layouts/LandingLayout.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site)
8888
.mobile-sidebar-toggle #grid-left {
8989
display: block;
9090
top: 2rem;
91+
padding: 0 20px;
9192
}
9293
/** This is done to hide the search box in the homepage. CSSModules styles are taking precedence over other styles so !important was needed **/
9394
@media (min-width: 50em) {

src/layouts/MainLayout.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ changeLanguage(content.lang)
6464
}
6565

6666
.grid-sidebar {
67+
width: 100%;
6768
height: 100vh;
6869
position: sticky;
6970
top: 0;

src/pages/en/home/ConnectUs.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ const mediaList = [
66
icon: "/svgs/Discord.svg",
77
name: "Join our Discord",
88
content: "Connect with other Scroll developers and users.",
9-
link: "/en/getting-started/overview",
9+
link: "https://discord.gg/scroll",
1010
},
1111
{
1212
icon: "/svgs/Forum.svg",
1313
name: "Community Forum",
1414
content: "Discuss and propose changes to Scroll’s core protocols.",
15-
link: "/en/developers",
15+
link: "http://community.scroll.io/",
1616
},
1717
{
1818
icon: "/svgs/Contribute.svg",
1919
name: "Contribute to Scroll",
2020
content: "Build with other developers.",
21-
link: "/en/technology",
21+
link: "https://github.com/scroll-tech/contribute-to-scroll",
2222
},
2323
]
2424
---

0 commit comments

Comments
 (0)