Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ jobs:
cp build-wasm/wasm/ibex.mjs build-wasm/wasm/ibex.wasm docs/playground/
ls -l docs/playground

- name: Cache-bust static assets
run: |
# Stamp every deploy's commit onto local css/js URLs so returning
# visitors don't get served a stale stylesheet or script.
VER="$(git rev-parse --short HEAD)"
find docs -name '*.html' -print0 | xargs -0 sed -i -E \
"s#(href|src)=\"(\./[^\"?]+\.(css|js|mjs))\"#\1=\"\2?v=${VER}\"#g"
# ... the wasm module the playground script imports ...
sed -i -E "s#(\./playground/ibex\.mjs)#\1?v=${VER}#g" docs/playground.js
# ... and the .wasm the module fetches (Emscripten's URL() drops the
# query from import.meta.url, so stamp the filename itself).
sed -i -E "s#([\"'])ibex\.wasm([\"'])#\1ibex.wasm?v=${VER}\2#g" docs/playground/ibex.mjs
grep -o 'styles\.css?v=[0-9a-f]*' docs/index.html | head -1

- name: Configure Pages
uses: actions/configure-pages@v6

Expand Down
2 changes: 1 addition & 1 deletion docs/playground.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<link rel="stylesheet" href="./styles.css" />
</head>
<body>
<main class="page">
<main class="page playground-page">
<nav class="nav">
<a class="nav-logo" href="./index.html">Ibex</a>
<div class="nav-links">
Expand Down
22 changes: 8 additions & 14 deletions docs/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,10 @@ table.bench {

/* ── Playground ──────────────────────────────────────────────────────────── */

.playground-page {
max-width: 1180px;
}

.playground {
margin-top: 1.5rem;
}
Expand Down Expand Up @@ -881,15 +885,14 @@ table.bench {
}

.pg-grid {
display: grid;
grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
gap: 1.1rem;
align-items: start;
display: flex;
flex-direction: column;
gap: 1rem;
}

.pg-editor {
width: 100%;
min-height: 15rem;
min-height: 10rem;
box-sizing: border-box;
resize: vertical;
border: 1px solid #334044;
Expand Down Expand Up @@ -922,10 +925,6 @@ table.bench {
.pg-status-ok { color: var(--accent); }
.pg-status-error { color: #b3261e; }

.pg-result-pane {
min-height: 15rem;
}

.pg-env {
display: flex;
flex-wrap: wrap;
Expand Down Expand Up @@ -1017,8 +1016,3 @@ table.bench {
font-size: 0.74rem;
}

@media (max-width: 820px) {
.pg-grid {
grid-template-columns: 1fr;
}
}
Loading