diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..ac0f580 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,36 @@ +name: GitHub Pages + +on: + push: + branches: + - master # Set a branch to deploy + pull_request: + +jobs: + deploy: + runs-on: ubuntu-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v2 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + + - uses: actions/setup-node@v2 + with: + node-version: '17' + + + - run: npm install + - run: npm run build + + - name: Add custom domain + run: "touch build/CNAME && echo \"new.utxo.cz\" >> build/CNAME" + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/master' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build diff --git a/package-lock.json b/package-lock.json index 20555e5..c517e71 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,11 +13,13 @@ "cookie": "^0.4.1" }, "devDependencies": { + "@faker-js/faker": "^6.1.2", "@sveltejs/adapter-auto": "next", "@sveltejs/kit": "next", "autoprefixer": "^10.4.4", "postcss": "^8.4.12", "svelte": "^3.46.0", + "svelte-markdown": "^0.2.2", "tailwindcss": "^3.0.23" } }, @@ -118,6 +120,16 @@ "node": ">=4" } }, + "node_modules/@faker-js/faker": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-6.1.2.tgz", + "integrity": "sha512-QSvmexHCxeRUk1/yKmoEDaWB5Hohjvtim5g2JJwy8S/l0L4b3y/GxSpE6vN4SBoVGGahEQW21uqyRr7EofI35A==", + "dev": true, + "engines": { + "node": ">=14.0.0", + "npm": ">=6.0.0" + } + }, "node_modules/@fontsource/fira-mono": { "version": "4.5.7", "resolved": "https://registry.npmjs.org/@fontsource/fira-mono/-/fira-mono-4.5.7.tgz", @@ -283,6 +295,12 @@ } } }, + "node_modules/@types/marked": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/marked/-/marked-4.0.3.tgz", + "integrity": "sha512-HnMWQkLJEf/PnxZIfbm0yGJRRZYYMhb++O9M36UCTA9z53uPvVoSlAwJr3XOpDEryb7Hwl1qAx/MV6YIW1RXxg==", + "dev": true + }, "node_modules/@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", @@ -1278,6 +1296,18 @@ "node": ">=12" } }, + "node_modules/marked": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.12.tgz", + "integrity": "sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ==", + "dev": true, + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -1747,6 +1777,19 @@ "svelte": ">=3.19.0" } }, + "node_modules/svelte-markdown": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/svelte-markdown/-/svelte-markdown-0.2.2.tgz", + "integrity": "sha512-bNxpG3gRbC2UjAFakIMcLEzVq5db2Md57aeU4wKCuffSfD6f7RkvtYDqbrAk2ycC55t3wykOy0E7KDuvVKyDYA==", + "dev": true, + "dependencies": { + "@types/marked": "^4.0.1", + "marked": "^4.0.10" + }, + "peerDependencies": { + "svelte": "^3.0.0" + } + }, "node_modules/tailwindcss": { "version": "3.0.23", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.0.23.tgz", @@ -1963,6 +2006,12 @@ } } }, + "@faker-js/faker": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-6.1.2.tgz", + "integrity": "sha512-QSvmexHCxeRUk1/yKmoEDaWB5Hohjvtim5g2JJwy8S/l0L4b3y/GxSpE6vN4SBoVGGahEQW21uqyRr7EofI35A==", + "dev": true + }, "@fontsource/fira-mono": { "version": "4.5.7", "resolved": "https://registry.npmjs.org/@fontsource/fira-mono/-/fira-mono-4.5.7.tgz", @@ -2088,6 +2137,12 @@ "svelte-hmr": "^0.14.11" } }, + "@types/marked": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/marked/-/marked-4.0.3.tgz", + "integrity": "sha512-HnMWQkLJEf/PnxZIfbm0yGJRRZYYMhb++O9M36UCTA9z53uPvVoSlAwJr3XOpDEryb7Hwl1qAx/MV6YIW1RXxg==", + "dev": true + }, "@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", @@ -2708,6 +2763,12 @@ "sourcemap-codec": "^1.4.8" } }, + "marked": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.12.tgz", + "integrity": "sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ==", + "dev": true + }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -2995,6 +3056,16 @@ "dev": true, "requires": {} }, + "svelte-markdown": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/svelte-markdown/-/svelte-markdown-0.2.2.tgz", + "integrity": "sha512-bNxpG3gRbC2UjAFakIMcLEzVq5db2Md57aeU4wKCuffSfD6f7RkvtYDqbrAk2ycC55t3wykOy0E7KDuvVKyDYA==", + "dev": true, + "requires": { + "@types/marked": "^4.0.1", + "marked": "^4.0.10" + } + }, "tailwindcss": { "version": "3.0.23", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.0.23.tgz", diff --git a/package.json b/package.json index d25c0dc..44c1b44 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,13 @@ "prepare": "svelte-kit sync" }, "devDependencies": { + "@faker-js/faker": "^6.1.2", "@sveltejs/adapter-auto": "next", "@sveltejs/kit": "next", "autoprefixer": "^10.4.4", "postcss": "^8.4.12", "svelte": "^3.46.0", + "svelte-markdown": "^0.2.2", "tailwindcss": "^3.0.23" }, "type": "module", diff --git a/src/app.css b/src/app.css index 04fb3fe..5319dfa 100644 --- a/src/app.css +++ b/src/app.css @@ -4,108 +4,3 @@ @tailwind components; @tailwind utilities; -:root { - font-family: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, - Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; - --font-mono: 'Fira Mono', monospace; - --pure-white: #ffffff; - --primary-color: #b9c6d2; - --secondary-color: #d0dde9; - --tertiary-color: #edf0f8; - --accent-color: #ff3e00; - --heading-color: rgba(0, 0, 0, 0.7); - --text-color: #444444; - --background-without-opacity: rgba(255, 255, 255, 0.7); - --column-width: 42rem; - --column-margin-top: 4rem; -} - -body { - min-height: 100vh; - margin: 0; - background-color: var(--primary-color); - background: linear-gradient( - 180deg, - var(--primary-color) 0%, - var(--secondary-color) 10.45%, - var(--tertiary-color) 41.35% - ); -} - -body::before { - content: ''; - width: 80vw; - height: 100vh; - position: absolute; - top: 0; - left: 10vw; - z-index: -1; - background: radial-gradient( - 50% 50% at 50% 50%, - var(--pure-white) 0%, - rgba(255, 255, 255, 0) 100% - ); - opacity: 0.05; -} - -#svelte { - min-height: 100vh; - display: flex; - flex-direction: column; -} - -h1, -h2, -p { - font-weight: 400; - color: var(--heading-color); -} - -p { - line-height: 1.5; -} - -a { - color: var(--accent-color); - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -h1 { - font-size: 2rem; - text-align: center; -} - -h2 { - font-size: 1rem; -} - -pre { - font-size: 16px; - font-family: var(--font-mono); - background-color: rgba(255, 255, 255, 0.45); - border-radius: 3px; - box-shadow: 2px 2px 6px rgb(255 255 255 / 25%); - padding: 0.5em; - overflow-x: auto; - color: var(--text-color); -} - -input, -button { - font-size: inherit; - font-family: inherit; -} - -button:focus:not(:focus-visible) { - outline: none; -} - -@media (min-width: 720px) { - h1 { - font-size: 2.4rem; - } -} diff --git a/src/app.html b/src/app.html index e7d2cbd..f79de85 100644 --- a/src/app.html +++ b/src/app.html @@ -5,6 +5,7 @@ + %svelte.head% diff --git a/src/lib/Avatar.svelte b/src/lib/Avatar.svelte new file mode 100644 index 0000000..2e98ed1 --- /dev/null +++ b/src/lib/Avatar.svelte @@ -0,0 +1,88 @@ + + +{#if size === 'normal'} +
+ +
{speaker.name} {country}
+ {#if speaker.bio} +
+ {/if} + {#if speaker.orgs} +
+ {/if} +
+{/if} + +{#if size === 'small'} +
+ +
+{/if} + +{#if size === 'extra-small'} +
+ +
+{/if} + +{#if size === 'micro'} +
+ +
+{/if} + diff --git a/src/lib/EventTypeLabel.svelte b/src/lib/EventTypeLabel.svelte new file mode 100644 index 0000000..6730344 --- /dev/null +++ b/src/lib/EventTypeLabel.svelte @@ -0,0 +1,19 @@ + + +
+
+
{current.title}
+
+ diff --git a/src/lib/Footer.svelte b/src/lib/Footer.svelte new file mode 100644 index 0000000..402473b --- /dev/null +++ b/src/lib/Footer.svelte @@ -0,0 +1,26 @@ + + +{#if $bundle} +
+
+
+
+ UTXO.22 +
+
+ Otevřená komunitní kryptoměnová konference +
+ +
+ +
+
+ S láskou vytváří UTXO Foundation, z.s. +
+
+{/if} diff --git a/src/lib/SocialButtons.svelte b/src/lib/SocialButtons.svelte new file mode 100644 index 0000000..f7df819 --- /dev/null +++ b/src/lib/SocialButtons.svelte @@ -0,0 +1,35 @@ + + +{#if $bundle} + {#if size === 'small'} +
+ {#each socials as soc} + + + + {/each} +
+ {/if} + {#if size === 'normal'} +
+
+ {#each socials as soc} + + {/each} +
+
+ {/if} +{/if} diff --git a/src/lib/api.js b/src/lib/api.js index fbeb823..59d3f8f 100644 --- a/src/lib/api.js +++ b/src/lib/api.js @@ -1,7 +1,40 @@ +import { bundle } from '$lib/stores.js'; +import staticBundle from '$lib/bundle.json'; -export async function spec () { +class API { + constructor () { + this.bundle = null + } - const resp = await fetch('https://spec.utxo.cz/22/bundle.json') - return resp.json() + async load () { + await this.loadBundle() + } + async loadBundle (local = false) { + if (!this.bundle) { + if (local) { + this.bundle = staticBundle + } else { + const resp = await fetch('https://spec.utxo.cz/22/bundle.json') + this.bundle = await resp.json() + } + bundle.set(this.bundle) + } + return this.bundle + } + + async submitOrder (data) { + const resp = await fetch('https://api.utxo.cz/submitOrder', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify(data), + }) + return resp.json() + } } + +const api = new API(); + +export default api; diff --git a/src/lib/bundle.json b/src/lib/bundle.json new file mode 120000 index 0000000..9d29b61 --- /dev/null +++ b/src/lib/bundle.json @@ -0,0 +1 @@ +../../../utxo/dist/22/bundle.json \ No newline at end of file diff --git a/src/lib/header/Header.svelte b/src/lib/header/Header.svelte index 08358cf..b4ea900 100644 --- a/src/lib/header/Header.svelte +++ b/src/lib/header/Header.svelte @@ -1,11 +1,26 @@ -
+
-
diff --git a/src/lib/stores.js b/src/lib/stores.js new file mode 100644 index 0000000..6a49f1c --- /dev/null +++ b/src/lib/stores.js @@ -0,0 +1,10 @@ +import { writable } from 'svelte/store'; + +export const bundle = writable(null); + +export const orderTicketForm = writable({ + count: 1, + email: '', + tickets: [], + paymentMethod: 'card', +}); diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte index 4882756..951d5b9 100644 --- a/src/routes/__layout.svelte +++ b/src/routes/__layout.svelte @@ -1,17 +1,21 @@ -
+{#if bundle} +
@@ -19,10 +23,9 @@
-
-
+
- +{/if} diff --git a/src/routes/index.svelte b/src/routes/index.svelte index 3ee78ea..12cdf8f 100644 --- a/src/routes/index.svelte +++ b/src/routes/index.svelte @@ -3,35 +3,107 @@ Home -
-

-
- - - Welcome - -
+
+ {#if $bundle} +
+ {#each tracks as track} +
{track.shortname || track.name} {#if !track.id}({$bundle.spec.speakers.length}){/if}
+ {/each} +
- to your new
SvelteKit app -

- -

- try editing src/routes/index.svelte -

- - - -

- Hello world! -

+
+ {#each $bundle.spec.speakers as speaker} + {#if (currentTrack === 'top' && speaker.lead === true) || currentTrack !== 'top'} + {#if (!currentTrack || speaker.tracks.includes(currentTrack)) || currentTrack === 'top'} + + {/if} + {/if} + {/each} +
+ {#if currentTrack === 'top'} +
+
+
+ {#each $bundle.spec.speakers as speaker} + {#if !speaker.lead} + + {/if} + {/each} +
+
+ {/if} + {/if}
+
+
+
+
+ +
+
+
Místo
+
Gabriel Loci
+
+ Holečkova 106/10
+ 150 00 Praha 5 - Smíchov +
+
+ Benediktinky. Kulturní památka. Česká Pošta. Poštovní muzeum. +Na první pohled nesouvisející názvy, které jsou ale neodmyslitelnou součástí unikátního komplexu Gabriel Loci na pražském Smíchově doslova pár minut od centra. +Na konci 19.století v klášteře sídlily řeholnice, ženské opatství řádu benediktinek beuronské kongregace. Později prostory spravovalo československé Ministerstvo pošt a telegrafů. +Dnes komplex využívají hlavně natáčecí studia jako HBO, Netflix nebo i ČT. No a my! 💪

+Zažijte mysteriózní atmosféru komplexu na 1.ročníku konference UTXO.22. Část after-party si užijete doslova v pitevně ze seriálu Devadesátky 👌😀 +
+
+
+
+
+ +{#if $bundle} +
+
+

Často kladené dotazy (FAQ)

+
+ {#each $bundle.spec.faqs as item} +
+
{item.question}
+ +
+ {/each} +
+
+
+{/if} + diff --git a/src/routes/program.svelte b/src/routes/program.svelte new file mode 100644 index 0000000..bc65dbf --- /dev/null +++ b/src/routes/program.svelte @@ -0,0 +1,71 @@ + + + +
+

Program

+
Program stále připravujeme. Jeho konečná podoba bude zveřejněna par týdnů před konferencí.
+ +
+ {#each $bundle.spec.events.filter(e => !e.parent) as e} +
+
{e.name}
+ {#if e.speakers && e.speakers.length > 0} +
+ {#each speakersMap(e.speakers) as s} +
+ +
{s.name}
+
+ {/each} +
+ {/if} +
+
+
{trackRender(e.track)}
+
{e.duration}m
+
+ {#if getParents(e).length > 0} +
+
+ {#each getParents(e) as pe} +
+
{pe.name}
+
+ {#if pe.speakers.length === 0} +
TBA
+ {:else} + {#each speakersMap(pe.speakers) as s} +
{s.name}
+ {/each} + {/if} +
+
+ {/each} +
+
+ {/if} +
+ {/each} +
+
diff --git a/src/routes/vstupenky.svelte b/src/routes/vstupenky.svelte new file mode 100644 index 0000000..9c44160 --- /dev/null +++ b/src/routes/vstupenky.svelte @@ -0,0 +1,160 @@ + + +
+
+

Vaše vstupenky

+
Nemáte žádnou vstupenku
+
+
+

Nákup vstupenek

+
+
Zbývá 333 z 333 (celková emise: 999 vstupenek)
+
+
I. vlna
+ +
+
+
+
+ Aktuální cena vstupenky: {ticketPrice} Kč / osobu +
+
+
+
✅ Vstupenka obsahuje
+
+
• přístup na všechny přednášky, workshopy a další událostí v rámci konference (do naplnění kapacity sálu)
+
• platnost oba dva konferenční dny (sobota + neděle)
+
• přístup na UTXO.Party během sobotního večera/noci
+
• skvělou možnost networkingu v rámci lokální kryptokomunity
+
+
+
+
❌ Vstupenka NEobsahuje
+
+
• jídlo nebo pití - teplé i studené občerstvení bude možné zakoupit na místě, platba kartou nebo Lightning Network (LN)
+
• v případě menších přednášejících sálů negarantujeme místo pro každého
+
+
+
+
+
+
+
Počet vstupenek
+
+ +
+
+
+
Email
+
Kontaktní email, na který budou zaslány vstupenky.
+
+
+
+
Údaje na jmenovku
+
Informace, které budou vytištěné na Vaší konferenční jmenovku. Tyto údaje jsou nepovinné a je možné je změnit později.
+
+
+ {#each ticketFormCountArray($orderTicketForm.count) as i} +
+
+
Vstupenka #{i+1}
+
+
+
Jméno
+
+
+
+
Organizace
+
+
+
+
Twitter handle
+
+
+
+
+
+ {/each} +
+
+
Platební metoda
+
+ {#each paymentMethods as pm} +
+ +
+ {/each} +
+
+
+ Celkem: {$orderTicketForm.count * ticketPrice} Kč +
+
+ +
+
+
+
+ diff --git a/static/img/logo-full.png b/static/img/logo-full.png deleted file mode 100644 index 691c91d..0000000 Binary files a/static/img/logo-full.png and /dev/null differ diff --git a/static/img/logo.png b/static/img/logo.png new file mode 100644 index 0000000..315649e Binary files /dev/null and b/static/img/logo.png differ diff --git a/static/photos/gabriel-loci.jpeg b/static/photos/gabriel-loci.jpeg new file mode 100644 index 0000000..686e6e1 Binary files /dev/null and b/static/photos/gabriel-loci.jpeg differ diff --git a/tailwind.config.cjs b/tailwind.config.cjs index ce58078..563bbc6 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -1,7 +1,25 @@ module.exports = { content: ['./src/**/*.{html,js,svelte,ts}'], theme: { - extend: {}, + extend: { + colors: { + custom: { + blue: '#4D96FF', + green: '#6BCB77', + yellow: '#FFD93D', + red: '#FF6B6B', + }, + blue: { + web: '#393F67', + 'web-bg': '#191B2E', + 'web-light': '#DBE8F4', + utxo: '#00A1FE' + } + }, + backgroundImage: { + 'utxo-gradient': 'linear-gradient(130deg,#FF634D,#00A1FE)' + } + } }, plugins: [], }