openfree commited on
Commit
af7454c
1 Parent(s): 88ee1eb

Upload index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +296 -19
index.html CHANGED
@@ -1,19 +1,296 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>AI Blog Generator</title>
7
+ <style>
8
+ :root {
9
+ --primary: #6366f1;
10
+ --secondary: #4f46e5;
11
+ --bg: #f8fafc;
12
+ --text: #1e293b;
13
+ }
14
+
15
+ * {
16
+ margin: 0;
17
+ padding: 0;
18
+ box-sizing: border-box;
19
+ }
20
+
21
+ body {
22
+ font-family: 'Inter', system-ui, sans-serif;
23
+ background: var(--bg);
24
+ color: var(--text);
25
+ line-height: 1.5;
26
+ }
27
+
28
+ .container {
29
+ max-width: 1200px;
30
+ margin: 0 auto;
31
+ padding: 2rem;
32
+ }
33
+
34
+ .header {
35
+ text-align: center;
36
+ margin-bottom: 3rem;
37
+ }
38
+
39
+ .header h1 {
40
+ font-size: 2.5rem;
41
+ color: var(--primary);
42
+ margin-bottom: 1rem;
43
+ }
44
+
45
+ .header p {
46
+ color: #64748b;
47
+ }
48
+
49
+ .grid {
50
+ display: grid;
51
+ grid-template-columns: 1fr 1fr;
52
+ gap: 2rem;
53
+ }
54
+
55
+ .panel {
56
+ background: white;
57
+ padding: 2rem;
58
+ border-radius: 1rem;
59
+ box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
60
+ }
61
+
62
+ .input-group {
63
+ margin-bottom: 1.5rem;
64
+ }
65
+
66
+ .input-group label {
67
+ display: block;
68
+ font-weight: 500;
69
+ margin-bottom: 0.5rem;
70
+ }
71
+
72
+ .input-group input,
73
+ .input-group textarea,
74
+ .input-group select {
75
+ width: 100%;
76
+ padding: 0.75rem;
77
+ border: 1px solid #e2e8f0;
78
+ border-radius: 0.5rem;
79
+ font-size: 1rem;
80
+ }
81
+
82
+ .input-group textarea {
83
+ height: 150px;
84
+ resize: vertical;
85
+ }
86
+
87
+ .btn {
88
+ background: var(--primary);
89
+ color: white;
90
+ border: none;
91
+ padding: 1rem 2rem;
92
+ border-radius: 0.5rem;
93
+ font-weight: 500;
94
+ cursor: pointer;
95
+ transition: all 0.3s ease;
96
+ }
97
+
98
+ .btn:hover {
99
+ background: var(--secondary);
100
+ }
101
+
102
+ .btn-secondary {
103
+ background: #e2e8f0;
104
+ color: var(--text);
105
+ }
106
+
107
+ .btn-secondary:hover {
108
+ background: #cbd5e1;
109
+ }
110
+
111
+ .output {
112
+ margin-top: 1rem;
113
+ padding: 1rem;
114
+ background: #f1f5f9;
115
+ border-radius: 0.5rem;
116
+ white-space: pre-wrap;
117
+ }
118
+
119
+ .writing-status {
120
+ display: flex;
121
+ align-items: center;
122
+ margin-top: 1rem;
123
+ padding: 1rem;
124
+ background: #f1f5f9;
125
+ border-radius: 0.5rem;
126
+ }
127
+
128
+ .status-dot {
129
+ width: 10px;
130
+ height: 10px;
131
+ border-radius: 50%;
132
+ background: #22c55e;
133
+ margin-right: 0.5rem;
134
+ animation: pulse 2s infinite;
135
+ }
136
+
137
+ @keyframes pulse {
138
+ 0% { transform: scale(1); opacity: 1; }
139
+ 50% { transform: scale(1.2); opacity: 0.5; }
140
+ 100% { transform: scale(1); opacity: 1; }
141
+ }
142
+
143
+ .tools {
144
+ display: flex;
145
+ gap: 1rem;
146
+ margin-bottom: 1rem;
147
+ }
148
+
149
+ @media (max-width: 768px) {
150
+ .grid {
151
+ grid-template-columns: 1fr;
152
+ }
153
+ }
154
+ </style>
155
+ </head>
156
+ <body>
157
+ <div class="container">
158
+ <header class="header">
159
+ <h1>AI Blog Generator</h1>
160
+ <p>Generate high-quality blog content with AI assistance</p>
161
+ </header>
162
+
163
+ <div class="grid">
164
+ <div class="panel">
165
+ <h2>Input</h2>
166
+ <div class="tools">
167
+ <button class="btn btn-secondary" onclick="generateIdeas()">Generate Ideas</button>
168
+ <button class="btn btn-secondary" onclick="improveWriting()">Improve Writing</button>
169
+ </div>
170
+
171
+ <div class="input-group">
172
+ <label for="topic">Topic/Keywords</label>
173
+ <input type="text" id="topic" placeholder="Enter main topic or keywords">
174
+ </div>
175
+
176
+ <div class="input-group">
177
+ <label for="tone">Writing Tone</label>
178
+ <select id="tone">
179
+ <option value="professional">Professional</option>
180
+ <option value="casual">Casual</option>
181
+ <option value="technical">Technical</option>
182
+ <option value="creative">Creative</option>
183
+ </select>
184
+ </div>
185
+
186
+ <div class="input-group">
187
+ <label for="length">Article Length</label>
188
+ <select id="length">
189
+ <option value="short">Short (~300 words)</option>
190
+ <option value="medium">Medium (~600 words)</option>
191
+ <option value="long">Long (~1000 words)</option>
192
+ </select>
193
+ </div>
194
+
195
+ <button class="btn" onclick="generateContent()">Generate Content</button>
196
+ </div>
197
+
198
+ <div class="panel">
199
+ <h2>Output</h2>
200
+ <div id="writingStatus" class="writing-status" style="display: none;">
201
+ <div class="status-dot"></div>
202
+ <span>AI is writing...</span>
203
+ </div>
204
+ <div id="output" class="output"></div>
205
+ </div>
206
+ </div>
207
+ </div>
208
+
209
+ <script>
210
+ function simulateAIWriting(text, delay = 50) {
211
+ return new Promise((resolve) => {
212
+ const output = document.getElementById('output');
213
+ let index = 0;
214
+
215
+ const interval = setInterval(() => {
216
+ if (index < text.length) {
217
+ output.textContent += text[index];
218
+ index++;
219
+ } else {
220
+ clearInterval(interval);
221
+ resolve();
222
+ }
223
+ }, delay);
224
+ });
225
+ }
226
+
227
+ function generateContent() {
228
+ const topic = document.getElementById('topic').value;
229
+ const tone = document.getElementById('tone').value;
230
+ const length = document.getElementById('length').value;
231
+
232
+ if (!topic) {
233
+ alert('Please enter a topic');
234
+ return;
235
+ }
236
+
237
+ document.getElementById('writingStatus').style.display = 'flex';
238
+ document.getElementById('output').textContent = '';
239
+
240
+ // Simulated AI response
241
+ const content = generateArticle(topic, tone, length);
242
+
243
+ document.getElementById('writingStatus').style.display = 'none';
244
+ simulateAIWriting(content);
245
+ }
246
+
247
+ function generateArticle(topic, tone, length) {
248
+ // This is a mock function that would normally connect to an AI API
249
+ const templates = {
250
+ professional: `Title: ${topic}: A Comprehensive Analysis\n\nIn today's rapidly evolving landscape, ${topic} has emerged as a crucial factor in shaping our understanding of modern developments. This article explores the key aspects and implications of ${topic}, providing valuable insights for professionals and enthusiasts alike.\n\nKey Points:\n1. Understanding the fundamentals\n2. Current trends and developments\n3. Future implications\n`,
251
+ casual: `Hey there! Let's Talk About ${topic}!\n\nEver wondered what makes ${topic} so interesting? Well, you're in for a treat! Today we're going to dive into this fascinating topic and explore all the cool things about it.\n\nWhat's the Deal With ${topic}?\n`,
252
+ technical: `Technical Analysis: ${topic}\n\nAbstract:\nThis technical examination of ${topic} provides a detailed analysis of its core components, implementation considerations, and technical specifications.\n\nTechnical Overview:\n`,
253
+ creative: `The Art of ${topic}: A Creative Exploration\n\nImagine a world where ${topic} shapes everything around us. In this creative journey, we'll explore the fascinating dimensions of ${topic} and its impact on our creative consciousness.\n\n`
254
+ };
255
+
256
+ return templates[tone] + `[Content continues with ${length} format...]`;
257
+ }
258
+
259
+ function generateIdeas() {
260
+ const topic = document.getElementById('topic').value;
261
+ if (!topic) {
262
+ alert('Please enter a topic first');
263
+ return;
264
+ }
265
+
266
+ const ideas = [
267
+ `- How ${topic} is Changing the Future`,
268
+ `- The Ultimate Guide to ${topic}`,
269
+ `- 10 Things You Didn't Know About ${topic}`,
270
+ `- Why ${topic} Matters in 2024`,
271
+ `- The Evolution of ${topic}: Past, Present, and Future`
272
+ ].join('\n');
273
+
274
+ document.getElementById('output').textContent = 'Blog Post Ideas:\n' + ideas;
275
+ }
276
+
277
+ function improveWriting() {
278
+ const currentText = document.getElementById('output').textContent;
279
+ if (!currentText) {
280
+ alert('Generate content first');
281
+ return;
282
+ }
283
+
284
+ document.getElementById('writingStatus').style.display = 'flex';
285
+
286
+ setTimeout(() => {
287
+ document.getElementById('writingStatus').style.display = 'none';
288
+ document.getElementById('output').textContent = 'Enhanced Version:\n\n' +
289
+ currentText.replace(/\b\w+\b/g, match =>
290
+ Math.random() > 0.8 ? match.charAt(0).toUpperCase() + match.slice(1) : match
291
+ );
292
+ }, 2000);
293
+ }
294
+ </script>
295
+ </body>
296
+ </html>