diff --git a/Onest.ttf b/src/css/Onest.ttf similarity index 100% rename from Onest.ttf rename to src/css/Onest.ttf diff --git a/main.css b/src/css/main.css similarity index 95% rename from main.css rename to src/css/main.css index 8ffb72a..6757322 100644 --- a/main.css +++ b/src/css/main.css @@ -1,383 +1,383 @@ -@font-face { - font-family: Onest; - src: url(./Onest.ttf); -} - -* { - margin: 0; - padding: 0; - box-sizing: border-box; -} - -body { - font-family: 'Onest', sans-serif; - background: #181818; - color: #fff; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - overflow-x: hidden; -} - -.container { - text-align: center; - max-width: 50rem; - padding: 2rem; - position: relative; -} - -.logo { - width: 7.5rem; - height: 7.5rem; - background: #cf6a3e; - border-radius: 1.25rem; - margin: 0 auto 2rem; - display: flex; - align-items: center; - justify-content: center; - overflow: hidden; - font-size: 2.5rem; - font-weight: bold; - color: #fff; - box-shadow: - 0 0 1.875rem rgba(207, 106, 62, 0.5), - 0 0 3.75rem rgba(207, 106, 62, 0.3), - 0 0.625rem 1.875rem rgba(0, 0, 0, 0.3); - animation: logoGlow 3s ease-in-out infinite alternate; - -} - -.logo-img { - width: 105%; - height: auto; - object-fit: cover; - /* Сохранить пропорции */ - border-radius: 0.625rem; - /* Слегка скруглить углы изображения */ -} - -@keyframes logoGlow { - from { - box-shadow: - 0 0 1.875rem rgba(207, 106, 62, 0.5), - 0 0 3.75rem rgba(207, 106, 62, 0.3), - 0 0.625rem 1.875rem rgba(0, 0, 0, 0.3); - } - - to { - box-shadow: - 0 0 2.5rem rgba(207, 106, 62, 0.7), - 0 0 5rem rgba(207, 106, 62, 0.4), - 0 0.9375rem 2.5rem rgba(0, 0, 0, 0.4); - } -} - -h1 { - font-size: 4rem; - margin-bottom: 1rem; - background: linear-gradient(45deg, #cf6a3e, #ff8c5a); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - background-clip: text; - text-shadow: 0 0 1.875rem rgba(207, 106, 62, 0.5); - animation: textGlow 2s ease-in-out infinite alternate; -} - -@keyframes textGlow { - from { - filter: drop-shadow(0 0 0.625rem rgba(207, 106, 62, 0.3)); - } - - to { - filter: drop-shadow(0 0 1.25rem rgba(207, 106, 62, 0.6)); - } -} - -.subtitle { - font-size: 1.2rem; - color: #aaa; - margin-bottom: 3rem; - max-width: 31.25rem; - margin-left: auto; - margin-right: auto; -} - -.download-btn { - background: linear-gradient(45deg, #cf6a3e, #ff8c5a); - color: white; - padding: 0.9375rem 2.5rem; - border: none; - border-radius: 3.125rem; - font-size: 1.1rem; - font-weight: bold; - cursor: pointer; - text-decoration: none; - display: inline-block; - margin-bottom: 3rem; - transition: all 0.3s ease; - box-shadow: - 0 0.3125rem 0.9375rem rgba(207, 106, 62, 0.4), - 0 0 1.25rem rgba(207, 106, 62, 0.2); - position: relative; - overflow: hidden; -} - -.download-btn:hover { - transform: translateY(-0.1875rem); - box-shadow: - 0 0.5rem 1.5625rem rgba(207, 106, 62, 0.6), - 0 0 1.875rem rgba(207, 106, 62, 0.4); -} - -.download-btn:before { - content: ''; - position: absolute; - top: 0; - left: -100%; - width: 100%; - height: 100%; - background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); - transition: left 0.5s; -} - -.download-btn:hover:before { - left: 100%; -} - -.beta-notice { - font-size: 0.875rem; - color: #888; - margin-bottom: 3rem; - margin-top: -1.5rem; - font-style: italic; - opacity: 0.8; -} - -.social-links { - display: flex; - justify-content: center; - gap: 1.25rem; - flex-wrap: wrap; -} - -.social-btn { - display: flex; - align-items: center; - gap: 0.625rem; - padding: 0.75rem 1.25rem; - border-radius: 1.5625rem; - text-decoration: none; - color: white; - font-weight: 500; - transition: all 0.3s ease; - border: 0.125rem solid transparent; - position: relative; -} - -.social-btn:hover { - transform: translateY(-0.125rem); - border-color: rgba(255, 255, 255, 0.2); -} - -.social-icon { - width: 1.25rem; - height: 1.25rem; - border-radius: 0.1875rem; - display: flex; - align-items: center; - justify-content: center; - font-size: 0.75rem; - font-weight: bold; - background-size: contain; - background-repeat: no-repeat; - background-position: center; -} - -.social-icon img { - width: 100%; - height: 100%; - object-fit: contain; - border-radius: 0.1875rem; -} - -/* Платформо-специфичные стили */ -.platform-github { - background-color: #333; -} - -.platform-github:hover { - box-shadow: 0 0.3125rem 0.9375rem rgba(51, 51, 51, 0.4); -} - -.platform-gitea { - background-color: #609926; -} - -.platform-gitea:hover { - box-shadow: 0 0.3125rem 0.9375rem #47721c; -} - -.platform-twitter { - background-color: #1da1f2; -} - -.platform-twitter:hover { - box-shadow: 0 0.3125rem 0.9375rem rgba(29, 161, 242, 0.4); -} - -.platform-instagram { - background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); -} - -.platform-instagram:hover { - box-shadow: 0 0.3125rem 0.9375rem rgba(225, 48, 108, 0.4); -} - -.platform-youtube { - background-color: #ff0000; -} - -.platform-youtube:hover { - box-shadow: 0 0.3125rem 0.9375rem rgba(255, 0, 0, 0.4); -} - -.platform-telegram { - background-color: #0088cc; -} - -.platform-telegram:hover { - box-shadow: 0 0.3125rem 0.9375rem rgba(0, 136, 204, 0.4); -} - -.platform-discord { - background-color: #5865f2; -} - -.platform-discord:hover { - box-shadow: 0 0.3125rem 0.9375rem rgba(88, 101, 242, 0.4); -} - -.platform-facebook { - background-color: #1877f2; -} - -.platform-facebook:hover { - box-shadow: 0 0.3125rem 0.9375rem rgba(24, 119, 242, 0.4); -} - -.platform-linkedin { - background-color: #0077b5; -} - -.platform-linkedin:hover { - box-shadow: 0 0.3125rem 0.9375rem rgba(0, 119, 181, 0.4); -} - -.platform-tiktok { - background: linear-gradient(45deg, #ff0050, #00f2ea); -} - -.platform-tiktok:hover { - box-shadow: 0 0.3125rem 0.9375rem rgba(255, 0, 80, 0.4); -} - -.language-selector { - position: absolute; - top: 1.25rem; - right: 1.25rem; - z-index: 100; -} - -.language-select { - background: rgba(24, 24, 24, 0.9); - border: 0.125rem solid #cf6a3e; - border-radius: 1.5625rem; - color: #fff; - padding: 0.5rem 0.9375rem; - font-size: 0.875rem; - cursor: pointer; - outline: none; - transition: all 0.3s ease; - box-shadow: 0 0 0.9375rem rgba(207, 106, 62, 0.3); -} - -.language-select:hover { - background: rgba(207, 106, 62, 0.2); - box-shadow: 0 0 1.25rem rgba(207, 106, 62, 0.5); -} - -.language-select option { - background: #181818; - color: #fff; - padding: 0.3125rem; -} - -/* RTL поддержка для арабского */ -.rtl { - direction: rtl; - text-align: right; -} - -.rtl .language-selector { - right: auto; - left: 1.25rem; -} - -.rtl .container { - text-align: center; - /* Центрирование для основного контента */ -} - -.particles { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - pointer-events: none; - z-index: -1; -} - -.particle { - position: absolute; - width: 0.125rem; - height: 0.125rem; - background: #cf6a3e; - border-radius: 50%; - animation: float 6s ease-in-out infinite; - opacity: 0.3; -} - -@keyframes float { - - 0%, - 100% { - transform: translateY(0rem) rotate(0deg); - } - - 50% { - transform: translateY(-1.25rem) rotate(180deg); - } -} - -@media (max-width: 48rem) { - h1 { - font-size: 2.5rem; - } - - .container { - padding: 1rem; - } - - .social-links { - flex-direction: column; - align-items: center; - } - - .social-btn { - width: 12.5rem; - justify-content: center; - } +@font-face { + font-family: Onest; + src: url(./Onest.ttf); +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: 'Onest', sans-serif; + background: #181818; + color: #fff; + min-height: 100vh; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + overflow-x: hidden; +} + +.container { + text-align: center; + max-width: 50rem; + padding: 2rem; + position: relative; +} + +.logo { + width: 7.5rem; + height: 7.5rem; + background: #cf6a3e; + border-radius: 1.25rem; + margin: 0 auto 2rem; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; + font-size: 2.5rem; + font-weight: bold; + color: #fff; + box-shadow: + 0 0 1.875rem rgba(207, 106, 62, 0.5), + 0 0 3.75rem rgba(207, 106, 62, 0.3), + 0 0.625rem 1.875rem rgba(0, 0, 0, 0.3); + animation: logoGlow 3s ease-in-out infinite alternate; + +} + +.logo-img { + width: 105%; + height: auto; + object-fit: cover; + /* Сохранить пропорции */ + border-radius: 0.625rem; + /* Слегка скруглить углы изображения */ +} + +@keyframes logoGlow { + from { + box-shadow: + 0 0 1.875rem rgba(207, 106, 62, 0.5), + 0 0 3.75rem rgba(207, 106, 62, 0.3), + 0 0.625rem 1.875rem rgba(0, 0, 0, 0.3); + } + + to { + box-shadow: + 0 0 2.5rem rgba(207, 106, 62, 0.7), + 0 0 5rem rgba(207, 106, 62, 0.4), + 0 0.9375rem 2.5rem rgba(0, 0, 0, 0.4); + } +} + +h1 { + font-size: 4rem; + margin-bottom: 1rem; + background: linear-gradient(45deg, #cf6a3e, #ff8c5a); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; + text-shadow: 0 0 1.875rem rgba(207, 106, 62, 0.5); + animation: textGlow 2s ease-in-out infinite alternate; +} + +@keyframes textGlow { + from { + filter: drop-shadow(0 0 0.625rem rgba(207, 106, 62, 0.3)); + } + + to { + filter: drop-shadow(0 0 1.25rem rgba(207, 106, 62, 0.6)); + } +} + +.subtitle { + font-size: 1.2rem; + color: #aaa; + margin-bottom: 3rem; + max-width: 31.25rem; + margin-left: auto; + margin-right: auto; +} + +.download-btn { + background: linear-gradient(45deg, #cf6a3e, #ff8c5a); + color: white; + padding: 0.9375rem 2.5rem; + border: none; + border-radius: 3.125rem; + font-size: 1.1rem; + font-weight: bold; + cursor: pointer; + text-decoration: none; + display: inline-block; + margin-bottom: 3rem; + transition: all 0.3s ease; + box-shadow: + 0 0.3125rem 0.9375rem rgba(207, 106, 62, 0.4), + 0 0 1.25rem rgba(207, 106, 62, 0.2); + position: relative; + overflow: hidden; +} + +.download-btn:hover { + transform: translateY(-0.1875rem); + box-shadow: + 0 0.5rem 1.5625rem rgba(207, 106, 62, 0.6), + 0 0 1.875rem rgba(207, 106, 62, 0.4); +} + +.download-btn:before { + content: ''; + position: absolute; + top: 0; + left: -100%; + width: 100%; + height: 100%; + background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); + transition: left 0.5s; +} + +.download-btn:hover:before { + left: 100%; +} + +.beta-notice { + font-size: 0.875rem; + color: #888; + margin-bottom: 3rem; + margin-top: -1.5rem; + font-style: italic; + opacity: 0.8; +} + +.social-links { + display: flex; + justify-content: center; + gap: 1.25rem; + flex-wrap: wrap; +} + +.social-btn { + display: flex; + align-items: center; + gap: 0.625rem; + padding: 0.75rem 1.25rem; + border-radius: 1.5625rem; + text-decoration: none; + color: white; + font-weight: 500; + transition: all 0.3s ease; + border: 0.125rem solid transparent; + position: relative; +} + +.social-btn:hover { + transform: translateY(-0.125rem); + border-color: rgba(255, 255, 255, 0.2); +} + +.social-icon { + width: 1.25rem; + height: 1.25rem; + border-radius: 0.1875rem; + display: flex; + align-items: center; + justify-content: center; + font-size: 0.75rem; + font-weight: bold; + background-size: contain; + background-repeat: no-repeat; + background-position: center; +} + +.social-icon img { + width: 100%; + height: 100%; + object-fit: contain; + border-radius: 0.1875rem; +} + +/* Платформо-специфичные стили */ +.platform-github { + background-color: #333; +} + +.platform-github:hover { + box-shadow: 0 0.3125rem 0.9375rem rgba(51, 51, 51, 0.4); +} + +.platform-gitea { + background-color: #609926; +} + +.platform-gitea:hover { + box-shadow: 0 0.3125rem 0.9375rem #47721c; +} + +.platform-twitter { + background-color: #1da1f2; +} + +.platform-twitter:hover { + box-shadow: 0 0.3125rem 0.9375rem rgba(29, 161, 242, 0.4); +} + +.platform-instagram { + background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); +} + +.platform-instagram:hover { + box-shadow: 0 0.3125rem 0.9375rem rgba(225, 48, 108, 0.4); +} + +.platform-youtube { + background-color: #ff0000; +} + +.platform-youtube:hover { + box-shadow: 0 0.3125rem 0.9375rem rgba(255, 0, 0, 0.4); +} + +.platform-telegram { + background-color: #0088cc; +} + +.platform-telegram:hover { + box-shadow: 0 0.3125rem 0.9375rem rgba(0, 136, 204, 0.4); +} + +.platform-discord { + background-color: #5865f2; +} + +.platform-discord:hover { + box-shadow: 0 0.3125rem 0.9375rem rgba(88, 101, 242, 0.4); +} + +.platform-facebook { + background-color: #1877f2; +} + +.platform-facebook:hover { + box-shadow: 0 0.3125rem 0.9375rem rgba(24, 119, 242, 0.4); +} + +.platform-linkedin { + background-color: #0077b5; +} + +.platform-linkedin:hover { + box-shadow: 0 0.3125rem 0.9375rem rgba(0, 119, 181, 0.4); +} + +.platform-tiktok { + background: linear-gradient(45deg, #ff0050, #00f2ea); +} + +.platform-tiktok:hover { + box-shadow: 0 0.3125rem 0.9375rem rgba(255, 0, 80, 0.4); +} + +.language-selector { + position: absolute; + top: 1.25rem; + right: 1.25rem; + z-index: 100; +} + +.language-select { + background: rgba(24, 24, 24, 0.9); + border: 0.125rem solid #cf6a3e; + border-radius: 1.5625rem; + color: #fff; + padding: 0.5rem 0.9375rem; + font-size: 0.875rem; + cursor: pointer; + outline: none; + transition: all 0.3s ease; + box-shadow: 0 0 0.9375rem rgba(207, 106, 62, 0.3); +} + +.language-select:hover { + background: rgba(207, 106, 62, 0.2); + box-shadow: 0 0 1.25rem rgba(207, 106, 62, 0.5); +} + +.language-select option { + background: #181818; + color: #fff; + padding: 0.3125rem; +} + +/* RTL поддержка для арабского */ +.rtl { + direction: rtl; + text-align: right; +} + +.rtl .language-selector { + right: auto; + left: 1.25rem; +} + +.rtl .container { + text-align: center; + /* Центрирование для основного контента */ +} + +.particles { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + pointer-events: none; + z-index: -1; +} + +.particle { + position: absolute; + width: 0.125rem; + height: 0.125rem; + background: #cf6a3e; + border-radius: 50%; + animation: float 6s ease-in-out infinite; + opacity: 0.3; +} + +@keyframes float { + + 0%, + 100% { + transform: translateY(0rem) rotate(0deg); + } + + 50% { + transform: translateY(-1.25rem) rotate(180deg); + } +} + +@media (max-width: 48rem) { + h1 { + font-size: 2.5rem; + } + + .container { + padding: 1rem; + } + + .social-links { + flex-direction: column; + align-items: center; + } + + .social-btn { + width: 12.5rem; + justify-content: center; + } } \ No newline at end of file diff --git a/logo.svg b/src/icons/logo.svg similarity index 99% rename from logo.svg rename to src/icons/logo.svg index e81c1f3..016a5ef 100644 --- a/logo.svg +++ b/src/icons/logo.svg @@ -1,18 +1,18 @@ - + diff --git a/const.js b/src/js/const.js similarity index 97% rename from const.js rename to src/js/const.js index 87a1437..15434af 100644 --- a/const.js +++ b/src/js/const.js @@ -1,91 +1,91 @@ -const translations = { - ru: { - comingSoon: 'Скоро...', - subtitle: 'Что-то невероятное готовится к запуску. Следите за обновлениями!', - downloadBtn: 'Скачать программу', - betaNotice: 'Закрытое бета-тестирование.', - language: 'Язык' - }, - en: { - comingSoon: 'Coming Soon...', - subtitle: 'Something incredible is about to launch. Stay tuned for updates!', - downloadBtn: 'Download App', - betaNotice: 'Closed beta testing.', - language: 'Language' - } -}; - - -const downloadUrl = 'https://boophub.erry.xyz/api/app/download'; // Замените на вашу ссылку - -const iconSources = { - // Simple Icons (основной источник) - simple: (platform) => `https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/${platform}.svg`, - - // Tabler Icons (альтернативный) - tabler: (platform) => `https://cdn.jsdelivr.net/npm/@tabler/icons@latest/icons/${platform}.svg`, - - // Bootstrap Icons (еще один вариант) - bootstrap: (platform) => `https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/icons/${platform}.svg`, - - // Локальные иконки (если у вас есть собственные) - local: (platform) => `./icons/${platform}.svg` -}; - - -const socialLinks = [ - { - platform: 'gitea', - name: 'Gitea', - url: 'https://gt.1rb1.me/R1nc', - icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/gitea.svg' - }, - // { - // platform: 'telegram', - // name: 'Telegram', - // url: 'https://t.me/yourchannel', - // icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/telegram.svg' - // }, - { - platform: 'discord', - name: 'Discord', - url: 'https://discord.gg/Bx4H8FDyvB', - icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/discord.svg' - }, - // { - // platform: 'youtube', - // name: 'YouTube', - // url: 'https://youtube.com/@yourchannel', - // icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/youtube.svg' - // }, - // { - // platform: 'twitter', - // name: 'Twitter', - // url: 'https://twitter.com/yourusername', - // icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/twitter.svg' - // }, - // { - // platform: 'instagram', - // name: 'Instagram', - // url: 'https://instagram.com/yourusername', - // icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/instagram.svg' - // }, - // { - // platform: 'facebook', - // name: 'Facebook', - // url: 'https://facebook.com/yourpage', - // icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/facebook.svg' - // }, - // { - // platform: 'linkedin', - // name: 'LinkedIn', - // url: 'https://linkedin.com/in/yourusername', - // icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/linkedin.svg' - // }, - // { - // platform: 'tiktok', - // name: 'TikTok', - // url: 'https://tiktok.com/@yourusername', - // icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/tiktok.svg' - // } +const translations = { + ru: { + comingSoon: 'Скоро...', + subtitle: 'Что-то невероятное готовится к запуску. Следите за обновлениями!', + downloadBtn: 'Скачать программу', + betaNotice: 'Закрытое бета-тестирование.', + language: 'Язык' + }, + en: { + comingSoon: 'Coming Soon...', + subtitle: 'Something incredible is about to launch. Stay tuned for updates!', + downloadBtn: 'Download App', + betaNotice: 'Closed beta testing.', + language: 'Language' + } +}; + + +const downloadUrl = 'https://boophub.erry.xyz/api/app/download'; // Замените на вашу ссылку + +const iconSources = { + // Simple Icons (основной источник) + simple: (platform) => `https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/${platform}.svg`, + + // Tabler Icons (альтернативный) + tabler: (platform) => `https://cdn.jsdelivr.net/npm/@tabler/icons@latest/icons/${platform}.svg`, + + // Bootstrap Icons (еще один вариант) + bootstrap: (platform) => `https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/icons/${platform}.svg`, + + // Локальные иконки (если у вас есть собственные) + local: (platform) => `./icons/${platform}.svg` +}; + + +const socialLinks = [ + { + platform: 'gitea', + name: 'Gitea', + url: 'https://gt.1rb1.me/R1nc', + icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/gitea.svg' + }, + // { + // platform: 'telegram', + // name: 'Telegram', + // url: 'https://t.me/yourchannel', + // icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/telegram.svg' + // }, + { + platform: 'discord', + name: 'Discord', + url: 'https://discord.gg/Bx4H8FDyvB', + icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/discord.svg' + }, + // { + // platform: 'youtube', + // name: 'YouTube', + // url: 'https://youtube.com/@yourchannel', + // icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/youtube.svg' + // }, + // { + // platform: 'twitter', + // name: 'Twitter', + // url: 'https://twitter.com/yourusername', + // icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/twitter.svg' + // }, + // { + // platform: 'instagram', + // name: 'Instagram', + // url: 'https://instagram.com/yourusername', + // icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/instagram.svg' + // }, + // { + // platform: 'facebook', + // name: 'Facebook', + // url: 'https://facebook.com/yourpage', + // icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/facebook.svg' + // }, + // { + // platform: 'linkedin', + // name: 'LinkedIn', + // url: 'https://linkedin.com/in/yourusername', + // icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/linkedin.svg' + // }, + // { + // platform: 'tiktok', + // name: 'TikTok', + // url: 'https://tiktok.com/@yourusername', + // icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/tiktok.svg' + // } ]; \ No newline at end of file diff --git a/src/js/main.js b/src/js/main.js new file mode 100644 index 0000000..5a06e0e --- /dev/null +++ b/src/js/main.js @@ -0,0 +1,140 @@ + +// Текущий язык (по умолчанию русский) +let currentLanguage = localStorage.getItem('language') || 'ru'; + + + + +// Функция для обновления текста на странице +function updateLanguage(lang) { + const t = translations[lang]; + if (!t) return; + + document.getElementById('mainTitle').textContent = t.comingSoon; + document.getElementById('subtitle').textContent = t.subtitle; + document.getElementById('downloadBtn').textContent = t.downloadBtn; + document.getElementById('betaNotice').textContent = t.betaNotice; + + // Сохранить выбранный язык + localStorage.setItem('language', lang); + currentLanguage = lang; + + // Применить RTL для арабского + if (lang === 'ar') { + document.body.classList.add('rtl'); + } else { + document.body.classList.remove('rtl'); + } +} + +// Функция для инициализации переключателя языка +function initLanguageSelector() { + const selector = document.getElementById('languageSelect'); + selector.value = currentLanguage; + + selector.addEventListener('change', function () { + updateLanguage(this.value); + }); +} +function createSocialLinks() { + const container = document.getElementById('socialLinks'); + + socialLinks.forEach(link => { + const linkElement = document.createElement('a'); + linkElement.href = link.url; + linkElement.className = `social-btn platform-${link.platform}`; + linkElement.target = '_blank'; + linkElement.rel = 'noopener noreferrer'; + + linkElement.innerHTML = ` +
+ ${link.name} + `; + + container.appendChild(linkElement); + }); +} + +// Функция для создания частиц +function createParticles() { + const particlesContainer = document.getElementById('particles'); + const particleCount = 50; + + for (let i = 0; i < particleCount; i++) { + const particle = document.createElement('div'); + particle.className = 'particle'; + particle.style.left = Math.random() * 100 + '%'; + particle.style.top = Math.random() * 100 + '%'; + particle.style.animationDuration = (Math.random() * 3 + 3) + 's'; + particle.style.animationDelay = Math.random() * 2 + 's'; + particlesContainer.appendChild(particle); + } +} + +// Инициализация +document.addEventListener('DOMContentLoaded', function () { + // Инициализировать переключатель языка + initLanguageSelector(); + + // Применить сохраненный язык + updateLanguage(currentLanguage); + + // Установить ссылку для скачивания + document.getElementById('downloadBtn').href = downloadUrl; + + // Создать социальные ссылки + createSocialLinks(); + + // Создать частицы + createParticles(); +}); + +// Функция для добавления новой ссылки (для удобства) +function addSocialLink(platform, name, url, icon) { + socialLinks.push({ platform, name, url, icon }); + // Пересоздать ссылки + document.getElementById('socialLinks').innerHTML = ''; + createSocialLinks(); +} + +// Альтернативные источники иконок для разных платформ + +// Функция для смены источника иконок +function changeIconSource(source) { + socialLinks.forEach(link => { + if (iconSources[source]) { + link.icon = iconSources[source](link.platform); + } + }); + // Пересоздать ссылки с новыми иконками + document.getElementById('socialLinks').innerHTML = ''; + createSocialLinks(); +} + +// Функция для изменения ссылки на скачивание +function setDownloadUrl(url) { + document.getElementById('downloadBtn').href = url; +} + +// Функция для добавления нового языка +function addLanguage(code, translations, flagEmoji, nativeName) { + // Добавить переводы + translations[code] = translations; + + // Добавить опцию в селектор + const selector = document.getElementById('languageSelect'); + const option = document.createElement('option'); + option.value = code; + option.textContent = `${flagEmoji} ${nativeName}`; + selector.appendChild(option); +} + +// Функция для получения текущего языка +function getCurrentLanguage() { + return currentLanguage; +} + +// Функция для получения всех доступных языков +function getAvailableLanguages() { + return Object.keys(translations); +} \ No newline at end of file