Spaces:
Running
Running
Download index.html from sh1k4ku/python-playground: direct link, hf CLI and curl.
- Browser
- Download file 3.64 kB
-
https://huggingface.co/spaces/sh1k4ku/python-playground/resolve/main/index.html
- Command line
-
hf download hf://spaces/sh1k4ku/python-playground/index.html
-
curl -L -o index.html https://huggingface.co/spaces/sh1k4ku/python-playground/resolve/main/index.html
3.64 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Software Testing — Playground</title> | |
| <style> | |
| :root { | |
| --bg: #1e1e2e; --panel: #252535; --border: #353550; | |
| --accent: #89b4fa; --accent-hover: #74a0f0; | |
| --text: #cdd6f4; --muted: #7f849c; | |
| } | |
| * { box-sizing: border-box; } | |
| html, body { margin: 0; height: 100%; } | |
| body { | |
| display: flex; height: 100vh; overflow: hidden; | |
| font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; | |
| background: var(--bg); color: var(--text); | |
| } | |
| /* ===== Left sidebar ===== */ | |
| nav.sidebar { | |
| width: 210px; flex: 0 0 210px; background: var(--panel); | |
| border-right: 1px solid var(--border); | |
| display: flex; flex-direction: column; padding: 14px 10px; gap: 4px; | |
| } | |
| .sidebar .brand { | |
| font-size: 13px; font-weight: 700; color: var(--text); | |
| padding: 6px 10px 14px; letter-spacing: .02em; | |
| } | |
| .sidebar .brand small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; margin-top: 3px; } | |
| .sidebar .nav-label { | |
| font-size: 10px; text-transform: uppercase; letter-spacing: .08em; | |
| color: var(--muted); padding: 10px 10px 4px; | |
| } | |
| .sidebar button.item { | |
| display: block; width: 100%; text-align: left; | |
| background: transparent; color: var(--text); border: none; | |
| padding: 9px 12px; border-radius: 7px; font-size: 13px; font-weight: 600; | |
| cursor: pointer; transition: background .12s, color .12s; | |
| } | |
| .sidebar button.item:hover { background: var(--border); } | |
| .sidebar button.item.active { background: var(--accent); color: #11111b; } | |
| .sidebar button.item .sub { display: block; font-size: 11px; font-weight: 500; opacity: .8; margin-top: 2px; } | |
| .sidebar .spacer { flex: 1; } | |
| .sidebar .foot { font-size: 10px; color: var(--muted); padding: 8px 10px; line-height: 1.5; } | |
| /* ===== Content frame ===== */ | |
| .content { flex: 1; min-width: 0; } | |
| .content iframe { width: 100%; height: 100%; border: none; display: block; } | |
| </style> | |
| </head> | |
| <body> | |
| <nav class="sidebar"> | |
| <div class="brand">Software Testing<small>UNSW · Playground</small></div> | |
| <div class="nav-label">Assignments</div> | |
| <button class="item active" data-src="assignment1.html"> | |
| Assignment 1 | |
| <span class="sub">Black-box testing playground</span> | |
| </button> | |
| <button class="item" data-src="assignment2.html"> | |
| Assignment 2 | |
| <span class="sub">Decision tables · CFG · loops</span> | |
| </button> | |
| <button class="item" data-src="assignment3.html"> | |
| Assignment 3 | |
| <span class="sub">Scaffolding · combinatorial · mutation</span> | |
| </button> | |
| <div class="spacer"></div> | |
| <div class="foot">Pick an assignment on the left.<br>Assignment 2 has an interactive Q4 and a JSON export.</div> | |
| </nav> | |
| <div class="content"> | |
| <iframe id="frame" src="assignment1.html" title="assignment"></iframe> | |
| </div> | |
| <script> | |
| const frame = document.getElementById("frame"); | |
| const items = [...document.querySelectorAll(".sidebar button.item")]; | |
| // restore last-selected assignment | |
| const last = localStorage.getItem("st_last_assignment"); | |
| if (last) { | |
| const btn = items.find(b => b.dataset.src === last); | |
| if (btn) { items.forEach(i => i.classList.remove("active")); btn.classList.add("active"); frame.src = last; } | |
| } | |
| items.forEach(btn => btn.onclick = () => { | |
| items.forEach(i => i.classList.remove("active")); | |
| btn.classList.add("active"); | |
| frame.src = btn.dataset.src; | |
| localStorage.setItem("st_last_assignment", btn.dataset.src); | |
| }); | |
| </script> | |
| </body> | |
| </html> | |