Sticky menu in account settings

This commit is contained in:
Benjamin Bädorf 2022-11-27 04:30:19 +01:00
parent f4d97717bb
commit b591b83da9
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C
6 changed files with 67 additions and 11 deletions

View file

@ -56,7 +56,7 @@
</div> </div>
<main class="ps-main--page ps-page"> <main class="ps-main--page ps-page">
<header class="ps-page--header ps-header"> <header class="ps-page--header ps-header">
<h1 class="ps-header--title">pub.solar ID</h1> <a href="https://pub.solar/" class="ps-homelink">pub.solar/</a>
<nav class="ps-header--nav" role="navigation"> <nav class="ps-header--nav" role="navigation">
<ul class="ps-header--nav-list"> <ul class="ps-header--nav-list">
<#if realm.internationalizationEnabled> <#if realm.internationalizationEnabled>

View file

@ -98,6 +98,31 @@ html {
.ps-form-group .ps-button { .ps-form-group .ps-button {
align-self: flex-start; } align-self: flex-start; }
.ps-homelink {
position: fixed;
top: 0;
left: 0;
z-index: 100;
pointer-events: all;
color: var(--foreground);
background: white;
text-decoration: none;
text-align: center;
font-weight: 900;
font-size: 24px;
padding: 8px;
line-height: 1em;
text-shadow: 0.15vw 0px 0px white;
transition: text-shadow 0.1s ease;
border: 12px solid black;
border-top: 0;
border-left: 0; }
.ps-homelink:hover {
text-shadow: 0.3vw 0px 0px var(--accent); }
@media screen and (min-width: 1200px) {
.ps-homelink {
font-size: 32px;
padding: 12px; } }
.ps-main { .ps-main {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -121,6 +146,8 @@ html {
z-index: 1; } z-index: 1; }
.ps-main_full { .ps-main_full {
padding: 0; } padding: 0; }
.ps-main_full .ps-main--page {
overflow: hidden; }
.ps-header { .ps-header {
display: flex; display: flex;
@ -204,7 +231,8 @@ html {
max-width: unset; max-width: unset;
width: calc(100% - 8rem); width: calc(100% - 8rem);
margin: 4rem; margin: 4rem;
min-height: calc(100vh - 8rem); } height: calc(100vh - 8rem);
overflow: auto; }
.ps-page--section a { .ps-page--section a {
color: var(--accent); color: var(--accent);
border-bottom: 1px solid white; border-bottom: 1px solid white;
@ -253,16 +281,25 @@ html {
.ps-section-nav { .ps-section-nav {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; } flex-wrap: wrap;
position: sticky;
top: 0;
left: 0;
width: 100%;
background-color: var(--background);
border-bottom: 2px solid var(--foreground); }
.ps-section-nav--list { .ps-section-nav--list {
list-style: none; list-style: none;
display: flex; display: flex;
position: sticky; position: sticky;
margin: 0 -0.5rem; } margin: 0 -0.5rem; }
.ps-section-nav--link { .ps-section-nav--link {
margin: 0.5rem; } display: flex; }
.ps-section-nav--link a {
padding: 1rem 0.5rem; }
.ps-section-nav--link_active a { .ps-section-nav--link_active a {
color: var(--foreground); } color: var(--foreground);
border-bottom: 4px solid var(--foreground); }
.ps-section-nav--link_active a:hover { .ps-section-nav--link_active a:hover {
border-color: var(--foreground); } border-color: var(--foreground); }

View file

@ -36,6 +36,7 @@ html {
@import './input'; @import './input';
@import './form-group'; @import './form-group';
@import './homelink';
@import './main'; @import './main';
@import './header'; @import './header';
@import './page'; @import './page';

View file

@ -27,4 +27,8 @@
&_full { &_full {
padding: 0; padding: 0;
} }
&_full &--page {
overflow: hidden;
}
} }

View file

@ -54,7 +54,8 @@
max-width: unset; max-width: unset;
width: calc(100% - 8rem); width: calc(100% - 8rem);
margin: 4rem; margin: 4rem;
min-height: calc(100vh - 8rem); height: calc(100vh - 8rem);
overflow: auto;
} }
a { a {

View file

@ -2,6 +2,12 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
position: sticky;
top: 0;
left: 0;
width: 100%;
background-color: var(--background);
border-bottom: 2px solid var(--foreground);
&--list { &--list {
list-style: none; list-style: none;
@ -11,14 +17,21 @@
} }
&--link { &--link {
margin: 0.5rem; display: flex;
&_active a { a {
padding: 1rem 0.5rem;
}
&_active {
a {
color: var(--foreground); color: var(--foreground);
border-bottom: 4px solid var(--foreground);
&:hover { &:hover {
border-color: var(--foreground); border-color: var(--foreground);
} }
} }
} }
}
} }