Spaces:
Running
Running
create me a fully operating system please don't make it simple make it more complex
b33cdea verified Download components/window.js from idhyksi097/quantumos-hypervisor: direct link, hf CLI and curl.
- Browser
- Download file 3.05 kB
-
https://huggingface.co/spaces/idhyksi097/quantumos-hypervisor/resolve/main/components/window.js
- Command line
-
hf download hf://spaces/idhyksi097/quantumos-hypervisor/components/window.js
-
curl -L -o window.js https://huggingface.co/spaces/idhyksi097/quantumos-hypervisor/resolve/main/components/window.js
3.05 kB
| class QuantumWindow extends HTMLElement { | |
| constructor() { | |
| super(); | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| :host { | |
| display: block; | |
| position: absolute; | |
| min-width: 300px; | |
| min-height: 200px; | |
| background: rgba(30, 30, 40, 0.9); | |
| border-radius: 8px; | |
| box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); | |
| backdrop-filter: blur(10px); | |
| border: 1px solid rgba(255, 255, 255, 0.1); | |
| transition: all 0.3s ease; | |
| z-index: 10; | |
| overflow: hidden; | |
| } | |
| .titlebar { | |
| height: 32px; | |
| background: linear-gradient(to right, #4a00e0, #8e2de2); | |
| color: white; | |
| display: flex; | |
| align-items: center; | |
| padding: 0 10px; | |
| cursor: move; | |
| font-weight: 500; | |
| } | |
| .title { | |
| flex: 1; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } | |
| .controls { | |
| display: flex; | |
| } | |
| .control { | |
| width: 16px; | |
| height: 16px; | |
| border-radius: 50%; | |
| margin-left: 8px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| cursor: pointer; | |
| font-size: 8px; | |
| } | |
| .close { | |
| background: #ff5f56; | |
| } | |
| .minimize { | |
| background: #ffbd2e; | |
| } | |
| .maximize { | |
| background: #27c93f; | |
| } | |
| .content { | |
| padding: 15px; | |
| height: calc(100% - 32px); | |
| overflow: auto; | |
| } | |
| </style> | |
| <div class="titlebar"> | |
| <slot name="icon"></slot> | |
| <span class="title"><slot name="title"></slot></span> | |
| <div class="controls"> | |
| <div class="control minimize">_</div> | |
| <div class="control maximize">□</div> | |
| <div class="control close">×</div> | |
| </div> | |
| </div> | |
| <div class="content"> | |
| <slot name="content"></slot> | |
| </div> | |
| `; | |
| } | |
| connectedCallback() { | |
| // Implement window dragging, controls, etc. | |
| } | |
| } | |
| customElements.define('quantum-window', QuantumWindow); |