@meith/theme-midnight 0.2.0 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meith/theme-midnight",
3
- "version": "0.2.0",
3
+ "version": "0.3.3",
4
4
  "description": "A dark theme for Meith, built on the default theme's slots.",
5
5
  "license": "LGPL-3.0-or-later",
6
6
  "repository": {
@@ -20,8 +20,8 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@meith/theme-default": "^0.2.0",
24
- "@meith/theme-kit": "^0.2.0"
23
+ "@meith/theme-default": "^0.3.3",
24
+ "@meith/theme-kit": "^0.3.3"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "react": "^19.2.0"
@@ -2,23 +2,31 @@ import type { BoardIndexModel } from '@meith/theme-kit'
2
2
 
3
3
  export function BoardIndex({ markAllReadAction, regions }: BoardIndexModel) {
4
4
  const latest = regions.latest ?? null
5
+ const hasRail = latest !== null || regions.online !== null || regions.stats !== null
5
6
 
6
7
  return (
7
8
  <div className="flex flex-col gap-3 p-3">
8
- {latest !== null && <div className="flex flex-col gap-3">{latest}</div>}
9
-
10
- {(regions.online !== null || regions.stats !== null) && (
11
- <div className="flex flex-col gap-3">
12
- {regions.online}
13
- {regions.stats}
14
- </div>
15
- )}
16
-
17
9
  {regions.announcements !== undefined && (
18
10
  <div className="flex flex-col gap-3">{regions.announcements}</div>
19
11
  )}
20
12
 
21
- <div className="flex flex-col gap-3">{regions.categories}</div>
13
+ <div
14
+ className={
15
+ hasRail
16
+ ? 'grid items-start gap-3 lg:grid-cols-[minmax(0,1fr)_20rem]'
17
+ : 'flex min-w-0 flex-col gap-3'
18
+ }
19
+ >
20
+ <div className="flex min-w-0 flex-col gap-3">{regions.categories}</div>
21
+
22
+ {hasRail && (
23
+ <aside aria-label="Board activity" className="flex min-w-0 flex-col gap-3">
24
+ {latest}
25
+ {regions.online}
26
+ {regions.stats}
27
+ </aside>
28
+ )}
29
+ </div>
22
30
 
23
31
  {regions.plugins}
24
32
 
@@ -17,7 +17,7 @@ export function BoardStats({
17
17
  >
18
18
  Board statistics
19
19
  </h2>
20
- <dl className="grid grid-cols-2 gap-x-4 gap-y-1 px-3 py-2 font-mono text-xs sm:grid-cols-4">
20
+ <dl className="grid grid-cols-2 gap-x-4 gap-y-1 px-3 py-2 font-mono text-xs md:grid-cols-4 lg:grid-cols-2">
21
21
  <div>
22
22
  <dt className="text-muted-foreground">threads</dt>
23
23
  <dd>{threadCount}</dd>
@@ -13,7 +13,13 @@ export function CategoryBlock({ category, children }: CategoryBlockModel) {
13
13
  {category.description}
14
14
  </p>
15
15
  )}
16
- <table className="w-full border-collapse text-sm">
16
+ <table className="w-full table-fixed border-collapse text-sm">
17
+ <colgroup>
18
+ <col />
19
+ <col className="w-16" />
20
+ <col className="w-16" />
21
+ <col className="w-64" />
22
+ </colgroup>
17
23
  <thead className="sr-only">
18
24
  <tr>
19
25
  <th scope="col">Forum</th>
@@ -18,11 +18,10 @@ export function LatestPosts({ posts, capturedAt }: LatestPostsModel) {
18
18
  <ul className="divide-y divide-border font-mono text-xs">
19
19
  {posts.map((post) => (
20
20
  <li key={post.href} className="px-3 py-1.5">
21
- <a href={post.href} className="text-primary hover:underline">
21
+ <a href={post.href} className="block truncate text-primary hover:underline">
22
22
  {post.threadTitle}
23
23
  </a>
24
- <span className="text-muted-foreground">
25
- {' · '}
24
+ <p className="truncate text-muted-foreground">
26
25
  <a href={post.forum.href} className="hover:text-foreground">
27
26
  {post.forum.label}
28
27
  </a>
@@ -30,7 +29,7 @@ export function LatestPosts({ posts, capturedAt }: LatestPostsModel) {
30
29
  <UserRef user={post.author} className="hover:text-foreground" />
31
30
  {' · '}
32
31
  <time dateTime={post.postedAt.iso}>{post.postedAt.label}</time>
33
- </span>
32
+ </p>
34
33
  {post.excerpt !== '' && (
35
34
  <p className="line-clamp-2 text-muted-foreground">{post.excerpt}</p>
36
35
  )}
@@ -18,11 +18,10 @@ export function LatestThreads({ threads, capturedAt }: LatestThreadsModel) {
18
18
  <ul className="divide-y divide-border font-mono text-xs">
19
19
  {threads.map((thread) => (
20
20
  <li key={thread.href} className="px-3 py-1.5">
21
- <a href={thread.href} className="text-primary hover:underline">
21
+ <a href={thread.href} className="block truncate text-primary hover:underline">
22
22
  {thread.title}
23
23
  </a>
24
- <span className="text-muted-foreground">
25
- {' · '}
24
+ <p className="truncate text-muted-foreground">
26
25
  <a href={thread.forum.href} className="hover:text-foreground">
27
26
  {thread.forum.label}
28
27
  </a>
@@ -30,7 +29,7 @@ export function LatestThreads({ threads, capturedAt }: LatestThreadsModel) {
30
29
  <UserRef user={thread.author} className="hover:text-foreground" />
31
30
  {' · '}
32
31
  <time dateTime={thread.startedAt.iso}>{thread.startedAt.label}</time>
33
- </span>
32
+ </p>
34
33
  </li>
35
34
  ))}
36
35
  </ul>
@@ -5,6 +5,8 @@ export function UserPanel({
5
5
  links,
6
6
  unreadNotifications,
7
7
  unreadMessages,
8
+ notificationsHref,
9
+ messagesHref,
8
10
  children,
9
11
  }: UserPanelModel) {
10
12
  return (
@@ -14,10 +16,16 @@ export function UserPanel({
14
16
  </span>
15
17
 
16
18
  {unreadNotifications > 0 && (
17
- <span className="text-accent">[{unreadNotifications} new]</span>
19
+ <a href={notificationsHref} className="text-accent hover:underline">
20
+ [{unreadNotifications} new]
21
+ <span className="sr-only"> notifications</span>
22
+ </a>
18
23
  )}
19
24
  {unreadMessages > 0 && (
20
- <span className="text-accent">[{unreadMessages} pm]</span>
25
+ <a href={messagesHref} className="text-accent hover:underline">
26
+ [{unreadMessages} pm]
27
+ <span className="sr-only"> unread messages</span>
28
+ </a>
21
29
  )}
22
30
 
23
31
  {links.map((link) => (