This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "debug.allowBreakpointsEverywhere": true, | |
| "files.autoSave": "off", | |
| "code-runner.defaultLanguage": "\"code-runner.defaultLanguage\": \"python\"", | |
| "python.linting.pylintArgs": [ | |
| "--disable=all", | |
| "--enable=F,E,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode", | |
| "--load-plugins", | |
| "pylint_django" | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logo from "./logo.svg"; | |
| import "./App.css"; | |
| import Global from "./components/DarkLight/global"; | |
| import Home from "./components/Home.jsx"; | |
| function App() { | |
| return ( | |
| <Global> | |
| <Home /> | |
| </Global> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import { useDispatch, useSelector } from "react-redux"; | |
| import { dark } from "../redux"; | |
| import { LIGHT, DARK } from "./DarkLight/theme"; | |
| /** @jsxRuntime classic / | |
| /* @jsx jsx */ | |
| import styled from "@emotion/styled"; | |
| import { css, jsx } from "@emotion/react"; | |
| const Content = styled.div` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import { useSelector } from "react-redux"; | |
| const Global = ({ children }) => { | |
| const isDark = useSelector((state) => state.changedark.isdark); | |
| return <div className={isDark ? "dark" : "light"}> | |
| {children} | |
| </div>; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import ReactDOM from "react-dom"; | |
| import "./index.css"; | |
| import App from "./App"; | |
| import { Provider } from "react-redux"; | |
| import store from "./redux/store"; | |
| ReactDOM.render( | |
| <Provider store={store}> | |
| <React.StrictMode> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body .light { | |
| background-color: #f4f4f4; | |
| background: #f4f4f4; | |
| color: #000; | |
| transition: 250ms ease-in; | |
| } | |
| body .dark { | |
| background-color: #242424; | |
| background: #242424; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const LIGHT = { | |
| background: "#f4f4f4", | |
| textColor: "#000", | |
| }; | |
| export const DARK = { | |
| background: "#242424", | |
| textColor: "#fff", | |
| }; |