Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
- /*Creates variables for colors used throughout the stylesheet*/
- :root {
- --base-clr: #11121a;
- --line-clr: #42434a;
- --hover-clr: #222533;
- --text-clr: #e6e6ef;
- --accent-clr: #5e63ff;
- --secondary-text-clr: #b0b3c1;
- }
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- font-family: 'Poppins', sans-serif;
- }
- html {
- scroll-behavior: smooth;
- font-family: Poppins, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
- line-height: 1.5rem;
- }
- body {
- min-height: 100vh;
- max-height: 100dvh;
- background-color: var(--base-clr);
- color: var(--text-clr);
- display: grid;
- grid-template-columns: auto 1fr;
- }
- #sideBar {
- box-sizing: border-box;
- height: 100vh;
- width: 250px;
- padding: 5px 1em;
- background-color: var(--base-clr);
- border-right: 1px solid var(--line-clr);
- position: sticky;
- top: 0;
- align-self: start;
- transition: 300ms ease-in-out;
- overflow: hidden; /*This ensures the navbar does not overflow when the screen is resized*/
- white-space: nowrap; /*This ensures the text does not wrap - the property for this used to be "text-wrap" but aparently has changed to "white-space"*/
- }
- #sideBar.close {
- padding: 5px;
- width: 60px;
- }
- #sideBar ul {
- list-style: none;
- padding: 0;
- }
- #sideBar > ul > li:first-child {
- display: flex;
- justify-content: flex-end;
- margin-bottom: 16px;
- }
- #sideBar > ul > li:first-child .logo {
- font-weight: 600;
- }
- /*coloring the active page button text and icon(svg) in the navbar. This ensures the user always knows which page they are on*/
- #sideBar ul li.active a {
- color: var(--accent-clr);
- }
- #sideBar ul li.active a svg {
- fill: var(--accent-clr);
- }
- /*Styling the links in the navbar*/
- #sideBar a, #sideBar .dropdown-btn, #sideBar .logo {
- border-radius: .5em;
- padding: .85em;
- text-decoration: none;
- color: var(--text-clr);
- display: flex;
- align-items: center;
- gap: 1em;
- }
- /*Styling the dropdown buttons*/
- .dropdown-btn {
- width: 100%;
- text-align: left;
- background: none;
- border: none;
- font: inherit;
- cursor: pointer;
- }
- /*Styling all SVG*/
- #sideBar svg {
- flex-shrink: 0;
- fill: var(--text-clr);
- }
- /*Styling the spans*/
- #sideBar a span, #sideBar .dropdown-btn span {
- flex-grow: 1;
- /*flex-grow 1 makes sure the span takes up the remaing space in the container*/
- }
- /*Styling the dropdown content when hovering*/
- #sideBar a:hover, #sideBar .dropdown-btn:hover {
- background-color: var(--hover-clr);
- }
- #sideBar .submenu {
- display: grid;
- grid-template-rows: 0fr;
- transition: 300ms ease-in-out;
- }
- #sideBar .submenu > div {
- overflow: hidden;
- }
- #sideBar .submenu.show {
- grid-template-rows: 1fr;
- }
- .rotate svg:last-child {
- transform: rotate(180deg);
- }
- .dropdown-btn svg {
- transition: 300ms ease;
- }
- /*Indentation of the anchors (elements) in the sub-navbar (Bandmedlemmer)*/
- #sideBar .submenu a {
- padding-left: 4em;
- }
- /*Styling the toggle navbar button*/
- #toggle-btn {
- margin-left: auto;
- padding: 1em;
- border: none;
- border-radius: .5em;
- background: none;
- cursor: pointer;
- }
- #toggle-btn svg {
- transition: transform 150ms;
- }
- #toggle-btn:hover {
- background-color: var(--hover-clr);
- }
- #toggle-btn:hover {
- background-color: var(--hover-clr);
- }
- main {
- padding: min(30px, 7%);
- }
- main p {
- color: var(--secondary-text-clr);
- margin-top: 5px;
- margin-bottom: 15px;
- }
- @media(max-width: 800px){
- body{
- grid-template-columns: 1fr;
- }
- main{
- padding: 2em 1em 60px 1em;
- }
- .container{
- border: none;
- padding: 0;
- }
- #sideBar {
- height: 60px;
- width: 100%;
- border-right: none;
- border-top: 1px solid var(--line-clr);
- padding: 0;
- position: fixed;
- top: unset;
- bottom: 0;
- > ul {
- padding: 0;
- display: grid;
- grid-auto-columns: 60px;
- grid-auto-flow: column;
- }
- }
- ul li span, ul li:first-child, .dropdown-btn svg:last-child{
- display: none;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement