diff --git a/app/elements/list-events.mjs b/app/elements/list-events.mjs deleted file mode 100644 index a211f09..0000000 --- a/app/elements/list-events.mjs +++ /dev/null @@ -1,11 +0,0 @@ -export default function ListEvents({ html, state = {} }) { - const { store = {} } = state - const { events } = store - if (events.length === 0) { - return '' - } else { - return html` - ${events.map(e => html` `).join('')} - ` - } -} diff --git a/app/elements/list-links.mjs b/app/elements/list-links.mjs deleted file mode 100644 index 676952e..0000000 --- a/app/elements/list-links.mjs +++ /dev/null @@ -1,30 +0,0 @@ -export default function ListLinks({ html, state = {} }) { - const { attrs } = state - const { links } = attrs - const { linkedin, twitter, url, github } = { ...links } - return html` - - - ` -} diff --git a/app/elements/list-organizers.mjs b/app/elements/list-organizers.mjs deleted file mode 100644 index a0b18a1..0000000 --- a/app/elements/list-organizers.mjs +++ /dev/null @@ -1,45 +0,0 @@ -export default function ListOrganizers({ html, state = {} }) { - const { store = {} } = state - const { organizers } = store - return html` - - ${organizers - .map( - o => html`
-

- photo of ${o.full_name} -

-

-

${o.full_name}
- ${o.role ? `${o.role}
` : ''} - -

-
` - ) - .join('')} - ` -} diff --git a/app/elements/list-sponsors.mjs b/app/elements/list-sponsors.mjs deleted file mode 100644 index 8e7c766..0000000 --- a/app/elements/list-sponsors.mjs +++ /dev/null @@ -1,35 +0,0 @@ -export default function ListSponsors({ html, state = {} }) { - const { store = {} } = state - let { event, sponsors } = store - if (event) { - sponsors = event.sponsors - } - if (sponsors.length > 0) { - return html` - - ${sponsors - .map( - s => html`
- -
` - ) - .join('')} - ` - } -} diff --git a/app/elements/list-talks.mjs b/app/elements/list-talks.mjs deleted file mode 100644 index d4920ff..0000000 --- a/app/elements/list-talks.mjs +++ /dev/null @@ -1,23 +0,0 @@ -export default function ListTalks({ html, state = {} }) { - const { store, attrs } = state - let { events, event } = store - let { event_id } = attrs - if (event_id && events) { - event = events.find(e => e.id === event_id) - } - let { talks } = event - return html` - - ${ talks.length === 0 - ? `

There are no talks at the moment, maybe propose one?

` - : talks.map(t => ``).join('')} -`} diff --git a/app/elements/view-event.mjs b/app/elements/view-event.mjs deleted file mode 100644 index 33042b1..0000000 --- a/app/elements/view-event.mjs +++ /dev/null @@ -1,37 +0,0 @@ -import { marked } from 'marked' - -export default function ViewEvent({ html, state = {} }) { - const { attrs, store } = state - let { events } = store - let { id } = attrs - let event = events.find(e => e.id === id) - - return html` -

${event.title}

-

${marked(event.description)}

- ${event.sponsors.length > 0 ? html`

Thanks to our Sponsors ❤️

` : ''} - ${event.sponsors - .map( - s => - `` - ) - .join('')} -
- More Info & Tickets -
- -
- - See all past events - -
- ` -} diff --git a/app/elements/view-sponsor.mjs b/app/elements/view-sponsor.mjs deleted file mode 100644 index f73d072..0000000 --- a/app/elements/view-sponsor.mjs +++ /dev/null @@ -1,25 +0,0 @@ -export default function ViewSponsor({ html, state = {} }) { - const { attrs } = state - let { url, name, image, tier } = attrs - return html` - -
- logo for ${name} -
- ` -} diff --git a/app/elements/view-talk.mjs b/app/elements/view-talk.mjs deleted file mode 100644 index d40c01d..0000000 --- a/app/elements/view-talk.mjs +++ /dev/null @@ -1,86 +0,0 @@ -//import { marked } from 'marked' - -export default function ViewTalk({ html, state = {} }) { - const { attrs, store } = state - let { events, event } = store - let { id, event_id, url } = attrs - if (!event) { - event = events.find(e => e.id === event_id) - } - - let talk = event.talks.find(t => t.id === id) - - let { title, speaker, type } = talk - let { name, company, photo, location } = speaker - return html` - -
- -
- photo of ${ name } -
-
${ type === "lightning" ? "⚡️" : "" }${ title }
-
-
-
-
-
${ name }
-
- ${ company }
${ location } -
-
-
- ` -} diff --git a/app/pages/index.html b/app/pages/index.html deleted file mode 100644 index b9d7326..0000000 --- a/app/pages/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - SeattleJS header image -
-

Upcoming Meetups

- - -

Speaking at the SeattleJS Meetup

-

- No matter who you are and what your experience level is, you can give a - talk at SeattleJS. Please consider submitting an idea to our - Call for Presenters! -

-

Sponsors

- -

- If your company would like to sponsor an upcoming meetup, please email us - at info@seattlejs.com. -

- -

Organizers

- -
-
diff --git a/crawl.mjs b/crawl.mjs new file mode 100644 index 0000000..e81d039 --- /dev/null +++ b/crawl.mjs @@ -0,0 +1,43 @@ +import fs from 'fs' + +const queue = ['https://seattlejs.com/', 'https://seattlejs.com/events'] +/** @type {Set} */ +// eslint-disable-next-line no-undef +const visited = new Set() + +async function crawl() { + while (queue.length) { + let url = queue.shift() + if (!url || visited.has(url)) continue + + visited.add(url) + console.log(`Crawling ${url}`) + + let res = await fetch(url) + let text = await res.text() + let matches = text.match(/https?:\/\/[^'"\s)]+/g) || [] + + const links = text.match(/href="([^"]+)"/g) || [] + matches = matches.concat( + ...links + .map(m => { + const url = m.match(/href="([^"]+)"/)[1] + if (url.match(/^https?:\/\/seattlejs.com/)) return url + if (url.startsWith('/')) return `https://seattlejs.com${url}` + return null + }) + .filter(m => !!m), + ) + + // console.log(matches) + + for (let match of matches) { + if (match.match(/^https?:\/\/seattlejs.com/)) { + queue.push(match) + } + } + } +} + +await crawl() +fs.writeFileSync('urls.json', JSON.stringify(Array.from(visited), null, 2)) diff --git a/package-lock.json b/package-lock.json index dc0752f..a012805 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,10 +12,8 @@ "dependencies": { "@astrojs/preact": "^4.0.1", "astro": "^5.1.1", - "front-matter": "^4.0.2", "marked": "^15.0.4", - "preact": "^10.25.3", - "preact-iso": "^2.8.1" + "preact": "^10.25.3" }, "devDependencies": { "eslint": "^8.46.0", @@ -3966,34 +3964,6 @@ "node": ">=8" } }, - "node_modules/front-matter": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/front-matter/-/front-matter-4.0.2.tgz", - "integrity": "sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==", - "dependencies": { - "js-yaml": "^3.13.1" - } - }, - "node_modules/front-matter/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/front-matter/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", @@ -6299,16 +6269,6 @@ "url": "https://opencollective.com/preact" } }, - "node_modules/preact-iso": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/preact-iso/-/preact-iso-2.8.1.tgz", - "integrity": "sha512-RL0yDdJcSiB4Wnk4fBqq0OE9QCfTEW7B2ULf8GHPx72AtFE+j1NvabjBF6y3rBgrNWSuuPuuiN4L4KxYteQD2Q==", - "license": "MIT", - "peerDependencies": { - "preact": ">=10", - "preact-render-to-string": ">=6.4.0" - } - }, "node_modules/preact-render-to-string": { "version": "6.5.12", "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-6.5.12.tgz", diff --git a/package.json b/package.json index 079830d..f325aa0 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,8 @@ "dependencies": { "@astrojs/preact": "^4.0.1", "astro": "^5.1.1", - "front-matter": "^4.0.2", "marked": "^15.0.4", - "preact": "^10.25.3", - "preact-iso": "^2.8.1" + "preact": "^10.25.3" }, "devDependencies": { "eslint": "^8.46.0", diff --git a/patches/preact-iso+2.8.1.patch b/patches/preact-iso+2.8.1.patch deleted file mode 100644 index 57aea60..0000000 --- a/patches/preact-iso+2.8.1.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/node_modules/preact-iso/src/router.d.ts b/node_modules/preact-iso/src/router.d.ts -index 7958546..87715c7 100644 ---- a/node_modules/preact-iso/src/router.d.ts -+++ b/node_modules/preact-iso/src/router.d.ts -@@ -40,9 +40,9 @@ export interface RouteProps extends RoutableProps { - - export function Route(props: RouteProps & Partial): VNode; - --declare module 'preact' { -- namespace JSX { -- interface IntrinsicAttributes extends RoutableProps {} -- } -- interface Attributes extends RoutableProps {} --} -+// declare module 'preact' { -+// namespace JSX { -+// interface IntrinsicAttributes extends RoutableProps {} -+// } -+// interface Attributes extends RoutableProps {} -+// } diff --git a/src/components/Event.astro b/src/components/Event.astro new file mode 100644 index 0000000..1a436a9 --- /dev/null +++ b/src/components/Event.astro @@ -0,0 +1,43 @@ +--- +import { marked } from 'marked' +import Sponsor from '@/components/Sponsor.astro' +import TalkCard from '@/components/TalkCard.astro' +import { inflateEvent, type SJSEvent } from '@/utils/data' + +const { event: baseEvent } = Astro.props as { event: SJSEvent } +const event = inflateEvent(baseEvent) +--- + +

{event.title}

+{event.description &&

{marked(event.description)}

} +{event.sponsors.length > 0 &&

Thanks to our Sponsors ❤️

} +{event.sponsors.map(sponsor => )} + + +
+ { + event.talks.length === 0 ? ( +

+ There are no talks at the moment, maybe propose one + ? +

+ ) : ( + event.talks.map(t => ) + ) + } +
+ + diff --git a/src/components/Organizers.astro b/src/components/Organizers.astro new file mode 100644 index 0000000..6300a61 --- /dev/null +++ b/src/components/Organizers.astro @@ -0,0 +1,47 @@ +--- +import organizers from '@/data/organizers.json' +import SocialLinks from './SocialLinks.astro' +--- + +
+ { + organizers.map(o => ( +
+

+ {`photo +

+

+

{o.full_name}
+ {/* {o.role ? `${o.role}
` : ''} */} + +

+
+ )) + } +
+ + diff --git a/src/components/SocialLinks.astro b/src/components/SocialLinks.astro new file mode 100644 index 0000000..aff0108 --- /dev/null +++ b/src/components/SocialLinks.astro @@ -0,0 +1,53 @@ +--- +const { linkedin, twitter, url, github } = Astro.props.links +--- + + + diff --git a/src/components/Sponsor.astro b/src/components/Sponsor.astro new file mode 100644 index 0000000..49cd970 --- /dev/null +++ b/src/components/Sponsor.astro @@ -0,0 +1,28 @@ +--- +let { + sponsor: { url, name, image, tier }, +} = Astro.props +--- + + +
+ {`logo +
diff --git a/src/components/TalkCard.astro b/src/components/TalkCard.astro new file mode 100644 index 0000000..faa8ac8 --- /dev/null +++ b/src/components/TalkCard.astro @@ -0,0 +1,81 @@ +--- +import { type Talk, inflateTalk } from '@/utils/data' + +let { id, url } = Astro.props as { + id: Talk['id'] + url?: string +} + +let { title, speaker, type } = inflateTalk(id) +let { name, company, photo, location = '' } = speaker +--- + + +
+ +
+ {`photo +
+
{type === 'lightning' ? '⚡️ ' : ''}{title}
+
+
+
+
+
{name}
+
+ {company}
{location} +
+
+
diff --git a/src/images/blank-seattlejs-header.png b/src/images/blank-seattlejs-header.png new file mode 100644 index 0000000..1f52401 Binary files /dev/null and b/src/images/blank-seattlejs-header.png differ diff --git a/src/pages/index.astro b/src/pages/index.astro new file mode 100644 index 0000000..49b0f0c --- /dev/null +++ b/src/pages/index.astro @@ -0,0 +1,85 @@ +--- +import Layout from '@/layouts/Layout.astro' +import { Image } from 'astro:assets' +import Event from '@/components/Event.astro' +import Organizers from '@/components/Organizers.astro' +import Sponsor from '@/components/Sponsor.astro' +import events from '@/data/events.json' +import sponsors from '@/data/sponsors.json' +import heroImgSrc from '@/images/blank-seattlejs-header.png' + +const TWELVE_HOURS = 1000 * 60 * 60 * 12 +// const futureEvents = events.filter( +// t => new Date(`${t.date}T21:00-08:00`).getTime() + TWELVE_HOURS > Date.now() +// ) +const futureEvents = [events.at(-1)] +--- + + + + SeattleJS header image +
+

Upcoming Meetups

+ + + {futureEvents.map(event => )} + + + +

Speaking at the SeattleJS Meetup

+

+ No matter who you are and what your experience level is, you can give a + talk at SeattleJS. Please consider submitting an idea to our + Call for Presenters! +

+

Sponsors

+
+ {sponsors.map(s => )} +
+

+ If your company would like to sponsor an upcoming meetup, please email us + at info@seattlejs.com. +

+ +

Organizers

+ +
+
+ + diff --git a/src/utils/data.ts b/src/utils/data.ts index c3289e9..ad42cb3 100644 --- a/src/utils/data.ts +++ b/src/utils/data.ts @@ -25,6 +25,7 @@ export interface Speaker { twitter?: string pronouns?: string photo: string + location?: string } export interface Talk { diff --git a/urls.json b/urls.json new file mode 100644 index 0000000..b2301dc --- /dev/null +++ b/urls.json @@ -0,0 +1,119 @@ +[ + "https://seattlejs.com/", + "https://seattlejs.com/events", + "https://seattlejs.com/_public/styles/main-7e3a3b89c6.css", + "https://seattlejs.com/_public/favicon-d60dbc8577.jpg", + "https://seattlejs.com/about-us", + "https://seattlejs.com/join", + "https://seattlejs.com/conf", + "https://seattlejs.com/code-of-conduct", + "https://seattlejs.com/speak", + "https://seattlejs.com/events/november-2024", + "https://seattlejs.com/events/october-2024", + "https://seattlejs.com/events/september-2024", + "https://seattlejs.com/events/august-2024", + "https://seattlejs.com/events/july-2024", + "https://seattlejs.com/events/may-2024", + "https://seattlejs.com/events/april-2024", + "https://seattlejs.com/events/march-2024", + "https://seattlejs.com/events/february-2024", + "https://seattlejs.com/events/january-2024", + "https://seattlejs.com/events/holiday-party-2023", + "https://seattlejs.com/events/november-2023", + "https://seattlejs.com/events/october-2023", + "https://seattlejs.com/events/september-2023", + "https://seattlejs.com/events/july-2023", + "https://seattlejs.com/events/june-2023", + "https://seattlejs.com/events/may-2023", + "https://seattlejs.com/events/april-2023", + "https://seattlejs.com/events/march-2023", + "https://seattlejs.com/events/february-2023", + "https://seattlejs.com/events/january-2023", + "https://seattlejs.com/events/december-2022", + "https://seattlejs.com/events/november-2022", + "https://seattlejs.com/events/october-2022", + "https://seattlejs.com/events/september-2022", + "https://seattlejs.com/events/august-2022", + "https://seattlejs.com/events/july-2022", + "https://seattlejs.com/events/june-2022", + "https://seattlejs.com/events/may-2022", + "https://seattlejs.com/_public/images/seattlejsconf-sharing-c15b59d9f6.png", + "https://seattlejs.com/live", + "https://seattlejs.com/talks/deno-2.0", + "https://seattlejs.com/talks/dont-fear-the-linter", + "https://seattlejs.com/talks/every-process-everywhere-all-at-once", + "https://seattlejs.com/talks/creating-a-design-system", + "https://seattlejs.com/talks/rebuilding-in-rust", + "https://seattlejs.com/talks/react-rendering-with-nextjs", + "https://seattlejs.com/talks/flip-no-more", + "https://seattlejs.com/talks/langchain-agents", + "https://seattlejs.com/talks/move-over-passwords", + "https://seattlejs.com/talks/real-time-multiplayer-reactions-component", + "https://seattlejs.com/talks/a-plea-for-boring-tech", + "https://seattlejs.com/talks/es13-and-beyond", + "https://seattlejs.com/workshops/managing-data-in-a-react-application-aug-7", + "https://seattlejs.com/workshops/introduction-to-typescript-aug-9", + "https://seattlejs.com/workshops/building-ai-apps-aug-10", + "https://seattlejs.com/talks/cat-johnson-november-2024", + "https://seattlejs.com/talks/stacy-davis1-november-2024", + "https://seattlejs.com/talks/erik-marks-october-2024", + "https://seattlejs.com/talks/nicholas-patti-september-2024", + "https://seattlejs.com/talks/ben-van-citters-august-2024", + "https://seattlejs.com/talks/allan-deutsch-august-2024", + "https://seattlejs.com/talks/chris-griffing-july-2024", + "https://seattlejs.com/talks/allan-deutsch-may-2024", + "https://seattlejs.com/talks/sarah-guthals-phd-may-2024", + "https://seattlejs.com/talks/herrington-darkholme-april-2024", + "https://seattlejs.com/talks/john-pham-april-2024", + "https://seattlejs.com/talks/shruti-kapoor-march-2024", + "https://seattlejs.com/talks/eric-jensen-march-2024", + "https://seattlejs.com/talks/dm-liao-february-2024", + "https://seattlejs.com/talks/fx-wood-february-2024", + "https://seattlejs.com/talks/mike-ryan-november-2023", + "https://seattlejs.com/talks/doug-wade-november-2023", + "https://seattlejs.com/talks/caleb-diehl-october-2023", + "https://seattlejs.com/talks/alan-gonzalez-october-2023", + "https://seattlejs.com/talks/jan-miksovsky-september-2023", + "https://seattlejs.com/talks/peli-de-halleux-september-2023", + "https://seattlejs.com/talks/ben-lower-september-2023", + "https://seattlejs.com/talks/chris-griffing-july-2023", + "https://seattlejs.com/talks/michael-fitzgerald-july-2023", + "https://seattlejs.com/talks/geoff-rich-july-2023", + "https://seattlejs.com/talks/cristina-rodriguez-june-2023", + "https://seattlejs.com/talks/aiden-bai-june-2023", + "https://seattlejs.com/talks/dm-liao-june-2023", + "https://seattlejs.com/talks/spenser-solys-may-2023", + "https://seattlejs.com/talks/tiger-oakes-may-2023", + "https://seattlejs.com/talks/michael-solati-april-2023", + "https://seattlejs.com/talks/philip-swan-april-2023", + "https://seattlejs.com/talks/catherine-johnson-april-2023", + "https://seattlejs.com/talks/aaroh-mankad-march-2023", + "https://seattlejs.com/talks/mason-lynass-march-2023", + "https://seattlejs.com/talks/chris-griffing-march-2023", + "https://seattlejs.com/talks/brian-tran-february-2023", + "https://seattlejs.com/talks/lupe-canaviri-maydana-februrary-2023", + "https://seattlejs.com/talks/jacob-ebey-february-2023", + "https://seattlejs.com/talks/calvin-kipperman-january-2023", + "https://seattlejs.com/talks/josh-scotland-january-2023", + "https://seattlejs.com/talks/tim-obrien-january-2023", + "https://seattlejs.com/talks/matthew-bauer-november-2022", + "https://seattlejs.com/talks/brian-gershon-november-2022", + "https://seattlejs.com/talks/rachel-lee-nabors-october-2022", + "https://seattlejs.com/talks/jamund-ferguson-june-2022", + "https://seattlejs.com/talks/amber-hoak-may-2022", + "https://seattlejs.com/_public/images/social/deno-2.0-c4ba3a8139.png", + "https://seattlejs.com/_public/images/social/dont-fear-the-linter-3ce4d66746.png", + "https://seattlejs.com/_public/images/social/every-process-everywhere-all-at-once-1b6b606242.png", + "https://seattlejs.com/_public/images/social/creating-a-design-system-a039a079f7.png", + "https://seattlejs.com/_public/images/social/rebuilding-in-rust-2f56ab6a00.png", + "https://seattlejs.com/_public/images/social/react-rendering-with-nextjs-b0e96febb4.png", + "https://seattlejs.com/_public/images/social/flip-no-more-40a0166c00.png", + "https://seattlejs.com/_public/images/social/langchain-agents-ecd1661290.png", + "https://seattlejs.com/_public/images/social/move-over-passwords-bf5cc5ec29.png", + "https://seattlejs.com/_public/images/social/real-time-multiplayer-reactions-component-a13cd4acad.png", + "https://seattlejs.com/_public/images/social/a-plea-for-boring-tech-c74ac95a1f.png", + "https://seattlejs.com/_public/images/social/es13-and-beyond-6c42b7dcfd.png", + "https://seattlejs.com/_public/images/social/managing-data-in-a-react-application-aug-7-aa8fc7e3d5.png", + "https://seattlejs.com/_public/images/social/introduction-to-typescript-aug-9-d7837798fc.png", + "https://seattlejs.com/_public/images/social/building-ai-apps-aug-10-3a0a15dead.png" +] \ No newline at end of file