@meith/theme-clubhouse 0.35.0 → 0.36.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/package.json +4 -4
- package/src/copy.ts +2 -1
- package/src/shared.tsx +3 -3
- package/src/slots/forum-row.tsx +4 -4
- package/src/slots/header.tsx +2 -104
- package/src/slots/thread-row.tsx +4 -4
- package/src/theme.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meith/theme-clubhouse",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "A sports club theme for Meith — GAA, soccer, basketball — painted from the club's own two colours.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@meith/theme-default": "^0.
|
|
24
|
-
"@meith/theme-kit": "^0.
|
|
25
|
-
"@meith/ui": "^0.
|
|
23
|
+
"@meith/theme-default": "^0.36.0",
|
|
24
|
+
"@meith/theme-kit": "^0.36.0",
|
|
25
|
+
"@meith/ui": "^0.36.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": "^19.2.0"
|
package/src/copy.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { mobileHeaderNavCopy } from '@meith/theme-default'
|
|
1
2
|
import type { SlotCopy, Translator } from '@meith/theme-kit'
|
|
2
3
|
|
|
3
4
|
function copyFor(t: Translator, keys: readonly string[]): SlotCopy {
|
|
@@ -71,7 +72,7 @@ export function forumRowCopy(t: Translator): SlotCopy {
|
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
export function headerCopy(t: Translator): SlotCopy {
|
|
74
|
-
return copyFor(t, ['clubhouse.header.boardSections'])
|
|
75
|
+
return { ...mobileHeaderNavCopy(t), ...copyFor(t, ['clubhouse.header.boardSections']) }
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
export function latestPostsCopy(t: Translator): SlotCopy {
|
package/src/shared.tsx
CHANGED
|
@@ -34,10 +34,10 @@ export const TAB =
|
|
|
34
34
|
'inline-flex h-11 items-center px-3.5 text-sm font-bold tracking-[0.03em] whitespace-nowrap uppercase transition-colors'
|
|
35
35
|
|
|
36
36
|
export const BUTTON =
|
|
37
|
-
'inline-flex h-8 items-center rounded-sm px-3 text-[0.6875rem] font-bold tracking-[0.08em] whitespace-nowrap uppercase transition-colors'
|
|
37
|
+
'inline-flex h-8 pointer-coarse:min-h-11 items-center rounded-sm px-3 text-[0.6875rem] font-bold tracking-[0.08em] whitespace-nowrap uppercase transition-colors'
|
|
38
38
|
|
|
39
39
|
export const TABLE_ROW =
|
|
40
|
-
'grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-1.5 px-4 py-2.5
|
|
40
|
+
'grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-1.5 px-4 py-2.5 @3xl/card:grid-cols-[auto_minmax(0,1fr)_4.5rem_4.5rem_14rem] @3xl/card:items-center'
|
|
41
41
|
|
|
42
42
|
export function ClubBar({ className }: { className?: string }) {
|
|
43
43
|
return (
|
|
@@ -72,7 +72,7 @@ export function ColumnHeads({
|
|
|
72
72
|
return (
|
|
73
73
|
<div
|
|
74
74
|
aria-hidden="true"
|
|
75
|
-
className={`hidden border-b-2 border-b-secondary bg-surface
|
|
75
|
+
className={`hidden border-b-2 border-b-secondary bg-surface @3xl/card:grid ${TABLE_ROW} py-1.5`}
|
|
76
76
|
>
|
|
77
77
|
<span />
|
|
78
78
|
<span className={MICRO}>{first}</span>
|
package/src/slots/forum-row.tsx
CHANGED
|
@@ -41,18 +41,18 @@ export function ForumRow({ forum, copy }: ForumRowSlotModel & { copy: SlotCopy }
|
|
|
41
41
|
|
|
42
42
|
{!isLink && (
|
|
43
43
|
<>
|
|
44
|
-
<span className="col-start-2
|
|
44
|
+
<span className="col-start-2 @3xl/card:col-start-3 @3xl/card:block @3xl/card:text-right">
|
|
45
45
|
<Tally value={forum.threadCount} label={c('threads')} />
|
|
46
|
-
<span className="ms-3
|
|
46
|
+
<span className="ms-3 @3xl/card:hidden">
|
|
47
47
|
<Tally value={forum.postCount} label={c('posts')} />
|
|
48
48
|
</span>
|
|
49
49
|
</span>
|
|
50
50
|
|
|
51
|
-
<span className="hidden
|
|
51
|
+
<span className="hidden @3xl/card:block @3xl/card:text-right">
|
|
52
52
|
<Tally value={forum.postCount} label={c('posts')} />
|
|
53
53
|
</span>
|
|
54
54
|
|
|
55
|
-
<div className="col-start-2 min-w-0 text-xs text-muted-foreground
|
|
55
|
+
<div className="col-start-2 min-w-0 text-xs text-muted-foreground @3xl/card:col-start-5">
|
|
56
56
|
{forum.lastPost === null ? (
|
|
57
57
|
<span className={MICRO}>{c('noPostsYet')}</span>
|
|
58
58
|
) : (
|
package/src/slots/header.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MobileHeaderNav } from '@meith/theme-default'
|
|
1
2
|
import type { HeaderModel, SlotCopy } from '@meith/theme-kit'
|
|
2
3
|
import { fromSlotCopy, linkTarget } from '@meith/theme-kit'
|
|
3
4
|
|
|
@@ -54,90 +55,6 @@ function Submenu({ items }: { items: HeaderModel['navigation'][number]['submenu'
|
|
|
54
55
|
)
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
function Chevron({ className }: { className: string }) {
|
|
58
|
-
return (
|
|
59
|
-
<svg
|
|
60
|
-
aria-hidden="true"
|
|
61
|
-
viewBox="0 0 12 12"
|
|
62
|
-
className={className}
|
|
63
|
-
fill="none"
|
|
64
|
-
stroke="currentColor"
|
|
65
|
-
strokeWidth="1.5"
|
|
66
|
-
strokeLinecap="round"
|
|
67
|
-
strokeLinejoin="round"
|
|
68
|
-
>
|
|
69
|
-
<path d="m4.5 3 3 3-3 3" />
|
|
70
|
-
</svg>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function MobileNavItem({ item }: { item: HeaderModel['navigation'][number] }) {
|
|
75
|
-
if (item.submenu === undefined || item.submenu.length === 0) {
|
|
76
|
-
return (
|
|
77
|
-
<li>
|
|
78
|
-
<a
|
|
79
|
-
href={item.href}
|
|
80
|
-
{...linkTarget(item)}
|
|
81
|
-
className={`${HEADING} flex min-h-11 items-center px-2.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground`}
|
|
82
|
-
>
|
|
83
|
-
{item.label}
|
|
84
|
-
</a>
|
|
85
|
-
</li>
|
|
86
|
-
)
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return (
|
|
90
|
-
<li>
|
|
91
|
-
<details data-nav-disclosure name="clubhouse-header-submenu" className="group/submenu">
|
|
92
|
-
<summary
|
|
93
|
-
className={`${HEADING} flex min-h-11 cursor-default list-none items-center justify-between gap-2 px-2.5 text-sm text-muted-foreground select-none [&::-webkit-details-marker]:hidden [&::marker]:content-none hover:bg-accent hover:text-foreground`}
|
|
94
|
-
>
|
|
95
|
-
<a
|
|
96
|
-
href={item.href}
|
|
97
|
-
{...linkTarget(item)}
|
|
98
|
-
className="min-w-0 flex-1 truncate hover:underline"
|
|
99
|
-
>
|
|
100
|
-
{item.label}
|
|
101
|
-
</a>
|
|
102
|
-
<span className="flex size-11 shrink-0 items-center justify-center">
|
|
103
|
-
<Chevron className="size-3 text-muted-foreground transition-transform group-open/submenu:rotate-90" />
|
|
104
|
-
</span>
|
|
105
|
-
</summary>
|
|
106
|
-
<ul className="ml-2 flex flex-col gap-0.5 border-l border-border py-1 pl-2.5">
|
|
107
|
-
{item.submenu.map((child) => (
|
|
108
|
-
<li key={child.href}>
|
|
109
|
-
<a
|
|
110
|
-
href={child.href}
|
|
111
|
-
{...linkTarget(child)}
|
|
112
|
-
className="flex min-h-11 items-center px-2.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground"
|
|
113
|
-
>
|
|
114
|
-
{child.label}
|
|
115
|
-
</a>
|
|
116
|
-
</li>
|
|
117
|
-
))}
|
|
118
|
-
</ul>
|
|
119
|
-
</details>
|
|
120
|
-
</li>
|
|
121
|
-
)
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function MenuGlyph() {
|
|
125
|
-
return (
|
|
126
|
-
<svg
|
|
127
|
-
aria-hidden="true"
|
|
128
|
-
viewBox="0 0 20 20"
|
|
129
|
-
className="size-5"
|
|
130
|
-
fill="none"
|
|
131
|
-
stroke="currentColor"
|
|
132
|
-
strokeWidth="1.75"
|
|
133
|
-
strokeLinecap="round"
|
|
134
|
-
>
|
|
135
|
-
<path className="group-open/menu:hidden" d="M3 5.5h14M3 10h14M3 14.5h14" />
|
|
136
|
-
<path className="hidden group-open/menu:block" d="m5 5 10 10M15 5 5 15" />
|
|
137
|
-
</svg>
|
|
138
|
-
)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
58
|
export function Header({
|
|
142
59
|
boardTitle,
|
|
143
60
|
homeHref,
|
|
@@ -161,26 +78,7 @@ export function Header({
|
|
|
161
78
|
</a>
|
|
162
79
|
<div className="flex min-w-0 items-center gap-3">
|
|
163
80
|
{children}
|
|
164
|
-
{navigation
|
|
165
|
-
<nav aria-label={c('boardSections')} data-nav-view="mobile" className="lg:hidden">
|
|
166
|
-
<details data-nav-disclosure className="group/menu">
|
|
167
|
-
<summary
|
|
168
|
-
className={`rounded-md border border-border text-foreground transition-colors hover:bg-primary hover:text-primary-foreground group-open/menu:bg-primary group-open/menu:text-primary-foreground flex size-10 cursor-default list-none items-center justify-center select-none [&::-webkit-details-marker]:hidden [&::marker]:content-none`}
|
|
169
|
-
>
|
|
170
|
-
<MenuGlyph />
|
|
171
|
-
<span className="sr-only">{c('boardSections')}</span>
|
|
172
|
-
</summary>
|
|
173
|
-
|
|
174
|
-
<div className="absolute inset-x-0 top-full z-30 max-h-[calc(100dvh-4rem)] overflow-y-auto border-b border-border bg-card shadow-elevation">
|
|
175
|
-
<ul className={`${PAGE} flex flex-col gap-0.5 py-2`}>
|
|
176
|
-
{navigation.map((item) => (
|
|
177
|
-
<MobileNavItem key={item.href} item={item} />
|
|
178
|
-
))}
|
|
179
|
-
</ul>
|
|
180
|
-
</div>
|
|
181
|
-
</details>
|
|
182
|
-
</nav>
|
|
183
|
-
)}
|
|
81
|
+
<MobileHeaderNav boardTitle={boardTitle} navigation={navigation} copy={copy} />
|
|
184
82
|
</div>
|
|
185
83
|
</div>
|
|
186
84
|
|
package/src/slots/thread-row.tsx
CHANGED
|
@@ -62,18 +62,18 @@ export function ThreadRow({
|
|
|
62
62
|
</p>
|
|
63
63
|
</div>
|
|
64
64
|
|
|
65
|
-
<span className="col-start-2
|
|
65
|
+
<span className="col-start-2 @3xl/card:col-start-3 @3xl/card:block @3xl/card:text-right">
|
|
66
66
|
<Tally value={thread.replyCount} label={c('replies')} />
|
|
67
|
-
<span className="ms-3
|
|
67
|
+
<span className="ms-3 @3xl/card:hidden">
|
|
68
68
|
<Tally value={thread.viewCount} label={c('views')} />
|
|
69
69
|
</span>
|
|
70
70
|
</span>
|
|
71
71
|
|
|
72
|
-
<span className="hidden
|
|
72
|
+
<span className="hidden @3xl/card:block @3xl/card:text-right">
|
|
73
73
|
<Tally value={thread.viewCount} label={c('views')} />
|
|
74
74
|
</span>
|
|
75
75
|
|
|
76
|
-
<div className="col-start-2 min-w-0 text-xs text-muted-foreground
|
|
76
|
+
<div className="col-start-2 min-w-0 text-xs text-muted-foreground @3xl/card:col-start-5">
|
|
77
77
|
{thread.lastPost === null ? (
|
|
78
78
|
<span className={MICRO}>{c('noRepliesYet')}</span>
|
|
79
79
|
) : (
|
package/src/theme.ts
CHANGED