website

#astro#js#html#css

git clone https://git.pyrossh.dev/website

木 Personal website of pyrossh. Built with astrojs, shiki, vite.


de5070apyrossh 2026-07-07T11:39:23+05:30
fix: add htmx attributes to file-layout sub-nav links
packages/shared/ui/src/file-layout.tsx CHANGED
@@ -27,6 +27,9 @@ export function FileLayout({ repo, file, request, children }: FileLayoutProps) {
27
27
  <a
28
28
  aria-current={pathname === `/repos/${repo.id}/files/${file.name}` ? "true" : "false"}
29
29
  href={`/repos/${repo.id}/files/${file.name}`}
30
+ hx-get={`/repos/${repo.id}/files/${file.name}`}
31
+ hx-target="#tab-content"
32
+ hx-push-url="true"
30
33
  >
31
34
  Contents
32
35
  </a>
@@ -38,6 +41,9 @@ export function FileLayout({ repo, file, request, children }: FileLayoutProps) {
38
41
  pathname === `/repos/${repo.id}/files/${file.name}/history` ? "true" : "false"
39
42
  }
40
43
  href={`/repos/${repo.id}/files/${file.name}/history`}
44
+ hx-get={`/repos/${repo.id}/files/${file.name}/history`}
45
+ hx-target="#tab-content"
46
+ hx-push-url="true"
41
47
  >
42
48
  History
43
49
  </a>
@@ -49,6 +55,9 @@ export function FileLayout({ repo, file, request, children }: FileLayoutProps) {
49
55
  pathname === `/repos/${repo.id}/files/${file.name}/blame` ? "true" : "false"
50
56
  }
51
57
  href={`/repos/${repo.id}/files/${file.name}/blame`}
58
+ hx-get={`/repos/${repo.id}/files/${file.name}/blame`}
59
+ hx-target="#tab-content"
60
+ hx-push-url="true"
52
61
  >
53
62
  Blame
54
63
  </a>