Skip to content

Commit d2933b6

Browse files
committed
Fix things
1 parent 3c4df6a commit d2933b6

File tree

9 files changed

+49
-35
lines changed

9 files changed

+49
-35
lines changed

src/app/(main)/resources/[category]/category-tools-libraries-section.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ import { type Topic } from "@/resources/types"
1212
import { StripesDecoration } from "@/app/conf/_design-system/stripes-decoration"
1313

1414
import { ChevronRight } from "@/app/conf/_design-system/pixelarticons/chevron-right"
15-
import { Icon, IconName } from "./icons"
15+
import { IconSpritesheet, IconName } from "./spritesheet"
1616

1717
interface LibraryEntry {
1818
name: string
1919
href?: string
2020
group: string
21-
icon: React.ReactNode
2221
tags: string[]
2322
}
2423

@@ -130,16 +129,17 @@ export async function CategoryToolsLibrariesSection({
130129
const breakIndex =
131130
columns === 2 ? Math.floor(group.items.length / 2) : 0
132131

133-
console.log({ index, group: group.name, breakIndex })
134-
135132
return (
136133
<div
137134
key={group.id}
138135
className="min-w-[480px] shrink-0 grow border border-neu-200 bg-neu-50 dark:bg-neu-50/50 lg:w-1/3 lg:min-w-0"
139136
>
140137
<div className="typography-body-lg flex items-center gap-3 border-b border-inherit bg-neu-50 text-neu-900">
141138
<div className="border-r border-inherit p-3">
142-
<Icon icon={group.id as IconName} className="size-10" />
139+
<IconSpritesheet
140+
sprite={group.id as IconName}
141+
className="size-10"
142+
/>
143143
</div>
144144
<div className="px-4 py-3">{group.name}</div>
145145
<div className="border-l border-inherit p-3 md:hidden">

src/app/(main)/resources/[category]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ function sectionHeading(
4545
) {
4646
if (section.kind === "video") {
4747
if (category === "frontend") return "Master GraphQL on the frontend"
48+
// todo: paragraph: "Watch talks and tutorials from GraphQL Conf and community experts. See how teams integrate GraphQL on the frontend and learn from real-world case studies."
4849
if (category === "backend") return "Master GraphQL on the backend"
4950
}
5051

src/app/(main)/resources/[category]/icons/index.tsx renamed to src/app/(main)/resources/[category]/spritesheet/index.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { SVGProps } from "react"
22

3-
const sprite = new URL("./sprite.svg", import.meta.url).href
3+
import sheet from "./sheet.svg?resource"
44

55
export type IconName =
66
| "ballerina"
@@ -22,14 +22,16 @@ export type IconName =
2222
| "scala"
2323
| "swift"
2424

25-
interface IconProps extends SVGProps<SVGSVGElement> {
26-
icon: IconName
25+
interface IconSpritesheetProps extends SVGProps<SVGSVGElement> {
26+
sprite: IconName
2727
}
2828

29-
export function Icon({ icon, ...props }: IconProps) {
29+
export function IconSpritesheet({ sprite, ...props }: IconSpritesheetProps) {
3030
return (
31-
<svg {...props}>
32-
<use href={`${sprite}#${icon}`} />
33-
</svg>
31+
<>
32+
<svg {...props}>
33+
<use href={`${sheet}#${sprite}`} />
34+
</svg>
35+
</>
3436
)
3537
}

src/app/(main)/resources/[category]/icons/sprite.svg renamed to src/app/(main)/resources/[category]/spritesheet/sheet.svg

Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Kind, Topic } from "@/resources/types"
2+
3+
// @ts-ignore
4+
export const texts: {
5+
[key in Topic]: {
6+
heading: string
7+
subtitle: string
8+
sections: {
9+
[key in Kind]: {
10+
heading: string
11+
paragraph: string
12+
}
13+
}
14+
}
15+
} = {}

src/app/(main)/resources/reading/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ export const metadata = readingMetadata("all")
55
export default function ReadingPage() {
66
return <ReadingLibraryPage variant="all" />
77
}
8+
9+

src/app/(main)/resources/reading/reading-resources-card.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,7 @@ export function ReadingResourcesCard({
5050
title={resource.title}
5151
author={resource.author}
5252
authorPlacement="body"
53-
tags={
54-
config
55-
? [
56-
{
57-
label: config.label,
58-
color: config.color,
59-
},
60-
]
61-
: undefined
62-
}
53+
tags={resource.tags}
6354
icon={
6455
config ? (
6556
<div

src/app/(main)/resources/subtitles.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ export const categoryNames: Record<Topic, string> = {
77
security: "Security",
88
ai: "AI",
99
monitoring: "Monitoring",
10+
"api-platform-and-gateways": "API Platform and Gateways",
11+
"developer-experience": "Developer Experience",
12+
"schema-design": "Schema Design",
13+
tools: "Tools",
1014
}
1115

1216
export const categorySubtitles: Record<Topic, string> = {
@@ -18,4 +22,9 @@ export const categorySubtitles: Record<Topic, string> = {
1822
security: "Learn how to secure your GraphQL APIs.",
1923
monitoring:
2024
"Stay ahead of performance issues by monitoring queries and watching error trends.",
25+
"api-platform-and-gateways":
26+
"Learn how to build and deploy API Gateways and Supergraphs.",
27+
"developer-experience": "Learn how to improve your developer experience.",
28+
"schema-design": "Learn how to design and maintain GraphQL schemas.",
29+
tools: "Discover the best tools for GraphQL development.",
2130
}

src/app/(main)/resources/video/video-library.tsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
ComboboxInput,
88
ComboboxOption,
99
ComboboxOptions,
10-
Label,
1110
} from "@headlessui/react"
1211

1312
import { Button } from "@/app/conf/_design-system/button"
@@ -71,9 +70,9 @@ export function VideoLibrary({ resources }: VideoLibraryProps) {
7170
/>
7271

7372
<div className="flex flex-col gap-2 lg:w-52">
74-
<Label className="typography-menu font-mono font-medium uppercase text-neu-900">
73+
<span className="typography-menu font-mono font-medium uppercase text-neu-900">
7574
Sort
76-
</Label>
75+
</span>
7776
<div className="relative border border-neu-500 bg-neu-0 text-neu-800 focus-within:ring focus-within:ring-neu-300 dark:border-neu-200 dark:bg-neu-0/50 dark:focus-within:ring-neu-200">
7877
<select
7978
value={sortOrder}
@@ -108,18 +107,13 @@ export function VideoLibrary({ resources }: VideoLibraryProps) {
108107

109108
<ul className="grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3">
110109
{filtered.map(resource => {
111-
const tags = resource.tags.map(tag => ({
112-
label: tag,
113-
color: "hsl(var(--color-neu-500))",
114-
}))
115-
116110
return (
117111
<li key={resource.url}>
118112
<ResourceHubCard
119113
href={resource.url}
120114
title={resource.title}
121115
author={resource.author}
122-
tags={tags}
116+
tags={resource.tags}
123117
/>
124118
</li>
125119
)
@@ -152,9 +146,9 @@ function TopicsCombobox({
152146
return (
153147
<Combobox immediate multiple value={value} onChange={onChange}>
154148
<div className="flex flex-col gap-2 lg:w-full">
155-
<Label className="typography-menu font-mono font-medium uppercase text-neu-900">
149+
<span className="typography-menu font-mono font-medium uppercase text-neu-900">
156150
{label}
157-
</Label>
151+
</span>
158152
<label className="relative w-full border border-neu-500 bg-neu-0 p-2 focus-within:outline-none focus-within:ring focus-within:ring-neu-300 dark:border-neu-200 dark:bg-neu-0/50 dark:focus-within:ring-neu-200">
159153
<ComboboxInput
160154
value={query}

0 commit comments

Comments
 (0)