Skip to content

Commit 97b3405

Browse files
committed
Clean up: Port Note and upgrade styles.
1 parent 3225c72 commit 97b3405

File tree

6 files changed

+62
-16
lines changed

6 files changed

+62
-16
lines changed

src/components/note/index.tsx

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/components/note/note.tsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/components/ui/Note.astro

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
3+
interface Props {
4+
type: "warning" | "info" | "success" | "error";
5+
title?: string;
6+
icon?: string;
7+
}
8+
9+
const { type="info", title, icon } = Astro.props;
10+
11+
// Define styles for different note types
12+
const styles = {
13+
warning: {
14+
bg: "bg-[rgb(255,252,204)]",
15+
text: "text-[rgb(153,101,21)]",
16+
border: "border-[rgb(255,204,0)]",
17+
defaultIcon: "fas fa-exclamation-triangle fa-2x",
18+
defaultTitle: "Warning"
19+
},
20+
info: {
21+
bg: "bg-[rgb(229,246,253)]",
22+
text: "text-[rgb(27,95,133)]",
23+
border: "border-[rgb(83,177,234)]",
24+
defaultIcon: "fas fa-info-circle fa-2x",
25+
defaultTitle: "Info"
26+
},
27+
success: {
28+
bg: "bg-[rgb(237,247,237)]",
29+
text: "text-[rgb(48,112,60)]",
30+
border: "border-[rgb(98,187,112)]",
31+
defaultIcon: "fas fa-check-circle fa-2x",
32+
defaultTitle: "Success"
33+
},
34+
error: {
35+
bg: "bg-[rgb(253,237,237)]",
36+
text: "text-[rgb(156,38,38)]",
37+
border: "border-[rgb(244,99,99)]",
38+
defaultIcon: "fas fa-times-circle fa-2x",
39+
defaultTitle: "Error"
40+
}
41+
};
42+
43+
const currentStyle = styles[type];
44+
const noteIcon = icon || currentStyle.defaultIcon;
45+
const noteTitle = title || currentStyle.defaultTitle;
46+
---
47+
48+
<p class={`${currentStyle.bg} ${currentStyle.text} border-l-4 ${currentStyle.border} p-4 flex items-center space-x-2`}>
49+
{ noteIcon &&
50+
<i class={noteIcon}></i>
51+
}
52+
<span>
53+
{title && <strong>{noteTitle}:</strong>}
54+
<slot />
55+
</span>
56+
</p>

src/content/pages/sponsorship/information.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ subtitle:
99

1010
This page lists all sponsor deliverables and deadlines to help you plan and make the most of your sponsorship.
1111

12-
<Note>⚠️ All deadlines below are **hard deadlines**.
12+
<Note type="warning">All deadlines below are **hard deadlines**.
1313
Unfortunately, we won’t be able to accept late submissions or offer refunds if anything is missed.</Note>
1414

1515

@@ -135,7 +135,7 @@ However, we strongly recommend keeping booths staffed throughout the opening hou
135135

136136
On top of what is already included in your booth as part of the package, you can order add-ons, such as TV sets and furniture for your booth.
137137

138-
<Note>ℹ️ Packages of **Platinum and above** already include **a TV and stand** as part of the booth.
138+
<Note>Packages of **Platinum and above** already include **a TV and stand** as part of the booth.
139139
Gold and Silver sponsors can order a TV and stand separately, if needed</Note>
140140

141141
- **⏲️ Deadline** for booth customisation order: **Sunday, 8 June 2025**.
@@ -364,7 +364,7 @@ Creative Commons license to avoid copyright issues or strikes on our YouTube cha
364364
You can submit different video files or reuse the same video in both. The number of video ads you submit is up to you.
365365
We recommend **2 to 10** files. Higher sponsorship levels will receive more ad share.
366366

367-
<Note> **Important**: To avoid attachment size limits, please upload your videos to a file-sharing service
367+
<Note type="warning"> **Important**: To avoid attachment size limits, please upload your videos to a file-sharing service
368368
(e.g. Dropbox, Google Drive, WeTransfer, OneDrive) and send us the download link.</Note>
369369

370370
- **⏲️ Deadline** for submitting video ad links: **Monday, 23 June 2025**

src/layouts/ScheduleLayout.astro

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
import Layout from "@layouts/Layout.astro";
33
import Section from "@ui/Section.astro";
4+
import Note from "@ui/Note.astro";
45
56
export interface Props {
67
title?: string;
@@ -16,10 +17,7 @@ const { title, description } = Astro.props;
1617
</Fragment>
1718
<Section>
1819

19-
<p class="bg-[rgb(255,252,204)] text-[rgb(153,101,21)] border-l-4 border-[rgb(255,204,0)] p-4 text-sm flex items-center space-x-2">
20-
<i class="fas fa-exclamation-triangle"></i>
21-
<span><strong>Important:</strong> This is an early version of the schedule and may still change. If you're planning travel around specific sessions, please keep that in mind.</span>
22-
</p>
20+
<Note type="warning">This is an early version of the schedule and may still change. If you're planning travel around specific sessions, please keep that in mind.</Note>
2321

2422
<div class="layout-wrapper2">
2523
<slot />

src/pages/[...slug].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Map from "@components/Map.astro";
77
import YouTube from "@ui/YouTube.astro";
88
import HighlightCard from "@components/highlight-list/highlight-card.astro";
99
import HighlightItem from "@components/highlight-list/highlight-item.astro";
10-
import { Note } from "@components/note";
10+
import Note from "@ui/Note.astro";
1111
import SponsorTiers from "@components/sponsor-tiers/sponsor-tiers.astro";
1212
import Accordion from "@components/accordion/accordion.astro";
1313
import Button from "@ui/Button.astro";

0 commit comments

Comments
 (0)