File size: 10,280 Bytes
9f89279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42e479a
9f89279
 
42e479a
 
9f89279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e44e708
4516246
 
 
 
8812696
 
9f89279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Choose a Site</title>
  <style>
    /* Основные стили */
    :root {
      --background-light: #ffffff;
      --background-dark: #000000;
      --text-light: #111827;
      --text-dark: #f3f4f6;
      --primary-color: #000000;
      --primary-hover: #333333;
      --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      --border-radius: 8px;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      background-color: var(--background-light);
      color: var(--text-light);
      margin: 0;
      padding: 20px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      transition: background 0.3s ease, color 0.3s ease;
    }

    body.dark-mode {
      background-color: var(--background-dark);
      color: var(--text-dark);
    }

    .sites-list {
      margin-top: 24px;
      background: white;
      padding: 20px;
      border-radius: var(--border-radius);
      box-shadow: var(--shadow);
      width: 100%;
      max-width: 500px;
      transition: background 0.3s ease, transform 0.3s ease;
    }

    body.dark-mode .sites-list {
      background: #111111;
    }

    .sites-list h3 {
      margin: 0 0 16px 0;
      font-size: 18px;
      font-weight: 600;
      color: inherit;
    }

    #sitesList {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    #sitesList div {
      background: #f3f4f6;
      padding: 12px;
      border-radius: var(--border-radius);
      font-size: 14px;
      color: inherit;
      transition: background 0.3s ease, transform 0.2s ease;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    body.dark-mode #sitesList div {
      background: #1a1a1a;
    }

    #sitesList div:hover {
      background: #e5e7eb;
      transform: translateX(5px);
    }

    body.dark-mode #sitesList div:hover {
      background: #2d2d2d;
    }

    .loader {
      border: 4px solid #f3f3f3;
      border-top: 4px solid var(--primary-color);
      border-radius: 50%;
      width: 30px;
      height: 30px;
      animation: spin 1s linear infinite;
      display: none;
      margin: 20px auto;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    .theme-toggle {
      position: fixed;
      top: 20px;
      right: 20px;
      background: var(--primary-color);
      color: white;
      border: none;
      padding: 10px 15px;
      border-radius: var(--border-radius);
      cursor: pointer;
      transition: background 0.3s ease, transform 0.2s ease;
    }

    .theme-toggle:hover {
      background: var(--primary-hover);
      transform: scale(1.1);
    }

    .exit-button {
      position: fixed;
      top: 20px;
      left: 20px;
      background: var(--primary-color);
      color: white;
      border: none;
      padding: 10px 15px;
      border-radius: var(--border-radius);
      cursor: pointer;
      transition: background 0.3s ease, transform 0.2s ease;
      display: none; /* Скрыта по умолчанию */
    }

    .exit-button:hover {
      background: var(--primary-hover);
      transform: scale(1.1);
    }

    .translate-button {
      position: fixed;
      top: 60px;
      left: 20px;
      background: var(--primary-color);
      color: white;
      border: none;
      padding: 10px 15px;
      border-radius: var(--border-radius);
      cursor: pointer;
      transition: background 0.3s ease, transform 0.2s ease;
      display: none; /* Скрыта по умолчанию */
    }

    .translate-button:hover {
      background: var(--primary-hover);
      transform: scale(1.1);
    }

    .pagination {
      display: flex;
      justify-content: center;
      gap: 10px;
      margin-top: 20px;
    }

    .pagination button {
      background: var(--primary-color);
      color: white;
      border: none;
      padding: 8px 12px;
      border-radius: var(--border-radius);
      cursor: pointer;
      transition: background 0.3s ease, transform 0.2s ease;
    }

    .pagination button:hover {
      background: var(--primary-hover);
      transform: scale(1.1);
    }

    .pagination button:disabled {
      background: #cccccc;
      cursor: not-allowed;
    }

    /* Анимация появления */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(-10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .sites-list, .theme-toggle, .exit-button, .translate-button, .pagination {
      animation: fadeIn 0.5s ease-out;
    }
  </style>
</head>
<body>
  <button class="theme-toggle" onclick="toggleTheme()">🌙</button>
  <button class="exit-button" onclick="exitSite()">Exit</button>
  <button class="translate-button" onclick="toggleLanguage()">Перевести на русский</button>

  <div class="sites-list">
    <h3>Choose website</h3>
    <div id="sitesList"></div>
    <div class="pagination">
      <button id="prevPage" disabled>Back</button>
      <button id="nextPage">forward</button>
    </div>
  </div>

  <!-- Лоадер -->
  <div class="loader" id="loader"></div>

  <script>
    const websims = [
      "https://fluxai.pro/fast-flux",
      "https://aivideogenerator.me/ru",
      "https://airesumebuilder.me/ru",
      "https://www.ninjaed.com/",
      "https://essay.art/",
      "https://deepnostalgia.ai/",
      "https://aicoloringpages.net/",
      "https://ailovemusic.net/",
      "https://onionai.so/",
      "https://www.yeschat.ai/ru/features/text-to-image-ai",
      "https://slea.ai/ru",
      "https://pngmaker.ai/ru",
      "https://www.ai-portraits.org/ru",
      "https://remaker.ai/",
      "https://math.now/ru?utm_source=www.yeschat.ai",
      "https://learngerman.ai/",
      "https://ai-song.ai/",
      "https://videoweb.ai/",
      "https://www.cvformatter.co/",
      "https://sunoapi.org/",
      "https://qwen-qwen2-5-vl-72b-instruct.hf.space/"
    ];

    const itemsPerPage = 6; // Количество сайтов на одной странице
    let currentPage = 1; // Текущая страница

    function goToSite(site) {
      showLoader();
      setTimeout(() => {
        window.location.href = site;
        // Показываем кнопку "Exit" после перехода
        localStorage.setItem('showExitButton', 'true');

        // Показываем кнопку перевода, если выбран сайт https://essay.art/
        if (site === "https://essay.art/") {
          localStorage.setItem('showTranslateButton', 'true');
        }
      }, 1000); // Имитация загрузки
    }

    function exitSite() {
      showLoader();
      setTimeout(() => {
        window.location.href = "https://your-main-site.com"; // Замените на URL вашего главного сайта
      }, 1000); // Имитация загрузки
    }

    function toggleLanguage() {
      const translateButton = document.querySelector('.translate-button');
      if (translateButton.textContent === "Перевести на русский") {
        translateButton.textContent = "Translate to English";
        // Здесь можно добавить логику для перевода страницы
      } else {
        translateButton.textContent = "Перевести на русский";
        // Здесь можно добавить логику для перевода страницы
      }
    }

    function showLoader() {
      document.getElementById('loader').style.display = 'block';
    }

    function toggleTheme() {
      document.body.classList.toggle('dark-mode');
      const themeToggle = document.querySelector('.theme-toggle');
      themeToggle.textContent = document.body.classList.contains('dark-mode') ? '☀️' : '🌙';
    }

    // Функция для отображения сайтов на текущей странице
    function displaySites(page) {
      const sitesList = document.getElementById('sitesList');
      sitesList.innerHTML = ''; // Очищаем список

      const startIndex = (page - 1) * itemsPerPage;
      const endIndex = startIndex + itemsPerPage;
      const sitesToShow = websims.slice(startIndex, endIndex);

      sitesToShow.forEach(site => {
        const siteElement = document.createElement('div');
        siteElement.textContent = site;
        siteElement.addEventListener('click', () => goToSite(site));
        sitesList.appendChild(siteElement);
      });

      // Обновляем состояние кнопок пагинации
      document.getElementById('prevPage').disabled = page === 1;
      document.getElementById('nextPage').disabled = endIndex >= websims.length;
    }

    // Переход на предыдущую страницу
    document.getElementById('prevPage').addEventListener('click', () => {
      if (currentPage > 1) {
        currentPage--;
        displaySites(currentPage);
      }
    });

    // Переход на следующую страницу
    document.getElementById('nextPage').addEventListener('click', () => {
      if (currentPage * itemsPerPage < websims.length) {
        currentPage++;
        displaySites(currentPage);
      }
    });

    // Проверяем, нужно ли показать кнопку "Exit" или "Translate"
    if (localStorage.getItem('showExitButton') === 'true') {
      document.querySelector('.exit-button').style.display = 'block';
      localStorage.removeItem('showExitButton'); // Сбрасываем флаг после показа
    }

    if (localStorage.getItem('showTranslateButton') === 'true') {
      document.querySelector('.translate-button').style.display = 'block';
      localStorage.removeItem('showTranslateButton'); // Сбрасываем флаг после показа
    }

    // Инициализация: отображаем первую страницу
    displaySites(currentPage);
  </script>
</body>
</html>