Filters panel and navbar buttons
This commit is contained in:
parent
e762b7758e
commit
7c8cb9c199
|
@ -5,6 +5,7 @@ import { useState } from 'preact/hooks'
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
import NavBar from './components/NavBar/navbar'
|
import NavBar from './components/NavBar/navbar'
|
||||||
|
import FiltersPanel from './components/Filters/panel'
|
||||||
import Button from './components/Buttons/button'
|
import Button from './components/Buttons/button'
|
||||||
|
|
||||||
// Styles
|
// Styles
|
||||||
|
@ -30,6 +31,8 @@ export function App() {
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<NavBar></NavBar>
|
<NavBar></NavBar>
|
||||||
|
|
||||||
|
<FiltersPanel></FiltersPanel>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
16
frontend/src/components/Filters/panel.jsx
Normal file
16
frontend/src/components/Filters/panel.jsx
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
import { h } from 'preact' // Necessary ?
|
||||||
|
import styles from './panel.module.css'
|
||||||
|
|
||||||
|
function FiltersPanel({ children, className, ...rest}) {
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className={styles.navbar}
|
||||||
|
{...rest} // Allow passing other props like 'disabled', 'type', etc.
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default FiltersPanel;
|
19
frontend/src/components/Filters/panel.module.css
Normal file
19
frontend/src/components/Filters/panel.module.css
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
.navbar {
|
||||||
|
position: absolute;
|
||||||
|
top: 13rem;
|
||||||
|
bottom: 3rem;
|
||||||
|
right: 3rem;
|
||||||
|
/* left: 12rem; */
|
||||||
|
left: 21rem;
|
||||||
|
|
||||||
|
margin: 1rem;
|
||||||
|
width: 18rem;
|
||||||
|
min-height: 40rem;
|
||||||
|
|
||||||
|
background-color: #1a1a1a;
|
||||||
|
color: #eaeaea;
|
||||||
|
|
||||||
|
border: #3a3a3a solid;
|
||||||
|
border-width: .1em;
|
||||||
|
border-radius: .5rem;
|
||||||
|
}
|
|
@ -4,12 +4,15 @@ import styles from './navbar.module.css'
|
||||||
function NavBar({ children, className, ...rest}) {
|
function NavBar({ children, className, ...rest}) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<nav
|
||||||
className={styles.navbar}
|
className={styles.navbar}
|
||||||
{...rest} // Allow passing other props like 'disabled', 'type', etc.
|
{...rest} // Allow passing other props like 'disabled', 'type', etc.
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
<a href='index'> Home </a>
|
||||||
|
<a href='settings'> Mods </a>
|
||||||
|
<a href='settings'> Modpacks </a>
|
||||||
|
</nav>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,5 +14,25 @@
|
||||||
border-width: .1em;
|
border-width: .1em;
|
||||||
border-radius: .5rem;
|
border-radius: .5rem;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center; /* Vertically align items along the cross axis */
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar > a {
|
||||||
|
position: relative;
|
||||||
|
/* margin: 0 1.2em; */
|
||||||
|
padding: .2em .7em;
|
||||||
|
|
||||||
|
color: #eaeaea;
|
||||||
|
border-radius: .5rem;
|
||||||
|
font-size: 1.4rem;
|
||||||
|
font-weight: 500;
|
||||||
|
|
||||||
|
transition: 200ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar > a:hover {
|
||||||
|
background-color: #eaeaea10;
|
||||||
}
|
}
|
Loading…
Reference in a new issue