File size: 5,225 Bytes
fbcf5d4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Quote Image Generator</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <button class="theme-toggle" onclick="toggleTheme()" title="Toggle theme">
      🌙
    </button>

    <div class="container">
      <div class="panel">
        <h2>Quote Generator</h2>
        <div class="form-group">
          <label>Quote Text</label>
          <textarea id="quoteText">
The only way to do great work is to love what you do.</textarea
          >
        </div>

        <div class="form-group">
          <label>Author</label>
          <input type="text" id="author" value="Steve Jobs" />
        </div>

        <div class="color-grid">
          <div class="form-group color-picker">
            <label>Background Color</label>
            <div class="color-input-wrapper">
              <input type="color" id="bgColor" value="#ffffff" />
              <input

                type="text"

                id="bgColorText"

                value="#ffffff"

                class="color-text"

              />
            </div>
          </div>

          <div class="form-group color-picker">
            <label>Bar & Quote Mark Color</label>
            <div class="color-input-wrapper">
              <input type="color" id="barColor" value="#4f46e5" />
              <input

                type="text"

                id="barColorText"

                value="#4f46e5"

                class="color-text"

              />
            </div>
          </div>

          <div class="form-group color-picker">
            <label>Quote Text Color</label>
            <div class="color-input-wrapper">
              <input type="color" id="textColor" value="#1e293b" />
              <input

                type="text"

                id="textColorText"

                value="#1e293b"

                class="color-text"

              />
            </div>
          </div>

          <div class="form-group color-picker">
            <label>Author Color</label>
            <div class="color-input-wrapper">
              <input type="color" id="authorColor" value="#64748b" />
              <input

                type="text"

                id="authorColorText"

                value="#64748b"

                class="color-text"

              />
            </div>
          </div>
        </div>

        <div class="font-section">
          <div class="form-group font-controls">
            <label>Quote Font Style</label>
            <div class="font-selectors">
              <select id="quoteFontFamily" class="font-select">
                <option value="">Loading fonts...</option>
              </select>
              <select id="quoteFontStyle" class="font-select">
                <option value="normal">Normal</option>
              </select>
            </div>
          </div>

          <div class="form-group font-controls">
            <label>Author Font Style</label>
            <div class="font-selectors">
              <select id="authorFontFamily" class="font-select">
                <option value="">Loading fonts...</option>
              </select>
              <select id="authorFontStyle" class="font-select">
                <option value="normal">Normal</option>
              </select>
            </div>
          </div>
        </div>

        <div class="form-group">
          <label>Bar Width <span id="barWidthValue">4px</span></label>
          <input

            type="range"

            id="barWidth"

            min="2"

            max="10"

            value="4"

            class="slider"

            oninput="document.getElementById('barWidthValue').textContent = this.value + 'px'"

          />
        </div>

        <div class="btn-group">
          <button class="btn btn-primary" onclick="generateQuote()">
            <span class="btn-text">Generate</span>
            <div class="btn-loader"></div>
          </button>
          <button class="btn btn-success" onclick="downloadQuote()">
            Download
          </button>
          <button class="btn btn-secondary" onclick="viewRequests()">
            View Requests
          </button>
        </div>
      </div>

      <div class="panel">
        <h2>Preview</h2>
        <div id="preview-container">
          <img id="quoteImage" alt="Generated Quote" />
          <div id="loading" class="loading">
            <div class="loading-content">
              <div class="loading-spinner"></div>
              <span>Generating quote...</span>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div id="requestsModal" class="modal">
      <div class="modal-content">
        <span class="close-btn" onclick="closeModal()">&times;</span>
        <h2>Request History</h2>
        <div id="requestsList" class="requests-list"></div>
      </div>
    </div>

    <div id="status"></div>

    <script src="script.js"></script>
  </body>
</html>