1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-22 13:04:19 +00:00

Setup basic theme structure

This commit is contained in:
Stefano Pigozzi 2021-04-21 00:23:35 +02:00
parent 9ebbd7fc66
commit d9b9297c90
Signed by untrusted user who does not match committer: steffo
GPG key ID: 6965406171929D01
6 changed files with 38056 additions and 38063 deletions

View file

@ -5,11 +5,13 @@
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "nest-frontend",
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"@testing-library/jest-dom": "^5.11.10", "@testing-library/jest-dom": "^5.11.10",
"@testing-library/react": "^11.2.6", "@testing-library/react": "^11.2.6",
"@testing-library/user-event": "^12.8.3", "@testing-library/user-event": "^12.8.3",
"classnames": "^2.3.1",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-scripts": "4.0.3", "react-scripts": "4.0.3",
@ -5247,6 +5249,11 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/classnames": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz",
"integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA=="
},
"node_modules/clean-css": { "node_modules/clean-css": {
"version": "4.2.3", "version": "4.2.3",
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz",
@ -25488,6 +25495,11 @@
} }
} }
}, },
"classnames": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz",
"integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA=="
},
"clean-css": { "clean-css": {
"version": "4.2.3", "version": "4.2.3",
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz",

View file

@ -6,6 +6,7 @@
"@testing-library/jest-dom": "^5.11.10", "@testing-library/jest-dom": "^5.11.10",
"@testing-library/react": "^11.2.6", "@testing-library/react": "^11.2.6",
"@testing-library/user-event": "^12.8.3", "@testing-library/user-event": "^12.8.3",
"classnames": "^2.3.1",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-scripts": "4.0.3", "react-scripts": "4.0.3",

View file

@ -1,38 +0,0 @@
.App {
text-align: center;
}
.App-logo {
height: 40vmin;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}
.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.App-link {
color: #61dafb;
}
@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

View file

@ -1,26 +1,14 @@
import logo from "./logo.svg" import {useState} from "react"
import "./App.css" import classNames from "classnames"
import Style from "./App.module.css"
function App() { export default function App() {
const [theme, setTheme] = useState("theme-dark");
return ( return (
<div className="App"> <div className={classNames(Style["app"], theme)}>
<header className="App-header"> Ciao mondo!
<img src={logo} className="App-logo" alt="logo"/>
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div> </div>
) )
} }
export default App

View file

@ -0,0 +1,7 @@
.app {
min-height: 100vh;
min-width: 100vw;
background-color: var(--bg-primary);
color: var(--fg-primary);
}

View file

@ -1,13 +1,36 @@
body { body {
margin: 0; margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', min-height: 100%;
sans-serif; min-width: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
} }
code { .theme-dark {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', --bg-primary: #3B7097;
monospace; --bg-light: #34607A;
--bg-dark: #254D61;
--fg-primary: #FFFFFF;
--fg-secondary: #536841;
--btn-on: #5D815C;
--btn-off: #F6E2BC;
--cmp-light: #C4C4C4;
--cmp-dark: #7C7C7C;
}
.theme-light {
--bg-primary: #CAE4F6;
--bg-light: #B2CEDF;
--bg-dark: #7292AF;
--fg-primary: #536841;
--fg-secondary: #FFFFFF;
--btn-on: #A3BDA2;
--btn-off: #FFFFFF;
--cmp-light: #FFFFFF;
--cmp-dark: #AAAAAA;
} }