Skip to content

Commit

Permalink
Basic Navbar setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelcanosantana committed Nov 25, 2023
1 parent e6d7505 commit 33f5674
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CirsaHackaton.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<Content Include="StaticFiles\Images\BlackLogo.svg" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
Expand Down
2 changes: 1 addition & 1 deletion CirsaHackaton.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34316.72
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CirsaHackaton", "CirsaHackaton.csproj", "{F5F436AE-CDAB-45AB-99A3-92C58B3E144E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CirsaHackaton", "CirsaHackaton.csproj", "{F5F436AE-CDAB-45AB-99A3-92C58B3E144E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
7 changes: 1 addition & 6 deletions Layout/MainLayout.razor
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
@inherits LayoutComponentBase
<div class="page">
<div class="sidebar">
<NavMenu />
</div>

<main>
<div class="top-row px-4">
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
</div>
<NavBar></NavBar>

<article class="content px-4">
@Body
Expand Down
57 changes: 57 additions & 0 deletions Layout/NavBar.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<link rel="stylesheet" href="~/css/bootstrap/bootstrap.min.css" />

<style>
.app-navbar {
min-width: 1000px;
}
</style>

<nav class="navbar navbar-expand-lg bg-body-tertiary app-navbar" style="background-color: #f3ecce">
<div class="container-fluid">

<!-- Logo -->
<a class="navbar-brand" href="#">
<img src="../StaticFiles/Images/BlackLogo.svg" alt="Bootstrap" width="30" height="24">
</a>

<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Dropdown
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link disabled" aria-disabled="true">Disabled</a>
</li>
</ul>
<form class="d-flex" role="search">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
</div>
</div>
</nav>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>

@code {

}
1 change: 1 addition & 0 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using CirsaHackaton;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.FileProviders;

var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
Expand Down
9 changes: 9 additions & 0 deletions StaticFiles/Images/BlackLogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 33f5674

Please sign in to comment.