summaryrefslogblamecommitdiff
path: root/css/navBar.scss
blob: 2ef4d3a8e522c831dfef565ad42b91a54a86c1d3 (plain) (tree)
1
2
3
4
5
6
7
8
9
         

                                
                                       


                                                            

                                  
                                          
                              

                 
                                      
                                       
                                      
                                        
                                        
 

                                               
                                              



                                             
                                               

                 
                   

                                                       
                                                        
                                                         
                                                         
 
                                                         











                                                                               
                                                             

                                                                                         
                         
 
                                                                             
                                                             

                                                      
                         
 


                                                                         
                 

         
#navBar {
	align-items:     center;
	display:         flex;
	justify-content: space-between;
	left:            50%;
	max-width:       calc($contentWidth + $padding * 2);
	padding:         $padding;
	position:        absolute;
	top:             0;
	transform:       translateX(-50%);
	width:           100%;

	section {
		display:         flex;
		flex:            1 1 0;
		gap:             $gap;
		justify-content: center;
		text-align:      center;

		&:first-of-type {
			justify-content: start;
			text-align:      left;
		}

		&:last-of-type {
			justify-content: end;
			text-align:      right;
		}

		a {
			cursor:                pointer;
			font-weight:           bold;
			position:              relative;
			text-decoration:       underline;
			text-decoration-color: #00000000;

			&[aria-current = "page"]::after {
				background-color: var(--textColour);
				border-radius:    $separatorWidth;
				content:          "";
				display:          block;
				height:           $separatorWidth;
				left:             50%;
				position:         absolute;
				top:              calc(100% + $separatorWidth);
				transform:        translateX(-50%);
				width:            100%;
			}

			@media not (prefers-reduced-motion) {
				transition:                 text-decoration-color 0.125s;
				transition-timing-function: ease-in-out;
			}

			@media (orientation: portrait) or (pointer: coarse) {
				&:not(#home, #themeToggler) {
					display: none;
				}
			}

			&:hover {
				text-decoration-color: var(--textColour);
			}
		}
	}
}