mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix body css and forced yotsuba theme for homepage
This commit is contained in:
@@ -1,13 +1,5 @@
|
|||||||
.app {
|
.app {
|
||||||
background: var(--body-background-base-color) var(--body-background-pattern-image) top center repeat-x;
|
|
||||||
font-size: var(--body-font-size);
|
|
||||||
font-family: var(--body-font-family);
|
|
||||||
color: var(--body-font-color);
|
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
min-height: 100%;
|
|
||||||
overflow-y: hidden;
|
|
||||||
overflow-x: hidden;
|
|
||||||
min-height: 100vh;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 640px) {
|
@media (min-width: 640px) {
|
||||||
|
|||||||
+5
-5
@@ -39,13 +39,13 @@ const BoardLayout = () => {
|
|||||||
const App = () => {
|
const App = () => {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const isInHomeView = isHomeView(location.pathname);
|
const isInHomeView = isHomeView(location.pathname);
|
||||||
|
|
||||||
// add theme className to body so it can set the correct body background in index.css
|
|
||||||
const [theme] = useTheme();
|
const [theme] = useTheme();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.body.classList.forEach((className) => document.body.classList.remove(className));
|
document.body.classList.forEach((className) => document.body.classList.remove(className));
|
||||||
document.body.classList.add(theme);
|
const classToAdd = isInHomeView ? 'yotsuba' : theme;
|
||||||
}, [theme]);
|
document.body.classList.add(classToAdd);
|
||||||
|
}, [theme, isInHomeView]);
|
||||||
|
|
||||||
const globalLayout = (
|
const globalLayout = (
|
||||||
<>
|
<>
|
||||||
@@ -55,7 +55,7 @@ const App = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`${styles.app} ${isInHomeView ? 'yotsuba' : theme}`}>
|
<div className={styles.app}>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route element={globalLayout}>
|
<Route element={globalLayout}>
|
||||||
<Route path='/' element={<Home />} />
|
<Route path='/' element={<Home />} />
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ html, body {
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
background: var(--body-background-base-color) var(--body-background-pattern-image) top center repeat-x;
|
||||||
|
font-size: var(--body-font-size);
|
||||||
|
font-family: var(--body-font-family);
|
||||||
|
color: var(--body-font-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, th, td, iframe, blockquote {
|
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, th, td, iframe, blockquote {
|
||||||
|
|||||||
Reference in New Issue
Block a user