Download task_018/solution/code/index.html from Lego-X/UXInteract: direct link, hf CLI and curl.
- Browser
- Download file 1.5 kB
-
https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_018/solution/code/index.html
- Command line
-
hf download hf://datasets/Lego-X/UXInteract/task_018/solution/code/index.html
-
curl -L -o index.html https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_018/solution/code/index.html
1.5 kB
| <html><head><meta charset="utf-8"><title>Responsive Layout</title> | |
| <style> | |
| html,body{margin:0;font-family:Arial,sans-serif}.app{display:flex;min-height:100vh} | |
| [data-testid="sidebar"]{width:240px;min-width:240px;background:#111827;color:white;padding:16px;box-sizing:border-box} | |
| [data-testid="sidebar"].collapsed{width:0;min-width:0;padding:0;overflow:hidden;visibility:hidden} | |
| .shell{flex:1;display:flex;justify-content:center;min-width:0} | |
| [data-testid="main-content"]{width:min(900px,100%);min-width:360px;padding:24px;box-sizing:border-box} | |
| @media(max-width:700px){ | |
| [data-testid="sidebar-toggle"]{position:relative;z-index:3} | |
| [data-testid="sidebar"]{position:fixed;inset:0 auto 0 0;z-index:2;padding-top:64px;transform:translateX(-100%);visibility:hidden} | |
| [data-testid="sidebar"].mobile-open{transform:none;visibility:visible} | |
| [data-testid="main-content"]{min-width:min(360px,100vw);width:100%;padding:16px} | |
| } | |
| </style></head> | |
| <body> | |
| <div class="app"> | |
| <aside data-testid="sidebar">Sidebar</aside> | |
| <div class="shell"><main data-testid="main-content"><button data-testid="sidebar-toggle">Toggle</button><p>Main content</p></main></div> | |
| </div> | |
| <script>document.querySelector('[data-testid="sidebar-toggle"]').addEventListener('click',()=>{const sidebar=document.querySelector('[data-testid="sidebar"]');sidebar.classList.toggle(matchMedia('(max-width:700px)').matches?'mobile-open':'collapsed');});</script> | |
| </body></html> | |