Major styling improvements

This commit is contained in:
Curt Spark 2024-04-15 10:33:07 +01:00
parent bffc070296
commit c31cef3d96
6 changed files with 96 additions and 25 deletions

View File

@ -17,12 +17,14 @@ export default function App() {
<NavbarButton>Login</NavbarButton> <NavbarButton>Login</NavbarButton>
<NavbarButton>About</NavbarButton> <NavbarButton>About</NavbarButton>
</Navbar> </Navbar>
<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="/login" exact element={<Login></Login>} /> <Route path="/login" exact element={<Login></Login>} />
</Routes> </Routes>
</div>
</BrowserRouter> </BrowserRouter>
</> </>
); );

View File

@ -7,9 +7,7 @@ interface Props {
export default function Navbar({ children }: Props) { export default function Navbar({ children }: Props) {
return ( return (
<> <>
<div className="navBar"> <div id="navBar">{children}</div>
{children}
</div>
</> </>
); );
} }

View File

@ -1,20 +1,35 @@
body { html,
body,
#root {
display: flex;
flex-flow: column;
height: 100%;
max-height: 100%;
width: 100%;
max-width: 100%;
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
font-family: "consolas", sans-serif; font-family: "consolas", sans-serif;
background-color: white; background-color: white;
--background-image: url(https://source.unsplash.com/random/1920x1080/?blurry);
--nav-bar-height: 25px; --nav-bar-height: 25px;
--blog-card-width: 18rem; --blog-card-width: 18rem;
--blog-card-height: 20rem; --blog-card-height: 20rem;
--border-radii: 5px;
--blog-card-image-radius: 1px;
}
h1 {
padding: 0px;
margin: 0px;
} }
a { a {
text-decoration: none; text-decoration: none;
} }
.navBar { #navBar {
width: 100%;
height: var(--nav-bar-height); height: var(--nav-bar-height);
max-height: var(--nav-bar-height); max-height: var(--nav-bar-height);
max-width: 100%; max-width: 100%;
@ -32,7 +47,7 @@ a {
width: 100%; width: 100%;
max-height: 100%; max-height: 100%;
max-width: 100%; max-width: 100%;
border-radius: 5px; border-radius: var(--border-radii);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -67,7 +82,7 @@ a {
height: 100%; height: 100%;
border-style: solid; border-style: solid;
border-width: 5px; border-width: 5px;
border-radius: 10px; border-radius: var(--border-radii);
border-color: black; border-color: black;
background-color: white; background-color: white;
} }
@ -76,7 +91,7 @@ a {
width: var(--blog-card-width); width: var(--blog-card-width);
max-width: var(--blog-card-width); max-width: var(--blog-card-width);
max-height: var(--blog-card-width); max-height: var(--blog-card-width);
border-radius: 4px; border-radius: var(--blog-card-image-radius);
} }
.blogEntryBody { .blogEntryBody {
@ -103,3 +118,46 @@ a {
.blogEntryDescription { .blogEntryDescription {
} }
#page {
max-width: 100%;
max-height: 100%;
flex-grow: 1;
padding: 0px;
margin: 0px;
background: var(--background-image);
}
.centeredBoxArea {
width: 100%;
max-width: 100%;
height: 100%;
max-height: 100%;
padding: 0px;
margin: 0px;
display: flex;
justify-content: center;
align-items: center;
}
#loginBox {
padding: 20px;
border-radius: var(--border-radii);
display: flex;
background: white;
}
#loginBoxContents {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 20px;
}
#aboutBox {
padding: 20px;
border-radius: var(--border-radii);
display: flex;
background: white;
}

View File

@ -2,10 +2,16 @@ import * as React from "react";
export default function About() { export default function About() {
return ( return (
<main> <>
<div className="centeredBoxArea">
<div id="aboutBox">
<div>
<h1>This is an about me.</h1> <h1>This is an about me.</h1>
<p>Developed by Curt Spark</p> <p>Developed by Curt Spark</p>
<a href="https://git.cspark.dev/Blorg">Link to Project Page</a> <a href="https://git.cspark.dev/Blorg">Link to Project Page</a>
</main> </div>
</div>
</div>
</>
); );
} }

View File

@ -22,7 +22,7 @@ export default function Home() {
]; ];
return ( return (
<main> <>
<div className="blogEntryGrid"> <div className="blogEntryGrid">
{blogEntries.map((item, index) => ( {blogEntries.map((item, index) => (
<BlogEntryCard <BlogEntryCard
@ -34,6 +34,6 @@ export default function Home() {
></BlogEntryCard> ></BlogEntryCard>
))} ))}
</div> </div>
</main> </>
); );
} }

View File

@ -2,8 +2,15 @@ import * as React from "react";
export default function Login() { export default function Login() {
return ( return (
<main> <>
<h1>Login Page</h1> <div className="centeredBoxArea">
</main> <div id="loginBox">
<div id="loginBoxContents">
<h1>Login</h1>
<input value="Hi"></input>
</div>
</div>
</div>
</>
); );
} }