Spaces:
Running
Running
Publish Bashkort Keyboard website and interactive demo
Browse files- LICENSE +21 -0
- README.md +23 -5
- assets/app-icon.png +0 -0
- demo.js +69 -0
- index.html +84 -17
- repository.json +1 -0
- site.js +43 -0
- style.css +6 -28
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2026 TvoyTezka and Bashkort Keyboard contributors
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
CHANGED
|
@@ -1,10 +1,28 @@
|
|
| 1 |
---
|
| 2 |
title: Bashkort Keyboard
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: Bashkort Keyboard
|
| 3 |
+
emoji: ⌨️
|
| 4 |
+
colorFrom: green
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: static
|
| 7 |
+
app_file: index.html
|
| 8 |
+
license: mit
|
| 9 |
+
short_description: Башкирские буквы удержанием клавиш · Windows
|
| 10 |
+
thumbnail: https://huggingface.co/spaces/failed09/bashkort-keyboard/resolve/main/assets/app-icon.png
|
| 11 |
+
tags:
|
| 12 |
+
- bashkir
|
| 13 |
+
- keyboard
|
| 14 |
+
- windows
|
| 15 |
+
- language
|
| 16 |
+
- accessibility
|
| 17 |
+
pinned: true
|
| 18 |
---
|
| 19 |
|
| 20 |
+
# Башҡорт Keyboard
|
| 21 |
+
|
| 22 |
+
Башкирские буквы на привычной русской раскладке. Короткое нажатие — обычная буква, удержание — башкирская.
|
| 23 |
+
|
| 24 |
+
В этом Space можно попробовать принцип работы с помощью кнопок. Для ввода в других приложениях нужна программа для Windows 10/11 x64.
|
| 25 |
+
|
| 26 |
+
**[Скачать для Windows](https://github.com/TvoyTezka/bashkort-keyboard/releases/latest) · [Исходный код](https://github.com/TvoyTezka/bashkort-keyboard) · [Сайт](https://tvoytezka.github.io/bashkort-keyboard/)**
|
| 27 |
+
|
| 28 |
+
Приложение бесплатно, с открытым кодом под MIT. Браузерная демонстрация обрабатывает буквы локально, без сохранения и отправки.
|
assets/app-icon.png
ADDED
|
|
demo.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(() => {
|
| 2 |
+
const output = document.getElementById('try-output');
|
| 3 |
+
if (!output) return;
|
| 4 |
+
let text = '';
|
| 5 |
+
let active = null;
|
| 6 |
+
const render = () => { output.textContent = text || 'Здесь появятся буквы'; };
|
| 7 |
+
function cancel() {
|
| 8 |
+
if (!active) return;
|
| 9 |
+
clearTimeout(active.timer);
|
| 10 |
+
active.button.classList.remove('holding');
|
| 11 |
+
active = null;
|
| 12 |
+
}
|
| 13 |
+
function begin(button, upper) {
|
| 14 |
+
cancel();
|
| 15 |
+
text = text.slice(-199);
|
| 16 |
+
text += upper ? button.dataset.letter.toUpperCase() : button.dataset.letter;
|
| 17 |
+
render();
|
| 18 |
+
const replacement = upper ? button.dataset.hold.toUpperCase() : button.dataset.hold;
|
| 19 |
+
const candidate = { button, timer: null };
|
| 20 |
+
active = candidate;
|
| 21 |
+
button.classList.add('holding');
|
| 22 |
+
candidate.timer = setTimeout(() => {
|
| 23 |
+
if (active !== candidate) return;
|
| 24 |
+
text = text.slice(0, -1) + replacement;
|
| 25 |
+
render();
|
| 26 |
+
button.classList.remove('holding');
|
| 27 |
+
}, 450);
|
| 28 |
+
}
|
| 29 |
+
document.querySelectorAll('[data-letter]').forEach(button => {
|
| 30 |
+
let suppressClick = false;
|
| 31 |
+
button.addEventListener('pointerdown', event => {
|
| 32 |
+
if (event.button !== 0 || !event.isPrimary) return;
|
| 33 |
+
event.preventDefault();
|
| 34 |
+
button.focus();
|
| 35 |
+
suppressClick = true;
|
| 36 |
+
button.setPointerCapture(event.pointerId);
|
| 37 |
+
begin(button, event.shiftKey);
|
| 38 |
+
});
|
| 39 |
+
const end = () => { if (active?.button === button) cancel(); };
|
| 40 |
+
button.addEventListener('pointerup', end);
|
| 41 |
+
button.addEventListener('pointercancel', end);
|
| 42 |
+
button.addEventListener('lostpointercapture', end);
|
| 43 |
+
button.addEventListener('blur', end);
|
| 44 |
+
button.addEventListener('keydown', event => {
|
| 45 |
+
if (event.key !== ' ' && event.key !== 'Enter') return;
|
| 46 |
+
event.preventDefault();
|
| 47 |
+
if (event.repeat) return;
|
| 48 |
+
suppressClick = true;
|
| 49 |
+
begin(button, event.shiftKey);
|
| 50 |
+
});
|
| 51 |
+
button.addEventListener('keyup', event => {
|
| 52 |
+
if (event.key === ' ' || event.key === 'Enter') {
|
| 53 |
+
event.preventDefault();
|
| 54 |
+
end();
|
| 55 |
+
suppressClick = false;
|
| 56 |
+
}
|
| 57 |
+
});
|
| 58 |
+
button.addEventListener('click', () => {
|
| 59 |
+
if (suppressClick) { suppressClick = false; return; }
|
| 60 |
+
begin(button, false);
|
| 61 |
+
cancel();
|
| 62 |
+
});
|
| 63 |
+
});
|
| 64 |
+
document.getElementById('try-clear').addEventListener('click', () => {
|
| 65 |
+
cancel(); text = ''; render();
|
| 66 |
+
});
|
| 67 |
+
window.addEventListener('blur', cancel);
|
| 68 |
+
document.addEventListener('visibilitychange', () => { if (document.hidden) cancel(); });
|
| 69 |
+
})();
|
index.html
CHANGED
|
@@ -1,19 +1,86 @@
|
|
| 1 |
<!doctype html>
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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">
|
| 6 |
+
<meta name="description" content="Башкирские буквы на привычной русской раскладке. Бесплатная Windows-утилита с открытым кодом: нажмите коротко или удерживайте клавишу.">
|
| 7 |
+
<meta name="theme-color" content="#147d72">
|
| 8 |
+
<title>Башҡорт Keyboard — башкирские буквы одним удержанием</title>
|
| 9 |
+
<link rel="icon" href="assets/app-icon.png">
|
| 10 |
+
<link rel="stylesheet" href="style.css">
|
| 11 |
+
<script src="site.js" defer></script>
|
| 12 |
+
<script src="demo.js" defer></script>
|
| 13 |
+
</head>
|
| 14 |
+
<body>
|
| 15 |
+
<header class="navigation container">
|
| 16 |
+
<a class="brand" href="#"><img src="assets/app-icon.png" width="38" height="38" alt="">Башҡорт Keyboard</a>
|
| 17 |
+
<nav aria-label="Навигация"><a href="#how">Как работает</a><a href="#questions">Вопросы</a><a data-repo hidden>GitHub ↗</a></nav>
|
| 18 |
+
</header>
|
| 19 |
+
<main>
|
| 20 |
+
<section class="hero container">
|
| 21 |
+
<div class="hero-copy">
|
| 22 |
+
<span class="eyebrow"><span class="status-dot"></span> Для Windows 10 и 11 · x64</span>
|
| 23 |
+
<h1>Пишите по-башкирски.<br><span>На привычных клавишах.</span></h1>
|
| 24 |
+
<p class="lead">Короткое нажатие — русская буква. Удержание — башкирская. Без переключения на другую раскладку и без задержки обычной печати.</p>
|
| 25 |
+
<div class="actions"><a class="button primary" id="download" href="#installation">Как установить <span aria-hidden="true">↓</span></a><a class="button secondary" data-source hidden>Посмотреть код ↗</a></div>
|
| 26 |
+
<p class="download-note" id="release-note" role="status">Бесплатно · открытый код · .NET устанавливать не нужно</p>
|
| 27 |
+
</div>
|
| 28 |
+
<div class="demo" aria-label="Пример: удержание О заменяет о на ө">
|
| 29 |
+
<div class="demo-top"><img src="assets/app-icon.png" width="34" height="34" alt=""><span>Башҡорт Keyboard</span><span class="pill">Включено</span></div>
|
| 30 |
+
<div class="demo-label">ОДНА КЛАВИША. ДВА СИМВОЛА.</div>
|
| 31 |
+
<div class="letter-demo"><span class="keycap">О</span><span class="hold">удерживайте<br><strong>450 мс</strong><span class="arrow">→</span></span><span class="bashkir-letter">Ө</span></div>
|
| 32 |
+
<div class="demo-divider"></div>
|
| 33 |
+
<div class="demo-caption"><span>Короткое нажатие <strong>о</strong></span><span>С Shift <strong>Ө</strong></span></div>
|
| 34 |
+
<p>Привычное движение — нужная буква.</p>
|
| 35 |
+
</div>
|
| 36 |
+
</section>
|
| 37 |
+
<section class="try-section container" aria-labelledby="try-title">
|
| 38 |
+
<span class="eyebrow">ПОПРОБУЙТЕ ПРЯМО ЗДЕСЬ</span>
|
| 39 |
+
<h2 id="try-title">Одно нажатие. Две буквы.</h2>
|
| 40 |
+
<p>Нажмите кнопку коротко для русской буквы или удерживайте 450 мс для башкирской. На телефоне — удерживайте пальцем.</p>
|
| 41 |
+
<div class="try-keys" aria-label="Кнопки для демонстрации">
|
| 42 |
+
<button type="button" data-letter="а" data-hold="ә" aria-label="А, при удержании Ә">А <small>Ә</small></button>
|
| 43 |
+
<button type="button" data-letter="о" data-hold="ө" aria-label="О, при удержании Ө">О <small>Ө</small></button>
|
| 44 |
+
<button type="button" data-letter="у" data-hold="ү" aria-label="У, при удержании Ү">У <small>Ү</small></button>
|
| 45 |
+
<button type="button" data-letter="к" data-hold="ҡ" aria-label="К, при удержании Ҡ">К <small>Ҡ</small></button>
|
| 46 |
+
<button type="button" data-letter="г" data-hold="ғ" aria-label="Г, при удержании Ғ">Г <small>Ғ</small></button>
|
| 47 |
+
<button type="button" data-letter="с" data-hold="ҫ" aria-label="С, при удержании Ҫ">С <small>Ҫ</small></button>
|
| 48 |
+
<button type="button" data-letter="з" data-hold="ҙ" aria-label="З, при удержании Ҙ">З <small>Ҙ</small></button>
|
| 49 |
+
<button type="button" data-letter="х" data-hold="һ" aria-label="Х, при удержании Һ">Х <small>Һ</small></button>
|
| 50 |
+
<button type="button" data-letter="н" data-hold="ң" aria-label="Н, при удержании Ң">Н <small>Ң</small></button>
|
| 51 |
+
</div>
|
| 52 |
+
<div class="try-result"><output id="try-output" aria-label="Результат демонстрации" aria-live="polite">Здесь появятся буквы</output><button type="button" id="try-clear">Очистить</button></div>
|
| 53 |
+
<p class="try-note">Демонстрация работает только с этими кнопками. Для ввода в других приложениях скачайте программу для Windows. Буквы не сохраняются и не отправляются.</p>
|
| 54 |
+
</section>
|
| 55 |
+
<section class="mapping-section container" aria-labelledby="letters-title">
|
| 56 |
+
<div class="section-intro"><span class="eyebrow">ВСЕ НУЖНЫЕ БУКВЫ</span><h2 id="letters-title">Девять соответствий.<br>Ничего лишнего.</h2><p>Каждую замену можно включить отдельно.<br>Регистр учитывает Shift и Caps Lock.</p></div>
|
| 57 |
+
<div class="mapping-grid">
|
| 58 |
+
<div><span>А</span><i>→</i><strong>Ә</strong></div><div><span>О</span><i>→</i><strong>Ө</strong></div><div><span>У</span><i>→</i><strong>Ү</strong></div>
|
| 59 |
+
<div><span>К</span><i>→</i><strong>Ҡ</strong></div><div><span>Г</span><i>→</i><strong>Ғ</strong></div><div><span>С</span><i>→</i><strong>Ҫ</strong></div>
|
| 60 |
+
<div><span>З</span><i>→</i><strong>Ҙ</strong></div><div><span>Х</span><i>→</i><strong>Һ</strong></div><div><span>Н</span><i>→</i><strong>Ң</strong></div>
|
| 61 |
+
</div>
|
| 62 |
+
</section>
|
| 63 |
+
<section class="how container" id="how">
|
| 64 |
+
<span class="eyebrow">ПРОСТО В ПОВСЕДНЕВНОЙ РАБОТЕ</span><h2>Работает в фоне.<br>Управление — в трее.</h2>
|
| 65 |
+
<div class="feature-grid">
|
| 66 |
+
<article><span class="feature-number">01</span><h3>Печатайте в своём темпе</h3><p>Обычная буква появляется сразу. При быстром вводе приложение не ждёт таймер и не переставляет символы.</p></article>
|
| 67 |
+
<article><span class="feature-number">02</span><h3>Настройте под себя</h3><p>Выберите задержку от 250 до 800 мс, нужные соответствия и запуск вместе с Windows. Всё сохраняется локально.</p></article>
|
| 68 |
+
<article><span class="feature-number">03</span><h3>Ваш текст остаётся у вас</h3><p>В приложении нет аналитики и сетевой отправки. Диагностический журнал не содержит введённый текст.</p></article>
|
| 69 |
+
</div>
|
| 70 |
+
</section>
|
| 71 |
+
<section class="installation container" id="installation">
|
| 72 |
+
<div><span class="eyebrow">БЕЗ УСТАНОВЩИКА</span><h2>Распакуйте.<br>Запустите. Пишите.</h2><p>Переносимая сборка уже включает .NET.<br>Храните все файлы из архива вместе.</p><a class="text-link" data-releases hidden>Все выпуски и файлы ↗</a></div>
|
| 73 |
+
<ol><li><span>1</span><div><h3>Скачайте ZIP для Windows x64</h3><p>Выберите файл BashkortKeyboard…win-x64.zip в последнем выпуске.</p></div></li><li><span>2</span><div><h3>Распакуйте в постоянную папку</h3><p>Например, в папку приложений. Не запускайте программу внутри ZIP.</p></div></li><li><span>3</span><div><h3>Откройте BashkortKeyboard.exe</h3><p>Включите русскую раскладку. Для башкирской буквы удерживайте нужную клавишу.</p></div></li></ol>
|
| 74 |
+
</section>
|
| 75 |
+
<section class="questions container" id="questions">
|
| 76 |
+
<h2>Перед первым запуском</h2>
|
| 77 |
+
<details open><summary>В каких приложениях работает замена?</summary><p>Обработка клавиатуры глобальная, но замена зависит от доступности текстового поля через Windows UI Automation. Если положение курсора проверить нельзя, приложение оставляет обычный ввод. Совместимость всех версий редакторов не гарантируется.</p></details>
|
| 78 |
+
<details><summary>Почему Windows может показать предупреждение?</summary><p>Сборка пока не подписана цифровой подписью. Windows может предупредить о неизвестном издателе. Открытый код позволяет изучить приложение �� собрать его самостоятельно, но не заменяет цифровую подпись.</p></details>
|
| 79 |
+
<details><summary>Что происходит, если нажать другую клавишу?</summary><p>Ожидающая замена отменяется. Щелчок, смена окна или раскладки тоже отменяют удержание. Это помогает избежать удаления другой буквы.</p></details>
|
| 80 |
+
<details><summary>Можно ли оставить английскую раскладку?</summary><p>На английской раскладке замены отключены. Для башкирского ввода переключитесь на обычную русскую раскладку.</p></details>
|
| 81 |
+
<details><summary>Приложение читает и сохраняет мой текст?</summary><p>Для проверки замены оно кратковременно сравнивает один символ перед курсором в доступном непарольном поле. Этот текст не сохраняется и не отправляется. Полное описание доступно в документе о приватности.</p><a data-privacy hidden>Описание приватности ↗</a></details>
|
| 82 |
+
</section>
|
| 83 |
+
</main>
|
| 84 |
+
<footer class="container"><div class="brand"><img src="assets/app-icon.png" width="28" height="28" alt="">Башҡорт Keyboard</div><p>Небольшой инструмент для родного языка.</p><a data-license hidden>Открытый код · MIT ↗</a></footer>
|
| 85 |
+
</body>
|
| 86 |
</html>
|
repository.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"repository":"TvoyTezka/bashkort-keyboard"}
|
site.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
async function configureRepository() {
|
| 2 |
+
// Generated by Pages workflow; no account names or release URLs are hardcoded.
|
| 3 |
+
const response = await fetch('repository.json', { cache: 'no-cache' });
|
| 4 |
+
if (!response.ok) return;
|
| 5 |
+
const { repository } = await response.json();
|
| 6 |
+
if (typeof repository !== 'string' || !/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(repository)) return;
|
| 7 |
+
const root = `https://github.com/${repository}`;
|
| 8 |
+
const links = {
|
| 9 |
+
repo: root, source: root, releases: `${root}/releases`,
|
| 10 |
+
privacy: `${root}/blob/main/PRIVACY.md`, license: `${root}/blob/main/LICENSE`
|
| 11 |
+
};
|
| 12 |
+
for (const [name, url] of Object.entries(links)) {
|
| 13 |
+
document.querySelectorAll(`[data-${name}]`).forEach(link => {
|
| 14 |
+
link.href = url;
|
| 15 |
+
link.target = '_blank';
|
| 16 |
+
link.rel = 'noopener noreferrer';
|
| 17 |
+
link.hidden = false;
|
| 18 |
+
});
|
| 19 |
+
}
|
| 20 |
+
const button = document.getElementById('download');
|
| 21 |
+
button.target = '_blank';
|
| 22 |
+
button.rel = 'noopener noreferrer';
|
| 23 |
+
button.href = `${root}/releases`;
|
| 24 |
+
button.textContent = 'Перейти к скачиванию ↓';
|
| 25 |
+
try {
|
| 26 |
+
const latest = await fetch(`https://api.github.com/repos/${repository}/releases/latest`, {
|
| 27 |
+
headers: { Accept: 'application/vnd.github+json' }
|
| 28 |
+
});
|
| 29 |
+
if (!latest.ok) return;
|
| 30 |
+
const release = await latest.json();
|
| 31 |
+
const asset = release.assets?.find(item => /^BashkortKeyboard-.+-win-x64\.zip$/i.test(item.name));
|
| 32 |
+
if (!asset) return;
|
| 33 |
+
const url = new URL(asset.browser_download_url);
|
| 34 |
+
if (url.origin !== 'https://github.com' || !url.pathname.startsWith(`/${repository}/releases/download/`)) return;
|
| 35 |
+
button.href = url.href;
|
| 36 |
+
button.textContent = 'Скачать для Windows ↓';
|
| 37 |
+
document.getElementById('release-note').textContent =
|
| 38 |
+
`${release.tag_name} · ${Math.round(asset.size / 1024 / 1024)} МБ · Windows x64 · бесплатно`;
|
| 39 |
+
} catch {
|
| 40 |
+
// Releases link remains usable when API is offline or rate limited.
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
configureRepository().catch(() => {});
|
style.css
CHANGED
|
@@ -1,28 +1,6 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
}
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
font-size: 16px;
|
| 8 |
-
margin-top: 0;
|
| 9 |
-
}
|
| 10 |
-
|
| 11 |
-
p {
|
| 12 |
-
color: rgb(107, 114, 128);
|
| 13 |
-
font-size: 15px;
|
| 14 |
-
margin-bottom: 10px;
|
| 15 |
-
margin-top: 5px;
|
| 16 |
-
}
|
| 17 |
-
|
| 18 |
-
.card {
|
| 19 |
-
max-width: 620px;
|
| 20 |
-
margin: 0 auto;
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
-
}
|
| 25 |
-
|
| 26 |
-
.card p:last-child {
|
| 27 |
-
margin-bottom: 0;
|
| 28 |
-
}
|
|
|
|
| 1 |
+
:root{color-scheme:light;--ink:#19343b;--muted:#60767b;--teal:#147d72;--line:#dce7e5;--paper:#f8fbfa}
|
| 2 |
+
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:30px}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.65 "Segoe UI",system-ui,sans-serif}a{color:inherit;text-decoration:none}a:focus-visible,summary:focus-visible{outline:3px solid #147d72;outline-offset:5px}[hidden]{display:none!important}.container{max-width:1140px;margin:0 auto;padding-left:32px;padding-right:32px}.navigation{display:flex;justify-content:space-between;align-items:center;padding-top:25px;padding-bottom:25px}.brand{display:flex;align-items:center;gap:12px;font-weight:650}.brand img{object-fit:contain}nav{display:flex;gap:28px;font-size:14px}nav a:hover,.text-link:hover{color:var(--teal)}.hero{display:grid;grid-template-columns:1.2fr 1fr;gap:58px;align-items:center;padding-top:80px;padding-bottom:100px}.eyebrow{font-size:11px;letter-spacing:1.7px;font-weight:700;color:var(--teal);display:inline-flex;gap:9px;align-items:center}.status-dot{width:7px;height:7px;border-radius:50%;background:var(--teal)}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(34px,4.2vw,52px);line-height:1.12;font-weight:650;letter-spacing:-1.7px;margin-top:20px;margin-bottom:25px}h1 span{color:var(--teal)}.lead{max-width:500px;font-size:18px;line-height:1.75;color:var(--muted);margin-bottom:28px}.actions{display:flex;gap:12px;flex-wrap:wrap}.button{display:inline-flex;align-items:center;justify-content:center;gap:24px;padding:13px 19px;border-radius:10px;font-weight:600;font-size:14px;transition:transform .15s,background .15s}.button:hover{transform:translateY(-2px)}.primary{background:var(--teal);color:white;box-shadow:0 6px 18px #147d721c}.primary:hover{background:#106b62}.secondary{border:1px solid var(--line);background:white}.download-note{font-size:12px;color:var(--muted);margin-top:16px;min-height:20px}.demo{background:white;border:1px solid var(--line);border-radius:24px;padding:28px;box-shadow:0 24px 80px #173d3510;transform:rotate(-2deg)}.demo-top{display:flex;gap:9px;align-items:center;font-size:13px;font-weight:600}.pill{margin-left:auto;font-size:10px;background:#e5f3ee;color:var(--teal);border-radius:20px;padding:4px 10px}.demo-label{font-size:9px;color:var(--muted);letter-spacing:1.5px;margin-top:38px}.letter-demo{display:flex;gap:22px;align-items:center;justify-content:center;margin:27px 0 30px}.keycap{font-size:60px;line-height:1;background:#f8faf9;border:1px solid #d9e2df;border-bottom-width:5px;padding:22px 26px;border-radius:17px}.hold{font-size:10px;line-height:1.5;text-align:center;color:var(--muted)}.hold strong{font-size:12px}.arrow{display:block;font-size:24px;color:var(--teal)}.bashkir-letter{font-size:100px;font-weight:600;line-height:1;color:var(--teal)}.demo-divider{border-top:1px solid #edf1ef}.demo-caption{display:flex;justify-content:space-between;font-size:10px;color:var(--muted);margin-top:18px}.demo-caption strong{font-size:18px;margin-left:9px;color:var(--ink)}.demo>p{font-size:12px;text-align:center;color:var(--muted);margin:22px 0 0}.mapping-section{display:grid;grid-template-columns:1fr 1.25fr;gap:75px;border-top:1px solid var(--line);padding-top:55px;padding-bottom:65px}h2{font-size:34px;line-height:1.2;letter-spacing:-.8px;font-weight:650;margin:13px 0 20px}.section-intro p,.installation p{color:var(--muted);font-size:14px}.mapping-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.mapping-grid>div{display:flex;align-items:center;justify-content:center;gap:15px;background:white;border:1px solid var(--line);border-radius:13px;font-size:28px;min-height:80px}.mapping-grid i{font-style:normal;font-size:14px;color:#9aaaa6}.mapping-grid strong{font-weight:600;color:var(--teal)}.how{padding-top:55px;padding-bottom:70px}.feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:34px}.feature-grid article{border-top:1px solid var(--line);padding:24px 12px 0 0}.feature-number{font-size:12px;color:var(--teal);font-weight:700}h3{font-size:17px;line-height:1.4;font-weight:650;margin:14px 0 9px}.feature-grid p{font-size:14px;line-height:1.75;color:var(--muted)}.installation{display:grid;grid-template-columns:1fr 1.2fr;gap:65px;background:#eaf3ef;border-radius:24px;padding-top:40px;padding-bottom:40px;margin-top:20px;margin-bottom:70px}.text-link{font-size:13px;font-weight:600;color:var(--teal)}ol{list-style:none;padding:0;margin:0}ol li{display:flex;gap:17px;margin-bottom:23px}ol li:last-child{margin-bottom:0}ol li>span{flex-shrink:0;display:grid;place-items:center;width:31px;height:31px;border-radius:50%;background:white;color:var(--teal);font-size:13px;font-weight:700}ol h3{margin:1px 0 5px;font-size:15px}ol p{margin:0;font-size:12px!important}.questions{max-width:850px;padding-bottom:65px}.questions h2{margin-bottom:30px}details{border-bottom:1px solid var(--line);padding:18px 0}summary{cursor:pointer;font-weight:600;font-size:15px}details p{font-size:14px;line-height:1.8;color:var(--muted);margin:15px 0 0}details a{font-size:13px;color:var(--teal);display:inline-block;margin-top:10px}footer{display:flex;align-items:center;gap:25px;border-top:1px solid var(--line);padding-top:25px;padding-bottom:30px;font-size:12px;color:var(--muted)}footer p{margin:0}footer>a{margin-left:auto}footer .brand{font-size:12px;color:var(--ink)}
|
| 3 |
+
@media(max-width:850px){.hero{gap:30px;padding-top:45px}.demo{padding:20px}.letter-demo{gap:12px}.keycap{font-size:42px;padding:18px}.bashkir-letter{font-size:80px}.mapping-section{gap:30px}.installation{gap:30px;margin-left:20px;margin-right:20px}.mapping-grid>div{gap:10px;font-size:25px}nav{gap:18px}}
|
| 4 |
+
@media(max-width:640px){.container{padding-left:22px;padding-right:22px}.navigation{padding-top:18px}.brand{font-size:14px}nav a:first-child{display:none}nav{gap:15px;font-size:12px}.hero{grid-template-columns:1fr;gap:36px;padding-top:40px;padding-bottom:60px}h1{font-size:40px}.lead{font-size:16px}.demo{max-width:420px;width:100%;justify-self:center;transform:none}.letter-demo{gap:27px}.mapping-section{grid-template-columns:1fr;gap:15px;padding-top:35px;padding-bottom:35px}h2{font-size:29px}.feature-grid{grid-template-columns:1fr;gap:8px}.how{padding-top:25px;padding-bottom:25px}.installation{grid-template-columns:1fr;gap:25px;margin-left:12px;margin-right:12px;margin-bottom:45px;padding:28px 24px}.questions{padding-bottom:40px}footer{flex-wrap:wrap;gap:12px}footer p{width:100%;order:3}footer>a{margin-left:auto;font-size:11px}}
|
| 5 |
+
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.button{transition:none}.button:hover{transform:none}}
|
| 6 |
+
.try-section{padding-top:25px;padding-bottom:60px}.try-section>p{max-width:750px;color:var(--muted);font-size:15px}.try-keys{display:grid;grid-template-columns:repeat(9,1fr);gap:10px;margin:25px 0 20px}.try-keys button{font:inherit;font-size:28px;color:var(--ink);background:white;border:1px solid var(--line);border-bottom-width:4px;border-radius:12px;padding:15px 5px;cursor:pointer;touch-action:none;user-select:none;position:relative;overflow:hidden}.try-keys small{display:block;font-size:14px;color:var(--teal)}.try-keys button.holding{background:#d9eee5;border-color:var(--teal)}.try-keys button:focus-visible,#try-clear:focus-visible{outline:3px solid var(--teal);outline-offset:4px}.try-result{display:flex;gap:15px;align-items:center;border:1px solid var(--line);background:white;border-radius:12px;padding:18px 20px;min-height:80px}#try-output{font-size:25px;flex:1;overflow-wrap:anywhere;min-width:0}#try-clear{border:0;background:#eaf3ef;color:var(--teal);padding:10px 14px;border-radius:8px;cursor:pointer;font:inherit;font-size:13px}.try-section .try-note{font-size:12px;margin-top:15px}@media(max-width:640px){.try-keys{grid-template-columns:repeat(3,1fr)}.try-keys button{padding:9px}.try-section{padding-bottom:35px}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|