From d4862f096fa639cf4cbacf9557efa1dfe76ef7eb Mon Sep 17 00:00:00 2001 From: tree Date: Mon, 30 Jan 2023 04:04:13 +0100 Subject: [PATCH] Format code by "npm run format" --- .eslintrc.cjs | 26 +- .github/workflows/gh-pages.yml | 10 +- .github/workflows/test.yml | 6 +- package.json | 60 +- playwright.config.js | 10 +- postcss.config.cjs | 8 +- src/app.css | 70 +- src/app.html | 6 +- src/lib/components/CalendarList.svelte | 139 ++-- src/lib/components/CollectionList.svelte | 178 +++-- src/lib/components/EventTypeBadge.svelte | 12 +- src/lib/components/Footer.svelte | 103 ++- src/lib/components/ItemLogo.svelte | 31 +- src/lib/components/TimelineHeatmap.svelte | 321 ++++---- src/lib/dataApi.js | 48 +- src/lib/pbw.js | 86 +-- src/lib/utils.js | 53 +- src/routes/+layout.svelte | 25 +- src/routes/+page.js | 4 +- src/routes/+page.svelte | 4 +- src/routes/[entry]/+layout.js | 12 +- src/routes/[entry]/+page.svelte | 213 ++++-- src/routes/[entry]/[type]/+page.svelte | 447 ++++++----- src/routes/[entry]/[type]/[slug]/+page.svelte | 713 ++++++++++-------- src/routes/[entry]/day/[date]/+page.svelte | 113 +-- src/routes/[entry]/schedule/+page.svelte | 136 ++-- svelte.config.js | 12 +- tailwind.config.cjs | 38 +- tests/test.js | 8 +- vite.config.js | 12 +- 30 files changed, 1639 insertions(+), 1265 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index bd6d4e62..fab32bfc 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,15 +1,15 @@ module.exports = { - root: true, - extends: ["eslint:recommended", "prettier"], - plugins: ["svelte3"], - overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }], - parserOptions: { - sourceType: "module", - ecmaVersion: 2020, - }, - env: { - browser: true, - es2017: true, - node: true, - }, + root: true, + extends: ['eslint:recommended', 'prettier'], + plugins: ['svelte3'], + overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], + parserOptions: { + sourceType: 'module', + ecmaVersion: 2020 + }, + env: { + browser: true, + es2017: true, + node: true + } }; diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index b7efc5df..59463679 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -3,7 +3,7 @@ name: GitHub Pages on: push: branches: - - main # Set a branch name to trigger deployment + - main # Set a branch name to trigger deployment jobs: deploy: @@ -15,8 +15,8 @@ jobs: steps: - uses: actions/checkout@v3 with: - submodules: true # Fetch Hugo themes (true OR recursive) - fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - uses: actions/setup-node@v3 with: @@ -29,9 +29,9 @@ jobs: - name: Build run: npm run build - + - name: Add custom domain - run: "touch build/CNAME && echo \"explore.prgblockweek.com\" >> build/CNAME" + run: 'touch build/CNAME && echo "explore.prgblockweek.com" >> build/CNAME' - name: Deploy uses: peaceiris/actions-gh-pages@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9e1631bf..5729f2b1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,8 +17,8 @@ jobs: steps: - uses: actions/checkout@v3 with: - submodules: true # Fetch Hugo themes (true OR recursive) - fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - uses: actions/setup-node@v3 with: @@ -30,4 +30,4 @@ jobs: - run: rm src/lib/data.json && wget -O src/lib/data.json https://data.prgblockweek.com/23/index.json - name: Build - run: npm run build \ No newline at end of file + run: npm run build diff --git a/package.json b/package.json index c9dfd25f..d0e6ab88 100644 --- a/package.json +++ b/package.json @@ -1,32 +1,32 @@ { - "name": "pbw-explore", - "version": "0.2.0", - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview", - "test": "playwright test", - "lint": "prettier --plugin-search-dir . --check . && eslint .", - "format": "prettier --plugin-search-dir . --write ." - }, - "devDependencies": { - "@playwright/test": "^1.28.1", - "@sveltejs/adapter-auto": "^1.0.0", - "@sveltejs/adapter-static": "^1.0.1", - "@sveltejs/kit": "^1.0.0", - "autoprefixer": "^10.4.13", - "date-fns": "^2.29.3", - "eslint": "^8.28.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-svelte3": "^4.0.0", - "ethereum-blockies-base64": "^1.0.2", - "postcss": "^8.4.21", - "prettier": "^2.8.0", - "prettier-plugin-svelte": "^2.8.1", - "svelte": "^3.54.0", - "svelte-markdown": "^0.2.3", - "tailwindcss": "^3.2.4", - "vite": "^4.0.0" - }, - "type": "module" + "name": "pbw-explore", + "version": "0.2.0", + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "test": "playwright test", + "lint": "prettier --plugin-search-dir . --check . && eslint .", + "format": "prettier --plugin-search-dir . --write ." + }, + "devDependencies": { + "@playwright/test": "^1.28.1", + "@sveltejs/adapter-auto": "^1.0.0", + "@sveltejs/adapter-static": "^1.0.1", + "@sveltejs/kit": "^1.0.0", + "autoprefixer": "^10.4.13", + "date-fns": "^2.29.3", + "eslint": "^8.28.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-svelte3": "^4.0.0", + "ethereum-blockies-base64": "^1.0.2", + "postcss": "^8.4.21", + "prettier": "^2.8.0", + "prettier-plugin-svelte": "^2.8.1", + "svelte": "^3.54.0", + "svelte-markdown": "^0.2.3", + "tailwindcss": "^3.2.4", + "vite": "^4.0.0" + }, + "type": "module" } diff --git a/playwright.config.js b/playwright.config.js index b5e4384b..f0ba5d26 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -1,10 +1,10 @@ /** @type {import('@playwright/test').PlaywrightTestConfig} */ const config = { - webServer: { - command: "npm run build && npm run preview", - port: 4173, - }, - testDir: "tests", + webServer: { + command: 'npm run build && npm run preview', + port: 4173 + }, + testDir: 'tests' }; export default config; diff --git a/postcss.config.cjs b/postcss.config.cjs index 12a703d9..054c147c 100644 --- a/postcss.config.cjs +++ b/postcss.config.cjs @@ -1,6 +1,6 @@ module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, + plugins: { + tailwindcss: {}, + autoprefixer: {} + } }; diff --git a/src/app.css b/src/app.css index 9c63b080..93a50679 100644 --- a/src/app.css +++ b/src/app.css @@ -5,42 +5,42 @@ @tailwind utilities; @layer components { - .link { - @apply underline hover:no-underline hover:text-red-200; - } - #footer a { - @apply underline hover:no-underline hover:text-pbw-white; - } - .separator { - @apply inline-block mx-3; - } - .button { - @apply border border-pbw-yellow py-3 px-4 rounded hover:bg-pbw-yellow hover:text-pbw-red; - } + .link { + @apply underline hover:no-underline hover:text-red-200; + } + #footer a { + @apply underline hover:no-underline hover:text-pbw-white; + } + .separator { + @apply inline-block mx-3; + } + .button { + @apply border border-pbw-yellow py-3 px-4 rounded hover:bg-pbw-yellow hover:text-pbw-red; + } - .cc0-license { - vertical-align: -0.1em; - margin-right: 0.3em; - width: 1em; - height: 1em; - background-size: 1em 1em; - background-position: center; - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' id='Layer_1' x='0px' y='0px' width='64px' height='64px' viewBox='-0.5 0.5 64 64' enable-background='new -0.5 0.5 64 64' xml:space='preserve'%3E%3Cg%3E%3Ccircle fill='%23FFFFFF' cx='31.325' cy='32.873' r='30.096'/%3E%3Cpath id='text2809_1_' d='M31.5,14.08c-10.565,0-13.222,9.969-13.222,18.42c0,8.452,2.656,18.42,13.222,18.42 c10.564,0,13.221-9.968,13.221-18.42C44.721,24.049,42.064,14.08,31.5,14.08z M31.5,21.026c0.429,0,0.82,0.066,1.188,0.157 c0.761,0.656,1.133,1.561,0.403,2.823l-7.036,12.93c-0.216-1.636-0.247-3.24-0.247-4.437C25.808,28.777,26.066,21.026,31.5,21.026z M36.766,26.987c0.373,1.984,0.426,4.056,0.426,5.513c0,3.723-0.258,11.475-5.69,11.475c-0.428,0-0.822-0.045-1.188-0.136 c-0.07-0.021-0.134-0.043-0.202-0.067c-0.112-0.032-0.23-0.068-0.336-0.11c-1.21-0.515-1.972-1.446-0.874-3.093L36.766,26.987z'/%3E%3Cpath id='path2815_1_' d='M31.433,0.5c-8.877,0-16.359,3.09-22.454,9.3c-3.087,3.087-5.443,6.607-7.082,10.532 C0.297,24.219-0.5,28.271-0.5,32.5c0,4.268,0.797,8.32,2.397,12.168c1.6,3.85,3.921,7.312,6.969,10.396 c3.085,3.049,6.549,5.399,10.398,7.037c3.886,1.602,7.939,2.398,12.169,2.398c4.229,0,8.34-0.826,12.303-2.465 c3.962-1.639,7.496-3.994,10.621-7.081c3.011-2.933,5.289-6.297,6.812-10.106C62.73,41,63.5,36.883,63.5,32.5 c0-4.343-0.77-8.454-2.33-12.303c-1.562-3.885-3.848-7.32-6.857-10.33C48.025,3.619,40.385,0.5,31.433,0.5z M31.567,6.259 c7.238,0,13.412,2.566,18.554,7.709c2.477,2.477,4.375,5.31,5.67,8.471c1.296,3.162,1.949,6.518,1.949,10.061 c0,7.354-2.516,13.454-7.506,18.33c-2.592,2.516-5.502,4.447-8.74,5.781c-3.2,1.334-6.498,1.994-9.927,1.994 c-3.468,0-6.788-0.653-9.949-1.948c-3.163-1.334-6.001-3.238-8.516-5.716c-2.515-2.514-4.455-5.353-5.826-8.516 c-1.333-3.199-2.017-6.498-2.017-9.927c0-3.467,0.684-6.787,2.017-9.949c1.371-3.2,3.312-6.074,5.826-8.628 C18.092,8.818,24.252,6.259,31.567,6.259z'/%3E%3C/g%3E%3C/svg%3E"); - } + .cc0-license { + vertical-align: -0.1em; + margin-right: 0.3em; + width: 1em; + height: 1em; + background-size: 1em 1em; + background-position: center; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' id='Layer_1' x='0px' y='0px' width='64px' height='64px' viewBox='-0.5 0.5 64 64' enable-background='new -0.5 0.5 64 64' xml:space='preserve'%3E%3Cg%3E%3Ccircle fill='%23FFFFFF' cx='31.325' cy='32.873' r='30.096'/%3E%3Cpath id='text2809_1_' d='M31.5,14.08c-10.565,0-13.222,9.969-13.222,18.42c0,8.452,2.656,18.42,13.222,18.42 c10.564,0,13.221-9.968,13.221-18.42C44.721,24.049,42.064,14.08,31.5,14.08z M31.5,21.026c0.429,0,0.82,0.066,1.188,0.157 c0.761,0.656,1.133,1.561,0.403,2.823l-7.036,12.93c-0.216-1.636-0.247-3.24-0.247-4.437C25.808,28.777,26.066,21.026,31.5,21.026z M36.766,26.987c0.373,1.984,0.426,4.056,0.426,5.513c0,3.723-0.258,11.475-5.69,11.475c-0.428,0-0.822-0.045-1.188-0.136 c-0.07-0.021-0.134-0.043-0.202-0.067c-0.112-0.032-0.23-0.068-0.336-0.11c-1.21-0.515-1.972-1.446-0.874-3.093L36.766,26.987z'/%3E%3Cpath id='path2815_1_' d='M31.433,0.5c-8.877,0-16.359,3.09-22.454,9.3c-3.087,3.087-5.443,6.607-7.082,10.532 C0.297,24.219-0.5,28.271-0.5,32.5c0,4.268,0.797,8.32,2.397,12.168c1.6,3.85,3.921,7.312,6.969,10.396 c3.085,3.049,6.549,5.399,10.398,7.037c3.886,1.602,7.939,2.398,12.169,2.398c4.229,0,8.34-0.826,12.303-2.465 c3.962-1.639,7.496-3.994,10.621-7.081c3.011-2.933,5.289-6.297,6.812-10.106C62.73,41,63.5,36.883,63.5,32.5 c0-4.343-0.77-8.454-2.33-12.303c-1.562-3.885-3.848-7.32-6.857-10.33C48.025,3.619,40.385,0.5,31.433,0.5z M31.567,6.259 c7.238,0,13.412,2.566,18.554,7.709c2.477,2.477,4.375,5.31,5.67,8.471c1.296,3.162,1.949,6.518,1.949,10.061 c0,7.354-2.516,13.454-7.506,18.33c-2.592,2.516-5.502,4.447-8.74,5.781c-3.2,1.334-6.498,1.994-9.927,1.994 c-3.468,0-6.788-0.653-9.949-1.948c-3.163-1.334-6.001-3.238-8.516-5.716c-2.515-2.514-4.455-5.353-5.826-8.516 c-1.333-3.199-2.017-6.498-2.017-9.927c0-3.467,0.684-6.787,2.017-9.949c1.371-3.2,3.312-6.074,5.826-8.628 C18.092,8.818,24.252,6.259,31.567,6.259z'/%3E%3C/g%3E%3C/svg%3E"); + } - .markdown p a { - text-decoration: underline; - } - .markdown p a:hover { - text-decoration: none; - } + .markdown p a { + text-decoration: underline; + } + .markdown p a:hover { + text-decoration: none; + } - .external::after { - padding-left: 0.5rem; - content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13.5' height='13.5' aria-hidden='true' viewBox='0 0 24 24' class='iconExternalLink_nPIU'%3E%3Cpath fill='currentColor' d='M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z'%3E%3C/path%3E%3C/svg%3E"); - } + .external::after { + padding-left: 0.5rem; + content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13.5' height='13.5' aria-hidden='true' viewBox='0 0 24 24' class='iconExternalLink_nPIU'%3E%3Cpath fill='currentColor' d='M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z'%3E%3C/path%3E%3C/svg%3E"); + } - .external.text-white::after { - content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13.5' height='13.5' aria-hidden='true' viewBox='0 0 24 24' class='iconExternalLink_nPIU'%3E%3Cpath fill='white' d='M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z'%3E%3C/path%3E%3C/svg%3E"); - } -} \ No newline at end of file + .external.text-white::after { + content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13.5' height='13.5' aria-hidden='true' viewBox='0 0 24 24' class='iconExternalLink_nPIU'%3E%3Cpath fill='white' d='M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z'%3E%3C/path%3E%3C/svg%3E"); + } +} diff --git a/src/app.html b/src/app.html index 1cb0db53..ce98600d 100644 --- a/src/app.html +++ b/src/app.html @@ -6,7 +6,11 @@ - + %sveltekit.head% diff --git a/src/lib/components/CalendarList.svelte b/src/lib/components/CalendarList.svelte index ba112cff..38593b63 100644 --- a/src/lib/components/CalendarList.svelte +++ b/src/lib/components/CalendarList.svelte @@ -1,67 +1,82 @@
- {#each segments as segment} -
-
-
{format(new Date(segment.startTime), "HH:mm")} - {format(new Date(segment.endTime), "HH:mm")}
- {#if !event} -
- {#each (segment.event || event).types as type} - - {/each} -
- {/if} -
-
-
- - - -
- {#if !event} - {(segment.event || event)[event && event.shortname ? 'shortname' : 'name']} - {:else} - {event.shortname || event.name} - {/if} - {#if segment.title} - - {segment.title} - {/if} -
-
-
- {#if !event} - - {/if} -
- {#if segment.venues || event?.venues} - πŸ“ {@html ((segment.venues || event.venues).map(vId => { - const place = bundle.places.find(p => p.id === vId) - return `${place.name}` - })).join(", ")} - {:else if (segment.event?.venueName || event?.venueName)} - πŸ“ {(segment.event?.venueName || event?.venueName)} - {/if} -
- {#if segment.ecap || event?.attendees || segment.event?.attendees } -
πŸ‘₯ {segment.ecap || event?.attendees || segment.event?.attendees}
- {/if} -
-
-
- {/each} -
\ No newline at end of file + {#each segments as segment} +
+
+
+ {format(new Date(segment.startTime), 'HH:mm')} - {format( + new Date(segment.endTime), + 'HH:mm' + )} +
+ {#if !event} +
+ {#each (segment.event || event).types as type} + + {/each} +
+ {/if} +
+
+
+ + + +
+ {#if !event} + {(segment.event || event)[event && event.shortname ? 'shortname' : 'name']} + {:else} + {event.shortname || event.name} + {/if} + {#if segment.title} + - {segment.title} + {/if} +
+
+
+ {#if !event} + + {/if} +
+ {#if segment.venues || event?.venues} + πŸ“ {@html (segment.venues || event.venues) + .map((vId) => { + const place = bundle.places.find((p) => p.id === vId); + return `${place.name}`; + }) + .join(', ')} + {:else if segment.event?.venueName || event?.venueName} + πŸ“ {segment.event?.venueName || event?.venueName} + {/if} +
+ {#if segment.ecap || event?.attendees || segment.event?.attendees} +
+ πŸ‘₯ {segment.ecap || event?.attendees || segment.event?.attendees} +
+ {/if} +
+
+
+ {/each} + diff --git a/src/lib/components/CollectionList.svelte b/src/lib/components/CollectionList.svelte index fa78f563..002a2ed5 100644 --- a/src/lib/components/CollectionList.svelte +++ b/src/lib/components/CollectionList.svelte @@ -1,84 +1,112 @@ {#each arr.map((k) => findObject(k)) as item} -
-
- {#if col === "benefit"} -
-
{item.slogan}
-
- {/if} - - - -
- {#if col !== "media-partner"} -
-

{item.shortname || item.name}

- {#if col === "event"} -
- {formatItemDate(item)} - {#if item.attendees}
{item.attendees} ppl{/if} -
- {/if} - {#if col === "media-partner"} -
{item.description}
- {/if} - {#if col === "speaker"} -
- {/if} - {#if col === "union"} -
- {/if} - {#if col === "place"} -
{item.capacity} ppl
- {/if} -
- {/if} -
+
+
+ {#if col === 'benefit'} +
+
+ {item.slogan} +
+
+ {/if} + + + +
+ {#if col !== 'media-partner'} +
+

+ {item.shortname || item.name} +

+ {#if col === 'event'} +
+ {formatItemDate(item)} + {#if item.attendees}
{item.attendees} ppl{/if} +
+ {/if} + {#if col === 'media-partner'} +
{item.description}
+ {/if} + {#if col === 'speaker'} +
+ +
+ {/if} + {#if col === 'union'} +
+ +
+ {/if} + {#if col === 'place'} +
{item.capacity} ppl
+ {/if} +
+ {/if} +
{/each} {#if offer} -
-
-
+
-
- {#if col === 'event'}Host your own event!{/if} - {#if col === 'benefit'}Offer visitors your own benefit!{/if} -
-
-
-{/if} \ No newline at end of file +
+
+
+
+
+ {#if col === 'event'}Host your own event!{/if} + {#if col === 'benefit'}Offer visitors your own benefit!{/if} +
+
+
+{/if} diff --git a/src/lib/components/EventTypeBadge.svelte b/src/lib/components/EventTypeBadge.svelte index 7512f096..c8be93dd 100644 --- a/src/lib/components/EventTypeBadge.svelte +++ b/src/lib/components/EventTypeBadge.svelte @@ -1,9 +1,11 @@ -
- {type} +
+ {type}
diff --git a/src/lib/components/Footer.svelte b/src/lib/components/Footer.svelte index 69e80a95..1b2b846b 100644 --- a/src/lib/components/Footer.svelte +++ b/src/lib/components/Footer.svelte @@ -1,40 +1,77 @@ -
-
-
βš™ This page is automatically generated using the structured dataset which can be consumed as a single JSON file β†’ data.prgblockweek.com/23/index.json. -
- πŸ“– The source data GitHub repository β†’ utxo-foundation/prague-blockchain-week. - Go ahead and do PRs! -
-
- {#if bundle} -
-
- Last update: {formatDistanceToNow(new Date(bundle.time))} ago -  |  Analytics -  |  pbw-explore {__VERSION__} - {#if item} -  |  ID: {item.id} [{cc}] -  |  - {/if} -
- {#if showSource} -

JSON source-code

-
{JSON.stringify(item, null, 2)}
- {/if} -
- {/if} -
\ No newline at end of file +
+
+ βš™ This page is automatically generated using the structured dataset which can be consumed as a + single JSON file β†’ data.prgblockweek.com/23/index.json. +
+ πŸ“– The source data GitHub repository β†’utxo-foundation/prague-blockchain-week. Go ahead and do PRs! +
+
+ {#if bundle} +
+
+ Last update: {formatDistanceToNow(new Date(bundle.time))} ago +  |  + Analytics +  |  + pbw-explore {__VERSION__} + {#if item} +  |  ID: {item.id} + [{cc}]  |  + + {/if} +
+ {#if showSource} +

JSON source-code

+
+ {JSON.stringify(item, null, 2)} +
+ {/if} +
+ {/if} +
diff --git a/src/lib/components/ItemLogo.svelte b/src/lib/components/ItemLogo.svelte index 4ec29bfc..d7b4d50f 100644 --- a/src/lib/components/ItemLogo.svelte +++ b/src/lib/components/ItemLogo.svelte @@ -1,17 +1,24 @@ {#if item[img]} - {item.name} + {item.name} {:else if item.hash} -
-{/if} \ No newline at end of file +
+{/if} diff --git a/src/lib/components/TimelineHeatmap.svelte b/src/lib/components/TimelineHeatmap.svelte index 57ac8187..7d11913b 100644 --- a/src/lib/components/TimelineHeatmap.svelte +++ b/src/lib/components/TimelineHeatmap.svelte @@ -1,157 +1,196 @@
- {#if selectedSegment} -
-
{selectedSegment.title}
-
- {#each selectedSegment.data.events.map(e => { return [eventDetail(e[0]), e[1]] }) as [item, segmentId]} -
-
- -
-
- {item.shortname || item.name} - {#if item.segments[segmentId].title} - - {item.segments[segmentId].title} - {/if} -
-
- {/each} -
-
- {/if} -
- {#each days as day} - - {/each} -
-
- {#each days as day, i} -
1 ? "border-right: 1px solid silver;" : "")))}" - > - {#each segments as segment} -
-
- {/each} -
- {/each} -
-
\ No newline at end of file + {#if selectedSegment} +
+
{selectedSegment.title}
+
+ {#each selectedSegment.data.events.map((e) => { + return [eventDetail(e[0]), e[1]]; + }) as [item, segmentId]} +
+
+ +
+
+ {item.shortname || item.name} + {#if item.segments[segmentId].title} + - {item.segments[segmentId].title} + {/if} +
+
+ {/each} +
+
+ {/if} +
+ {#each days as day} + + {/each} +
+
+ {#each days as day, i} +
+ {#each segments as segment} +
+ {/each} +
+ {/each} +
+
diff --git a/src/lib/dataApi.js b/src/lib/dataApi.js index a1c6fbf5..fb806907 100644 --- a/src/lib/dataApi.js +++ b/src/lib/dataApi.js @@ -1,31 +1,27 @@ -import localData from "$lib/data.json"; +import localData from '$lib/data.json'; -export async function load(entry = "23", host = null) { - let data = null; - if (host === "localhost") { - data = localData; - } else { - const resp = await fetch( - `https://data.prgblockweek.com/${entry}/index.json`, - ); - data = await resp.json(); - } - data.events.sort((a, b) => (a.attendees || 0) < (b.attendees || 0) ? 1 : -1) - //console.log(data.events) - data.speakers = []; - for (const event of data.events) { - if (!event.speakers) continue; - for (const speaker of event.speakers) { - speaker.events = [event.id]; - data.speakers.push(speaker); - } - } - return data; +export async function load(entry = '23', host = null) { + let data = null; + if (host === 'localhost') { + data = localData; + } else { + const resp = await fetch(`https://data.prgblockweek.com/${entry}/index.json`); + data = await resp.json(); + } + data.events.sort((a, b) => ((a.attendees || 0) < (b.attendees || 0) ? 1 : -1)); + //console.log(data.events) + data.speakers = []; + for (const event of data.events) { + if (!event.speakers) continue; + for (const speaker of event.speakers) { + speaker.events = [event.id]; + data.speakers.push(speaker); + } + } + return data; } export async function loadSchema() { - const resp = await fetch( - "https://data.prgblockweek.com/schema/1/bundle.json", - ); - return resp.json(); + const resp = await fetch('https://data.prgblockweek.com/schema/1/bundle.json'); + return resp.json(); } diff --git a/src/lib/pbw.js b/src/lib/pbw.js index 3e5e3ac5..9bee5d7e 100644 --- a/src/lib/pbw.js +++ b/src/lib/pbw.js @@ -1,44 +1,44 @@ export const config = { - collections: { - places: { - title: "Places", - model: "place", - img: "photo" - }, - events: { - title: "Events", - model: "event" - }, - speakers: { - title: "Speakers", - model: "speaker", - img: "photoUrl" - }, - "media-partners": { - title: "Media Partners & Communities", - model: "media-partner", - aspect: "aspect-video" - }, - benefits: { - title: "Benefits for visitors", - model: "benefit" - }, - unions: { - title: "Event Unions", - model: "union" - }, - chains: { - title: "Blockchains", - model: "chain" - } - }, - eventTypeColors: { - conference: '#d3e5ee', - meetup: '#fdecc8', - hackathon: '#dad7ed', - expo: '#eee0da', - party: '#dbeddb' - }, - date: "2023-06-02", - days: 10, -} \ No newline at end of file + collections: { + places: { + title: 'Places', + model: 'place', + img: 'photo' + }, + events: { + title: 'Events', + model: 'event' + }, + speakers: { + title: 'Speakers', + model: 'speaker', + img: 'photoUrl' + }, + 'media-partners': { + title: 'Media Partners & Communities', + model: 'media-partner', + aspect: 'aspect-video' + }, + benefits: { + title: 'Benefits for visitors', + model: 'benefit' + }, + unions: { + title: 'Event Unions', + model: 'union' + }, + chains: { + title: 'Blockchains', + model: 'chain' + } + }, + eventTypeColors: { + conference: '#d3e5ee', + meetup: '#fdecc8', + hackathon: '#dad7ed', + expo: '#eee0da', + party: '#dbeddb' + }, + date: '2023-06-02', + days: 10 +}; diff --git a/src/lib/utils.js b/src/lib/utils.js index 790f449b..b4c271f7 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -1,32 +1,37 @@ - import { format, addDays } from 'date-fns'; const langMapper = { - czech: 'cz', - slovak: 'sk', - english: 'gb' + czech: 'cz', + slovak: 'sk', + english: 'gb' +}; + +export function formatItemDate(item, opts = {}) { + let dt = format(new Date(item.date), 'MMMM d' + (opts.full && item.days === 1 ? ', yyyy' : '')); + if (item.days > 1) { + dt += + '-' + format(addDays(new Date(item.date), item.days - 1), 'd' + (opts.full ? ', yyyy' : '')); + } + return dt; } -export function formatItemDate (item, opts = {}) { - let dt = format(new Date(item.date), "MMMM d" + (opts.full && item.days === 1 ? ', yyyy' : '')) - if (item.days > 1) { - dt += "-" + format(addDays(new Date(item.date), item.days-1), "d"+ (opts.full ? ', yyyy' : '')) - } - return dt -} - -export function bareDomain (link, type="") { - let out = link.replace(/https?:\/\/(twitter\.com\/|t\.me\/|www\.youtube\.com\/c\/|linkedin\.com\/in\/|www\.|)/g, '').replace(/\/$/, "") - if ([ "twitter", "telegram", "youtube" ].includes(type)) { - out = "@" + out - } - return out +export function bareDomain(link, type = '') { + let out = link + .replace( + /https?:\/\/(twitter\.com\/|t\.me\/|www\.youtube\.com\/c\/|linkedin\.com\/in\/|www\.|)/g, + '' + ) + .replace(/\/$/, ''); + if (['twitter', 'telegram', 'youtube'].includes(type)) { + out = '@' + out; + } + return out; } export function getFlagEmoji(str, mapper = true) { - const codePoints = (mapper ? langMapper[str] : str) - .toUpperCase() - .split('') - .map(char => 127397 + char.charCodeAt()); - return String.fromCodePoint(...codePoints); -} \ No newline at end of file + const codePoints = (mapper ? langMapper[str] : str) + .toUpperCase() + .split('') + .map((char) => 127397 + char.charCodeAt()); + return String.fromCodePoint(...codePoints); +} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index e3e8a77a..14673cf2 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,20 +1,21 @@ - {#if homepage} -
-
-

Prague Blockchain Week 2023

-
June 2-11, 2023
-
-
+
+
+

+ Prague Blockchain Week 2023 +

+
June 2-11, 2023
+
+
{/if}
- -
\ No newline at end of file + +
diff --git a/src/routes/+page.js b/src/routes/+page.js index a4f0cac2..5c6523b1 100644 --- a/src/routes/+page.js +++ b/src/routes/+page.js @@ -1,5 +1,5 @@ -import { redirect } from "@sveltejs/kit"; +import { redirect } from '@sveltejs/kit'; export function load() { - throw redirect(302, "/23"); + throw redirect(302, '/23'); } diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 4fe93074..c19042d7 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,5 +1,5 @@ - Prague Blockchain Week | Explore + Prague Blockchain Week | Explore -
\ No newline at end of file +
diff --git a/src/routes/[entry]/+layout.js b/src/routes/[entry]/+layout.js index 5899d5c7..ce2f7d0a 100644 --- a/src/routes/[entry]/+layout.js +++ b/src/routes/[entry]/+layout.js @@ -1,9 +1,9 @@ -import * as dataApi from "$lib/dataApi"; +import * as dataApi from '$lib/dataApi'; export async function load({ params, url }) { - return { - params, - bundle: await dataApi.load(params.entry, url.hostname), - schema: await dataApi.loadSchema(), - }; + return { + params, + bundle: await dataApi.load(params.entry, url.hostname), + schema: await dataApi.loadSchema() + }; } diff --git a/src/routes/[entry]/+page.svelte b/src/routes/[entry]/+page.svelte index cc71b14e..05c49ab8 100644 --- a/src/routes/[entry]/+page.svelte +++ b/src/routes/[entry]/+page.svelte @@ -1,84 +1,151 @@ - #PBW{$page.params.entry} Explore + #PBW{$page.params.entry} Explore
-
- -
- {#each collections as cd} - - - - {/each} -
+
+ - + -

Conferences & Hackathons ({conferences.length})

-
- -
-

Other events ({otherEvents.length})

-
- -
-

Speakers ({data.bundle.speakers.length})

-

International 🌎

-
- !['cz', 'sk'].includes(s.country))} entry={entry} /> -
-

Local - Czech πŸ‡¨πŸ‡Ώ & Slovak πŸ‡ΈπŸ‡°

-
- ['cz', 'sk'].includes(s.country))} entry={entry} /> -
-

Places ({data.bundle.places.length})

-
- -
- {#if data.bundle.benefits} -

Benefits for visitors ({data.bundle.benefits.length})

-
- -
- {/if} - {#if data.bundle["media-partners"]} -

Media Partners & Communities ({data.bundle["media-partners"].length})

-

International 🌎

-
- !['czech', 'slovak'].includes(m.languages[0]))} img="logo" col="media-partner" entry={entry} aspect="aspect-[16/9]" size="small" /> -
-

Local - Czech πŸ‡¨πŸ‡Ώ & Slovak πŸ‡ΈπŸ‡°

-
- ['czech', 'slovak'].includes(m.languages[0]))} img="logo" col="media-partner" entry={entry} aspect="aspect-[16/9]" size="small" /> -
- {/if} - -
-
-
\ No newline at end of file +
+
+
diff --git a/src/routes/[entry]/[type]/+page.svelte b/src/routes/[entry]/[type]/+page.svelte index 589946a4..ce32f01e 100644 --- a/src/routes/[entry]/[type]/+page.svelte +++ b/src/routes/[entry]/[type]/+page.svelte @@ -1,219 +1,256 @@ - {tc?.title} | #PBW{$page.params.entry} Explore + {tc?.title} | #PBW{$page.params.entry} Explore {#if tc} -
-
-
-
-

#PBW23.{$page.params.type}

-
-

{tc.title} ({processedItems.length})

-
- - - - {#if type === 'events'} - - - - - - {/if} - {#if type === 'speakers'} - - - - - - {/if} - {#if type === 'media-partners'} - - - - - {/if} - {#if type === 'benefits'} - - - {/if} - {#if type === 'places'} - - - - - {/if} - - - - {#each processedItems as item} - - {#if type === 'events'} - - - - - - - {/if} - {#if type === 'speakers'} - - - - - - {/if} - {#if type === 'media-partners'} - - - - - {/if} - {#if type === 'benefits'} - - - {/if} - {#if type === 'places'} - - - - - {/if} - - {/each} - -
πŸ“…NameName🌎Name🌎NameNameπŸ‘₯
{formatItemDate(item)} - - - - - - - - - - - - {item.name} - {item.country && item.country !== 'xx' ? getFlagEmoji(item.country, false) : ''} - - - - - {item.name} - - {#if item.languages && item.languages.length > 0} -
- {#each item.languages as lang} -
{getFlagEmoji(lang)}
- {/each} -
- {/if} -
- - - - - {item.name} - - - - - - {item.name} - {item.capacity}
-
-
-
-
-
-{/if} \ No newline at end of file +
+
+
+
+

+ #PBW23.{$page.params.type} +

+
+

+ {tc.title} ({processedItems.length}) +

+
+ + + + {#if type === 'events'} + + + + + {/if} + {#if type === 'speakers'} + + + + + {/if} + {#if type === 'media-partners'} + + + + {/if} + {#if type === 'benefits'} + + {/if} + {#if type === 'places'} + + + + {/if} + + + + {#each processedItems as item} + + {#if type === 'events'} + + + + + + + {/if} + {#if type === 'speakers'} + + + + + + {/if} + {#if type === 'media-partners'} + + + + + {/if} + {#if type === 'benefits'} + + + {/if} + {#if type === 'places'} + + + + + {/if} + + {/each} + +
πŸ“… + Name + Name🌎 + Name🌎 + Name + NameπŸ‘₯
{formatItemDate(item)} + + + + + + + + + + + + {item.name} + {item.country && item.country !== 'xx' + ? getFlagEmoji(item.country, false) + : ''} + + + + + {item.name} + + {#if item.languages && item.languages.length > 0} +
+ {#each item.languages as lang} +
{getFlagEmoji(lang)}
+ {/each} +
+ {/if} +
+ + + + + {item.name} + + + + + + {item.name} + {item.capacity}
+
+
+
+
+
+{/if} diff --git a/src/routes/[entry]/[type]/[slug]/+page.svelte b/src/routes/[entry]/[type]/[slug]/+page.svelte index 240ef98c..a995cb6c 100644 --- a/src/routes/[entry]/[type]/[slug]/+page.svelte +++ b/src/routes/[entry]/[type]/[slug]/+page.svelte @@ -1,320 +1,423 @@ - {item.name} | #PBW{$page.params.entry} + {item.name} | #PBW{$page.params.entry}
-
-
- -
+
+
+ +
+ +
+ +

+ {item.name} +

+ {#if col === 'event'} +
+
+ {#each item.types as type} + + {/each} +
+
{formatItemDate(item, { full: true })}
+
+ πŸ“ + {#if item.venues} + {@html item.venues + .map((vId) => { + const place = data.bundle.places.find((p) => p.id === vId); + return `${place.name}`; + }) + .join(', ')} + {:else if item.venueUrl} + {item.venueName} + {:else} + {item.venueName} + {/if} +
+ {#if item.attendees} +
πŸ‘₯ {item.attendees}
+ {/if} +
+ {/if} + {#if col === 'speaker'} +
+ +
+
+ {#each Object.keys(speakerLinks) as lk} + {#if speakerLinks[lk].col(item)} + + {/if} + {/each} +
+ {/if} + {#if col === 'event'} +
+ {#if item.chains && item.chains.length > 0} +
+
Chains
+
+ {#each item.chains.map((chId) => { + const chItem = data.bundle.chains.find((x) => x.id === chId); + if (!chItem) { + return { name: chain.substr(0, 1).toUpperCase() + chain.substr(1) }; + } + return chItem; + }) as chain} +
+ {#if chain.id} + + {#if chain.logo} + + {/if} + {chain.name} + + {:else} + {chain.name} + {/if} +
+ {/each} +
+
+ {/if} + {#if item.tags && item.tags.length > 0} +
+
Tags
+
+ {#each item.tags as tag} +
#{tag}
+ {/each} +
+
+ {/if} + {#if item.languages && item.languages.length > 0} +
+
Languages
+
+ {#each item.languages as lang} +
{getFlagEmoji(lang)} {lang}
+ {/each} +
+
+ {/if} +
+
Organizator
+
+
+ {#if item.poc} +
+
Point of contact
+
+
+ {/if} +
+ {/if} + {#if col === 'place'} +
+ {#if item.address} +
+
Address
+
+ {item.address} +
+
+ {/if} + {#if item.capacity} +
+
Capacity
+
+ {item.capacity} ppl +
+
+ {/if} + {#if item.eventTypes && item.eventTypes.length > 0} +
+
Event Types
+
+ {#each item.eventTypes as type} +
{type}
+ {/each} +
+
+ {/if} +
+ {/if} + {#if item.links} +
+ {#each Object.keys(item.links) as lk} + + {/each} +
+ {/if} +
- -
- -

- {item.name} -

- {#if col === 'event'} -
-
- {#each item.types as type} - - {/each} -
-
{formatItemDate(item, { full: true })}
-
πŸ“ - {#if item.venues} - {@html item.venues.map(vId => { - const place = data.bundle.places.find(p => p.id === vId) - return `${place.name}` - }).join(", ")} - {:else if item.venueUrl} - {item.venueName} - {:else} - {item.venueName} - {/if} -
- {#if item.attendees} -
πŸ‘₯ {item.attendees}
- {/if} -
- {/if} - {#if col === 'speaker'} -
- -
-
- {#each Object.keys(speakerLinks) as lk} - {#if speakerLinks[lk].col(item)} - - {/if} - {/each} -
- {/if} - {#if col === 'event'} -
- {#if item.chains && item.chains.length > 0} -
-
Chains
-
- {#each item.chains.map(chId => { - const chItem = data.bundle.chains.find(x => x.id === chId) - if (!chItem) { - return { - name: chain.substr(0, 1).toUpperCase() + chain.substr(1) - } - } - return chItem - }) as chain} -
- {#if chain.id} - - {#if chain.logo} - - {/if} - {chain.name} - - {:else} - {chain.name} - {/if} -
- {/each} -
-
- {/if} - {#if item.tags && item.tags.length > 0} -
-
Tags
-
- {#each item.tags as tag} -
#{tag}
- {/each} -
-
- {/if} - {#if item.languages && item.languages.length > 0} -
-
Languages
-
- {#each item.languages as lang} -
{getFlagEmoji(lang)} {lang}
- {/each} -
-
- {/if} -
Organizator
- {#if item.poc} -
Point of contact
- {/if} -
- {/if} - {#if col === 'place'} -
- {#if item.address} -
-
Address
-
- {item.address} -
-
- {/if} - {#if item.capacity} -
-
Capacity
-
- {item.capacity} ppl -
-
- {/if} - {#if item.eventTypes && item.eventTypes.length > 0} -
-
Event Types
-
- {#each item.eventTypes as type} -
{type}
- {/each} -
-
- {/if} -
- {/if} - {#if item.links} -
- {#each Object.keys(item.links) as lk} - - {/each} -
- {/if} -
+ {#if item.registration} +
+
+ {#if item.registration.link} + + {:else} +
+ {#if item.registration.type === 'tickets'} + Tickets not yet available + {:else if item.registration.type === 'invites'} + Application form is not yet available + {/if} +
+ {/if} +
+ {#if item.registration.status} +
+ Status + {#if item.registration.status === 'available'} + β€’ Available + {:else if item.registration.status === 'sold-out'} + β€’ Sold Out! + {:else if item.registration.status === 'closed'} + β€’ Registration closed + {/if} +
+ {/if} +
+ Price + {#if item.registration.type === 'tickets'} + {item.registration.price || 'TBA'} + {:else} + Free! + {/if} +
+
+
+
+ {/if} +
- {#if item.registration} -
-
- {#if item.registration.link} - - {:else} -
- {#if item.registration.type === 'tickets'} - Tickets not yet available - {:else if item.registration.type === 'invites'} - Application form is not yet available - {/if} -
- {/if} -
- {#if item.registration.status} -
Status - {#if item.registration.status === 'available'} - β€’ Available - {:else if item.registration.status === 'sold-out'} - β€’ Sold Out! - {:else if item.registration.status === 'closed'} - β€’ Registration closed - {/if} -
- {/if} -
Price - {#if item.registration.type === 'tickets'} - {item.registration.price || 'TBA'} - {:else} - Free! - {/if} -
-
-
-
- {/if} -
+ {#if item.desc || item.description} +
+
+
+ {/if} - {#if item.desc || item.description} -
-
-
- {/if} + {#if col === 'event'} + {#if item.tracks} +

Tracks

+
+ {#each item.tracks as track} +
+
{track.shortname || track.name}
+ +
+ {/each} +
+ {/if} + {#if item.segments} +

Schedule

+ {#each eventDates(item) as date} +
+

+ {format(new Date(date), 'EEEE - MMMM d, yyyy')} +

+
+ s.startTime.match(new RegExp('^' + date)))} + {entry} + bundle={data.bundle} + event={item} + /> +
+
+ {/each} + {/if} + {#if item.speakers} +

+ Speakers ({item.speakers?.length || 0}) +

+
+ +
+ {/if} + {#if item.events} +

+ Sub-Events ({item.events?.length || 0}) +

+
+ +
+ {/if} + {#if item.venues} +

+ Venues ({item.venues?.length || 0}) +

+
+ item.venues.includes(p.id))} + col="place" + img="photo" + /> +
+ {/if} + {/if} + {#if col === 'union'} +

+ Big events ({item.events?.map((eId) => data.bundle.events.find((e) => e.id === eId)) + .length}) +

+
+ data.bundle.events.find((e) => e.id === eId))} + col="event" + img="logo" + /> +
+ {/if} + {#if col === 'speaker'} +

+ Events ({data.bundle.events.filter((e) => e.speakers?.find((s) => s.id === item.id)) + .length || 0}) +

+
+ e.speakers?.find((s) => s.id === item.id))} + col="event" + img="logo" + /> +
+ {/if} + {#if col === 'place'} +

+ Events ({data.bundle.events.filter((e) => e.venues?.includes(item.id)).length || 0}) +

+
+ e.venues?.includes(item.id))} + col="event" + img="logo" + /> +
+ {/if} + {#if col === 'chain'} +

+ Events ({data.bundle.events.filter((e) => e.chains?.includes(item.id)).length || 0}) +

+
+ e.chains?.includes(item.id))} + col="event" + img="logo" + /> +
+ {/if} - {#if col === "event"} - {#if item.tracks} -

Tracks

-
- {#each item.tracks as track} -
-
{track.shortname || track.name}
- -
- {/each} -
- {/if} - {#if item.segments} -

Schedule

- {#each eventDates(item) as date} -
-

{format(new Date(date), "EEEE - MMMM d, yyyy")}

-
- s.startTime.match(new RegExp("^"+date)))} entry={entry} bundle={data.bundle} event={item} /> -
-
- {/each} - {/if} - {#if item.speakers} -

Speakers ({item.speakers?.length || 0})

-
- -
- {/if} - {#if item.events} -

Sub-Events ({item.events?.length || 0})

-
- -
- {/if} - {#if item.venues} -

Venues ({item.venues?.length || 0})

-
- item.venues.includes(p.id))} col="place" img="photo" /> -
- {/if} - {/if} - {#if col === "union"} -

Big events ({item.events?.map(eId => data.bundle.events.find(e => e.id === eId)).length})

-
- data.bundle.events.find(e => e.id === eId))} col="event" img="logo" /> -
- {/if} - {#if col === "speaker"} -

Events ({data.bundle.events.filter(e => e.speakers?.find(s => s.id === item.id)).length || 0})

-
- e.speakers?.find(s => s.id === item.id))} col="event" img="logo" /> -
- {/if} - {#if col === "place"} -

Events ({data.bundle.events.filter(e => e.venues?.includes(item.id)).length || 0})

-
- e.venues?.includes(item.id))} col="event" img="logo" /> -
- {/if} - {#if col === "chain"} -

Events ({data.bundle.events.filter(e => e.chains?.includes(item.id)).length || 0})

-
- e.chains?.includes(item.id))} col="event" img="logo" /> -
- {/if} - -
-
-
-
\ No newline at end of file +
+
+
+
diff --git a/src/routes/[entry]/day/[date]/+page.svelte b/src/routes/[entry]/day/[date]/+page.svelte index 16b05619..a1c16aea 100644 --- a/src/routes/[entry]/day/[date]/+page.svelte +++ b/src/routes/[entry]/day/[date]/+page.svelte @@ -1,60 +1,77 @@ - {format(new Date($page.params.date), "EEEE MMMM d, yyyy")} | #PBW{$page.params.entry} Explore + {format(new Date($page.params.date), 'EEEE MMMM d, yyyy')} | #PBW{$page.params.entry} Explore
-
-
- - - -

{format(new Date($page.params.date), "MMMM d, yyyy - EEEE")}

-
- -
-
-
-
-
\ No newline at end of file +
+
+
+

+ #PBW23.day +

+
+ + +

+ {format(new Date($page.params.date), 'MMMM d, yyyy - EEEE')} +

+
+ +
+
+
+
+ diff --git a/src/routes/[entry]/schedule/+page.svelte b/src/routes/[entry]/schedule/+page.svelte index f16dc722..7d50fafe 100644 --- a/src/routes/[entry]/schedule/+page.svelte +++ b/src/routes/[entry]/schedule/+page.svelte @@ -1,72 +1,88 @@ - Schedule | #PBW{$page.params.entry} Explore + Schedule | #PBW{$page.params.entry} Explore
-
-
-
-

#PBW23.schedule

-
- - - {#each days as day} -
-

{format(new Date(day.date), "MMMM d, yyyy")} - {format(new Date(day.date), "EEEE")}

-
- -
-
- {/each} -
-
-
-
\ No newline at end of file +
+
+
+

+ #PBW23.schedule +

+
+ + + {#each days as day} +
+

+ {format(new Date(day.date), 'MMMM d, yyyy')} + - {format(new Date(day.date), 'EEEE')} +

+
+ +
+
+ {/each} +
+
+ diff --git a/svelte.config.js b/svelte.config.js index bce6e82e..a0a9bdbb 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,12 +1,12 @@ -import adapter from "@sveltejs/adapter-static"; -import { vitePreprocess } from "@sveltejs/kit/vite"; +import adapter from '@sveltejs/adapter-static'; +import { vitePreprocess } from '@sveltejs/kit/vite'; /** @type {import('@sveltejs/kit').Config} */ const config = { - kit: { - adapter: adapter(), - }, - preprocess: vitePreprocess(), + kit: { + adapter: adapter() + }, + preprocess: vitePreprocess() }; export default config; diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 1a61eb74..220c6979 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -1,24 +1,24 @@ /** @type {import('tailwindcss').Config} */ -const defaultTheme = require("tailwindcss/defaultTheme"); +const defaultTheme = require('tailwindcss/defaultTheme'); module.exports = { - content: ["./src/**/*.{html,js,svelte,ts}"], - theme: { - extend: { - fontFamily: { - "sans": ["Barlow Semi Condensed", ...defaultTheme.fontFamily.sans], - }, - colors: { - "pbw": { - "red": "#ff1616", - "yellow": "#ffde59", - "white": "#ffffff", - "dark": "#252525" - }, - }, - }, - }, - darkMode: 'class', - plugins: [] + content: ['./src/**/*.{html,js,svelte,ts}'], + theme: { + extend: { + fontFamily: { + sans: ['Barlow Semi Condensed', ...defaultTheme.fontFamily.sans] + }, + colors: { + pbw: { + red: '#ff1616', + yellow: '#ffde59', + white: '#ffffff', + dark: '#252525' + } + } + } + }, + darkMode: 'class', + plugins: [] }; diff --git a/tests/test.js b/tests/test.js index 479ee92b..4e579377 100644 --- a/tests/test.js +++ b/tests/test.js @@ -1,6 +1,6 @@ -import { expect, test } from "@playwright/test"; +import { expect, test } from '@playwright/test'; -test("index page has expected h1", async ({ page }) => { - await page.goto("/"); - expect(await page.textContent("h1")).toBe("Welcome to SvelteKit"); +test('index page has expected h1', async ({ page }) => { + await page.goto('/'); + expect(await page.textContent('h1')).toBe('Welcome to SvelteKit'); }); diff --git a/vite.config.js b/vite.config.js index 0da8df3c..5bf4b599 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,11 +1,11 @@ -import { sveltekit } from "@sveltejs/kit/vite"; -import pkg from "./package.json" assert { type: 'json'}; +import { sveltekit } from '@sveltejs/kit/vite'; +import pkg from './package.json' assert { type: 'json' }; const config = { - plugins: [sveltekit()], - define: { - __VERSION__: JSON.stringify(pkg.version) - } + plugins: [sveltekit()], + define: { + __VERSION__: JSON.stringify(pkg.version) + } }; export default config;