Spaces:
Running
Running
Download components/hero.js from Alepha/stemcraft-explorers-hub: direct link, hf CLI and curl.
- Browser
- Download file 1.44 kB
-
https://huggingface.co/spaces/Alepha/stemcraft-explorers-hub/resolve/main/components/hero.js
- Command line
-
hf download hf://spaces/Alepha/stemcraft-explorers-hub/components/hero.js
-
curl -L -o hero.js https://huggingface.co/spaces/Alepha/stemcraft-explorers-hub/resolve/main/components/hero.js
1.44 kB
| class CustomHero extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| :host { | |
| --teal: #009688; | |
| --black: #0A0A0A; | |
| } | |
| .hero { | |
| padding: 120px 0; | |
| text-align: center; | |
| } | |
| h1 { | |
| font-size: 72px; | |
| font-weight: 900; | |
| margin-bottom: 24px; | |
| line-height: 1.2; | |
| } | |
| .subtitle { | |
| font-size: 24px; | |
| margin-bottom: 48px; | |
| max-width: 800px; | |
| margin-left: auto; | |
| margin-right: auto; | |
| } | |
| .btn { | |
| background: var(--teal); | |
| color: white; | |
| padding: 16px 32px; | |
| border: none; | |
| font-weight: 900; | |
| font-size: 18px; | |
| transition: all 0.3s ease; | |
| cursor: pointer; | |
| } | |
| .btn:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 4px 12px rgba(0,0,0,0.1); | |
| } | |
| </style> | |
| <section class="hero"> | |
| <h1>Образование нового поколения в Minecraft Education</h1> | |
| <p class="subtitle">STEMCraft — платформа, где игра превращается в обучение</p> | |
| <a href="subscription.html" class="btn">Оформить подписку</a> | |
| </section> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-hero', CustomHero); |