-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
try to addrress a couple accessibility audit issues
- Loading branch information
Showing
3 changed files
with
42 additions
and
29 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import Html from "@kitajs/html"; | ||
import { Session } from "lucia"; | ||
|
||
export function Header({ session }: { session: Session }) { | ||
return ( | ||
<div class="w-full mt-1"> | ||
{session ? ( | ||
<> | ||
<p class="text-gray-800 float-left" safe> | ||
We've been waiting for you, {session.user.name}. | ||
</p> | ||
<a | ||
href="/api/auth/signout" | ||
class="float-right i-octicon-sign-out text-white transition duration-200 hover:bg-black" | ||
> | ||
Log Out | ||
</a> | ||
{session.user.roles.includes("ADMIN") ? ( | ||
<a | ||
href="/admin/new-post" | ||
class="float-right i-octicon-diff-added text-white transition duration-200 hover:bg-black" | ||
> | ||
New Post | ||
</a> | ||
) : null} | ||
</> | ||
) : ( | ||
<a | ||
href="/api/auth/#/github" | ||
hx-boost="false" | ||
class="float-right i-octicon-sign-in text-white transition duration-200 hover:bg-black" | ||
> | ||
Log In | ||
</a> | ||
)} | ||
</div> | ||
); | ||
} |
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