Implement tiling grid layouts in preperation for the blog editor, settings etc.
This commit is contained in:
parent
7a91cde278
commit
34b61fc670
10
src/App.tsx
10
src/App.tsx
|
|
@ -9,6 +9,8 @@ import Home from "./pages/Home.tsx";
|
||||||
import Login from "./pages/Login.tsx";
|
import Login from "./pages/Login.tsx";
|
||||||
import Logout from "./pages/Logout.tsx";
|
import Logout from "./pages/Logout.tsx";
|
||||||
import About from "./pages/About.tsx";
|
import About from "./pages/About.tsx";
|
||||||
|
import Settings from "./pages/Settings.tsx";
|
||||||
|
import BlogEditor from "./pages/BlogEditor.tsx";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
usernameStorageHandlerInit,
|
usernameStorageHandlerInit,
|
||||||
|
|
@ -68,12 +70,20 @@ export default function App() {
|
||||||
) : (
|
) : (
|
||||||
<NavbarButton>Login</NavbarButton>
|
<NavbarButton>Login</NavbarButton>
|
||||||
)}
|
)}
|
||||||
|
<NavbarButton>Settings</NavbarButton>
|
||||||
|
<NavbarButton>BlogEditor</NavbarButton>
|
||||||
</Navbar>
|
</Navbar>
|
||||||
<div id="page">
|
<div id="page">
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" exact element={<Home></Home>} />
|
<Route path="/" exact element={<Home></Home>} />
|
||||||
<Route path="/home" exact element={<Home></Home>} />
|
<Route path="/home" exact element={<Home></Home>} />
|
||||||
<Route path="/about" exact element={<About></About>} />
|
<Route path="/about" exact element={<About></About>} />
|
||||||
|
<Route
|
||||||
|
path="/blogeditor"
|
||||||
|
exact
|
||||||
|
element={<BlogEditor></BlogEditor>}
|
||||||
|
/>
|
||||||
|
<Route path="/settings" exact element={<Settings></Settings>} />
|
||||||
<Route path="/login" exact element={<Login></Login>} />
|
<Route path="/login" exact element={<Login></Login>} />
|
||||||
<Route path="/logout" exact element={<Logout></Logout>} />
|
<Route path="/logout" exact element={<Logout></Logout>} />
|
||||||
</Routes>
|
</Routes>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ body,
|
||||||
--blog-card-height: 20rem;
|
--blog-card-height: 20rem;
|
||||||
--border-radii: 5px;
|
--border-radii: 5px;
|
||||||
--blog-card-image-radius: 1px;
|
--blog-card-image-radius: 1px;
|
||||||
|
--tiling-gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
|
|
@ -56,6 +57,54 @@ a {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.standardHorizontalTilingGrid {
|
||||||
|
display: grid;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
max-width: calc(100% - var(--tiling-gap) * 2);
|
||||||
|
max-height: calc(100% - var(--tiling-gap) * 2);
|
||||||
|
gap: var(--tiling-gap);
|
||||||
|
padding: var(--tiling-gap);
|
||||||
|
grid-auto-flow: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.standardVerticalTilingGrid {
|
||||||
|
display: grid;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
max-width: calc(100% - var(--tiling-gap) * 2);
|
||||||
|
max-height: calc(100% - var(--tiling-gap) * 2);
|
||||||
|
gap: var(--tiling-gap);
|
||||||
|
padding: var(--tiling-gap);
|
||||||
|
grid-auto-flow: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.standardTilingBox {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: scroll;
|
||||||
|
border-radius: var(--border-radii);
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.standardTilingTitlebar {
|
||||||
|
height: 20px;
|
||||||
|
width: 100%;
|
||||||
|
max-height: 20px;
|
||||||
|
max-width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
background: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.standardTilingTitlebar > p {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
.blogEntryGrid {
|
.blogEntryGrid {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue