Skip to content

Commit

Permalink
Working on positioning nav, next need to make it respect the position…
Browse files Browse the repository at this point in the history
…s of other components.
  • Loading branch information
Oia20 committed Apr 23, 2024
1 parent 7e50e68 commit 56f0da0
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 6 deletions.
8 changes: 4 additions & 4 deletions CropSQL/Pages/Components/Home.razor
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@page "/"
@page "/home"

<PageTitle>Home</PageTitle>
<PageTitle>CropSQL</PageTitle>
<WelcomeModal />
<Header />

<h1>Hello, world!</h1>
<p>
<SideBarNav />
<h1 class="content1">Hello, world!</h1>
<p class="content1">
Welcome to crop sql!
</p>
3 changes: 3 additions & 0 deletions CropSQL/Pages/Components/Home.razor.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.content1 {
width: fit-content;
}
9 changes: 9 additions & 0 deletions CropSQL/Pages/Components/SideBarNav.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- SidebarNav.razor -->
<div class="sidebar">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
30 changes: 30 additions & 0 deletions CropSQL/Pages/Components/SideBarNav.razor.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* SidebarNav.razor.css */
.sidebar {
position:relative;
left: 0;
height:90vh;
width: 200px;
background-color: #333;
color: #fff;
padding-top: 20px;
}

.sidebar ul {
list-style-type: none;
padding: 0;
}

.sidebar ul li {
margin-bottom: 10px;
}

.sidebar ul li a {
display: block;
padding: 10px;
color: #fff;
text-decoration: none;
}

.sidebar ul li a:hover {
background-color: #555;
}
2 changes: 2 additions & 0 deletions CropSQL/Pages/Components/WelcomeModal.razor.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
display: flex;
justify-content: center;
align-items: center;
z-index: 500;

}

.modalBack {
Expand Down
5 changes: 3 additions & 2 deletions CropSQL/wwwroot/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

html, body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
height: 100vh;
background-color: #a2b780;
height:100vh;
background-image: linear-gradient(180deg, #a2b780, #5e8d61);

}

h1:focus {
Expand Down

0 comments on commit 56f0da0

Please sign in to comment.