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
39 changes: 39 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy to GitHub Pages

on:
push:
branches: [asha-new-manipulatives-v2]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm run build
- uses: actions/upload-pages-artifact@v3
with:
path: dist

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
8 changes: 4 additions & 4 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import ManipulativeCanvas from './ManipulativeCanvas.jsx'
import { manipulatives } from './manipulatives/index.js'

export default function App() {
const [activeId, setActiveId] = useState(manipulatives[0].id)
const [activeId, setActiveId] = useState('percent-park-designer')
const active = manipulatives.find((m) => m.id === activeId) ?? manipulatives[0]
const ActiveComponent = active.component

return (
<div className="flex h-screen overflow-hidden bg-slate-950">
<nav className="w-48 shrink-0 border-r border-slate-800 bg-slate-900 p-3">
<p className="mb-3 text-xs font-semibold uppercase tracking-wide text-slate-400">
<nav className="flex w-48 shrink-0 flex-col border-r border-slate-800 bg-slate-900 p-3">
<p className="mb-3 shrink-0 text-xs font-semibold uppercase tracking-wide text-slate-400">
Manipulatives
</p>
<ul className="space-y-1">
<ul className="manipulative-list-scroll min-h-0 flex-1 space-y-1 overflow-y-scroll pr-1">
{manipulatives.map((m) => (
<li key={m.id}>
<button
Expand Down
20 changes: 20 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,23 @@ input[type="number"] {
-moz-appearance: textfield;
appearance: textfield;
}

.manipulative-list-scroll {
scrollbar-gutter: stable;
scrollbar-color: #64748b #0f172a;
}

.manipulative-list-scroll::-webkit-scrollbar {
width: 10px;
}

.manipulative-list-scroll::-webkit-scrollbar-track {
background: #0f172a;
border-radius: 999px;
}

.manipulative-list-scroll::-webkit-scrollbar-thumb {
background: #64748b;
border: 2px solid #0f172a;
border-radius: 999px;
}
Loading