This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add responsive menu chore: replace all `class` attributes with `className` Update coffee-bear.png
- Loading branch information
Showing
4 changed files
with
67 additions
and
50 deletions.
There are no files selected for viewing
Binary file modified
BIN
+293 KB
(130%)
src/EducationTrail/ClientApp/src/assets/images/coffee-bear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,76 @@ | ||
import React, { Component } from "react"; | ||
import EducationTrailEmblem from "../assets/images/education_trail_emblem.png"; | ||
|
||
export function hamburgerClicked() { | ||
document.getElementById("mobile-menu").classList.toggle("hidden"); | ||
} | ||
|
||
export class NavMenu extends Component { | ||
static displayName = NavMenu.name; | ||
|
||
render() { | ||
return ( | ||
<nav class="navbar bg-base-100"> | ||
{/* navbar container right */} | ||
<div class="navbar-start"> | ||
<div class="navbrand"> | ||
<a | ||
className="btn btn-ghost normal-case text-xl" | ||
href="/" | ||
> | ||
<div class="w-10 rounded-full"> | ||
<img | ||
src={EducationTrailEmblem} | ||
alt="The education trail's emblem." | ||
className="mask mask-circle shadow-xl" | ||
/> | ||
</div> | ||
<h3 class="hidden sm:block">The Education Trail</h3> | ||
</a> | ||
</div> | ||
{/* navbar navigation */} | ||
<div className="hidden w-full md:flex md:items-center md:w-auto"> | ||
<ul className="menu menu-horizontal px-1"> | ||
<li> | ||
<a className="text-dark" href="/"> | ||
Home | ||
</a> | ||
</li> | ||
<li> | ||
<a className="text-dark" href="/counter"> | ||
Counter | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
<nav className="navbar bg-base-100"> | ||
{/* navbar container right */} | ||
<div className="navbar-start"> | ||
<div className="navbrand"> | ||
<a className="btn btn-ghost normal-case text-xl" href="/"> | ||
<div className="w-10 rounded-full"> | ||
<img | ||
src={EducationTrailEmblem} | ||
alt="The education trail's emblem." | ||
className="mask mask-circle shadow-xl" | ||
/> | ||
</div> | ||
<h3 className="hidden sm:block">The Education Trail</h3> | ||
</a> | ||
</div> | ||
{/* navbar end */} | ||
<div class="navbar-end"> | ||
{/* search? login? */} | ||
<div> | ||
|
||
</div> | ||
{/* mobile navburger */} | ||
<div class="cursor-pointer md:hidden block"> | ||
<button class="btn btn-ghost auto"> | ||
<span class="i-fa-solid-bars auto text-xl"></span> | ||
</button> | ||
</div> | ||
{/* navbar navigation */} | ||
<div className="hidden w-full md:flex md:items-center md:w-auto"> | ||
<ul className="menu menu-horizontal px-1"> | ||
<li> | ||
<a className="text-dark" href="/"> | ||
Home | ||
</a> | ||
</li> | ||
<li> | ||
<a className="text-dark" href="/counter"> | ||
Counter | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
{/* navbar end */} | ||
<div className="navbar-end"> | ||
{/* search? login? */} | ||
<div></div> | ||
{/* mobile navburger */} | ||
<div className="cursor-pointer md:hidden block"> | ||
<button className="btn btn-ghost auto" onClick={hamburgerClicked}> | ||
<span className="i-fa-solid-bars auto text-xl"></span> | ||
</button> | ||
</div> | ||
{/* mobile menu */} | ||
<div | ||
class="hidden md:hidden fixed top-0 right-0 bg-base-100 w-full h-full z-50" | ||
id="mobile-menu" | ||
> | ||
<ul class="menu p-4"> | ||
<li> | ||
<a class="text-dark" href="/"> | ||
Home | ||
</a> | ||
</li> | ||
<li> | ||
<a class="text-dark" href="/counter"> | ||
Counter | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</nav> | ||
</div> | ||
</nav> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters