| class EditorSidebar extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| :host { | |
| display: block; | |
| width: 300px; | |
| background: #f0e8e0; | |
| border-right: 1px solid #e0d6cc; | |
| height: 100vh; | |
| position: fixed; | |
| left: 0; | |
| top: 0; | |
| padding-top: 4rem; | |
| } | |
| .sidebar-section { | |
| padding: 1.5rem; | |
| border-bottom: 1px solid #e0d6cc; | |
| } | |
| .section-title { | |
| font-size: 0.9rem; | |
| text-transform: uppercase; | |
| letter-spacing: 0.5px; | |
| color: #888; | |
| margin-bottom: 1rem; | |
| } | |
| .template-item { | |
| padding: 0.5rem 0; | |
| cursor: pointer; | |
| color: #555; | |
| transition: all 0.2s; | |
| } | |
| .template-item:hover { | |
| color: #333; | |
| } | |
| .format-control { | |
| margin-bottom: 1rem; | |
| } | |
| label { | |
| display: block; | |
| margin-bottom: 0.5rem; | |
| font-size: 0.9rem; | |
| color: #666; | |
| } | |
| select, input { | |
| width: 100%; | |
| padding: 0.5rem; | |
| border: 1px solid #e0d6cc; | |
| background: white; | |
| font-family: inherit; | |
| } | |
| </style> | |
| <div class="sidebar-section"> | |
| <div class="section-title">Modelos</div> | |
| <div class="template-item">Petição Inicial</div> | |
| <div class="template-item">Contrato de Prestação</div> | |
| <div class="template-item">Declaração de Dívida</div> | |
| </div> | |
| <div class="sidebar-section"> | |
| <div class="section-title">Formatação</div> | |
| <div class="format-control"> | |
| <label>Fonte</label> | |
| <select> | |
| <option>Crimson Pro</option> | |
| <option>Times New Roman</option> | |
| <option>Georgia</option> | |
| </select> | |
| </div> | |
| <div class="format-control"> | |
| <label>Tamanho</label> | |
| <input type="range" min="12" max="18" value="14"> | |
| </div> | |
| <div class="format-control"> | |
| <label>Alinhamento</label> | |
| <select> | |
| <option>Justificado</option> | |
| <option>Alinhado à Esquerda</option> | |
| </select> | |
| </div> | |
| <div class="format-control"> | |
| <label>Margens</label> | |
| <input type="range" min="1" max="5" value="2.5" step="0.5"> | |
| </div> | |
| </div> | |
| `; | |
| } | |
| } | |
| customElements.define('editor-sidebar', EditorSidebar); |