Skip to content

Commit

Permalink
[sites] Work around Parcel's index.html detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarron committed Sep 1, 2021
1 parent b8558e4 commit 5521c50
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/sites/alpha.twizzle.net/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,21 @@
}
</style>
<div class="cards">
<a href="./edit/index.html" class="card">
<a href="./edit/index.html" hidden
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<a href="./edit/" class="card">
<img src="./edit.png" />
<div class="card-label"><span>✍️&nbsp;Edit</span></div>
<div class="explanation">
<b>Edit</b> algs or solves for WCA puzzles and other speedsolving
puzzles.
</div>
</a>
<a href="./explore/index.html" class="card">
<a href="./explore/index.html" hidden
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<a href="./explore/" class="card">
<img src="./explore.png" />
<div class="card-label"><span>🔭&nbsp;Explore</span></div>
<div class="explanation">
Expand Down
51 changes: 51 additions & 0 deletions src/sites/experiments.cubing.net/cubing.js/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,26 @@ <h2><code>cubing.js</code><br />Dev Apps</h2>
>
</div>
<hr />
<a href="play/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<div>🌀 <a href="./play/">Play</a></div>
<a href="bluetooth/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<div>📶 <a href="./bluetooth/">Bluetooth</a></div>
<a href="console/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<div>🖥 <a href="./console/">console</a></div>
<hr />
<div>
🔄 <a href="./twisty/twisty-player.html">twisty/twisty-player</a>
</div>
<div>
<a href="twisty/twisty-player-v2/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
🆕 <a href="./twisty/twisty-player-v2/">twisty/twisty-player-v2</a>
</div>
<div>🔄 <a href="./twisty/attributes.html">twisty/attributes</a></div>
Expand Down Expand Up @@ -107,26 +119,59 @@ <h2><code>cubing.js</code><br />Dev Apps</h2>
</div>
<div>
🔄
<a href="twisty/twisty-alg-editor/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<a href="./twisty/twisty-alg-editor/">twisty/twisty-alg-editor</a>
</div>
<hr />
<div>
🎬
<a href="twizzle-diaries/intro/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<a href="./twizzle-diaries/intro/">twizzle-diaries/intro</a>
</div>
<div>🖼 <a href="./kpuzzle/svg.html">KPuzzle SVG</a></div>
<div>🇬🇷 <a href="./flag/greece.html">flag/greece</a></div>
<a href="vr/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<div>🕶 <a href="./vr/">VR</a></div>
<div>🕶 <a href="./vr/proxy/proxy.html">VR proxy</a></div>
<a href="spec/binary/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<div>🔍 <a href="./spec/binary/">spec/binary</a></div>
<a href="3x3x3-formats/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<div>🔢 <a href="./3x3x3-formats/">3x3x3-formats</a></div>
<a href="multi-alg/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<div>🔠 <a href="./multi-alg/">multi-alg</a></div>
<div>↪️ <a href="./stream/reorient.html">stream/reorient</a></div>
<a href="robot/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<div>🤖 <a href="./robot/">robot</a></div>
<a href="robot/logs/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<div>🤖 <a href="./robot/logs/">robot/logs</a></div>
<a href="screenshot/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<div>📸 <a href="./screenshot/">screenshot</a></div>
<div>🔍 <a href="./alg/inspector.html">alg/inspector</a></div>
<a href="scramble/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<div>🔀 <a href="./scramble/">scramble</a></div>
<a href="stub/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<div>📃 <a href="./stub/">stub</a></div>
<div>
😲 <a href="./stress-tests/40x40x40.html">stress-tests/40x40x40</a>
Expand All @@ -139,8 +184,14 @@ <h2><code>cubing.js</code><br />Dev Apps</h2>
</div>
<div>
📦
<a href="applet-wrappers/AnimCube/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<a href="./applet-wrappers/AnimCube/">applet-wrappers/AnimCube</a>
</div>
<a href="threex/index.html"
><!-- Workaround for https://github.com/parcel-bundler/parcel/issues/6850 --></a
>
<div>🧪 <a href="./threex/">threex</a></div>
<div>🧪 <a href="./threex/babylon.html">threex/babylon</a></div>
<br />
Expand Down
3 changes: 2 additions & 1 deletion src/sites/experiments.cubing.net/cubing.js/play/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ const fn = async (
clearButton.addEventListener("click", space);

function toLink(alg: Alg): string {
const url = new URL("../edit/", import.meta.url);
const editRelative = "../edit/";
const url = new URL(editRelative, import.meta.url);
const puzzleID = getPuzzleID();
if (puzzleID === "3x3x3") {
const opts: AlgCubingNetOptions = {
Expand Down
2 changes: 1 addition & 1 deletion src/sites/experiments.cubing.net/cubing.js/vr/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</style>
</head>
<body>
<script src="index.ts"></script>
<script src="index.ts" type="module"></script>
VR demo is currently not working.
<!-- <button id="connect">Connect</button> -->
</body>
Expand Down

0 comments on commit 5521c50

Please sign in to comment.