mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-02-04 22:48:56 +08:00
refactor: move scroll to top and mobile commandline to overlays
This commit is contained in:
parent
5c22ffdfaa
commit
af801335e4
2 changed files with 15 additions and 14 deletions
|
|
@ -4,26 +4,12 @@ import { getFocus } from "../../../signals/core";
|
|||
import { showModal } from "../../../stores/modals";
|
||||
import { Button } from "../../common/Button";
|
||||
|
||||
import { ScrollToTop } from "./ScrollToTop";
|
||||
import { ThemeIndicator } from "./ThemeIndicator";
|
||||
import { VersionButton } from "./VersionButton";
|
||||
|
||||
export function Footer(): JSXElement {
|
||||
return (
|
||||
<footer class="text-sub relative text-xs">
|
||||
<ScrollToTop />
|
||||
<button
|
||||
type="button"
|
||||
id="commandLineMobileButton"
|
||||
class="bg-main text-bg fixed bottom-8 left-8 z-99 hidden h-12 w-12 rounded-full text-center leading-12"
|
||||
onClick={() => {
|
||||
showModal("Commandline");
|
||||
}}
|
||||
tabIndex="-1"
|
||||
>
|
||||
<i class="fas fa-terminal"></i>
|
||||
</button>
|
||||
|
||||
<div
|
||||
class="mb-8 text-center leading-loose transition-opacity"
|
||||
classList={{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import { JSXElement } from "solid-js";
|
||||
|
||||
import { showModal } from "../../../stores/modals";
|
||||
import { ScrollToTop } from "../footer/ScrollToTop";
|
||||
|
||||
import { Banners } from "./Banners";
|
||||
import { FpsCounter } from "./FpsCounter";
|
||||
import { LoaderBar } from "./LoaderBar";
|
||||
|
|
@ -8,6 +11,18 @@ import { MediaQueryDebugger } from "./MediaQueryDebugger";
|
|||
export function Overlays(): JSXElement {
|
||||
return (
|
||||
<>
|
||||
<ScrollToTop />
|
||||
<button
|
||||
type="button"
|
||||
id="commandLineMobileButton"
|
||||
class="bg-main text-bg fixed bottom-8 left-8 z-99 hidden h-12 w-12 rounded-full text-center leading-12"
|
||||
onClick={() => {
|
||||
showModal("Commandline");
|
||||
}}
|
||||
tabIndex="-1"
|
||||
>
|
||||
<i class="fas fa-terminal"></i>
|
||||
</button>
|
||||
<Banners />
|
||||
<MediaQueryDebugger />
|
||||
<LoaderBar />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue