metroproliv commited on
Commit
c2683a3
·
verified ·
1 Parent(s): 486c196

Add 2 files

Browse files
Files changed (2) hide show
  1. README.md +6 -4
  2. index.html +672 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Webaitw
3
- emoji:
4
  colorFrom: blue
5
- colorTo: indigo
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: webaitw
3
+ emoji: 🐳
4
  colorFrom: blue
5
+ colorTo: blue
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,672 @@
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="ru">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>WB AIТехпис - умный редактор техдокументации</title>
7
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
8
+ <style>
9
+ :root {
10
+ --primary-pink: #CB11AB;
11
+ --primary-blue: #428BF9;
12
+ --dark-bg: #2D3748;
13
+ --sidebar-bg: #f8f9fa;
14
+ --editor-bg: #ffffff;
15
+ --text-dark: #2D3748;
16
+ --text-light: #718096;
17
+ --border-color: #E2E8F0;
18
+ }
19
+
20
+ * {
21
+ margin: 0;
22
+ padding: 0;
23
+ box-sizing: border-box;
24
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
25
+ }
26
+
27
+ body {
28
+ display: grid;
29
+ grid-template-areas:
30
+ "header header header"
31
+ "sidebar editor tools";
32
+ grid-template-columns: 240px 1fr 300px;
33
+ grid-template-rows: 60px 1fr;
34
+ height: 100vh;
35
+ background-color: #f5f7fa;
36
+ color: var(--text-dark);
37
+ }
38
+
39
+ header {
40
+ grid-area: header;
41
+ background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
42
+ color: white;
43
+ display: flex;
44
+ align-items: center;
45
+ padding: 0 20px;
46
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
47
+ z-index: 10;
48
+ }
49
+
50
+ .logo {
51
+ font-size: 22px;
52
+ font-weight: 700;
53
+ display: flex;
54
+ align-items: center;
55
+ }
56
+
57
+ .logo span {
58
+ color: white;
59
+ margin-left: 8px;
60
+ }
61
+
62
+ .styleguide-selector {
63
+ margin-left: 40px;
64
+ position: relative;
65
+ }
66
+
67
+ .styleguide-selector select {
68
+ background-color: rgba(255, 255, 255, 0.2);
69
+ border: none;
70
+ color: white;
71
+ padding: 8px 30px 8px 12px;
72
+ border-radius: 4px;
73
+ font-size: 14px;
74
+ appearance: none;
75
+ width: 200px;
76
+ }
77
+
78
+ .styleguide-selector::after {
79
+ content: "\f078";
80
+ font-family: "Font Awesome 6 Free";
81
+ font-weight: 900;
82
+ position: absolute;
83
+ right: 12px;
84
+ top: 50%;
85
+ transform: translateY(-50%);
86
+ color: white;
87
+ font-size: 12px;
88
+ }
89
+
90
+ .sidebar {
91
+ grid-area: sidebar;
92
+ background-color: var(--sidebar-bg);
93
+ padding: 20px;
94
+ border-right: 1px solid var(--border-color);
95
+ overflow-y: auto;
96
+ }
97
+
98
+ .documents-list {
99
+ margin-top: 20px;
100
+ }
101
+
102
+ .document-item {
103
+ padding: 10px;
104
+ border-radius: 6px;
105
+ margin-bottom: 8px;
106
+ cursor: pointer;
107
+ transition: all 0.2s;
108
+ display: flex;
109
+ align-items: center;
110
+ }
111
+
112
+ .document-item:hover {
113
+ background-color: rgba(66, 139, 249, 0.1);
114
+ }
115
+
116
+ .document-item.active {
117
+ background-color: rgba(66, 139, 249, 0.2);
118
+ font-weight: 600;
119
+ }
120
+
121
+ .document-item i {
122
+ margin-right: 10px;
123
+ color: var(--primary-blue);
124
+ }
125
+
126
+ .new-document-btn {
127
+ background-color: var(--primary-blue);
128
+ color: white;
129
+ border: none;
130
+ padding: 12px 15px;
131
+ border-radius: 6px;
132
+ width: 100%;
133
+ font-weight: 600;
134
+ margin-top: 20px;
135
+ cursor: pointer;
136
+ transition: all 0.2s;
137
+ display: flex;
138
+ align-items: center;
139
+ justify-content: center;
140
+ }
141
+
142
+ .new-document-btn:hover {
143
+ background-color: #3272d3;
144
+ }
145
+
146
+ .new-document-btn i {
147
+ margin-right: 8px;
148
+ }
149
+
150
+ .editor {
151
+ grid-area: editor;
152
+ background-color: var(--editor-bg);
153
+ padding: 30px;
154
+ overflow-y: auto;
155
+ }
156
+
157
+ .editor-toolbar {
158
+ margin-bottom: 20px;
159
+ padding-bottom: 15px;
160
+ border-bottom: 1px solid var(--border-color);
161
+ }
162
+
163
+ .editor-title {
164
+ font-size: 24px;
165
+ font-weight: 600;
166
+ margin-bottom: 15px;
167
+ }
168
+
169
+ .text-editor {
170
+ min-height: 500px;
171
+ padding: 15px;
172
+ border: 1px solid var(--border-color);
173
+ border-radius: 6px;
174
+ font-size: 16px;
175
+ line-height: 1.6;
176
+ outline: none;
177
+ }
178
+
179
+ .tools-panel {
180
+ grid-area: tools;
181
+ background-color: white;
182
+ padding: 30px 20px;
183
+ border-left: 1px solid var(--border-color);
184
+ box-shadow: -2px 0 10px rgba(0, 0, 0, 0.05);
185
+ }
186
+
187
+ .tools-title {
188
+ font-size: 18px;
189
+ font-weight: 600;
190
+ margin-bottom: 25px;
191
+ color: var(--primary-pink);
192
+ display: flex;
193
+ align-items: center;
194
+ }
195
+
196
+ .tools-title i {
197
+ margin-right: 10px;
198
+ }
199
+
200
+ .ai-function {
201
+ background-color: white;
202
+ border: 1px solid var(--border-color);
203
+ border-radius: 8px;
204
+ padding: 15px;
205
+ margin-bottom: 15px;
206
+ cursor: pointer;
207
+ transition: all 0.2s;
208
+ }
209
+
210
+ .ai-function:hover {
211
+ border-color: var(--primary-blue);
212
+ box-shadow: 0 2px 8px rgba(66, 139, 249, 0.2);
213
+ }
214
+
215
+ .ai-function i {
216
+ font-size: 20px;
217
+ margin-right: 10px;
218
+ color: var(--primary-pink);
219
+ }
220
+
221
+ .ai-function-title {
222
+ font-weight: 600;
223
+ margin-bottom: 5px;
224
+ display: flex;
225
+ align-items: center;
226
+ }
227
+
228
+ .ai-function-desc {
229
+ font-size: 13px;
230
+ color: var(--text-light);
231
+ line-height: 1.4;
232
+ }
233
+
234
+ .dropdown {
235
+ position: relative;
236
+ margin-top: 10px;
237
+ }
238
+
239
+ .dropdown-btn {
240
+ width: 100%;
241
+ text-align: left;
242
+ padding: 8px 12px;
243
+ background-color: #f8f9fa;
244
+ border: 1px solid var(--border-color);
245
+ border-radius: 4px;
246
+ font-size: 14px;
247
+ cursor: pointer;
248
+ display: flex;
249
+ justify-content: space-between;
250
+ align-items: center;
251
+ }
252
+
253
+ .dropdown-content {
254
+ display: none;
255
+ position: absolute;
256
+ background-color: white;
257
+ width: 100%;
258
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
259
+ border-radius: 4px;
260
+ z-index: 1;
261
+ margin-top: 5px;
262
+ }
263
+
264
+ .dropdown-content a {
265
+ color: var(--text-dark);
266
+ padding: 10px 12px;
267
+ text-decoration: none;
268
+ display: block;
269
+ font-size: 14px;
270
+ transition: background-color 0.2s;
271
+ }
272
+
273
+ .dropdown-content a:hover {
274
+ background-color: #f8f9fa;
275
+ }
276
+
277
+ .dropdown:hover .dropdown-content {
278
+ display: block;
279
+ }
280
+
281
+ .ai-result {
282
+ background-color: white;
283
+ margin-top: 30px;
284
+ padding: 20px;
285
+ border: 1px dashed var(--primary-blue);
286
+ border-radius: 8px;
287
+ display: none;
288
+ }
289
+
290
+ .ai-result-title {
291
+ font-weight: 600;
292
+ margin-bottom: 15px;
293
+ color: var(--primary-blue);
294
+ display: flex;
295
+ align-items: center;
296
+ justify-content: space-between;
297
+ }
298
+
299
+ .ai-result-title i {
300
+ cursor: pointer;
301
+ }
302
+
303
+ .ai-result-content {
304
+ line-height: 1.6;
305
+ }
306
+
307
+ .loading {
308
+ display: inline-block;
309
+ width: 20px;
310
+ height: 20px;
311
+ border: 3px solid rgba(66, 139, 249, 0.3);
312
+ border-radius: 50%;
313
+ border-top-color: var(--primary-blue);
314
+ animation: spin 1s ease-in-out infinite;
315
+ margin-left: 10px;
316
+ }
317
+
318
+ @keyframes spin {
319
+ to { transform: rotate(360deg); }
320
+ }
321
+
322
+ @media (max-width: 1200px) {
323
+ body {
324
+ grid-template-areas:
325
+ "header header header"
326
+ "sidebar editor tools";
327
+ grid-template-columns: 200px 1fr 260px;
328
+ }
329
+ }
330
+
331
+ @media (max-width: 992px) {
332
+ body {
333
+ grid-template-areas:
334
+ "header header"
335
+ "sidebar editor"
336
+ "sidebar tools";
337
+ grid-template-columns: 180px 1fr;
338
+ grid-template-rows: 60px 1fr auto;
339
+ }
340
+ }
341
+ </style>
342
+ </head>
343
+ <body>
344
+ <header>
345
+ <div class="logo">
346
+ <i class="fas fa-robot"></i>
347
+ <span>WB AIТехпис</span>
348
+ </div>
349
+ <div class="styleguide-selector">
350
+ <select id="styleGuide">
351
+ <option value="">Выберите стайлгайд</option>
352
+ <option value="wb">Wildberries</option>
353
+ <option value="yandex">Яндекс</option>
354
+ <option value="tinkoff">Тинькофф</option>
355
+ <option value="sber">Сбер</option>
356
+ <option value="custom">Мой стайлгайд</option>
357
+ </select>
358
+ </div>
359
+ </header>
360
+
361
+ <div class="sidebar">
362
+ <div class="documents-list">
363
+ <div class="document-item active">
364
+ <i class="fas fa-file-alt"></i>
365
+ <span>Документация API</span>
366
+ </div>
367
+ <div class="document-item">
368
+ <i class="fas fa-code"></i>
369
+ <span>Описание компонента</span>
370
+ </div>
371
+ <div class="document-item">
372
+ <i class="fas fa-list-check"></i>
373
+ <span>Технические требования</span>
374
+ </div>
375
+ <div class="document-item">
376
+ <i class="fas fa-book"></i>
377
+ <span>Руководство пользователя</span>
378
+ </div>
379
+ </div>
380
+ <button class="new-document-btn">
381
+ <i class="fas fa-plus"></i>
382
+ Новый документ
383
+ </button>
384
+ </div>
385
+
386
+ <div class="editor">
387
+ <div class="editor-toolbar">
388
+ <div class="editor-title">Документация API платежной системы</div>
389
+ <div class="toolbar-buttons">
390
+ <!-- Здесь могли бы быть кнопки форматирования текста -->
391
+ </div>
392
+ </div>
393
+ <div class="text-editor" id="textEditor" contenteditable="true">
394
+ <p>В данном документе описывается API для интеграции с платежной системой Wildberries.</p>
395
+ <p>&nbsp;</p>
396
+ <h2>1. Общие сведения</h2>
397
+ <p>API позволяет совершать следующие операции:</p>
398
+ <ul>
399
+ <li>Создание платежа</li>
400
+ <li>Проверка статуса платежа</li>
401
+ <li>Возврат средств</li>
402
+ </ul>
403
+ <p>&nbsp;</p>
404
+ <h2>2. Аутентификация</h2>
405
+ <p>Для работы с API необходимо использовать ключ доступа, который можно получить в личном кабинете.</p>
406
+ </div>
407
+
408
+ <div class="ai-result" id="aiResult">
409
+ <div class="ai-result-title">
410
+ <span>Результат обработки AI</span>
411
+ <i class="fas fa-times" id="closeResult"></i>
412
+ </div>
413
+ <div class="ai-result-content" id="aiResultContent"></div>
414
+ </div>
415
+ </div>
416
+
417
+ <div class="tools-panel">
418
+ <div class="tools-title">
419
+ <i class="fas fa-magic"></i>
420
+ <span>Умные функции AI</span>
421
+ </div>
422
+
423
+ <div class="ai-function" id="editStyleGuide">
424
+ <div class="ai-function-title">
425
+ <i class="fas fa-brush"></i>
426
+ <span>Отредактировать по стайлгайду</span>
427
+ </div>
428
+ <div class="ai-function-desc">
429
+ Анализирует текст и приводит его в соответствие с выбранным стайлгайдом компании.
430
+ </div>
431
+ </div>
432
+
433
+ <div class="ai-function" id="fixGrammar">
434
+ <div class="ai-function-title">
435
+ <i class="fas fa-spell-check"></i>
436
+ <span>Исправить грамматику</span>
437
+ </div>
438
+ <div class="ai-function-desc">
439
+ Проверяет текст на грамматические, пунктуационные и стилистические ошибки.
440
+ </div>
441
+ </div>
442
+
443
+ <div class="ai-function" id="checkStructure">
444
+ <div class="ai-function-title">
445
+ <i class="fas fa-sitemap"></i>
446
+ <span>Проверить структуру</span>
447
+ </div>
448
+ <div class="ai-function-desc">
449
+ Анализирует логическую структуру документа и предлагает улучшения.
450
+ </div>
451
+ <div class="dropdown">
452
+ <button class="dropdown-btn">
453
+ <span>Выберите тип документа</span>
454
+ <i class="fas fa-chevron-down"></i>
455
+ </button>
456
+ <div class="dropdown-content">
457
+ <a href="#" data-type="api">Описание API</a>
458
+ <a href="#" data-type="component">Описание компонента системы</a>
459
+ <a href="#" data-type="requirements">Требования</a>
460
+ <a href="#" data-type="other">Прочие</a>
461
+ </div>
462
+ </div>
463
+ </div>
464
+ </div>
465
+
466
+ <script>
467
+ document.addEventListener('DOMContentLoaded', function() {
468
+ const textEditor = document.getElementById('textEditor');
469
+ const aiResult = document.getElementById('aiResult');
470
+ const aiResultContent = document.getElementById('aiResultContent');
471
+ const closeResult = document.getElementById('closeResult');
472
+ const aiFunctions = [
473
+ document.getElementById('editStyleGuide'),
474
+ document.getElementById('fixGrammar'),
475
+ document.getElementById('checkStructure')
476
+ ];
477
+ const dropdownItems = document.querySelectorAll('.dropdown-content a');
478
+ const styleGuideSelect = document.getElementById('styleGuide');
479
+
480
+ // Закрытие результатов AI
481
+ closeResult.addEventListener('click', function() {
482
+ aiResult.style.display = 'none';
483
+ });
484
+
485
+ // Обработка кликов по AI функциям
486
+ aiFunctions.forEach(func => {
487
+ func.addEventListener('click', function() {
488
+ const action = this.id;
489
+ const text = textEditor.innerText.trim();
490
+
491
+ if (!text) {
492
+ alert('Введите текст для обработки');
493
+ return;
494
+ }
495
+
496
+ // Показываем загрузку
497
+ const title = this.querySelector('.ai-function-title span');
498
+ const originalText = title.textContent;
499
+ title.innerHTML = originalText + ' <div class="loading"></div>';
500
+
501
+ // Имитация запроса к API
502
+ setTimeout(() => {
503
+ // Убираем загрузку
504
+ title.textContent = originalText;
505
+
506
+ // Показываем результат (в реальном приложении заменить на реальный ответ API)
507
+ aiResultContent.innerHTML = simulateAIResponse(text, action);
508
+ aiResult.style.display = 'block';
509
+ }, 1500);
510
+ });
511
+ });
512
+
513
+ // Обработка выбора типа документа для проверки структуры
514
+ dropdownItems.forEach(item => {
515
+ item.addEventListener('click', function(e) {
516
+ e.preventDefault();
517
+ const documentType = this.getAttribute('data-type');
518
+
519
+ // Показываем загрузку
520
+ const dropdownBtn = this.closest('.dropdown').querySelector('.dropdown-btn span');
521
+ dropdownBtn.textContent = this.textContent;
522
+
523
+ const title = document.querySelector('#checkStructure .ai-function-title span');
524
+ const originalText = 'Проверить структуру';
525
+ title.innerHTML = originalText + ' <div class="loading"></div>';
526
+
527
+ // Имитация запроса к API
528
+ setTimeout(() => {
529
+ // Убираем загрузку
530
+ title.textContent = originalText;
531
+
532
+ // Показываем результат (в реальном приложении заменить на реальный ответ API)
533
+ aiResultContent.innerHTML = simulateStructureCheck(textEditor.innerText.trim(), documentType);
534
+ aiResult.style.display = 'block';
535
+ }, 1500);
536
+ });
537
+ });
538
+
539
+ // Функция имитации ответа AI
540
+ function simulateAIResponse(text, action) {
541
+ let result = '';
542
+
543
+ if (action === 'editStyleGuide') {
544
+ result = `
545
+ <h3>Текст, приведенный в соответствие с выбранным стайлгайдом:</h3>
546
+ <p>В данном документе описано API для интеграции с платёжной системой Wildberries.</p>
547
+ <p>&nbsp;</p>
548
+ <h2>1. Общие сведения</h2>
549
+ <p>API поддерживает следующие операции:</p>
550
+ <ul>
551
+ <li>создание платежа;</li>
552
+ <li>проверка статуса платежа;</li>
553
+ <li>возврат средств.</li>
554
+ </ul>
555
+ <p>&nbsp;</p>
556
+ <h2>2. Аутентификация</h2>
557
+ <p>Для работы с API необходим ключ доступа. Получить ключ можно в личном кабинете.</p>
558
+ `;
559
+ } else if (action === 'fixGrammar') {
560
+ result = `
561
+ <h3>Исправленный текст (грамматика, пунктуация и стиль):</h3>
562
+ <p>В данном документе описывается API для интеграции с платёжной системой Wildberries.</p>
563
+ <p>&nbsp;</p>
564
+ <h2>1. Общие сведения</h2>
565
+ <p>API позволяет выполнять следующие операции:</p>
566
+ <ul>
567
+ <li>создавать платежи;</li>
568
+ <li>проверять статус платежа;</li>
569
+ <li>осуществлять возврат средств.</li>
570
+ </ul>
571
+ <p>&nbsp;</p>
572
+ <h2>2. Аутентификация</h2>
573
+ <p>Для работы с API необходимо использовать ключ доступа, который можно получить в личном кабинете.</p>
574
+ `;
575
+ }
576
+
577
+ return result;
578
+ }
579
+
580
+ // Функция имитации проверки структуры
581
+ function simulateStructureCheck(text, documentType) {
582
+ let suggestions = '';
583
+
584
+ if (documentType === 'api') {
585
+ suggestions = `
586
+ <h3>Рекомендации по структуре для API документации:</h3>
587
+ <ol>
588
+ <li><strong>Добавить раздел "Базовый URL"</strong> с основным адресом API</li>
589
+ <li><strong>Подробнее описать коды ошибок</strong> и способы их обработки</li>
590
+ <li><strong>Добавить примеры запросов и ответов</strong> для каждого метода</li>
591
+ <li><strong>Выделить раздел "Ограничения"</strong> (лимиты, rate limiting)</li>
592
+ <li><strong>Добавить секцию "Версионирование"</strong> с политикой обновлений</li>
593
+ </ol>
594
+ <p>Также рекомендуется добавить разделы:</p>
595
+ <ul>
596
+ <li>3. Методы API</li>
597
+ <li>4. Форматы данных</li>
598
+ <li>5. Безопасность</li>
599
+ </ul>
600
+ `;
601
+ } else if (documentType === 'component') {
602
+ suggestions = `
603
+ <h3>Рекомендации по структуре для описания компонента:</h3>
604
+ <ol>
605
+ <li><strong>Добавить архитектурную схему</strong> с положением компонента в системе</li>
606
+ <li><strong>Описать интерфейсы взаимодействия</strong> с другими компонентами</li>
607
+ <li><strong>Добавить требования</strong> к окружению и зависимостям</li>
608
+ <li><strong>Добавить диаграмму состояний</strong> для компонента</li>
609
+ <li><strong>Подробнее описать обработку ошибок</strong> и исключительных ситуаций</li>
610
+ </ol>
611
+ <p>Рекомендуемая структура:</p>
612
+ <ul>
613
+ <li>1. Назначение компонента</li>
614
+ <li>2. Архитектура</li>
615
+ <li>3. Функциональность</li>
616
+ <li>4. Интерфейсы</li>
617
+ <li>5. Ограничения</li>
618
+ </ul>
619
+ `;
620
+ } else if (documentType === 'requirements') {
621
+ suggestions = `
622
+ <h3>Рекомендации по структуре технических требований:</h3>
623
+ <ol>
624
+ <li><strong>Разделить требования на функциональные и нефункциональные</strong></li>
625
+ <li><strong>Добавить приоритеты</strong> для каждого требования (Must/Should/Could)</li>
626
+ <li><strong>Добавить критерии приемки</strong> для ключевых требований</li>
627
+ <li><strong>Сгруппировать требования</strong> по модулям/компонентам</li>
628
+ <li><strong>Добавить ссылки</strong> на связанные документы</li>
629
+ </ol>
630
+ <p>Рекомендуемая структура:</p>
631
+ <ul>
632
+ <li>1. Общие требования</li>
633
+ <li>2. Функциональные требования</li>
634
+ <li>3. Нефункциональные требования</li>
635
+ <li>4. Требования к интерфейсам</li>
636
+ <li>5. Ограничения</li>
637
+ </ul>
638
+ `;
639
+ } else {
640
+ suggestions = `
641
+ <h3>Общие рекомендации по структуре документа:</h3>
642
+ <ol>
643
+ <li><strong>Добавить оглавление</strong> для удобной навигации</li>
644
+ <li><strong>Ввести раздел "Введение"</strong> с целью и областью применения</li>
645
+ <li><strong>Добавить раздел "Термины и определения"</strong> для сложных понятий</li>
646
+ <li><strong>Соблюдать единую стилистику</strong> заголовков и списков</li>
647
+ <li><strong>Добавить заключительный раздел</strong> с выводами и дальнейшими шагами</li>
648
+ </ol>
649
+ <p>Общая рекомендуемая структура:</p>
650
+ <ul>
651
+ <li>1. Введение</li>
652
+ <li>2. Основная часть (разделы по теме)</li>
653
+ <li>3. Заключение</li>
654
+ <li>Приложения (при необходимости)</li>
655
+ </ul>
656
+ `;
657
+ }
658
+
659
+ return suggestions;
660
+ }
661
+
662
+ // Обработка изменения стайлгайда
663
+ styleGuideSelect.addEventListener('change', function() {
664
+ const selectedGuide = this.value;
665
+ if (selectedGuide) {
666
+ alert(`Выбран стайлгайд: ${this.options[this.selectedIndex].text}`);
667
+ }
668
+ });
669
+ });
670
+ </script>
671
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <a href="https://enzostvs-deepsite.hf.space" style="color: #fff;" target="_blank" >DeepSite</a> <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;"></p></body>
672
+ </html>