@meith/theme-midnight 0.1.0
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/LICENSE.md +165 -0
- package/package.json +32 -0
- package/src/index.ts +7 -0
- package/src/shared.tsx +22 -0
- package/src/slots/announcement.tsx +41 -0
- package/src/slots/board-index.tsx +37 -0
- package/src/slots/board-stats.tsx +55 -0
- package/src/slots/category-block.tsx +29 -0
- package/src/slots/footer.tsx +24 -0
- package/src/slots/forum-display.tsx +62 -0
- package/src/slots/forum-row.tsx +58 -0
- package/src/slots/header.tsx +53 -0
- package/src/slots/latest-posts.tsx +47 -0
- package/src/slots/latest-threads.tsx +44 -0
- package/src/slots/member-profile.tsx +91 -0
- package/src/slots/navigation.tsx +27 -0
- package/src/slots/notice.tsx +30 -0
- package/src/slots/pagination.tsx +38 -0
- package/src/slots/post-actions.tsx +26 -0
- package/src/slots/post-bit.tsx +182 -0
- package/src/slots/shell.tsx +20 -0
- package/src/slots/subforum-list.tsx +16 -0
- package/src/slots/thread-row.tsx +62 -0
- package/src/slots/thread-view.tsx +55 -0
- package/src/slots/user-panel.tsx +32 -0
- package/src/slots/who-is-online.tsx +55 -0
- package/src/theme.ts +59 -0
- package/src/tokens.ts +98 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { WhoIsOnlineModel } from '@meith/theme-kit'
|
|
2
|
+
|
|
3
|
+
import { UserRef } from '../shared'
|
|
4
|
+
|
|
5
|
+
export function WhoIsOnline({
|
|
6
|
+
guestCount,
|
|
7
|
+
members,
|
|
8
|
+
total,
|
|
9
|
+
recordCount,
|
|
10
|
+
recordAt,
|
|
11
|
+
fullListHref,
|
|
12
|
+
}: WhoIsOnlineModel) {
|
|
13
|
+
return (
|
|
14
|
+
<section aria-labelledby="who-is-online-heading" className="border border-border">
|
|
15
|
+
<h2
|
|
16
|
+
id="who-is-online-heading"
|
|
17
|
+
className="border-b border-border bg-secondary px-3 py-1 font-mono text-xs uppercase tracking-wide"
|
|
18
|
+
>
|
|
19
|
+
Online now — {total}
|
|
20
|
+
</h2>
|
|
21
|
+
<p className="px-3 py-2 text-xs">
|
|
22
|
+
{members.length === 0 ? (
|
|
23
|
+
<span className="text-muted-foreground">no members</span>
|
|
24
|
+
) : (
|
|
25
|
+
members.map((member, index) => (
|
|
26
|
+
<span key={member.username}>
|
|
27
|
+
{index > 0 && ', '}
|
|
28
|
+
<UserRef user={member} className="text-primary hover:underline" />
|
|
29
|
+
{member.isInvisible && (
|
|
30
|
+
<span className="ml-1 font-mono text-muted-foreground">(hidden)</span>
|
|
31
|
+
)}
|
|
32
|
+
</span>
|
|
33
|
+
))
|
|
34
|
+
)}
|
|
35
|
+
<span className="text-muted-foreground">
|
|
36
|
+
{' · '}
|
|
37
|
+
{guestCount} guests
|
|
38
|
+
</span>
|
|
39
|
+
</p>
|
|
40
|
+
<p className="border-t border-border px-3 py-1 font-mono text-xs text-muted-foreground">
|
|
41
|
+
<a href={fullListHref} className="hover:text-foreground">
|
|
42
|
+
full list
|
|
43
|
+
</a>
|
|
44
|
+
{' · record '}
|
|
45
|
+
{recordCount}
|
|
46
|
+
{recordAt !== null && (
|
|
47
|
+
<>
|
|
48
|
+
{' on '}
|
|
49
|
+
<time dateTime={recordAt.iso}>{recordAt.label}</time>
|
|
50
|
+
</>
|
|
51
|
+
)}
|
|
52
|
+
</p>
|
|
53
|
+
</section>
|
|
54
|
+
)
|
|
55
|
+
}
|
package/src/theme.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defaultTheme } from '@meith/theme-default'
|
|
2
|
+
import { defineTheme } from '@meith/theme-kit'
|
|
3
|
+
|
|
4
|
+
import { BoardIndex } from './slots/board-index'
|
|
5
|
+
import { BoardStats } from './slots/board-stats'
|
|
6
|
+
import { CategoryBlock } from './slots/category-block'
|
|
7
|
+
import { Footer } from './slots/footer'
|
|
8
|
+
import { ForumDisplay } from './slots/forum-display'
|
|
9
|
+
import { ForumRow } from './slots/forum-row'
|
|
10
|
+
import { Header } from './slots/header'
|
|
11
|
+
import { LatestPosts } from './slots/latest-posts'
|
|
12
|
+
import { LatestThreads } from './slots/latest-threads'
|
|
13
|
+
import { MemberProfile } from './slots/member-profile'
|
|
14
|
+
import { Navigation } from './slots/navigation'
|
|
15
|
+
import { Notice } from './slots/notice'
|
|
16
|
+
import { Announcement } from './slots/announcement'
|
|
17
|
+
import { Pagination } from './slots/pagination'
|
|
18
|
+
import { PostActions } from './slots/post-actions'
|
|
19
|
+
import { PostBit } from './slots/post-bit'
|
|
20
|
+
import { Shell } from './slots/shell'
|
|
21
|
+
import { SubforumList } from './slots/subforum-list'
|
|
22
|
+
import { ThreadRow } from './slots/thread-row'
|
|
23
|
+
import { ThreadView } from './slots/thread-view'
|
|
24
|
+
import { UserPanel } from './slots/user-panel'
|
|
25
|
+
import { WhoIsOnline } from './slots/who-is-online'
|
|
26
|
+
|
|
27
|
+
export const midnightTheme = defineTheme({
|
|
28
|
+
key: 'midnight',
|
|
29
|
+
title: 'Midnight',
|
|
30
|
+
extends: defaultTheme,
|
|
31
|
+
slots: {
|
|
32
|
+
Shell,
|
|
33
|
+
Header,
|
|
34
|
+
UserPanel,
|
|
35
|
+
Navigation,
|
|
36
|
+
Footer,
|
|
37
|
+
Notice,
|
|
38
|
+
Announcement,
|
|
39
|
+
|
|
40
|
+
BoardIndex,
|
|
41
|
+
CategoryBlock,
|
|
42
|
+
ForumRow,
|
|
43
|
+
BoardStats,
|
|
44
|
+
WhoIsOnline,
|
|
45
|
+
LatestThreads,
|
|
46
|
+
LatestPosts,
|
|
47
|
+
|
|
48
|
+
ForumDisplay,
|
|
49
|
+
ThreadRow,
|
|
50
|
+
SubforumList,
|
|
51
|
+
Pagination,
|
|
52
|
+
|
|
53
|
+
ThreadView,
|
|
54
|
+
PostBit,
|
|
55
|
+
PostActions,
|
|
56
|
+
|
|
57
|
+
MemberProfile,
|
|
58
|
+
},
|
|
59
|
+
})
|
package/src/tokens.ts
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export const LIGHT_TOKENS: Record<string, string> = {
|
|
2
|
+
background: 'oklch(0.9 0.008 240)',
|
|
3
|
+
foreground: 'oklch(0.24 0.02 240)',
|
|
4
|
+
surface: 'oklch(0.92 0.008 240)',
|
|
5
|
+
card: 'oklch(0.945 0.005 240)',
|
|
6
|
+
'card-foreground': 'oklch(0.24 0.02 240)',
|
|
7
|
+
primary: 'oklch(0.48 0.11 210)',
|
|
8
|
+
'primary-foreground': 'oklch(0.97 0.005 240)',
|
|
9
|
+
'primary-hover': 'oklch(0.41 0.1 210)',
|
|
10
|
+
secondary: 'oklch(0.87 0.012 240)',
|
|
11
|
+
'secondary-foreground': 'oklch(0.28 0.02 240)',
|
|
12
|
+
muted: 'oklch(0.885 0.008 240)',
|
|
13
|
+
'muted-foreground': 'oklch(0.46 0.018 240)',
|
|
14
|
+
accent: 'oklch(0.6 0.13 195)',
|
|
15
|
+
'accent-foreground': 'oklch(0.18 0.03 195)',
|
|
16
|
+
destructive: 'oklch(0.52 0.19 20)',
|
|
17
|
+
'destructive-foreground': 'oklch(0.97 0.005 240)',
|
|
18
|
+
border: 'oklch(0.78 0.012 240)',
|
|
19
|
+
input: 'oklch(0.61 0.012 240)',
|
|
20
|
+
ring: 'oklch(0.55 0.13 195)',
|
|
21
|
+
'shadow-tint': 'oklch(0.24 0.02 240 / 10%)',
|
|
22
|
+
radius: '0rem',
|
|
23
|
+
'density-unit': '0.2rem',
|
|
24
|
+
'font-mono-stack': '"IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace',
|
|
25
|
+
'font-sans-stack': '"IBM Plex Sans", ui-sans-serif, system-ui, sans-serif',
|
|
26
|
+
'font-heading-stack': 'var(--font-sans-stack)',
|
|
27
|
+
elevation: 'none',
|
|
28
|
+
'forum-unread': 'oklch(0.49 0.13 195)',
|
|
29
|
+
'forum-read': 'oklch(0.52 0.016 240)',
|
|
30
|
+
'forum-locked': 'oklch(0.52 0.1 20)',
|
|
31
|
+
'thread-pinned': 'oklch(0.5 0.14 150)',
|
|
32
|
+
'thread-locked': 'oklch(0.52 0.1 20)',
|
|
33
|
+
'thread-moved': 'oklch(0.52 0.016 240)',
|
|
34
|
+
'thread-unapproved': 'oklch(0.52 0.13 85)',
|
|
35
|
+
'thread-deleted': 'oklch(0.52 0.16 20)',
|
|
36
|
+
'post-highlight': 'oklch(0.86 0.05 195)',
|
|
37
|
+
'post-own': 'oklch(0.9 0.02 210)',
|
|
38
|
+
'post-unapproved': 'oklch(0.89 0.04 85)',
|
|
39
|
+
'moderation-pending': 'oklch(0.52 0.13 85)',
|
|
40
|
+
'moderation-approved': 'oklch(0.51 0.13 150)',
|
|
41
|
+
'moderation-rejected': 'oklch(0.52 0.17 20)',
|
|
42
|
+
'group-admin': 'oklch(0.5 0.17 20)',
|
|
43
|
+
'group-supermod': 'oklch(0.5 0.14 310)',
|
|
44
|
+
'group-mod': 'oklch(0.48 0.12 195)',
|
|
45
|
+
'group-banned': 'oklch(0.52 0.016 240)',
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const DARK_TOKENS: Record<string, string> = {
|
|
49
|
+
background: 'oklch(0.14 0.012 250)',
|
|
50
|
+
foreground: 'oklch(0.9 0.008 240)',
|
|
51
|
+
surface: 'oklch(0.157 0.013 250)',
|
|
52
|
+
card: 'oklch(0.175 0.014 250)',
|
|
53
|
+
'card-foreground': 'oklch(0.9 0.008 240)',
|
|
54
|
+
primary: 'oklch(0.78 0.12 195)',
|
|
55
|
+
'primary-foreground': 'oklch(0.14 0.012 250)',
|
|
56
|
+
'primary-hover': 'oklch(0.85 0.11 195)',
|
|
57
|
+
secondary: 'oklch(0.22 0.016 250)',
|
|
58
|
+
'secondary-foreground': 'oklch(0.88 0.008 240)',
|
|
59
|
+
muted: 'oklch(0.2 0.014 250)',
|
|
60
|
+
'muted-foreground': 'oklch(0.64 0.014 240)',
|
|
61
|
+
accent: 'oklch(0.8 0.13 195)',
|
|
62
|
+
'accent-foreground': 'oklch(0.14 0.012 250)',
|
|
63
|
+
destructive: 'oklch(0.65 0.19 20)',
|
|
64
|
+
'destructive-foreground': 'oklch(0.13 0.01 250)',
|
|
65
|
+
border: 'oklch(0.27 0.016 250)',
|
|
66
|
+
input: 'oklch(0.5 0.018 250)',
|
|
67
|
+
ring: 'oklch(0.8 0.13 195)',
|
|
68
|
+
'shadow-tint': 'oklch(0 0 0 / 50%)',
|
|
69
|
+
radius: '0rem',
|
|
70
|
+
'density-unit': '0.2rem',
|
|
71
|
+
'font-mono-stack': '"IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace',
|
|
72
|
+
'font-sans-stack': '"IBM Plex Sans", ui-sans-serif, system-ui, sans-serif',
|
|
73
|
+
'font-heading-stack': 'var(--font-sans-stack)',
|
|
74
|
+
elevation: 'none',
|
|
75
|
+
'forum-unread': 'oklch(0.8 0.13 195)',
|
|
76
|
+
'forum-read': 'oklch(0.59 0.016 250)',
|
|
77
|
+
'forum-locked': 'oklch(0.62 0.12 20)',
|
|
78
|
+
'thread-pinned': 'oklch(0.72 0.14 150)',
|
|
79
|
+
'thread-locked': 'oklch(0.62 0.12 20)',
|
|
80
|
+
'thread-moved': 'oklch(0.59 0.016 250)',
|
|
81
|
+
'thread-unapproved': 'oklch(0.76 0.14 90)',
|
|
82
|
+
'thread-deleted': 'oklch(0.64 0.16 20)',
|
|
83
|
+
'post-highlight': 'oklch(0.26 0.05 195)',
|
|
84
|
+
'post-own': 'oklch(0.19 0.02 210)',
|
|
85
|
+
'post-unapproved': 'oklch(0.25 0.045 85)',
|
|
86
|
+
'moderation-pending': 'oklch(0.72 0.15 90)',
|
|
87
|
+
'moderation-approved': 'oklch(0.7 0.13 150)',
|
|
88
|
+
'moderation-rejected': 'oklch(0.65 0.17 20)',
|
|
89
|
+
'group-admin': 'oklch(0.68 0.17 20)',
|
|
90
|
+
'group-supermod': 'oklch(0.7 0.13 310)',
|
|
91
|
+
'group-mod': 'oklch(0.78 0.12 195)',
|
|
92
|
+
'group-banned': 'oklch(0.59 0.016 250)',
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const BROWSER_THEME_COLOR = {
|
|
96
|
+
light: '#d9dfe3',
|
|
97
|
+
dark: '#060a0e',
|
|
98
|
+
} as const
|