Added some styles; added a basic main navigation side bar

This commit is contained in:
Gregory Ballantine 2022-12-07 18:55:12 -05:00
parent 156759d1cd
commit 1736e7e457
2 changed files with 71 additions and 1 deletions

View File

@ -1,3 +1,62 @@
$nav-width: 200px;
$box-shadow-1: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
$box-shadow-2: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
body{ body{
background: lightgrey; background: lightgrey;
} }
#main-nav{
position: fixed;
top: 0;
left: 0;
width: $nav-width;
height: 100%;
padding: 20px 0;
background: #212121;
color: white;
box-shadow: $box-shadow-1;
box-sizing: border-box;
h3{
text-align: center;
}
ul{
list-style: none;
li{
margin: 0;
border-bottom: 1px solid #999;
&:first-child{
border-top: 1px solid #999;
}
}
a{
display: block;
box-sizing: border-box;
width: $nav-width;
padding: 10px 15px;
color: limegreen;
font-size: 2.5rem;
text-decoration: none;
transition: all 230ms ease-in-out;
&:hover{
background: rgba(255, 255, 255, 0.1);
}
}
}
}
#main-wrapper{
max-width: 1200px;
margin-top: 25px;
padding: 20px 30px;
background: white;
border-radius: 5px;
box-shadow: $box-shadow-2;
}

View File

@ -9,6 +9,17 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
</head> </head>
<body> <body>
<%= yield %> <!-- Main navigation -->
<nav id="main-nav">
<h3>Raven</h3>
<ul>
<li><a href="/item/list">Items</a></li>
<li><a href="/license/list">Licenses</a></li>
</ul>
</nav>
<div id="main-wrapper" class="container">
<%= yield %>
</div>
</body> </body>
</html> </html>