Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chibat committed Dec 25, 2023
1 parent 3708d9d commit 6b1af76
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 18 deletions.
32 changes: 20 additions & 12 deletions islands/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import { useEffect } from "preact/hooks";
import { shortcut } from "~/client/shortcut.ts";
import { DEFAULT_AVATOR } from "~/common/constants.ts";

export default function Header(props: { user?: { id: number, picture: string | null, notification: boolean }; authUrl?: string }) {
export default function Header(
props: {
user?: { id: number; picture: string | null; notification: boolean };
authUrl?: string;
},
) {
useEffect(() => {
shortcut();
}, []);
Expand Down Expand Up @@ -86,6 +91,20 @@ export default function Header(props: { user?: { id: number, picture: string | n
</svg>
</a>
</li>
<li class="nav-item">
<a
class="noDecoration nav-link"
href="/help"
>
<img
src="/assets/img/keyboard-fill.svg"
alt="Keyboard Shortcuts"
width="20"
height="20"
>
</img>
</a>
</li>
{props.user &&
(
<>
Expand Down Expand Up @@ -181,17 +200,6 @@ export default function Header(props: { user?: { id: number, picture: string | n
</a>
</li>
<li>
<a class="dropdown-item" href="/help">
<img
src="/assets/img/question-circle-fill.svg"
alt="Edit"
width="16"
height="16"
class="me-2"
>
</img>
Help
</a>
</li>
<li>
<hr class="dropdown-divider" />
Expand Down
8 changes: 6 additions & 2 deletions routes/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ export default defineRoute(async (req, _ctx) => {
Supabase
</a>(Postgres database)
</li>
<li><a href="https://github.com/features/actions" target="_blank">GitHub Actions</a>(Deploy and DB Backup)</li>
<li>
<a href="https://github.com/features/actions" target="_blank">
GitHub Actions
</a>(Deploy and DB Backup)
</li>
<li>Google OAuth</li>
</ul>
</li>
Expand Down Expand Up @@ -89,7 +93,7 @@ export default defineRoute(async (req, _ctx) => {
</a>
</li>
<li>
<a href="/help">Help</a>
<a href="/help">Keyboard Shortcuts</a>
</li>
</ul>
</main>
Expand Down
7 changes: 3 additions & 4 deletions routes/help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineRoute(async (req, _ctx) => {
return (
<>
<Head>
<title>Help - Leaves</title>
<title>Keyboard Shortcuts - Leaves</title>
<meta property="og:url" content="https://leaves.deno.dev/"></meta>
<meta property="og:title" content="Leaves"></meta>
<meta
Expand All @@ -35,9 +35,8 @@ export default defineRoute(async (req, _ctx) => {
class="me-2"
>
</img>
Help
Keyboard Shortcuts
</h1>
<h2>Keyboard Shortcut</h2>
<div class="post">
<table>
<thead>
Expand All @@ -48,7 +47,7 @@ export default defineRoute(async (req, _ctx) => {
</thead>
<tbody>
<tr>
<td>Help</td>
<td>Keyboard Shortcuts</td>
<td>?</td>
</tr>
<tr>
Expand Down
3 changes: 3 additions & 0 deletions static/assets/img/keyboard-fill.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 6b1af76

Please sign in to comment.