diff --git a/components/frontend/src/App.css b/components/frontend/src/App.css index 610c057fed..95ccba6113 100644 --- a/components/frontend/src/App.css +++ b/components/frontend/src/App.css @@ -1,21 +1,3 @@ -.MainContainer { - flex: 1; - margin-top: 6em; - padding-left: 1em; - padding-right: 1em; -} - -@media print { - .MainContainer { - margin-top: 0em; - } -} - html { - scroll-padding-top: 163px; /* height of sticky header */ -} - -:root { - --inverted-menu-background-color: #1b1c1d; - --selection-color: #2185d0; + scroll-padding-top: 176px; /* height of sticky header */ } diff --git a/components/frontend/src/App.js b/components/frontend/src/App.js index 6ee06731d5..0dc59896da 100644 --- a/components/frontend/src/App.js +++ b/components/frontend/src/App.js @@ -1,6 +1,6 @@ import "./App.css" -import { createTheme, ThemeProvider } from "@mui/material/styles" +import { ThemeProvider } from "@mui/material/styles" import { Action } from "history" import history from "history/browser" import { Component } from "react" @@ -11,16 +11,10 @@ import { nr_measurements_api } from "./api/measurement" import { get_report, get_reports_overview } from "./api/report" import { AppUI } from "./AppUI" import { registeredURLSearchParams } from "./hooks/url_search_query" +import { theme } from "./theme" import { isValidDate_YYYYMMDD, toISODateStringInCurrentTZ } from "./utils" import { showConnectionMessage, showMessage } from "./widgets/toast" -const theme = createTheme({ - colorSchemes: { - dark: true, // Add a dark theme (light theme is available by default) - }, - components: { MuiTooltip: { defaultProps: { arrow: true }, styleOverrides: { tooltip: { fontSize: "1em" } } } }, -}) - class App extends Component { constructor(props) { super(props) diff --git a/components/frontend/src/AppUI.js b/components/frontend/src/AppUI.js index 4b35645ba8..7494a249df 100644 --- a/components/frontend/src/AppUI.js +++ b/components/frontend/src/AppUI.js @@ -66,65 +66,55 @@ export function AppUI({ } const darkMode = userPrefersDarkMode(mode) - const backgroundColor = darkMode ? "rgb(40, 40, 40)" : "white" return ( -
- - - - - } - settings={settings} - setUIMode={setMode} - uiMode={mode} - /> - - - - - - -
+ + + + + } + settings={settings} + setUIMode={setMode} + uiMode={mode} + /> + + + + + + +