File size: 2,666 Bytes
24f91e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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);