Skip to content
Open
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
6 changes: 3 additions & 3 deletions src/pages/apps.astro
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const heroDescription = `Browse ${totalApps} badge apps. ${preloadedApps.length}
Apps Directory Structure
</h3>

<pre class="bg-background rounded-lg p-6 overflow-x-auto text-sm"><code>{`/Volumes/BADGER/
<pre class="code-block"><code>{`/Volumes/BADGER/
├── apps/
│ ├── badge/
│ │ ├── __init__.py
Expand Down Expand Up @@ -216,7 +216,7 @@ const heroDescription = `Browse ${totalApps} badge apps. ${preloadedApps.length}
<p class="text-sm text-muted-foreground mb-3">
Apps can be launched from the badge menu or inspected directly from the REPL:
</p>
<pre class="bg-background rounded p-3 text-sm"><code>import os
<pre class="code-block-sm"><code>import os
os.listdir('/apps')

# example: run flappy from a REPL session
Expand All @@ -231,7 +231,7 @@ exec(open('/apps/flappy/__init__.py').read())</code></pre>
<p class="text-sm text-muted-foreground mb-3">
Most apps expose straight Python or asset files you can tweak while mounted:
</p>
<pre class="bg-background rounded p-3 text-sm"><code># Edit via USB file access
<pre class="code-block-sm"><code># Edit via USB file access
# example: adjust Monapet UI text
edit('/apps/monapet/ui.py')</code></pre>
</div>
Expand Down
14 changes: 14 additions & 0 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -556,4 +556,18 @@

.prose .chars--highlighted {
@apply bg-zinc-700/50 dark:bg-zinc-600/50 rounded px-1;
}


.code-block {
@apply bg-background rounded p-6 overflow-x-auto text-sm max-w-full;
}

.code-block-sm {
@apply bg-background rounded p-3 overflow-x-auto text-sm max-w-full;
}

.code-block code,
.code-block-sm code {
@apply block whitespace-pre-wrap font-mono;
}