feat: further optimized page layout

This commit is contained in:
moonleay 2024-01-26 22:48:22 +01:00
parent 77766b95f0
commit 2d3a0f1b1b
Signed by: moonleay
GPG key ID: 82667543CCD715FB
6 changed files with 79 additions and 22 deletions

View file

@ -1,5 +1,8 @@
<footer> <footer class="footer">
<p></p> <div class="footerline"></div>
<div class="content">
<p class="footertxt"><a href="/guidelines">Guidelines</a> | <a href="/rules">Rules</a> | <a href="https://git.moonleay.net/Websites/FediNews">Code</a> | <a href="/modlog">Modlog</a> | <a href="/legal">Legal</a> | <a href="/imprint">Imprint</a> | <a href="/privacy-policy">Privacy Policy</a></p>
</div>
</footer> </footer>
@code { @code {

View file

@ -0,0 +1,36 @@
.footer {
display: flex;
flex-direction: column;
padding: 0.5rem;
margin-top: 0.5rem;
}
.content {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin: 1rem auto auto;
}
.footerline {
display: flex;
width: 100%;
height: 2px;
background-color: #8422e8;
}
.footertxt a {
color: grey;
text-decoration: none;
font-size: 0.7rem;
}
.footertxt a:hover {
text-decoration: underline;
}
.footertxt {
color: grey;
font-size: 0.8rem;
}

View file

@ -4,10 +4,12 @@
<NavBar/> <NavBar/>
<main> <main>
<article class="content px-4"> <div class="content px-4">
@Body @Body
</article> </div>
</main> </main>
<Footer/>
</div> </div>
<div id="blazor-error-ui"> <div id="blazor-error-ui">

View file

@ -3,13 +3,17 @@
flex-direction: column; flex-direction: column;
align-content: center; align-content: center;
max-width: 1000px; /*min-width: 600px;*/
width: 85%;
margin: 8px auto auto; margin: 8px auto auto;
background-color: #f6f6ef; background-color: #f6f6ef;
} }
@media (max-width: 1000px) { @media (max-width: 600px) {
margin: 0 auto auto; .page {
margin: 0 auto auto;
width: 100%;
}
} }
#blazor-error-ui { #blazor-error-ui {
@ -24,9 +28,9 @@
z-index: 1000; z-index: 1000;
} }
#blazor-error-ui .dismiss { #blazor-error-ui .dismiss {
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
right: 0.75rem; right: 0.75rem;
top: 0.5rem; top: 0.5rem;
} }

View file

@ -1,8 +1,8 @@
<nav> <nav class="navigation">
<div class="navigation"> <a class="logo" href="/">
<a class="logo" href="/"> <img src="logo.png" alt="F"/>
<img src="logo.png" alt="F"/> </a>
</a> <div class="pagenav">
<a class="name" href="/"><span>Fedi News</span></a> <a class="name" href="/"><span>Fedi News</span></a>
<div class="navlinks"> <div class="navlinks">
<a class="new" href="/new">new</a> <a class="new" href="/new">new</a>
@ -11,9 +11,9 @@
<span>|</span> <span>|</span>
<a class="submit" href="/submit">submit</a> <a class="submit" href="/submit">submit</a>
</div> </div>
<div class="account"> </div>
<a href="/login">login</a> <div class="account">
</div> <a href="/login">login</a>
</div> </div>
</nav> </nav>

View file

@ -1,6 +1,5 @@
nav { nav {
display: flex; display: flex;
flex-direction: column;
background-color: #8422e8; background-color: #8422e8;
position: sticky; position: sticky;
color: white !important; color: white !important;
@ -29,6 +28,14 @@ nav {
align-items: center; align-items: center;
} }
@media(min-width: 601px) {
.pagenav {
display: flex;
flex-direction: row;
align-items: center;
}
}
.name { .name {
font-weight: bolder; font-weight: bolder;
margin-right: 0.6rem; margin-right: 0.6rem;
@ -43,6 +50,11 @@ nav {
.navlinks a { .navlinks a {
color: white; color: white;
text-decoration: none;
}
.navlinks a:hover {
text-decoration: underline !important;
} }
.account { .account {