2022-10-13 17:02:23 +00:00
|
|
|
import { Main } from "./Views/Main";
|
|
|
|
import { Index } from "./Views/Index";
|
|
|
|
import { Editor } from "./Views/Editor";
|
|
|
|
import { useRouter } from "./Router";
|
|
|
|
import { Switch, Match, Show } from "solid-js";
|
|
|
|
import { Wallpaper } from "./Wallpaper";
|
2021-01-14 15:26:29 +00:00
|
|
|
|
|
|
|
function App() {
|
2022-10-13 17:02:23 +00:00
|
|
|
const route = useRouter();
|
|
|
|
const isMobile = screen.width <= 500;
|
2021-09-06 23:43:57 +00:00
|
|
|
|
2021-01-14 23:24:55 +00:00
|
|
|
return (
|
2022-10-13 17:02:23 +00:00
|
|
|
<div className="App" style={isMobile ? "--color-texto: #202020;" : ""}>
|
|
|
|
<Show when={!isMobile}>
|
|
|
|
<Wallpaper />
|
|
|
|
</Show>
|
2021-09-06 23:43:57 +00:00
|
|
|
<Switch fallback={<p>404!</p>}>
|
|
|
|
<Match when={route() === "/"}>
|
|
|
|
<Index />
|
|
|
|
</Match>
|
|
|
|
<Match when={route() === "/editor/"}>
|
|
|
|
<Editor />
|
|
|
|
</Match>
|
|
|
|
<Match when={route() === "/sistemas/"}>
|
|
|
|
<Main />
|
|
|
|
</Match>
|
|
|
|
</Switch>
|
2021-01-14 23:24:55 +00:00
|
|
|
</div>
|
2022-10-13 17:02:23 +00:00
|
|
|
);
|
2021-01-14 15:26:29 +00:00
|
|
|
}
|
|
|
|
|
2022-10-13 17:02:23 +00:00
|
|
|
export default App;
|