webinterface draft

This commit is contained in:
2021-10-02 00:04:27 +02:00
parent 304844daef
commit 0dbb7f8528
11 changed files with 12573 additions and 0 deletions
+71
View File
@@ -0,0 +1,71 @@
import "./App.sass"
function App() {
return (
<>
<div id="header">
<h1>Doorlock Systems</h1>
<div id="header__search"><input id="header__search__input" type="text" placeholder="..."></input><button>Search</button></div>
<div id="header__menu">
<ul>
<li><a>User Settings</a></li>
<li><a>Logout</a></li>
</ul>
</div>
</div>
<div id="menu">
<h3>Menu</h3>
<ul>
<li><a className="menu__active">Status</a></li>
<li><a>Account</a></li>
<li><a>Log</a></li>
<li><a>Backup</a></li>
<li><a>Admin</a></li>
</ul>
</div>
<div id="main">
<div className="main__card">
<h4>Add User</h4>
<hr />
<p>Add new user</p>
<p><label>First Name</label><input type="text"></input></p>
<p><label>Last Name</label><input type="text"></input></p>
<p><label>PIN</label><input type="text"></input></p>
<p><label>RFID</label><input type="text"></input><button>Scan</button></p>
<p><label>Expire Date</label><input type="date"></input></p>
<button>Add</button>
</div>
<div className="main__card">
<h4>Recent Activity</h4>
<hr />
<table>
<thead>
<tr>
<td>Name</td>
<td>Method</td>
<td>Time</td>
</tr>
</thead>
<tbody>
<tr>
<td>Max Mustermann</td>
<td>RFID</td>
<td>1.10.2020 08:30</td>
</tr>
</tbody>
</table>
</div>
<div className="main__card">
<h4>System Status</h4>
<hr />
<p>Uptime: since 3days 15hours</p>
<p>LastDB Update: before 7hours</p>
<p>Last administrator login: Admin (12.9.2021 09:30)</p>
</div>
</div>
<div id="footer">Footer</div>
</>
);
}
export default App;
+198
View File
@@ -0,0 +1,198 @@
$color1: #1F1E2E
$color2: #27283A
$color3: #438AF4
$color4: rgba(2,0,36,0.7455182756696428)
$color5: rgba(43,2,23,0.7763306005996149)
$color6: #ddd9ebbf
*
box-sizing: border-box
html, body
margin: 0
#root
min-height: 100vh
display: grid
grid-template-columns: auto 1fr auto
grid-template-rows: auto 1fr 2em
grid-template-areas: "header header header" " menu main ." "footer footer footer"
background: $color2
overflow: auto
#header
position: relative
grid-area: header
display: inline-flex
flex-wrap: wrap
flex-direction: row
min-height: auto
padding: .5em
justify-content: space-between
align-items: center
background: $color1
color: $color6
h1
flex-wrap: nowrap
white-space: nowrap
display: inline-flex
font-size: 1.5em
&::after
justify-self: start
position: absolute
display: block
content: ''
left: 0
right: 0
top: 100%
background: $color3
height: .1em
&__search
margin: 1em
position: relative
border-radius: .5rem
display: inline-flex
margin-left: auto
transition: ease all 500ms
&:hover
flex-grow: 1
&__input
height: 2rem
transition: ease all 500ms
border-radius: .5rem 0 0 .5rem
display: flex
background: $color3
border: none
outline: none
color: $color6
flex-grow: 0
margin-left: auto
max-width: 50%
box-shadow: 0 0 .2em $color5
padding: .5em
&:hover, &:not(:placeholder-shown)
transition: ease all 500ms
flex-grow: 1
+ button
height: 2rem
border: none
color: $color6
border-radius: 0 .5rem .5rem 0
display: flex
align-items: center
background: $color2
font-size: 1em
border: .1rem inset $color3
border-style: solid
padding: .5em
&:hover
background: $color6
color: $color3
&__menu
display: inline-flex
flex-wrap: nowrap
flex-shrink: 1
ul
list-style: none
padding: 0
li
display: inline
a
padding: .5em
white-space: nowrap
#menu
grid-area: menu
display: flex
min-height: 100
flex-direction: column
align-items: center
background: $color1
padding: .5em 0
overflow: visible
h3
margin: 0
color: $color6
text-decoration: bold
ul
list-style: none
padding-left: 0
margin: .4em 0
a
position: relative
display: block
text-decoration: none
margin-left: .4em
color: $color6
//margin: .5em 0
padding: .3em .5em
font-size: 1.05em
transition: ease all 500ms
&::after
transition: ease all 500ms
position: absolute
top: 0
bottom: 0
right: 100%
width: 0em
content: ''
background: $color6
&:hover
background: $color3
&::after
width: 0.4em
&.menu__active
color: $color3
&::after
width: 0.4em
background: $color2
&:hover
color: #fff
&::after
width: 0.4em
background: $color6
#main
grid-area: main
display: flex
flex-wrap: wrap
padding: 1em
border-top-left-radius: 1em
.main
&__card
flex-grow: 1
background: $color6
border-radius: 1em
padding: 1em
margin: 1em
h4
margin: 0
#footer
position: relative
grid-area: footer
display: flex
justify-content: center
align-items: center
color: #ffffff67
text-transform: uppercase
&::after
position: absolute
left: 0
right: 0
bottom: 0
height: 2em
widht: 100vw
opacity: 0.5
background: #000
background: linear-gradient(90deg, $color2 0%, $color3% 25%, $color5 50%, $color4 65%, $color1 100%)
content: ''
&::before
position: absolute
left: 0
right: 0
bottom: 100%
height: .2em
opacity: 0.5
content: ''
background: linear-gradient($color2,$color3)
+13
View File
@@ -0,0 +1,13 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
+13
View File
@@ -0,0 +1,13 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);