Spaces:
Running
Running
| class ResumeSection extends HTMLElement { | |
| connectedCallback() { | |
| const title = this.getAttribute('title') || ''; | |
| const icon = this.getAttribute('icon') || 'file'; | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| .section-title { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| margin-bottom: 1.5rem; | |
| color: #4f46e5; | |
| } | |
| .section-title h2 { | |
| font-size: 1.25rem; | |
| font-weight: 600; | |
| margin: 0; | |
| } | |
| .section-icon { | |
| width: 2rem; | |
| height: 2rem; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| background-color: #eef2ff; | |
| border-radius: 50%; | |
| } | |
| </style> | |
| <section class="resume-section"> | |
| <div class="section-title"> | |
| <div class="section-icon"> | |
| <i data-feather="${icon}"></i> | |
| </div> | |
| <h2>${title}</h2> | |
| </div> | |
| <div class="section-content"> | |
| <slot></slot> | |
| </div> | |
| </section> | |
| `; | |
| } | |
| } | |
| customElements.define('resume-section', ResumeSection); |