File tree Expand file tree Collapse file tree 4 files changed +23
-5
lines changed
Expand file tree Collapse file tree 4 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ const section = frontmatter?.section ?? ""
7676 </div >
7777 )
7878 }
79- <!-- < ThemeModeToggle client:only="preact" dark={dark} /> -- >
79+ <ThemeModeToggle client:only =" preact" dark ={ dark } />
8080 <LanguageSelector class =" language-selector" />
8181 <a href =" https://github.com/scroll-tech/scroll-documentation" class =" github-url" target =" _blank" rel =" nofollow" >
8282 <span
@@ -176,9 +176,8 @@ const section = frontmatter?.section ?? ""
176176 .tools {
177177 display: flex;
178178 align-items: center;
179- gap: 8px ;
179+ gap: 20px ;
180180 width: 100%;
181- justify-content: space-between;
182181 flex-direction: row-reverse;
183182 }
184183
@@ -218,9 +217,20 @@ const section = frontmatter?.section ?? ""
218217 font-weight: 600;
219218 @apply border-0 border-solid border-link;
220219 }
220+
221+ .right-box {
222+ gap: 1.5em;
223+ }
221224 .tools {
222225 width: unset;
223226 flex-direction: row;
227+ flex: 1;
228+ gap: 8px;
229+ justify-content: flex-end;
230+ }
231+ .search-item {
232+ flex: 1;
233+ max-width: 346px;
224234 }
225235 .github-url {
226236 width: 35px;
Original file line number Diff line number Diff line change 3737 outline : 0 ;
3838 cursor : pointer;
3939 align-items : center;
40- width : 346 px ;
40+ width : 100 % ;
4141 height : 35px ;
4242 border-radius : 40px ;
4343 font-style : italic;
195195
196196 .container {
197197 position : relative;
198+ width : 100% ;
198199 }
199200
200201 # searchModal .mini {
Original file line number Diff line number Diff line change @@ -16,8 +16,14 @@ export default function Search() {
1616 const body = document . body
1717 if ( isOpen ) {
1818 body . classList . add ( "global-search-toggle" )
19+ if ( window . matchMedia ( "(max-width: 50em)" ) . matches ) {
20+ document . querySelector ( "#themeModeToggle" ) . style . right = "-43px"
21+ }
1922 } else {
2023 body . classList . remove ( "global-search-toggle" )
24+ if ( window . matchMedia ( "(max-width: 50em)" ) . matches ) {
25+ document . querySelector ( "#themeModeToggle" ) . style . right = 0
26+ }
2127 }
2228 } , [ isOpen ] )
2329
Original file line number Diff line number Diff line change @@ -43,8 +43,9 @@ const ThemeModeToggle = (props) => {
4343
4444 return (
4545 < button
46+ id = "themeModeToggle"
4647 className = { clsx (
47- "w-[35px] h-[35px] rounded-[5px] border-solid bg-transparent border border-black dark:border-white text-black dark:text-white" ,
48+ "relative w-[35px] h-[35px] rounded-[5px] border-solid bg-transparent border border-black dark:border-white text-black dark:text-white" ,
4849 dark && "border-white text-white"
4950 ) }
5051 onClick = { handleToggleThemeMode }
You can’t perform that action at this time.
0 commit comments