Skip to content

Commit

Permalink
Merge pull request #848 from shiyouganai/shiyouganai-slashocalypse
Browse files Browse the repository at this point in the history
Fix examples page, piano() and a few workshop imgs
  • Loading branch information
felixroos committed Dec 6, 2023
2 parents ff45bab + a32ed02 commit 2bd21df
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion website/src/pages/de/workshop/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { MiniRepl } from '../../../docs/MiniRepl';

# Willkommen

<img src="/icons/strudel_icon.png" className="w-32 animate-pulse md:float-right ml-8" />
<div className="w-32 animate-pulse md:float-right ml-8">![Strudel Icon](/icons/strudel_icon.png)</div>

Willkommen zum Strudel Workshop!
Du hast den richtigen Ort gefunden wenn du lernen möchtest wie man mit Code Musik macht.
Expand Down
7 changes: 5 additions & 2 deletions website/src/pages/examples/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import * as tunes from '../../../src/repl/tunes.mjs';
import HeadCommon from '../../components/HeadCommon.astro';
import { getMetadata } from '../metadata_parser';
const { BASE_URL } = import.meta.env;
const baseNoTrailing = BASE_URL.endsWith('/') ? BASE_URL.slice(0, -1) : BASE_URL;
---

<head>
Expand All @@ -12,11 +15,11 @@ import { getMetadata } from '../metadata_parser';
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-2 p-2 select-none">
{
Object.entries(tunes).map(([name, tune]) => (
<a class="rounded-md bg-slate-900 hover:bg-slate-700 cursor-pointer relative" href={`./#${btoa(tune)}`}>
<a class="rounded-md bg-slate-900 hover:bg-slate-700 cursor-pointer relative" href={`${baseNoTrailing}/#${btoa(tune)}`}>
<div class="absolute w-full h-full flex justify-center items-center">
<span class="bg-slate-800 p-2 rounded-md text-white">{getMetadata(tune)['title'] || name}</span>
</div>
<img src={`./img/example-${name}.png`} />
<img src={`${baseNoTrailing}/img/example-${name}.png`} />
</a>
))
}
Expand Down
4 changes: 2 additions & 2 deletions website/src/pages/learn/pwa.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ A standalone app has its own desktop / homescreen icon and launches in a separat
without the browser ui.

<figure>
<img src="./pwa/strudel-macos.png" alt="Strudel on MacOS" />
![Strudel on MacOS](/pwa/strudel-macos.png)
<figcaption>Strudel on MacOS</figcaption>
</figure>

Expand All @@ -67,7 +67,7 @@ Without a chromium based browser, you can use [nativefier](https://github.com/na
2. run `npx nativefier strudel.cc`

<figure>
<img src="./pwa/strudel-linux.png" alt="Strudel on Linux" />
![Strudel on Linux](/pwa/strudel-linux.png)
<figcaption>Strudel on Linux</figcaption>
</figure>

Expand Down
2 changes: 1 addition & 1 deletion website/src/repl/prebake.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function prebake() {
// => getting "window is not defined", as soon as "@strudel.cycles/soundfonts" is imported statically
// seems to be a problem with soundfont2
import('@strudel.cycles/soundfonts').then(({ registerSoundfonts }) => registerSoundfonts()),
samples(`${baseNoTrailing}/piano.json`, `./piano/`, { prebake: true }),
samples(`${baseNoTrailing}/piano.json`, `${baseNoTrailing}/piano/`, { prebake: true }),
// https://github.com/sgossner/VCSL/
// https://api.github.com/repositories/126427031/contents/
// LICENSE: CC0 general-purpose
Expand Down

0 comments on commit 2bd21df

Please sign in to comment.