Website: one page in six languages, downloads via the server, download statistics
Rust server (axum) with server-side translations, OS-aware download buttons, /download/<platform> redirecting to the latest GitHub release asset and logging platform, version and geolocated region (no IP stored), password-protected /stats and /stats.csv. Docker compose setup behind nginx. Ten screenshots taken with new dev hooks (CP_FILTER, CP_PANE, CP_SORT, CP_BOARD). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
@ -263,14 +263,39 @@ impl LargeView {
|
|||
if let Ok(p) = std::env::var("CP_FILTER_PLAYER") {
|
||||
form.player.text = p;
|
||||
}
|
||||
let (board, pane) = match SearchBoard::from_env() {
|
||||
// `CP_FILTER="player=carlsen;years=2015-2026;elo=2600"` (screenshots).
|
||||
if let Ok(spec) = std::env::var("CP_FILTER") {
|
||||
for part in spec.split(';') {
|
||||
let Some((k, v)) = part.split_once('=') else { continue };
|
||||
match k.trim() {
|
||||
"player" => form.player.text = v.to_string(),
|
||||
"years" => {
|
||||
let (a, b) = v.split_once('-').unwrap_or((v, ""));
|
||||
form.year_from = a.to_string();
|
||||
form.year_to = b.to_string();
|
||||
}
|
||||
"elo" => form.elo_min = v.to_string(),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
let (board, mut pane) = match SearchBoard::from_env() {
|
||||
Some(b) => (b, Pane::Board),
|
||||
None => (SearchBoard::new(), Pane::Filters),
|
||||
};
|
||||
if std::env::var("CP_PANE").as_deref() == Ok("hidden") {
|
||||
pane = Pane::Hidden;
|
||||
}
|
||||
// `CP_SORT=date`: newest games first (screenshots).
|
||||
let sort = if std::env::var("CP_SORT").as_deref() == Ok("date") {
|
||||
(SortKey::Date, false)
|
||||
} else {
|
||||
(SortKey::Number, true)
|
||||
};
|
||||
LargeView {
|
||||
form,
|
||||
sort: (SortKey::Number, true),
|
||||
sort_chosen: false,
|
||||
sort,
|
||||
sort_chosen: sort.0 != SortKey::Number,
|
||||
view: Vec::new(),
|
||||
shown: None,
|
||||
outcome: None,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ XDG_CONFIG_HOME=/tmp/cfg CP_OPEN=11 CP_PLY=3 CP_ANALYZE=1 ./target/debug/chesspe
|
|||
```
|
||||
|
||||
`CP_OPEN` — индекс партии (с 0) в первой базе списка, `CP_PLY` — шагов по основной линии,
|
||||
`CP_ANALYZE` — запустить активный движок, `CP_SETTINGS` — открыть настройки, `CP_ENGINE_PANEL` — раскрыть панель настроек движка, `CP_VAR` — перейти в первый вариант после `CP_PLY`, `CP_REVIEW=1` — запустить анализ партии (`=dialog` — только открыть окно), `CP_REPORT=1` — открыть вкладку «Отчёт» (нужен готовый анализ), `CP_BEST=k` — показать на доске k-й ход лучшей линии у первой отметки движка (нужен готовый анализ), `CP_ENGINE_OFFER=1` — окно предложения скачать Stockfish (`=download` — сразу начать загрузку), `CP_BOARD="e4 c5 Nf3"` — доска поиска большой базы с этими ходами (SAN), `CP_FILTER_PLAYER=имя` — фильтр «Игрок» большой базы ChessBase при запуске, `CP_SCREENSHOT=file.png` (+ `CP_SCREENSHOT_DELAY=сек`) — полноэкранный снимок окна и выход; так сделаны `docs/screenshots/`.
|
||||
`CP_ANALYZE` — запустить активный движок, `CP_SETTINGS` — открыть настройки, `CP_ENGINE_PANEL` — раскрыть панель настроек движка, `CP_VAR` — перейти в первый вариант после `CP_PLY`, `CP_REVIEW=1` — запустить анализ партии (`=dialog` — только открыть окно), `CP_REPORT=1` — открыть вкладку «Отчёт» (нужен готовый анализ), `CP_BEST=k` — показать на доске k-й ход лучшей линии у первой отметки движка (нужен готовый анализ), `CP_ENGINE_OFFER=1` — окно предложения скачать Stockfish (`=download` — сразу начать загрузку), `CP_BOARD="e4 c5 Nf3"` — доска поиска большой базы с этими ходами (SAN), `CP_SORT=date` — большая база по дате (новые сверху), `CP_PANE=hidden` — большая база без правой панели, `CP_FILTER="player=carlsen;years=2015-2026;elo=2600"` — несколько фильтров большой базы, `CP_FILTER_PLAYER=имя` — фильтр «Игрок» большой базы ChessBase при запуске, `CP_SCREENSHOT=file.png` (+ `CP_SCREENSHOT_DELAY=сек`) — полноэкранный снимок окна и выход; так сделаны `docs/screenshots/`.
|
||||
|
||||
## Языки
|
||||
|
||||
|
|
|
|||
5
website/.dockerignore
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
data
|
||||
data-dev
|
||||
server/target
|
||||
shots
|
||||
.env
|
||||
17
website/.env.example
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Copy to .env and fill in. .env is not committed.
|
||||
|
||||
# Public address of the site (canonical links, sitemap, link previews).
|
||||
SITE_URL=https://chesspenguin.example.org
|
||||
# Port on 127.0.0.1 that nginx proxies to.
|
||||
HOST_PORT=8080
|
||||
# Time zone for "today" on /stats.
|
||||
TZ=Europe/Moscow
|
||||
|
||||
# /stats and /stats.csv: basic auth. An empty password turns /stats off.
|
||||
STATS_USER=admin
|
||||
STATS_PASSWORD=
|
||||
|
||||
# Releases are taken from this GitHub repository.
|
||||
GITHUB_REPO=vrubelroman/chessPenguin
|
||||
# Take the visitor address from X-Forwarded-For / X-Real-IP (set by nginx).
|
||||
TRUST_PROXY=1
|
||||
5
website/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/data/
|
||||
/data-dev/
|
||||
/server/target/
|
||||
/shots/raw/
|
||||
.env
|
||||
24
website/Dockerfile
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# ChessPenguin website: one small Rust server for the pages, the downloads and /stats.
|
||||
FROM rust:1-slim-bookworm AS build
|
||||
WORKDIR /src
|
||||
COPY server/Cargo.toml server/Cargo.lock ./
|
||||
COPY server/src ./src
|
||||
RUN cargo build --release --locked
|
||||
|
||||
FROM debian:bookworm-slim
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates curl tzdata \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& useradd --system --uid 10001 --home-dir /app site
|
||||
WORKDIR /app
|
||||
COPY --from=build /src/target/release/chesspenguin-site /usr/local/bin/
|
||||
COPY site ./site
|
||||
COPY static ./static
|
||||
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
RUN mkdir -p /app/data && chown site /app/data
|
||||
USER site
|
||||
ENV PORT=8080 STATIC_DIR=/app/static SITE_DIR=/app/site DB_PATH=/app/data/downloads.sqlite \
|
||||
GEOIP_DB=/app/data/dbip-city-ipv4.mmdb,/app/data/dbip-city-ipv6.mmdb
|
||||
EXPOSE 8080
|
||||
HEALTHCHECK --interval=60s --timeout=5s CMD curl -fsS http://127.0.0.1:8080/healthz || exit 1
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
72
website/README.md
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
# ChessPenguin website
|
||||
|
||||
One page in six languages (`/`, `/ru/`, `/fr/`, `/de/`, `/es/`, `/it/`), downloads that go
|
||||
through this server to the latest GitHub release, and download statistics at `/stats`.
|
||||
Internal: kept in Forgejo only (excluded from the GitHub mirror by `scripts/publish-github.sh`).
|
||||
|
||||
## Run
|
||||
|
||||
```sh
|
||||
cp .env.example .env # set SITE_URL, STATS_PASSWORD, TZ
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
The server listens on `127.0.0.1:${HOST_PORT}` (8080). `data/` keeps the statistics
|
||||
(`downloads.sqlite`) and the geolocation databases, which the container downloads on start
|
||||
when they are missing or older than 35 days (DB-IP Lite City, CC BY 4.0; the footer credits
|
||||
DB-IP as the licence requires). Update the site: `git pull && docker compose up -d --build`.
|
||||
|
||||
## nginx
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 443 ssl;
|
||||
http2 on;
|
||||
server_name chesspenguin.example.org;
|
||||
# ssl_certificate ...; ssl_certificate_key ...;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The visitor address is read from `X-Forwarded-For` / `X-Real-IP` (`TRUST_PROXY=1`) only to
|
||||
look up the country, region and city; the address itself is never stored.
|
||||
|
||||
## Downloads
|
||||
|
||||
`/download/<platform>` (`windows`, `macos`, `deb`, `rpm`, `arch`, `appimage`, `flatpak`,
|
||||
`tarball`, `checksums`) records the download and answers with a redirect to the asset of
|
||||
the latest release, so the browser starts downloading at once and the visitor stays on the
|
||||
site. The release list is cached for 10 minutes; a new GitHub release appears on the site
|
||||
by itself. If GitHub is unreachable, the link leads to the releases page.
|
||||
|
||||
## Statistics
|
||||
|
||||
`/stats` (basic auth `STATS_USER` / `STATS_PASSWORD`): totals for today, 7 and 30 days and
|
||||
all time, by platform, version, country, region and city, language, a 30-day chart and the
|
||||
latest downloads. `/stats.csv` exports every row. Each row: UTC time, platform, version,
|
||||
file, country, region, city, page language, referrer host.
|
||||
|
||||
## Development
|
||||
|
||||
```sh
|
||||
cd server && cargo build
|
||||
STATIC_DIR=../static SITE_DIR=../site DB_PATH=../data-dev/d.sqlite \
|
||||
GEOIP_DB=../data-dev/dbip-city-ipv4.mmdb STATS_PASSWORD=secret PORT=18080 \
|
||||
target/debug/chesspenguin-site
|
||||
```
|
||||
|
||||
Texts: `site/index.html` (template), `site/i18n/<lang>.json` (English is the fallback for a
|
||||
missing key); translations are loaded at start, so restart after editing.
|
||||
|
||||
Screenshots: `shots/make-screenshots.sh` takes them with the release build of the app and
|
||||
its dev hooks (`docs/dev/desktop.md`) into `shots/raw/` (not committed), then
|
||||
`python3 -I shots/derive.py` makes the WebP/JPEG/PNG sizes and `static/og-image.png`. The
|
||||
games are public domain with our own comments; the large database appears only as a table
|
||||
of game data under a neutral name, never with its annotations.
|
||||
12
website/docker-compose.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
services:
|
||||
site:
|
||||
build: .
|
||||
image: chesspenguin-site
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
ports:
|
||||
# Only for the reverse proxy on this machine.
|
||||
- "127.0.0.1:${HOST_PORT:-8080}:8080"
|
||||
volumes:
|
||||
# Download statistics (SQLite) and the geolocation databases.
|
||||
- ./data:/app/data
|
||||
19
website/docker/entrypoint.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
# Fetches the DB-IP Lite City geolocation databases (CC BY 4.0, MaxMind DB format, via the
|
||||
# ip-location-db package on unpkg) when they are missing or older than 35 days, then
|
||||
# starts the server. Without them the site works and downloads are stored without a country.
|
||||
set -u
|
||||
base="${GEOIP_URL:-https://unpkg.com/@ip-location-db/dbip-city-mmdb}"
|
||||
for v in ipv4 ipv6; do
|
||||
f="/app/data/dbip-city-${v}.mmdb"
|
||||
if [ ! -s "$f" ] || [ -n "$(find "$f" -mtime +35 2>/dev/null)" ]; then
|
||||
echo "downloading ${f##*/}"
|
||||
if curl -fsSL --retry 3 --max-time 600 -o "$f.part" "$base/dbip-city-${v}.mmdb"; then
|
||||
mv "$f.part" "$f"
|
||||
else
|
||||
rm -f "$f.part"
|
||||
echo "geolocation download failed; keeping what is there"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
exec chesspenguin-site
|
||||
1946
website/server/Cargo.lock
generated
Normal file
25
website/server/Cargo.toml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
[package]
|
||||
name = "chesspenguin-site"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-or-later"
|
||||
description = "The ChessPenguin website: pages, downloads through GitHub releases, download statistics"
|
||||
publish = false
|
||||
|
||||
# Separate from the application's workspace.
|
||||
[workspace]
|
||||
|
||||
[dependencies]
|
||||
axum = "0.8"
|
||||
tokio = { version = "1", features = ["macros", "rt-multi-thread", "net", "sync", "time", "signal"] }
|
||||
tower-http = { version = "0.7", features = ["fs", "set-header"] }
|
||||
reqwest = { version = "0.13", default-features = false, features = ["json", "rustls"] }
|
||||
rusqlite = { version = "0.40", features = ["bundled"] }
|
||||
maxminddb = "0.32"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
chrono = { version = "0.4", default-features = false, features = ["clock", "std"] }
|
||||
base64 = "0.23"
|
||||
|
||||
[profile.release]
|
||||
strip = true
|
||||
629
website/server/src/main.rs
Normal file
|
|
@ -0,0 +1,629 @@
|
|||
//! The ChessPenguin website: serves the static page, answers "which release is the
|
||||
//! latest" from the GitHub API (cached), counts downloads and redirects them to the
|
||||
//! release files on GitHub (the visitor stays on the site), and shows the download
|
||||
//! statistics behind a password.
|
||||
//!
|
||||
//! Nothing personal is stored: a download keeps its time, platform, version, the
|
||||
//! country/region/city looked up from the IP (DB-IP Lite) and the browser language; the
|
||||
//! IP itself is not written anywhere.
|
||||
|
||||
mod site;
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::net::{IpAddr, SocketAddr};
|
||||
use std::path::PathBuf;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use axum::extract::{ConnectInfo, Path, Query, State};
|
||||
use axum::http::{HeaderMap, HeaderValue, StatusCode, header};
|
||||
use axum::response::{Html, IntoResponse, Redirect, Response};
|
||||
use axum::routing::get;
|
||||
use axum::{Json, Router};
|
||||
use base64::Engine as _;
|
||||
use serde::Serialize;
|
||||
use tower_http::services::ServeDir;
|
||||
|
||||
/// Downloadable files, by the platform names used in `/download/<platform>`.
|
||||
pub const PLATFORMS: &[(&str, &str)] = &[
|
||||
("windows", "-windows-x86_64.zip"),
|
||||
("macos", "-macos-arm64.dmg"),
|
||||
("deb", "_amd64.deb"),
|
||||
("rpm", ".x86_64.rpm"),
|
||||
("arch", ".pkg.tar.zst"),
|
||||
("appimage", ".AppImage"),
|
||||
("flatpak", ".flatpak"),
|
||||
("tarball", "-linux-x86_64.tar.gz"),
|
||||
("checksums", "SHA256SUMS.txt"),
|
||||
];
|
||||
|
||||
/// The latest release is asked from GitHub at most this often.
|
||||
const RELEASE_TTL: Duration = Duration::from_secs(600);
|
||||
|
||||
struct Config {
|
||||
port: u16,
|
||||
static_dir: PathBuf,
|
||||
site_dir: PathBuf,
|
||||
/// Public address of the site (canonical links, sitemap, Open Graph).
|
||||
site_url: String,
|
||||
db_path: PathBuf,
|
||||
/// Geolocation databases (MaxMind DB format): DB-IP Lite City, either the official
|
||||
/// file or the IPv4/IPv6 pair of ip-location-db; comma-separated.
|
||||
geoip_paths: Vec<PathBuf>,
|
||||
repo: String,
|
||||
stats_user: String,
|
||||
stats_password: String,
|
||||
/// Take the client address from `X-Forwarded-For` / `X-Real-IP` (behind nginx).
|
||||
trust_proxy: bool,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
fn from_env() -> Config {
|
||||
let var = |k: &str, d: &str| std::env::var(k).unwrap_or_else(|_| d.to_string());
|
||||
Config {
|
||||
port: var("PORT", "8080").parse().unwrap_or(8080),
|
||||
static_dir: var("STATIC_DIR", "static").into(),
|
||||
site_dir: var("SITE_DIR", "site").into(),
|
||||
site_url: var("SITE_URL", "http://localhost:8080"),
|
||||
db_path: var("DB_PATH", "data/downloads.sqlite").into(),
|
||||
geoip_paths: var("GEOIP_DB", "data/dbip-city-ipv4.mmdb,data/dbip-city-ipv6.mmdb")
|
||||
.split(',')
|
||||
.map(|s| PathBuf::from(s.trim()))
|
||||
.filter(|p| !p.as_os_str().is_empty())
|
||||
.collect(),
|
||||
repo: var("GITHUB_REPO", "vrubelroman/chessPenguin"),
|
||||
stats_user: var("STATS_USER", "admin"),
|
||||
stats_password: var("STATS_PASSWORD", ""),
|
||||
trust_proxy: var("TRUST_PROXY", "1") != "0",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize)]
|
||||
pub struct Asset {
|
||||
pub platform: &'static str,
|
||||
pub name: String,
|
||||
pub size: u64,
|
||||
#[serde(skip)]
|
||||
url: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize)]
|
||||
pub struct Release {
|
||||
pub version: String,
|
||||
pub published: String,
|
||||
pub assets: Vec<Asset>,
|
||||
}
|
||||
|
||||
struct AppState {
|
||||
config: Config,
|
||||
site: site::Site,
|
||||
db: Mutex<rusqlite::Connection>,
|
||||
geoip: Vec<maxminddb::Reader<Vec<u8>>>,
|
||||
http: reqwest::Client,
|
||||
release: tokio::sync::Mutex<Option<(Instant, Release)>>,
|
||||
}
|
||||
|
||||
type Shared = Arc<AppState>;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let config = Config::from_env();
|
||||
if let Some(dir) = config.db_path.parent() {
|
||||
let _ = std::fs::create_dir_all(dir);
|
||||
}
|
||||
let db = rusqlite::Connection::open(&config.db_path).expect("open the database");
|
||||
db.execute_batch(
|
||||
"PRAGMA journal_mode = WAL;
|
||||
CREATE TABLE IF NOT EXISTS downloads (
|
||||
id INTEGER PRIMARY KEY,
|
||||
ts TEXT NOT NULL, -- UTC, RFC 3339
|
||||
platform TEXT NOT NULL,
|
||||
version TEXT NOT NULL,
|
||||
asset TEXT NOT NULL,
|
||||
country TEXT, -- ISO 3166-1 alpha-2
|
||||
region TEXT,
|
||||
city TEXT,
|
||||
lang TEXT, -- first browser language
|
||||
referrer TEXT -- host of the referring page
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS downloads_ts ON downloads (ts);",
|
||||
)
|
||||
.expect("create the table");
|
||||
let geoip: Vec<_> = config
|
||||
.geoip_paths
|
||||
.iter()
|
||||
.filter_map(|p| match maxminddb::Reader::open_readfile(p) {
|
||||
Ok(r) => Some(r),
|
||||
Err(e) => {
|
||||
eprintln!("geolocation database {} not used: {e}", p.display());
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
if geoip.is_empty() {
|
||||
eprintln!("geolocation off: downloads are stored without a country");
|
||||
}
|
||||
if config.stats_password.is_empty() {
|
||||
eprintln!("STATS_PASSWORD is empty: /stats is disabled");
|
||||
}
|
||||
let port = config.port;
|
||||
let static_dir = config.static_dir.clone();
|
||||
let site = site::Site::load(&config.site_dir, config.site_url.clone());
|
||||
let state: Shared = Arc::new(AppState {
|
||||
site,
|
||||
config,
|
||||
db: Mutex::new(db),
|
||||
geoip,
|
||||
http: reqwest::Client::builder()
|
||||
.user_agent("chesspenguin-site")
|
||||
.timeout(Duration::from_secs(15))
|
||||
.build()
|
||||
.expect("http client"),
|
||||
release: tokio::sync::Mutex::new(None),
|
||||
});
|
||||
let mut app = Router::new()
|
||||
.route("/", get(home))
|
||||
.route("/robots.txt", get(robots))
|
||||
.route("/sitemap.xml", get(sitemap));
|
||||
for (code, _, _) in site::LANGS.iter().skip(1) {
|
||||
let code: &'static str = code;
|
||||
app = app
|
||||
.route(
|
||||
&format!("/{code}/"),
|
||||
get(move |s: State<Shared>| async move { page(s, code).await }),
|
||||
)
|
||||
.route(
|
||||
&format!("/{code}"),
|
||||
get(move || async move { Redirect::permanent(&format!("/{code}/")) }),
|
||||
);
|
||||
}
|
||||
let not_found = {
|
||||
let state = state.clone();
|
||||
move || async move { (StatusCode::NOT_FOUND, Html(state.site.not_found("en"))) }
|
||||
};
|
||||
let app = app
|
||||
.route("/api/release", get(api_release))
|
||||
.route("/download/{platform}", get(download))
|
||||
.route("/stats", get(stats))
|
||||
.route("/stats.csv", get(stats_csv))
|
||||
.route("/healthz", get(|| async { "ok" }))
|
||||
.fallback_service(ServeDir::new(static_dir).fallback(get(not_found)))
|
||||
.with_state(state);
|
||||
let listener = tokio::net::TcpListener::bind(("0.0.0.0", port))
|
||||
.await
|
||||
.expect("bind");
|
||||
println!("listening on :{port}");
|
||||
axum::serve(
|
||||
listener,
|
||||
app.into_make_service_with_connect_info::<SocketAddr>(),
|
||||
)
|
||||
.with_graceful_shutdown(async {
|
||||
let _ = tokio::signal::ctrl_c().await;
|
||||
})
|
||||
.await
|
||||
.expect("serve");
|
||||
}
|
||||
|
||||
/// `/`: English, or `?lang=xx` → `/xx/`.
|
||||
async fn home(state: State<Shared>, Query(q): Query<HashMap<String, String>>) -> Response {
|
||||
if let Some(lang) = q.get("lang")
|
||||
&& lang != "en"
|
||||
&& state.site.has_lang(lang)
|
||||
{
|
||||
return Redirect::permanent(&format!("/{lang}/")).into_response();
|
||||
}
|
||||
page(state, "en").await
|
||||
}
|
||||
|
||||
async fn page(State(state): State<Shared>, lang: &'static str) -> Response {
|
||||
let release = latest(&state).await;
|
||||
let mut resp = Html(state.site.page(lang, release.as_ref())).into_response();
|
||||
resp.headers_mut().insert(
|
||||
header::CACHE_CONTROL,
|
||||
HeaderValue::from_static("public, max-age=300"),
|
||||
);
|
||||
resp
|
||||
}
|
||||
|
||||
async fn robots(State(state): State<Shared>) -> String {
|
||||
format!(
|
||||
"User-agent: *\nDisallow: /stats\nDisallow: /download/\nSitemap: {}/sitemap.xml\n",
|
||||
state.site.url
|
||||
)
|
||||
}
|
||||
|
||||
async fn sitemap(State(state): State<Shared>) -> Response {
|
||||
(
|
||||
[(header::CONTENT_TYPE, "application/xml; charset=utf-8")],
|
||||
state.site.sitemap(),
|
||||
)
|
||||
.into_response()
|
||||
}
|
||||
|
||||
/// The latest release, from the cache or GitHub; the last good answer is kept when
|
||||
/// GitHub fails.
|
||||
async fn latest(state: &Shared) -> Option<Release> {
|
||||
let mut cache = state.release.lock().await;
|
||||
if let Some((at, r)) = cache.as_ref()
|
||||
&& at.elapsed() < RELEASE_TTL
|
||||
{
|
||||
return Some(r.clone());
|
||||
}
|
||||
let url = format!(
|
||||
"https://api.github.com/repos/{}/releases/latest",
|
||||
state.config.repo
|
||||
);
|
||||
let fetched = async {
|
||||
let v: serde_json::Value = state
|
||||
.http
|
||||
.get(&url)
|
||||
.header("Accept", "application/vnd.github+json")
|
||||
.send()
|
||||
.await
|
||||
.ok()?
|
||||
.error_for_status()
|
||||
.ok()?
|
||||
.json()
|
||||
.await
|
||||
.ok()?;
|
||||
let version = v["tag_name"].as_str()?.trim_start_matches('v').to_string();
|
||||
let published = v["published_at"].as_str().unwrap_or("").to_string();
|
||||
let mut assets = Vec::new();
|
||||
for a in v["assets"].as_array()? {
|
||||
let name = a["name"].as_str().unwrap_or("");
|
||||
if let Some((platform, _)) = PLATFORMS.iter().find(|(_, end)| name.ends_with(end)) {
|
||||
assets.push(Asset {
|
||||
platform,
|
||||
name: name.to_string(),
|
||||
size: a["size"].as_u64().unwrap_or(0),
|
||||
url: a["browser_download_url"].as_str()?.to_string(),
|
||||
});
|
||||
}
|
||||
}
|
||||
Some(Release {
|
||||
version,
|
||||
published,
|
||||
assets,
|
||||
})
|
||||
}
|
||||
.await;
|
||||
match fetched {
|
||||
Some(r) => {
|
||||
*cache = Some((Instant::now(), r.clone()));
|
||||
Some(r)
|
||||
}
|
||||
None => cache.as_ref().map(|(_, r)| r.clone()),
|
||||
}
|
||||
}
|
||||
|
||||
async fn api_release(State(state): State<Shared>) -> Response {
|
||||
match latest(&state).await {
|
||||
Some(r) => {
|
||||
let mut resp = Json(r).into_response();
|
||||
resp.headers_mut().insert(
|
||||
header::CACHE_CONTROL,
|
||||
HeaderValue::from_static("public, max-age=300"),
|
||||
);
|
||||
resp
|
||||
}
|
||||
None => (StatusCode::SERVICE_UNAVAILABLE, "release information unavailable").into_response(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Counts the download and sends the browser to the file on GitHub.
|
||||
async fn download(
|
||||
State(state): State<Shared>,
|
||||
Path(platform): Path<String>,
|
||||
ConnectInfo(peer): ConnectInfo<SocketAddr>,
|
||||
headers: HeaderMap,
|
||||
) -> Response {
|
||||
if !PLATFORMS.iter().any(|(p, _)| *p == platform) {
|
||||
return (StatusCode::NOT_FOUND, Html(state.site.not_found("en"))).into_response();
|
||||
}
|
||||
// Without the release data the visitor still gets the files, from GitHub's page.
|
||||
let fallback = format!("https://github.com/{}/releases/latest", state.config.repo);
|
||||
let Some(release) = latest(&state).await else {
|
||||
return Redirect::to(&fallback).into_response();
|
||||
};
|
||||
let Some(asset) = release.assets.iter().find(|a| a.platform == platform) else {
|
||||
return Redirect::to(&fallback).into_response();
|
||||
};
|
||||
let ip = client_ip(&state.config, peer, &headers);
|
||||
let (country, region, city) = locate(&state, ip);
|
||||
let lang = headers
|
||||
.get(header::ACCEPT_LANGUAGE)
|
||||
.and_then(|v| v.to_str().ok())
|
||||
.and_then(|v| v.split([',', ';']).next())
|
||||
.map(|s| s.trim().chars().take(16).collect::<String>());
|
||||
let referrer = headers
|
||||
.get(header::REFERER)
|
||||
.and_then(|v| v.to_str().ok())
|
||||
.and_then(|v| v.split('/').nth(2))
|
||||
.map(|s| s.chars().take(64).collect::<String>());
|
||||
if let Ok(db) = state.db.lock() {
|
||||
let _ = db.execute(
|
||||
"INSERT INTO downloads (ts, platform, version, asset, country, region, city, lang, referrer)
|
||||
VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9)",
|
||||
rusqlite::params![
|
||||
chrono::Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, true),
|
||||
asset.platform,
|
||||
release.version,
|
||||
asset.name,
|
||||
country,
|
||||
region,
|
||||
city,
|
||||
lang,
|
||||
referrer
|
||||
],
|
||||
);
|
||||
}
|
||||
Redirect::to(&asset.url).into_response()
|
||||
}
|
||||
|
||||
fn client_ip(config: &Config, peer: SocketAddr, headers: &HeaderMap) -> IpAddr {
|
||||
if config.trust_proxy {
|
||||
let forwarded = headers
|
||||
.get("x-forwarded-for")
|
||||
.and_then(|v| v.to_str().ok())
|
||||
.and_then(|v| v.split(',').next())
|
||||
.or_else(|| headers.get("x-real-ip").and_then(|v| v.to_str().ok()))
|
||||
.and_then(|s| s.trim().parse().ok());
|
||||
if let Some(ip) = forwarded {
|
||||
return ip;
|
||||
}
|
||||
}
|
||||
peer.ip()
|
||||
}
|
||||
|
||||
/// Country code, region and city of an address (all `None` without a database). Reads
|
||||
/// both the GeoIP2-style records of the official DB-IP file (`country.iso_code`,
|
||||
/// `subdivisions[0].names.en`, `city.names.en`) and the flat ones of ip-location-db
|
||||
/// (`country_code`, `state1`, `city`).
|
||||
fn locate(state: &AppState, ip: IpAddr) -> (Option<String>, Option<String>, Option<String>) {
|
||||
let record = state.geoip.iter().find_map(|reader| {
|
||||
reader
|
||||
.lookup(ip)
|
||||
.ok()?
|
||||
.decode::<serde_json::Value>()
|
||||
.ok()
|
||||
.flatten()
|
||||
});
|
||||
let Some(r) = record else {
|
||||
return (None, None, None);
|
||||
};
|
||||
let text = |v: &serde_json::Value| v.as_str().filter(|s| !s.is_empty()).map(str::to_string);
|
||||
let country = text(&r["country_code"]).or_else(|| text(&r["country"]["iso_code"]));
|
||||
let region = text(&r["state1"]).or_else(|| text(&r["subdivisions"][0]["names"]["en"]));
|
||||
let city = text(&r["city"]).or_else(|| text(&r["city"]["names"]["en"]));
|
||||
(country, region, city)
|
||||
}
|
||||
|
||||
/// Basic authentication against STATS_USER / STATS_PASSWORD.
|
||||
fn authorized(config: &Config, headers: &HeaderMap) -> bool {
|
||||
if config.stats_password.is_empty() {
|
||||
return false;
|
||||
}
|
||||
let Some(value) = headers
|
||||
.get(header::AUTHORIZATION)
|
||||
.and_then(|v| v.to_str().ok())
|
||||
.and_then(|v| v.strip_prefix("Basic "))
|
||||
else {
|
||||
return false;
|
||||
};
|
||||
let expected = format!("{}:{}", config.stats_user, config.stats_password);
|
||||
base64::engine::general_purpose::STANDARD
|
||||
.decode(value.trim())
|
||||
.is_ok_and(|d| d == expected.as_bytes())
|
||||
}
|
||||
|
||||
fn ask_password() -> Response {
|
||||
(
|
||||
StatusCode::UNAUTHORIZED,
|
||||
[(header::WWW_AUTHENTICATE, "Basic realm=\"ChessPenguin stats\"")],
|
||||
"Password required",
|
||||
)
|
||||
.into_response()
|
||||
}
|
||||
|
||||
/// Rows of `SELECT label, count` as pairs.
|
||||
fn pairs(db: &rusqlite::Connection, sql: &str) -> Vec<(String, i64)> {
|
||||
let Ok(mut stmt) = db.prepare(sql) else {
|
||||
return Vec::new();
|
||||
};
|
||||
stmt.query_map([], |r| {
|
||||
Ok((
|
||||
r.get::<_, Option<String>>(0)?.unwrap_or_else(|| "—".into()),
|
||||
r.get::<_, i64>(1)?,
|
||||
))
|
||||
})
|
||||
.map(|rows| rows.flatten().collect())
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
fn count(db: &rusqlite::Connection, filter: &str) -> i64 {
|
||||
db.query_row(
|
||||
&format!("SELECT COUNT(*) FROM downloads WHERE platform <> 'checksums' {filter}"),
|
||||
[],
|
||||
|r| r.get(0),
|
||||
)
|
||||
.unwrap_or(0)
|
||||
}
|
||||
|
||||
fn esc(s: &str) -> String {
|
||||
s.replace('&', "&")
|
||||
.replace('<', "<")
|
||||
.replace('>', ">")
|
||||
.replace('"', """)
|
||||
}
|
||||
|
||||
/// A ranked list with bars.
|
||||
fn table(title: &str, rows: &[(String, i64)]) -> String {
|
||||
let max = rows.iter().map(|r| r.1).max().unwrap_or(1).max(1);
|
||||
let mut out = format!("<section><h2>{}</h2><table>", esc(title));
|
||||
if rows.is_empty() {
|
||||
out.push_str("<tr><td class=muted>No downloads yet</td></tr>");
|
||||
}
|
||||
for (label, n) in rows {
|
||||
let w = (*n as f64 / max as f64 * 100.0).round();
|
||||
out.push_str(&format!(
|
||||
"<tr><td>{}</td><td class=num>{n}</td><td class=bar><span style=\"width:{w}%\"></span></td></tr>",
|
||||
esc(label)
|
||||
));
|
||||
}
|
||||
out.push_str("</table></section>");
|
||||
out
|
||||
}
|
||||
|
||||
async fn stats(State(state): State<Shared>, headers: HeaderMap) -> Response {
|
||||
if !authorized(&state.config, &headers) {
|
||||
return ask_password();
|
||||
}
|
||||
let Ok(db) = state.db.lock() else {
|
||||
return StatusCode::INTERNAL_SERVER_ERROR.into_response();
|
||||
};
|
||||
// "Today" and the days follow the server's time zone (TZ in the environment).
|
||||
let total = count(&db, "");
|
||||
let today = count(&db, "AND date(ts, 'localtime') = date('now', 'localtime')");
|
||||
let week = count(&db, "AND ts >= datetime('now', '-7 days')");
|
||||
let month = count(&db, "AND ts >= datetime('now', '-30 days')");
|
||||
let base = "FROM downloads WHERE platform <> 'checksums'";
|
||||
let by_platform = pairs(&db, &format!("SELECT platform, COUNT(*) {base} GROUP BY 1 ORDER BY 2 DESC"));
|
||||
let by_version = pairs(&db, &format!("SELECT version, COUNT(*) {base} GROUP BY 1 ORDER BY 2 DESC LIMIT 15"));
|
||||
let by_country = pairs(&db, &format!("SELECT country, COUNT(*) {base} GROUP BY 1 ORDER BY 2 DESC LIMIT 30"));
|
||||
let by_region = pairs(
|
||||
&db,
|
||||
&format!(
|
||||
"SELECT country || ' · ' || COALESCE(region, '—') || COALESCE(' · ' || city, ''), COUNT(*) {base} GROUP BY 1 ORDER BY 2 DESC LIMIT 30"
|
||||
),
|
||||
);
|
||||
let by_lang = pairs(&db, &format!("SELECT lang, COUNT(*) {base} GROUP BY 1 ORDER BY 2 DESC LIMIT 15"));
|
||||
let days: HashMap<String, i64> = pairs(
|
||||
&db,
|
||||
&format!(
|
||||
"SELECT date(ts, 'localtime'), COUNT(*) {base} AND ts >= datetime('now', '-31 days') GROUP BY 1"
|
||||
),
|
||||
)
|
||||
.into_iter()
|
||||
.collect();
|
||||
let mut daily = Vec::new();
|
||||
for back in (0..30).rev() {
|
||||
let day = (chrono::Local::now() - chrono::Duration::days(back))
|
||||
.format("%Y-%m-%d")
|
||||
.to_string();
|
||||
let n = days.get(&day).copied().unwrap_or(0);
|
||||
daily.push((day, n));
|
||||
}
|
||||
let max_day = daily.iter().map(|d| d.1).max().unwrap_or(1).max(1);
|
||||
let mut chart = String::from("<section class=wide><h2>Last 30 days</h2><div class=chart>");
|
||||
for (day, n) in &daily {
|
||||
let h = (*n as f64 / max_day as f64 * 100.0).round();
|
||||
chart.push_str(&format!(
|
||||
"<div title=\"{day}: {n}\"><span style=\"height:{h}%\"></span><small>{}</small></div>",
|
||||
&day[8..]
|
||||
));
|
||||
}
|
||||
chart.push_str("</div></section>");
|
||||
let mut recent = String::from(
|
||||
"<section class=wide><h2>Latest downloads</h2><table><tr><th>Time (UTC)</th><th>Platform</th><th>Version</th><th>Where</th><th>Language</th><th>From</th></tr>",
|
||||
);
|
||||
if let Ok(mut stmt) = db.prepare(
|
||||
"SELECT ts, platform, version, country, region, city, lang, referrer FROM downloads ORDER BY id DESC LIMIT 50",
|
||||
) {
|
||||
let rows = stmt.query_map([], |r| {
|
||||
let s = |i| r.get::<_, Option<String>>(i).map(|v| v.unwrap_or_default());
|
||||
Ok([s(0)?, s(1)?, s(2)?, s(3)?, s(4)?, s(5)?, s(6)?, s(7)?])
|
||||
});
|
||||
for row in rows.into_iter().flatten().flatten() {
|
||||
let place = [&row[3], &row[4], &row[5]]
|
||||
.iter()
|
||||
.filter(|s| !s.is_empty())
|
||||
.map(|s| esc(s))
|
||||
.collect::<Vec<_>>()
|
||||
.join(" · ");
|
||||
recent.push_str(&format!(
|
||||
"<tr><td>{}</td><td>{}</td><td>{}</td><td>{place}</td><td>{}</td><td>{}</td></tr>",
|
||||
esc(&row[0].replace('T', " ").replace('Z', "")),
|
||||
esc(&row[1]),
|
||||
esc(&row[2]),
|
||||
esc(&row[6]),
|
||||
esc(&row[7])
|
||||
));
|
||||
}
|
||||
}
|
||||
recent.push_str("</table></section>");
|
||||
let tile = |label: &str, n: i64| format!("<div class=tile><b>{n}</b><span>{label}</span></div>");
|
||||
let page = format!(
|
||||
r#"<!doctype html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1">
|
||||
<meta name=robots content=noindex><title>ChessPenguin · downloads</title><style>
|
||||
:root{{color-scheme:light dark;--bg:#f6f7f9;--fg:#1b1f24;--muted:#6b7280;--card:#fff;--line:#e5e7eb;--accent:#1f6fa8}}
|
||||
@media(prefers-color-scheme:dark){{:root{{--bg:#16181b;--fg:#e6e8eb;--muted:#9aa1ab;--card:#1f2226;--line:#2c3036;--accent:#4a9be0}}}}
|
||||
body{{margin:0;font:15px/1.45 system-ui,sans-serif;background:var(--bg);color:var(--fg)}}
|
||||
main{{max-width:1100px;margin:0 auto;padding:24px 16px}} h1{{font-size:22px;margin:0 0 16px}}
|
||||
.tiles{{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:20px}}
|
||||
.tile{{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:14px}}
|
||||
.tile b{{display:block;font-size:28px}} .tile span{{color:var(--muted)}}
|
||||
.grid{{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:16px}}
|
||||
section{{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:14px;overflow-x:auto}}
|
||||
section.wide{{margin-top:16px}} h2{{font-size:15px;margin:0 0 10px}}
|
||||
table{{border-collapse:collapse;width:100%}} td,th{{padding:4px 6px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}}
|
||||
.num{{text-align:right;width:60px}} .bar{{width:40%}} .bar span{{display:block;height:8px;border-radius:4px;background:var(--accent)}}
|
||||
.muted{{color:var(--muted)}} .chart{{display:flex;align-items:flex-end;gap:3px;height:140px}}
|
||||
.chart div{{flex:1;display:flex;flex-direction:column;justify-content:flex-end;height:100%;text-align:center}}
|
||||
.chart span{{background:var(--accent);border-radius:3px 3px 0 0;min-height:1px}} .chart small{{color:var(--muted);font-size:10px}}
|
||||
a{{color:var(--accent)}}</style></head><body><main>
|
||||
<h1>ChessPenguin downloads</h1>
|
||||
<div class=tiles>{}{}{}{}</div>
|
||||
<div class=grid>{}{}{}{}{}</div>{chart}{recent}
|
||||
<p class=muted>Checksum downloads are not counted. <a href="/stats.csv">Download all as CSV</a> · IP geolocation by <a href="https://db-ip.com">DB-IP</a></p>
|
||||
</main></body></html>"#,
|
||||
tile("today", today),
|
||||
tile("last 7 days", week),
|
||||
tile("last 30 days", month),
|
||||
tile("all time", total),
|
||||
table("By platform", &by_platform),
|
||||
table("By version", &by_version),
|
||||
table("By country", &by_country),
|
||||
table("By region and city", &by_region),
|
||||
table("By browser language", &by_lang),
|
||||
);
|
||||
Html(page).into_response()
|
||||
}
|
||||
|
||||
async fn stats_csv(State(state): State<Shared>, headers: HeaderMap) -> Response {
|
||||
if !authorized(&state.config, &headers) {
|
||||
return ask_password();
|
||||
}
|
||||
let Ok(db) = state.db.lock() else {
|
||||
return StatusCode::INTERNAL_SERVER_ERROR.into_response();
|
||||
};
|
||||
let mut out = String::from("time_utc,platform,version,asset,country,region,city,language,referrer\n");
|
||||
if let Ok(mut stmt) = db.prepare(
|
||||
"SELECT ts, platform, version, asset, country, region, city, lang, referrer FROM downloads ORDER BY id",
|
||||
) {
|
||||
let rows = stmt.query_map([], |r| {
|
||||
(0..9)
|
||||
.map(|i| r.get::<_, Option<String>>(i).map(|v| v.unwrap_or_default()))
|
||||
.collect::<Result<Vec<_>, _>>()
|
||||
});
|
||||
for row in rows.into_iter().flatten().flatten() {
|
||||
let cells: Vec<String> = row
|
||||
.iter()
|
||||
.map(|c| format!("\"{}\"", c.replace('"', "\"\"")))
|
||||
.collect();
|
||||
out.push_str(&cells.join(","));
|
||||
out.push('\n');
|
||||
}
|
||||
}
|
||||
(
|
||||
[
|
||||
(header::CONTENT_TYPE, "text/csv; charset=utf-8"),
|
||||
(
|
||||
header::CONTENT_DISPOSITION,
|
||||
"attachment; filename=\"chesspenguin-downloads.csv\"",
|
||||
),
|
||||
],
|
||||
out,
|
||||
)
|
||||
.into_response()
|
||||
}
|
||||
382
website/server/src/site.rs
Normal file
|
|
@ -0,0 +1,382 @@
|
|||
//! Pages of the site: one HTML template, a translation file per language, the data of
|
||||
//! the latest release filled in on every request (so the download buttons are right
|
||||
//! without JavaScript).
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::path::Path;
|
||||
|
||||
use serde_json::{Value, json};
|
||||
|
||||
use crate::Release;
|
||||
|
||||
/// Languages of the site: code, own name, Open Graph locale. English is at `/`, the
|
||||
/// others at `/<code>/`.
|
||||
pub const LANGS: &[(&str, &str, &str)] = &[
|
||||
("en", "English", "en_US"),
|
||||
("ru", "Русский", "ru_RU"),
|
||||
("fr", "Français", "fr_FR"),
|
||||
("de", "Deutsch", "de_DE"),
|
||||
("es", "Español", "es_ES"),
|
||||
("it", "Italiano", "it_IT"),
|
||||
];
|
||||
|
||||
/// Screenshots in gallery order (file stem); the first one is shown in the hero.
|
||||
const SHOTS: &[&str] = &[
|
||||
"01-game",
|
||||
"02-engine",
|
||||
"03-variations",
|
||||
"04-review",
|
||||
"05-marks",
|
||||
"06-preview",
|
||||
"07-library",
|
||||
"08-filters",
|
||||
"09-position-search",
|
||||
"10-looks",
|
||||
];
|
||||
|
||||
/// Strings the page script needs (download panel, buttons, lightbox).
|
||||
const CLIENT_KEYS: &[&str] = &[
|
||||
"btn_windows",
|
||||
"btn_macos",
|
||||
"btn_linux",
|
||||
"btn_version",
|
||||
"btn_latest",
|
||||
"apple_silicon",
|
||||
"mac_requires",
|
||||
"mac_intel_warning",
|
||||
"chromeos",
|
||||
"copy_link",
|
||||
"link_copied",
|
||||
"share_link",
|
||||
"started",
|
||||
"try_again",
|
||||
"choose_another",
|
||||
"close",
|
||||
"next_windows",
|
||||
"next_macos_title",
|
||||
"next_macos15",
|
||||
"mac_step1",
|
||||
"mac_step2",
|
||||
"mac15_step1",
|
||||
"mac15_step2",
|
||||
"mac15_step3",
|
||||
"next_linux",
|
||||
"copy",
|
||||
"copied",
|
||||
"lb_count",
|
||||
"meta_title",
|
||||
];
|
||||
|
||||
pub struct Site {
|
||||
template: String,
|
||||
strings: HashMap<String, HashMap<String, String>>,
|
||||
/// Public address without a trailing slash (`https://chesspenguin.example`).
|
||||
pub url: String,
|
||||
asset_version: String,
|
||||
}
|
||||
|
||||
impl Site {
|
||||
pub fn load(dir: &Path, url: String) -> Site {
|
||||
let template = std::fs::read_to_string(dir.join("index.html")).expect("site/index.html");
|
||||
let mut strings = HashMap::new();
|
||||
for (code, _, _) in LANGS {
|
||||
let path = dir.join("i18n").join(format!("{code}.json"));
|
||||
let map: HashMap<String, String> = std::fs::read_to_string(&path)
|
||||
.ok()
|
||||
.and_then(|s| serde_json::from_str(&s).ok())
|
||||
.unwrap_or_else(|| {
|
||||
eprintln!("no translations in {}", path.display());
|
||||
HashMap::new()
|
||||
});
|
||||
strings.insert(code.to_string(), map);
|
||||
}
|
||||
// Changes with every start: browsers fetch the new CSS and JS after a deploy.
|
||||
let asset_version = format!(
|
||||
"{:x}",
|
||||
std::time::SystemTime::now()
|
||||
.duration_since(std::time::UNIX_EPOCH)
|
||||
.map_or(0, |d| d.as_secs())
|
||||
);
|
||||
Site {
|
||||
template,
|
||||
strings,
|
||||
url: url.trim_end_matches('/').to_string(),
|
||||
asset_version,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn has_lang(&self, code: &str) -> bool {
|
||||
LANGS.iter().any(|(c, _, _)| *c == code)
|
||||
}
|
||||
|
||||
/// A string in `lang`, else in English, else the key.
|
||||
fn t<'a>(&'a self, lang: &str, key: &'a str) -> &'a str {
|
||||
self.strings
|
||||
.get(lang)
|
||||
.and_then(|m| m.get(key))
|
||||
.or_else(|| self.strings.get("en").and_then(|m| m.get(key)))
|
||||
.map_or(key, String::as_str)
|
||||
}
|
||||
|
||||
fn path(lang: &str) -> String {
|
||||
if lang == "en" {
|
||||
"/".to_string()
|
||||
} else {
|
||||
format!("/{lang}/")
|
||||
}
|
||||
}
|
||||
|
||||
/// The page in `lang` with the release's version, sizes and file names.
|
||||
pub fn page(&self, lang: &str, release: Option<&Release>) -> String {
|
||||
let mut html = self.translate(&self.template, lang);
|
||||
let page_url = format!("{}{}", self.url, Self::path(lang));
|
||||
let alternates: String = LANGS
|
||||
.iter()
|
||||
.map(|(c, _, _)| {
|
||||
format!(
|
||||
"<link rel=\"alternate\" hreflang=\"{c}\" href=\"{}{}\">\n",
|
||||
self.url,
|
||||
Self::path(c)
|
||||
)
|
||||
})
|
||||
.chain(std::iter::once(format!(
|
||||
"<link rel=\"alternate\" hreflang=\"x-default\" href=\"{}/\">",
|
||||
self.url
|
||||
)))
|
||||
.collect();
|
||||
let lang_options: String = LANGS
|
||||
.iter()
|
||||
.map(|(c, name, _)| {
|
||||
format!(
|
||||
"<option value=\"{c}\"{}>{name}</option>",
|
||||
if *c == lang { " selected" } else { "" }
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
let lang_links: String = LANGS
|
||||
.iter()
|
||||
.map(|(c, name, _)| format!("<a href=\"{}\" hreflang=\"{c}\" data-lang=\"{c}\">{name}</a>", Self::path(c)))
|
||||
.collect::<Vec<_>>()
|
||||
.join(" · ");
|
||||
let locale = LANGS
|
||||
.iter()
|
||||
.find(|(c, _, _)| *c == lang)
|
||||
.map_or("en_US", |l| l.2);
|
||||
let root_redirect = if lang == "en" { ROOT_REDIRECT } else { "" };
|
||||
let gallery: String = SHOTS
|
||||
.iter()
|
||||
.enumerate()
|
||||
.skip(1)
|
||||
.map(|(i, stem)| {
|
||||
let n = i + 1;
|
||||
format!(
|
||||
"<li><a href=\"/screenshots/{stem}.png\" data-shot=\"{n}\"><picture>\
|
||||
<source type=\"image/webp\" srcset=\"/screenshots/{stem}-640.webp 640w, /screenshots/{stem}-1280.webp 1280w\" sizes=\"(min-width: 900px) 360px, (min-width: 640px) 50vw, 85vw\">\
|
||||
<img src=\"/screenshots/{stem}-640.jpg\" width=\"1920\" height=\"1080\" loading=\"lazy\" alt=\"{alt}\"></picture></a>\
|
||||
<p>{cap}</p></li>",
|
||||
alt = attr(self.t(lang, &format!("alt{n}"))),
|
||||
cap = self.t(lang, &format!("shot{n}")),
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
let t: serde_json::Map<String, Value> = CLIENT_KEYS
|
||||
.iter()
|
||||
.map(|k| (k.to_string(), Value::String(self.t(lang, k).to_string())))
|
||||
.collect();
|
||||
let shots: Vec<Value> = SHOTS
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(i, stem)| {
|
||||
json!({
|
||||
"full": format!("/screenshots/{stem}.png"),
|
||||
"src": format!("/screenshots/{stem}-1920.webp"),
|
||||
"fallback": format!("/screenshots/{stem}-1280.jpg"),
|
||||
"caption": self.t(lang, &format!("shot{}", i + 1)),
|
||||
"alt": self.t(lang, &format!("alt{}", i + 1)),
|
||||
})
|
||||
})
|
||||
.collect();
|
||||
let assets: serde_json::Map<String, Value> = release
|
||||
.map(|r| {
|
||||
r.assets
|
||||
.iter()
|
||||
.map(|a| {
|
||||
(
|
||||
a.platform.to_string(),
|
||||
json!({ "file": a.name, "size": size(a.size) }),
|
||||
)
|
||||
})
|
||||
.collect()
|
||||
})
|
||||
.unwrap_or_default();
|
||||
let client = json!({
|
||||
"lang": lang,
|
||||
"home": Self::path(lang),
|
||||
"version": release.map(|r| r.version.clone()),
|
||||
"assets": assets,
|
||||
"shots": shots,
|
||||
"t": t,
|
||||
});
|
||||
let json_ld = json!({
|
||||
"@context": "https://schema.org",
|
||||
"@type": "SoftwareApplication",
|
||||
"name": "ChessPenguin",
|
||||
"operatingSystem": "Windows, macOS, Linux",
|
||||
"applicationCategory": "GameApplication",
|
||||
"license": "https://www.gnu.org/licenses/gpl-3.0.html",
|
||||
"softwareVersion": release.map(|r| r.version.clone()),
|
||||
"downloadUrl": format!("{}/#download", self.url),
|
||||
"offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" },
|
||||
});
|
||||
for (key, value) in [
|
||||
("{{lang}}", lang.to_string()),
|
||||
("{{locale}}", locale.to_string()),
|
||||
("{{page_url}}", page_url),
|
||||
("{{site}}", self.url.clone()),
|
||||
("{{home}}", Self::path(lang)),
|
||||
("{{alternates}}", alternates),
|
||||
("{{lang_options}}", lang_options),
|
||||
("{{lang_links}}", lang_links),
|
||||
("{{root_redirect}}", root_redirect.to_string()),
|
||||
("{{gallery}}", gallery),
|
||||
// `</` must not close the script element the JSON sits in.
|
||||
("{{client_json}}", client.to_string().replace("</", "<\\/")),
|
||||
("{{json_ld}}", json_ld.to_string().replace("</", "<\\/")),
|
||||
("{{asset_version}}", self.asset_version.clone()),
|
||||
] {
|
||||
html = html.replace(key, &value);
|
||||
}
|
||||
self.fill_release(html, lang, release)
|
||||
}
|
||||
|
||||
/// `{{t:key}}` → the string in `lang`.
|
||||
fn translate(&self, template: &str, lang: &str) -> String {
|
||||
let mut out = String::with_capacity(template.len() + 8192);
|
||||
let mut rest = template;
|
||||
while let Some(start) = rest.find("{{t:") {
|
||||
out.push_str(&rest[..start]);
|
||||
let after = &rest[start + 4..];
|
||||
let Some(end) = after.find("}}") else {
|
||||
out.push_str(&rest[start..]);
|
||||
return out;
|
||||
};
|
||||
out.push_str(self.t(lang, &after[..end]));
|
||||
rest = &after[end + 2..];
|
||||
}
|
||||
out.push_str(rest);
|
||||
out
|
||||
}
|
||||
|
||||
/// `{version}`, `{date}`, `{size:<platform>}`, `{file:<platform>}`.
|
||||
fn fill_release(&self, mut html: String, lang: &str, release: Option<&Release>) -> String {
|
||||
let version = release.map_or("", |r| r.version.as_str());
|
||||
html = html.replace("{version}", version);
|
||||
html = html.replace("{date}", &release.map(|r| date(&r.published, lang)).unwrap_or_default());
|
||||
for (platform, _) in crate::PLATFORMS {
|
||||
let asset = release.and_then(|r| r.assets.iter().find(|a| a.platform == *platform));
|
||||
html = html.replace(
|
||||
&format!("{{size:{platform}}}"),
|
||||
&asset.map(|a| size(a.size)).unwrap_or_default(),
|
||||
);
|
||||
html = html.replace(
|
||||
&format!("{{file:{platform}}}"),
|
||||
&asset.map_or_else(String::new, |a| a.name.clone()),
|
||||
);
|
||||
}
|
||||
html
|
||||
}
|
||||
|
||||
pub fn not_found(&self, lang: &str) -> String {
|
||||
format!(
|
||||
"<!doctype html><html lang=\"{lang}\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\
|
||||
<title>{title} · ChessPenguin</title><link rel=\"stylesheet\" href=\"/css/site.css?v={v}\"></head>\
|
||||
<body><main class=\"wrap nf\"><h1>{title}</h1><p>{text}</p><p><a class=\"btn btn-small btn-accent\" href=\"{home}#download\">{link}</a></p></main></body></html>",
|
||||
title = self.t(lang, "nf_title"),
|
||||
text = self.t(lang, "nf_text"),
|
||||
link = self.t(lang, "nf_link"),
|
||||
home = Self::path(lang),
|
||||
v = self.asset_version,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn sitemap(&self) -> String {
|
||||
let mut out = String::from(
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\">\n",
|
||||
);
|
||||
for (code, _, _) in LANGS {
|
||||
out.push_str(&format!("<url><loc>{}{}</loc>", self.url, Self::path(code)));
|
||||
for (alt, _, _) in LANGS {
|
||||
out.push_str(&format!(
|
||||
"<xhtml:link rel=\"alternate\" hreflang=\"{alt}\" href=\"{}{}\"/>",
|
||||
self.url,
|
||||
Self::path(alt)
|
||||
));
|
||||
}
|
||||
out.push_str("</url>\n");
|
||||
}
|
||||
out.push_str("</urlset>\n");
|
||||
out
|
||||
}
|
||||
}
|
||||
|
||||
/// On `/` only, before anything is drawn: the language chosen before, else the first
|
||||
/// browser language the site has, else English stays.
|
||||
const ROOT_REDIRECT: &str = r#"<script>(function(){var L=["ru","fr","de","es","it"],p=null;try{p=localStorage.getItem("lang")}catch(e){}if(!p){var ls=navigator.languages||[navigator.language||""];for(var i=0;i<ls.length;i++){var c=(ls[i]||"").slice(0,2).toLowerCase();if(c==="en"||L.indexOf(c)>=0){p=c;break}}}if(p&&p!=="en"&&L.indexOf(p)>=0){location.replace("/"+p+"/"+location.hash)}})();</script>"#;
|
||||
|
||||
fn attr(s: &str) -> String {
|
||||
s.replace('&', "&").replace('"', """).replace('<', "<")
|
||||
}
|
||||
|
||||
/// "14 MB", "8.4 MB" (decimal megabytes, as browsers and Finder show).
|
||||
pub fn size(bytes: u64) -> String {
|
||||
let mb = bytes as f64 / 1e6;
|
||||
if mb < 10.0 {
|
||||
format!("{mb:.1} MB")
|
||||
} else {
|
||||
format!("{:.0} MB", mb)
|
||||
}
|
||||
}
|
||||
|
||||
/// "October 19, 2026" in the page's language, from an RFC 3339 time.
|
||||
fn date(rfc3339: &str, lang: &str) -> String {
|
||||
let Some((y, rest)) = rfc3339.split_once('-') else {
|
||||
return String::new();
|
||||
};
|
||||
let (m, rest) = rest.split_once('-').unwrap_or(("", ""));
|
||||
let d: u32 = rest.get(..2).and_then(|s| s.parse().ok()).unwrap_or(0);
|
||||
let m: usize = m.parse().unwrap_or(0);
|
||||
if m == 0 || m > 12 || d == 0 {
|
||||
return String::new();
|
||||
}
|
||||
let months: [&str; 12] = match lang {
|
||||
"ru" => ["января", "февраля", "марта", "апреля", "мая", "июня", "июля", "августа", "сентября", "октября", "ноября", "декабря"],
|
||||
"fr" => ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"],
|
||||
"de" => ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
|
||||
"es" => ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"],
|
||||
"it" => ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"],
|
||||
_ => ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
||||
};
|
||||
let month = months[m - 1];
|
||||
match lang {
|
||||
"en" => format!("{month} {d}, {y}"),
|
||||
"de" => format!("{d}. {month} {y}"),
|
||||
"es" => format!("{d} de {month} de {y}"),
|
||||
_ => format!("{d} {month} {y}"),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn sizes_and_dates() {
|
||||
assert_eq!(size(15_673_262), "16 MB");
|
||||
assert_eq!(size(8_400_000), "8.4 MB");
|
||||
assert_eq!(date("2026-10-19T06:54:58Z", "en"), "October 19, 2026");
|
||||
assert_eq!(date("2026-10-19T06:54:58Z", "ru"), "19 октября 2026");
|
||||
assert_eq!(date("2026-10-19T06:54:58Z", "de"), "19. Oktober 2026");
|
||||
assert_eq!(date("2026-10-19T06:54:58Z", "es"), "19 de octubre de 2026");
|
||||
assert_eq!(date("bad", "en"), "");
|
||||
}
|
||||
}
|
||||
76
website/shots/classic-games.pgn
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
[Event "Paris Opera"]
|
||||
[Site "Paris FRA"]
|
||||
[Date "1858.??.??"]
|
||||
[Round "?"]
|
||||
[White "Morphy, Paul"]
|
||||
[Black "Duke Karl / Count Isouard"]
|
||||
[Result "1-0"]
|
||||
[ECO "C41"]
|
||||
[PlyCount "33"]
|
||||
[Annotator "ChessPenguin sample"]
|
||||
|
||||
{The "Opera Game": a model of rapid development and open lines.} 1. e4 e5 2. Nf3
|
||||
d6 3. d4 Bg4 $6 {Pinning the knight, but Black will have to give up the bishop
|
||||
pair.} 4. dxe5 Bxf3 (4... dxe5 5. Qxd8+ Kxd8 6. Nxe5 {wins a pawn.}) 5. Qxf3
|
||||
dxe5 6. Bc4 {Threatening Qxf7#.} Nf6 7. Qb3 $1 {A double attack on f7 and b7.}
|
||||
Qe7 8. Nc3 {Morphy prefers development to material.} (8. Qxb7 Qb4+ 9. Qxb4 Bxb4+
|
||||
{only trades queens.}) 8... c6 9. Bg5 b5 $2 {Black wants to chase the bishop, but opens lines towards his own king.}
|
||||
(9... Nbd7 {is the healthy move:} 10. O-O-O {keeps the pressure on d7.} (10. Qxb7 $6 Qb4+
|
||||
11. Qxb4 Bxb4 {[%csl Gb4] and Black is fine.}) 10... h6 11. Bh4 $14) 10. Nxb5 $1
|
||||
{[%cal Gb5d6,Gc4f7] The knight sacrifice opens the c-file and the a4-e8 diagonal.} cxb5 11.
|
||||
Bxb5+ Nbd7 12. O-O-O {[%csl Rd7][%cal Gd1d7,Gb5d7] All of White's pieces aim at d7.} Rd8
|
||||
13. Rxd7 $1 Rxd7 14. Rd1 Qe6 15. Bxd7+ Nxd7 16. Qb8+ $3 {[%cal Gb3b8,Gd1d8] The famous
|
||||
queen sacrifice.} Nxb8 17. Rd8# {[%csl Re8] A model of rapid development.}
|
||||
1-0
|
||||
|
||||
[Event "London casual game"]
|
||||
[Site "London ENG"]
|
||||
[Date "1851.06.21"]
|
||||
[Round "?"]
|
||||
[White "Anderssen, Adolf"]
|
||||
[Black "Kieseritzky, Lionel"]
|
||||
[Result "1-0"]
|
||||
[ECO "C33"]
|
||||
[PlyCount "45"]
|
||||
[Annotator "ChessPenguin sample"]
|
||||
|
||||
{The "Immortal Game".} 1. e4 e5 2. f4 exf4 3. Bc4 Qh4+ 4. Kf1 b5 5. Bxb5 Nf6 6.
|
||||
Nf3 Qh6 7. d3 Nh5 8. Nh4 Qg5 9. Nf5 c6 10. g4 Nf6 11. Rg1 $1 cxb5 12. h4 Qg6
|
||||
13. h5 Qg5 14. Qf3 Ng8 15. Bxf4 Qf6 16. Nc3 Bc5 17. Nd5 Qxb2 18. Bd6 $3 {White
|
||||
gives up both rooks.} Bxg1 (18... Qxa1+ 19. Ke2 Bxg1 20. Nxg7+ Kd8 21. Qf6+ {is
|
||||
similar.}) 19. e5 $1 Qxa1+ 20. Ke2 Na6 21. Nxg7+ Kd8 22. Qf6+ $3 Nxf6 23. Be7#
|
||||
1-0
|
||||
|
||||
[Event "Berlin casual game"]
|
||||
[Site "Berlin GER"]
|
||||
[Date "1852.??.??"]
|
||||
[Round "?"]
|
||||
[White "Anderssen, Adolf"]
|
||||
[Black "Dufresne, Jean"]
|
||||
[Result "1-0"]
|
||||
[ECO "C52"]
|
||||
[PlyCount "47"]
|
||||
[Annotator "ChessPenguin sample"]
|
||||
|
||||
{The "Evergreen Game".} 1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. b4 {The Evans Gambit.}
|
||||
Bxb4 5. c3 Ba5 6. d4 exd4 7. O-O d3 8. Qb3 Qf6 9. e5 Qg6 10. Re1 Nge7 11. Ba3
|
||||
b5 12. Qxb5 Rb8 13. Qa4 Bb6 14. Nbd2 Bb7 15. Ne4 Qf5 16. Bxd3 Qh5 17. Nf6+ $1
|
||||
gxf6 18. exf6 Rg8 19. Rad1 $3 Qxf3 20. Rxe7+ $1 Nxe7 (20... Kd8 21. Rxd7+ Kc8
|
||||
22. Rd8+ Kxd8 23. Bf5+ Qxd1 24. Qxd1+ {wins.}) 21. Qxd7+ $3 Kxd7 22. Bf5+ Ke8
|
||||
23. Bd7+ Kf8 24. Bxe7# 1-0
|
||||
|
||||
[Event "Endgame study"]
|
||||
[Site "?"]
|
||||
[Date "????.??.??"]
|
||||
[Round "?"]
|
||||
[White "White to move"]
|
||||
[Black "Opposition"]
|
||||
[Result "1-0"]
|
||||
[SetUp "1"]
|
||||
[FEN "4k3/8/4K3/4P3/8/8/8/8 w - - 0 1"]
|
||||
[PlyCount "7"]
|
||||
[Annotator "ChessPenguin sample"]
|
||||
|
||||
{A starting position from FEN. With the king on the sixth rank in front of
|
||||
its pawn, White wins whoever is to move.} 1. Kd6 (1. Kf6 Kf8 2. e6 Ke8 3. e7 Kd7
|
||||
4. Kf7 {also wins.}) 1... Kd8 2. e6 Ke8 3. e7 Kf7 4. Kd7 1-0
|
||||
68
website/shots/derive.py
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Images for the website from the raw screenshots (website/shots/raw):
|
||||
WebP and JPEG at 640/1280/1920 px wide for the gallery and the lightbox, a PNG at
|
||||
2560 px for "Open full size", and og-image.png (1200x630) for link previews.
|
||||
|
||||
python3 -I website/shots/derive.py
|
||||
"""
|
||||
import glob
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
RAW = os.path.join(ROOT, "shots", "raw")
|
||||
OUT = os.path.join(ROOT, "static", "screenshots")
|
||||
STATIC = os.path.join(ROOT, "static")
|
||||
|
||||
|
||||
def font(bold, size):
|
||||
name = "sans-serif:bold" if bold else "sans-serif"
|
||||
try:
|
||||
path = subprocess.run(["fc-match", "-f", "%{file}", name], capture_output=True, text=True).stdout
|
||||
return ImageFont.truetype(path, size)
|
||||
except Exception:
|
||||
return ImageFont.load_default()
|
||||
|
||||
|
||||
def derive():
|
||||
for path in sorted(glob.glob(os.path.join(RAW, "[0-9]*.png"))):
|
||||
stem = os.path.splitext(os.path.basename(path))[0]
|
||||
im = Image.open(path).convert("RGB")
|
||||
for w in (640, 1280, 1920):
|
||||
small = im.resize((w, round(im.height * w / im.width)), Image.LANCZOS)
|
||||
small.save(os.path.join(OUT, f"{stem}-{w}.webp"), "WEBP", quality=84, method=6)
|
||||
if w in (640, 1280):
|
||||
small.save(os.path.join(OUT, f"{stem}-{w}.jpg"), "JPEG", quality=86, optimize=True, progressive=True)
|
||||
full = im.resize((2560, round(im.height * 2560 / im.width)), Image.LANCZOS)
|
||||
full.save(os.path.join(OUT, f"{stem}.png"), "PNG", optimize=True)
|
||||
print(stem)
|
||||
|
||||
|
||||
def og_image():
|
||||
w, h = 1200, 630
|
||||
img = Image.new("RGB", (w, h), (22, 23, 24))
|
||||
shot = Image.open(os.path.join(RAW, "01-game.png")).convert("RGB")
|
||||
# The board side of the first screenshot, on the right.
|
||||
crop = shot.crop((0, 0, int(shot.width * 0.62), shot.height))
|
||||
crop = crop.resize((round(crop.width * h / crop.height), h), Image.LANCZOS)
|
||||
img.paste(crop, (w - crop.width + 160, 0))
|
||||
shade = Image.new("L", (w, h), 0)
|
||||
d = ImageDraw.Draw(shade)
|
||||
for x in range(w):
|
||||
d.line([(x, 0), (x, h)], fill=max(0, min(255, int(255 * (1 - (x - 380) / 360)))))
|
||||
img.paste((22, 23, 24), mask=shade)
|
||||
icon = Image.open(os.path.join(STATIC, "img", "icon-180.png")).convert("RGBA").resize((128, 128), Image.LANCZOS)
|
||||
img.paste(icon, (64, 120), icon)
|
||||
d = ImageDraw.Draw(img)
|
||||
d.text((64, 280), "ChessPenguin", font=font(True, 64), fill=(232, 232, 232))
|
||||
d.text((64, 370), "Free chess database for", font=font(False, 34), fill=(163, 167, 173))
|
||||
d.text((64, 416), "Windows, macOS and Linux", font=font(False, 34), fill=(163, 167, 173))
|
||||
img.save(os.path.join(STATIC, "og-image.png"), "PNG", optimize=True)
|
||||
print("og-image.png")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
derive()
|
||||
og_image()
|
||||
93
website/shots/make-screenshots.sh
Executable file
|
|
@ -0,0 +1,93 @@
|
|||
#!/usr/bin/env bash
|
||||
# Takes the ten screenshots of the website with the release build of ChessPenguin and
|
||||
# its dev hooks (docs/dev/desktop.md), in English, fullscreen (3840x2160 at scale 2).
|
||||
# Games: shots/classic-games.pgn (public-domain games, our own comments). Lists: a
|
||||
# large ChessBase database shown under a neutral name (hard links), never its annotations.
|
||||
#
|
||||
# website/shots/make-screenshots.sh "/path/to/Mega Database 2026.cbh" /path/to/sf_19
|
||||
# The second argument is a directory with a downloaded `stockfish` (engines/sf_19).
|
||||
set -euo pipefail
|
||||
|
||||
big="${1:?usage: $0 BIG_DATABASE.cbh STOCKFISH_DIR}"
|
||||
engine_dir="${2:?usage: $0 BIG_DATABASE.cbh STOCKFISH_DIR}"
|
||||
root="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
app="${root}/target/release/chesspenguin"
|
||||
out="${root}/website/shots/raw"
|
||||
work="${root}/target/site-shots"
|
||||
mkdir -p "${out}" "${work}"
|
||||
|
||||
# The large database under a neutral name: every companion file hard-linked (a symlink
|
||||
# would be resolved to the original name by the app).
|
||||
db_dir="${work}/db"
|
||||
rm -rf "${db_dir}" && mkdir -p "${db_dir}"
|
||||
stem="$(basename "${big}" .cbh)"
|
||||
for f in "$(dirname "${big}")/${stem}".*; do
|
||||
[[ -f "${f}" ]] || continue
|
||||
ln "${f}" "${db_dir}/Tournament games${f#"$(dirname "${big}")/${stem}"}"
|
||||
done
|
||||
tournament="${db_dir}/Tournament games.cbh"
|
||||
classics="${db_dir}/Classic games.pgn"
|
||||
cp "${root}/website/shots/classic-games.pgn" "${classics}"
|
||||
|
||||
# settings.json: English, the downloaded Stockfish, the databases in order.
|
||||
settings() { # dark board pieces first_db second_db
|
||||
cat <<EOF
|
||||
{
|
||||
"language": "En", "dark_mode": $1, "board_theme": "$2", "piece_set": "$3",
|
||||
"sound_enabled": false, "engines_discovered": true,
|
||||
"engines": [{"name": "Stockfish 19", "path": "", "builtin": true, "threads": 8, "hash_mb": 512, "multipv": 3}],
|
||||
"active_engine": 0,
|
||||
"databases": ["$4", "$5"]
|
||||
}
|
||||
EOF
|
||||
}
|
||||
|
||||
# One shot (ONLY="07 08" takes just these): name, settings JSON, delay, then environment assignments and app arguments.
|
||||
shot() {
|
||||
local name="$1" json="$2" delay="$3"
|
||||
if [[ -n "${ONLY:-}" && " ${ONLY} " != *" ${name%%-*} "* ]]; then return; fi
|
||||
shift 3
|
||||
local home="${work}/${name}"
|
||||
rm -rf "${home}/cfg"
|
||||
mkdir -p "${home}/cfg/chesspenguin" "${home}/data/chesspenguin/engines"
|
||||
printf '%s' "${json}" > "${home}/cfg/chesspenguin/settings.json"
|
||||
ln -sfn "${engine_dir}" "${home}/data/chesspenguin/engines/sf_19"
|
||||
# The analysis cache is shared, so the game analysis is computed only once; NOCACHE
|
||||
# gives a shot its own empty cache (no engine marks).
|
||||
local cache="${work}/cache"
|
||||
if [[ "${1:-}" == NOCACHE ]]; then cache="${home}/cache"; rm -rf "${cache}"; shift; fi
|
||||
mkdir -p "${cache}"
|
||||
echo "== ${name}"
|
||||
# CP_* assignments go to the environment, the rest are the app's arguments.
|
||||
local vars=() args=()
|
||||
for a in "$@"; do
|
||||
if [[ "${a}" == CP_*=* ]]; then vars+=("${a}"); else args+=("${a}"); fi
|
||||
done
|
||||
env XDG_CONFIG_HOME="${home}/cfg" XDG_DATA_HOME="${home}/data" XDG_CACHE_HOME="${cache}" \
|
||||
CP_SCREENSHOT="${out}/${name}.png" CP_SCREENSHOT_DELAY="${delay}" "${vars[@]}" "${app}" "${args[@]}" \
|
||||
> "${home}/log" 2>&1 || true
|
||||
ls -la "${out}/${name}.png"
|
||||
}
|
||||
|
||||
dark_games="$(settings true Brown Cburnett "${classics}" "${tournament}")"
|
||||
dark_big="$(settings true Brown Cburnett "${tournament}" "${classics}")"
|
||||
light_games="$(settings false Wood Celtic "${classics}" "${tournament}")"
|
||||
|
||||
# Game analysis for the marks (Opera game) and the report (Evergreen game): computed
|
||||
# once into the shared cache.
|
||||
shot prep-opera "${dark_games}" 40 CP_OPEN=0 CP_REVIEW=1
|
||||
shot prep-evergreen "${dark_games}" 60 CP_OPEN=2 CP_REVIEW=1
|
||||
|
||||
shot 01-game "${dark_games}" 4 NOCACHE CP_OPEN=0 CP_PLY=23
|
||||
shot 02-engine "${dark_games}" 14 CP_OPEN=1 CP_PLY=35 CP_ANALYZE=1 CP_ENGINE_PANEL=1
|
||||
shot 03-variations "${dark_games}" 4 NOCACHE CP_OPEN=0 CP_PLY=18 CP_VAR=1
|
||||
shot 04-review "${dark_games}" 5 CP_OPEN=2 CP_PLY=37 CP_REPORT=1
|
||||
shot 05-marks "${dark_games}" 5 CP_OPEN=0 CP_PLY=18
|
||||
shot 06-preview "${dark_games}" 5 CP_OPEN=0 CP_BEST=3
|
||||
shot 07-library "${dark_big}" 6 CP_PANE=hidden CP_SORT=date "${tournament}"
|
||||
shot 08-filters "${dark_big}" 6 "CP_FILTER=player=carlsen magnus;years=2015-2026;elo=2600" "${tournament}"
|
||||
shot 09-position-search "${dark_big}" 8 "CP_BOARD=e4 c5 Nf3 d6 d4 cxd4 Nxd4 Nf6 Nc3 a6" "${tournament}"
|
||||
shot 10-looks "${light_games}" 4 NOCACHE CP_OPEN=0 CP_PLY=23 CP_SETTINGS=board
|
||||
|
||||
rm -f "${out}"/prep-*.png
|
||||
echo "Raw screenshots in ${out}; next: website/shots/derive.py"
|
||||
150
website/site/i18n/de.json
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
{
|
||||
"meta_title": "ChessPenguin — kostenlose Schachdatenbank für Windows, macOS und Linux",
|
||||
"meta_description": "Kostenlose Open-Source-Schachdatenbank. Öffnen Sie PGN-Dateien und ChessBase-Datenbanken, lesen Sie kommentierte Partien und analysieren Sie sie mit Stockfish. Für Windows, macOS und Linux.",
|
||||
"skip": "Zum Inhalt",
|
||||
"nav_label": "Abschnitte",
|
||||
"nav_screenshots": "Screenshots",
|
||||
"nav_features": "Funktionen",
|
||||
"nav_download": "Download",
|
||||
"nav_support": "Support",
|
||||
"language": "Sprache",
|
||||
"header_download": "Download",
|
||||
"hero_title": "Die kostenlose Schachdatenbank für Windows, macOS und Linux",
|
||||
"hero_subtitle": "Öffnen Sie PGN-Dateien und ChessBase-Datenbanken, lesen Sie kommentierte Partien und analysieren Sie sie mit Stockfish. Schnell, nativ und Open Source.",
|
||||
"btn_windows": "Für Windows herunterladen",
|
||||
"btn_macos": "Für macOS herunterladen",
|
||||
"btn_linux": "Für Linux herunterladen",
|
||||
"btn_choose": "Download wählen",
|
||||
"btn_choose_2": "Alle Plattformen und Formate",
|
||||
"btn_version": "Version {version}",
|
||||
"btn_latest": "Neueste Version",
|
||||
"apple_silicon": "Apple Silicon",
|
||||
"other_platforms": "Andere Plattformen und Formate",
|
||||
"whats_new": "Neu in {version}",
|
||||
"other_formats": "Andere Formate:",
|
||||
"more": "Mehr…",
|
||||
"mac_requires": "Erfordert einen Mac mit Apple-Chip (M1 oder neuer) und macOS 11 oder neuer.",
|
||||
"mac_intel_warning": "Dieser Mac scheint einen Intel-Prozessor zu haben. Die aktuelle Version läuft nur auf Apple-Chips.",
|
||||
"chromeos": "für Linux unter ChromeOS",
|
||||
"mobile_text": "ChessPenguin ist ein Programm für Computer mit Windows, macOS oder Linux. Öffnen Sie diese Seite auf Ihrem Computer, um es herunterzuladen.",
|
||||
"share_link": "Link teilen",
|
||||
"copy_link": "Link kopieren",
|
||||
"link_copied": "Link kopiert",
|
||||
"see_all": "Alle Downloads",
|
||||
"platforms": "Plattformen",
|
||||
"badge_macos": "macOS · Apple Silicon",
|
||||
"free_line": "Kostenlos und Open Source. Kein Konto, keine Werbung, kein Tracking.",
|
||||
"started": "Ihr Download hat begonnen.",
|
||||
"try_again": "Nicht gestartet? Erneut versuchen",
|
||||
"choose_another": "Andere Datei wählen",
|
||||
"close": "Schließen",
|
||||
"next_windows": "Entpacken Sie das Archiv und starten Sie ChessPenguin.exe.",
|
||||
"next_macos_title": "Erster Start unter macOS",
|
||||
"next_macos15": "macOS 15 und neuer: siehe Schritte",
|
||||
"next_linux": "Installieren mit:",
|
||||
"gallery_title": "So sieht es aus",
|
||||
"shot1": "Kommentierte Partien auf einem großen, klaren Brett lesen.",
|
||||
"shot2": "Live-Analyse: bis zu fünf Varianten, Bewertungsbalken und Pfeile für die besten Züge.",
|
||||
"shot3": "Varianten, Kommentare und Symbole bleiben lesbar, egal wie tief sie gehen.",
|
||||
"shot4": "Die ganze Partie analysieren: Bewertungsgraph, Genauigkeit und Fehler beider Spieler.",
|
||||
"shot5": "Sehen, wo die Partie kippte, mit dem besseren Zug für jeden Fehler.",
|
||||
"shot6": "Eine Engine-Variante durchgehen, ohne die Partie zu ändern, und sie mit einem Klick als Variante einfügen.",
|
||||
"shot7": "Alle Datenbanken griffbereit: PGN-Dateien, ChessBase-Datenbanken und Archive.",
|
||||
"shot8": "Millionen Partien öffnen in Sekunden. Filtern nach Spieler, Turnier, Jahren, Elo, ECO und Ergebnis während der Eingabe.",
|
||||
"shot9": "Jede Partie finden, die eine Stellung erreicht, mit den Folgezügen und ihren Ergebnissen.",
|
||||
"shot10": "Ganz nach Ihrem Geschmack: 17 Figurensätze, 37 Bretter, 7 Soundsets, dunkles und helles Design.",
|
||||
"alt1": "Partieansicht von ChessPenguin: Morphys Opernpartie auf einem großen Brett, rechts die kommentierte Notation mit einer Variante.",
|
||||
"alt2": "Stockfish-Analyse der Unsterblichen Partie: drei Engine-Varianten, Bewertungsbalken und blaue Pfeile für die besten Züge.",
|
||||
"alt3": "Eine kommentierte Partie mit verschachtelten Varianten, Kommentaren und Symbolen sowie den Pfeilen des Autors auf dem Brett.",
|
||||
"alt4": "Analysebericht: Genauigkeit, Ungenauigkeiten, Fehler und grobe Fehler beider Spieler und der Bewertungsgraph unter dem Brett.",
|
||||
"alt5": "Engine-Markierungen in der Notation, jeder Fehler mit der besseren Variante und Pfeilen zur Widerlegung.",
|
||||
"alt6": "Vorschau einer Engine-Variante: Das Brett zeigt einen Zug darin, mit Schaltflächen zum Einfügen als Variante oder Beenden.",
|
||||
"alt7": "Die Bibliothek: mehrere Datenbanken im Regal und eine sortierbare Partientabelle.",
|
||||
"alt8": "Eine Datenbank mit Millionen Partien, gefiltert nach Spieler, Jahren und Elo, mit den aktiven Bedingungen über der Tabelle.",
|
||||
"alt9": "Stellungssuche: eine Sizilianische Najdorf-Stellung auf dem Brett, die Folgezüge mit Ergebnissen und die gefundenen Partien.",
|
||||
"alt10": "Brett- und Figureneinstellungen im hellen Design: ein Raster aus Figurensätzen und Brettern, dahinter das gewählte Brett.",
|
||||
"lb_label": "Screenshots",
|
||||
"lb_full": "In voller Größe öffnen",
|
||||
"lb_prev": "Vorheriger Screenshot",
|
||||
"lb_next": "Nächster Screenshot",
|
||||
"lb_count": "Screenshot {n} von {total}",
|
||||
"features_title": "Alles, was Sie zum Schachstudium brauchen",
|
||||
"f1_title": "PGN und ChessBase",
|
||||
"f1_text": "PGN-Dateien, ChessBase-Datenbanken (.cbh, .cbv) und .zip- oder .7z-Archive öffnen. Alte Zeichenkodierungen und ungewöhnliches PGN funktionieren einfach, und Ihre Dateien werden nie verändert.",
|
||||
"f2_title": "Lesbare kommentierte Partien",
|
||||
"f2_text": "Die Hauptvariante als übersichtliche zweispaltige Tabelle, Kommentare und Varianten als Blöcke, Zugsymbole und die Pfeile des Autors auf dem Brett.",
|
||||
"f3_title": "Live-Engine-Analyse",
|
||||
"f3_text": "Bis zu fünf Engine-Varianten, ein Bewertungsbalken und Pfeile für die besten Züge. Eine Engine-Variante durchgehen, ohne die Partie zu ändern, und mit einem Klick als Variante einfügen.",
|
||||
"f4_title": "Analyse der ganzen Partie",
|
||||
"f4_text": "Ein Bewertungsgraph, Genauigkeit, Ungenauigkeiten, Fehler und grobe Fehler für jeden Spieler und jede Partiephase, mit besseren Zügen direkt in der Notation.",
|
||||
"f5_title": "Millionen Partien",
|
||||
"f5_text": "Große ChessBase-Datenbanken öffnen in Sekunden. Filtern nach Spieler, Turnier, Jahren, Elo, ECO und Ergebnis – die Liste aktualisiert sich während der Eingabe.",
|
||||
"f6_title": "Stellungssuche",
|
||||
"f6_text": "Ziehen Sie auf dem Brett, um jede Partie zu finden, die die Stellung in beliebiger Zugfolge erreicht, mit den Folgezügen und ihren Ergebnissen.",
|
||||
"f7_title": "Eigene Partien eingeben",
|
||||
"f7_text": "Züge und Varianten hinzufügen, Varianten hochstufen oder löschen, rückgängig machen und wiederholen, PGN oder FEN kopieren und in einer neuen PGN-Datei speichern.",
|
||||
"f8_title": "Nach Ihrem Geschmack",
|
||||
"f8_text": "17 Figurensätze, 37 Bretter, 7 Soundsets, dunkles und helles Design und sechs Sprachen: Englisch, Russisch, Französisch, Deutsch, Spanisch und Italienisch.",
|
||||
"download_title": "Download",
|
||||
"download_meta": "Version {version} · veröffentlicht am {date} ·",
|
||||
"release_notes": "Versionshinweise",
|
||||
"your_system": "Ihr System",
|
||||
"row_download": "Herunterladen",
|
||||
"copy": "Kopieren",
|
||||
"copied": "Kopiert",
|
||||
"copy_aria": "Befehl kopieren",
|
||||
"win_title": "Windows 10 und 11, 64 Bit",
|
||||
"win_step1": "Entpacken Sie das Archiv (Rechtsklick → Alle extrahieren).",
|
||||
"win_step2": "Starten Sie ChessPenguin.exe aus dem entpackten Ordner.",
|
||||
"win_note": "Wenn Windows „Der Computer wurde durch Windows geschützt“ anzeigt, klicken Sie auf „Weitere Informationen“ und dann auf „Trotzdem ausführen“. ChessPenguin ist noch nicht mit einem Microsoft-Zertifikat signiert; das ist nur einmal nötig.",
|
||||
"mac_title": "Mac mit Apple-Chip (M1 oder neuer), macOS 11 oder neuer",
|
||||
"mac_step1": "Öffnen Sie die .dmg-Datei und ziehen Sie ChessPenguin in den Ordner „Programme“.",
|
||||
"mac_step2": "Beim ersten Mal öffnen Sie „Programme“, klicken ChessPenguin bei gedrückter Ctrl-Taste (oder mit rechts) an, wählen „Öffnen“ und klicken erneut auf „Öffnen“.",
|
||||
"mac15_title": "Unter macOS 15 Sequoia und neuer",
|
||||
"mac15_step1": "Doppelklicken Sie auf ChessPenguin. Wenn macOS meldet, dass die App nicht überprüft werden kann, klicken Sie auf „Fertig“.",
|
||||
"mac15_step2": "Öffnen Sie Systemeinstellungen → Datenschutz & Sicherheit und scrollen Sie zu „Sicherheit“.",
|
||||
"mac15_step3": "Klicken Sie neben „ChessPenguin wurde blockiert“ auf „Dennoch öffnen“ und bestätigen Sie mit Ihrem Passwort.",
|
||||
"mac_why": "Das ist nur einmal nötig. ChessPenguin ist noch nicht von Apple signiert, dafür braucht man ein kostenpflichtiges Entwicklerkonto. Die App ist Open Source und wird auf GitHub aus dem veröffentlichten Code gebaut.",
|
||||
"mac_still": "Immer noch blockiert?",
|
||||
"mac_still_text": "Führen Sie dies im Terminal aus und öffnen Sie ChessPenguin erneut:",
|
||||
"mac_intel": "Macs mit Intel-Prozessor werden noch nicht unterstützt.",
|
||||
"linux_intro": "Wählen Sie das Paket für Ihre Distribution. Die Befehle gehen davon aus, dass die Datei in ~/Downloads liegt; speichert Ihr Browser woanders, passen Sie den Pfad an.",
|
||||
"lx_deb": "Debian, Ubuntu, Linux Mint",
|
||||
"lx_rpm": "Fedora, openSUSE",
|
||||
"lx_rpm_suse": "Unter openSUSE:",
|
||||
"lx_arch": "Arch Linux, Manjaro, EndeavourOS",
|
||||
"lx_appimage": "AppImage — jede Distribution",
|
||||
"lx_flatpak": "Flatpak — mit Stockfish",
|
||||
"lx_flatpak_note": "Wenn Flatpak nach einer Laufzeitumgebung fragt, fügen Sie zuerst Flathub hinzu: flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo",
|
||||
"lx_tar": "Portables Archiv",
|
||||
"lx_tar_text": "Irgendwo entpacken und chesspenguin starten. Ohne Installation und ohne Menüeintrag.",
|
||||
"verify": "Download prüfen:",
|
||||
"all_releases": "Alle Versionen auf GitHub",
|
||||
"source_code": "Quellcode",
|
||||
"how_verify": "So prüfen Sie",
|
||||
"how_verify_text": "Laden Sie SHA256SUMS.txt in denselben Ordner wie die Datei und führen Sie aus:",
|
||||
"how_verify_win": "Vergleichen Sie das Ergebnis mit der Zeile dieser Datei in SHA256SUMS.txt.",
|
||||
"engine_title": "Schach-Engine",
|
||||
"engine_text": "ChessPenguin analysiert mit Stockfish, der stärksten kostenlosen Schach-Engine. Damit der Download klein bleibt, ist Stockfish nicht enthalten: Bei der ersten Analyse bietet ChessPenguin an, die offizielle Version (etwa 80 MB) herunterzuladen, prüft sie und startet die Analyse. Das geht auch jederzeit unter Einstellungen → Engines.",
|
||||
"engine_b1": "Das Flatpak enthält Stockfish bereits.",
|
||||
"engine_b2": "Lieber selbst installieren? Ein im System installiertes stockfish wird automatisch gefunden, oder Sie geben ChessPenguin die Datei an.",
|
||||
"engine_b3": "Jede UCI-Engine lässt sich unter Einstellungen → Engines hinzufügen.",
|
||||
"engine_link1": "Stockfish-Downloads",
|
||||
"engine_link2": "Stockfish auf GitHub",
|
||||
"oss_title": "Open Source",
|
||||
"oss_text": "ChessPenguin ist freie Software unter der GNU GPL 3.0 oder neuer, geschrieben in Rust. Der Quellcode und jede Version liegen auf GitHub und werden automatisch aus dem veröffentlichten Code gebaut. Nutzen, studieren, teilen, verbessern.",
|
||||
"oss_button": "Auf GitHub ansehen",
|
||||
"oss_small": "Figurensätze, Bretter und Sounds stammen von Lichess, unter ihren eigenen freien Lizenzen.",
|
||||
"third_party": "Lizenzen Dritter",
|
||||
"support_title": "Support",
|
||||
"support_text": "Ein Problem gefunden oder eine Idee? Schreiben Sie uns – jede Nachricht wird gelesen, und Vorschläge bestimmen, was als Nächstes kommt.",
|
||||
"email": "E-Mail",
|
||||
"support_issues": "Sie können auch ein Issue auf GitHub eröffnen:",
|
||||
"support_hint": "Geben Sie bei einem Problem bitte Ihre ChessPenguin-Version und Ihr System an und hängen Sie die PGN-Datei an, wenn es um eine Partie geht.",
|
||||
"footer_license": "Freie Software unter GPL-3.0-or-later",
|
||||
"footer_privacy": "Keine Cookies, keine Tracker. Download-Zahlen und Länder werden nur auf dem Server erfasst.",
|
||||
"footer_geo": "IP-Geolokalisierung von",
|
||||
"nf_title": "Seite nicht gefunden",
|
||||
"nf_text": "Die gesuchte Seite oder Datei gibt es hier nicht.",
|
||||
"nf_link": "Zu den ChessPenguin-Downloads"
|
||||
}
|
||||
150
website/site/i18n/en.json
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
{
|
||||
"meta_title": "ChessPenguin — free chess database for Windows, macOS and Linux",
|
||||
"meta_description": "Free, open-source chess database. Open PGN and ChessBase files, read annotated games and analyse them with Stockfish. For Windows, macOS and Linux.",
|
||||
"skip": "Skip to content",
|
||||
"nav_label": "Sections",
|
||||
"nav_screenshots": "Screenshots",
|
||||
"nav_features": "Features",
|
||||
"nav_download": "Download",
|
||||
"nav_support": "Support",
|
||||
"language": "Language",
|
||||
"header_download": "Download",
|
||||
"hero_title": "The free chess database for Windows, macOS and Linux",
|
||||
"hero_subtitle": "Open PGN and ChessBase files, read annotated games, and analyse them with Stockfish. Fast, native and open source.",
|
||||
"btn_windows": "Download for Windows",
|
||||
"btn_macos": "Download for macOS",
|
||||
"btn_linux": "Download for Linux",
|
||||
"btn_choose": "Choose a download",
|
||||
"btn_choose_2": "All platforms and formats",
|
||||
"btn_version": "Version {version}",
|
||||
"btn_latest": "Latest version",
|
||||
"apple_silicon": "Apple silicon",
|
||||
"other_platforms": "Other platforms and formats",
|
||||
"whats_new": "What's new in {version}",
|
||||
"other_formats": "Other formats:",
|
||||
"more": "More…",
|
||||
"mac_requires": "Requires a Mac with Apple silicon (M1 or later) and macOS 11 or later.",
|
||||
"mac_intel_warning": "This Mac seems to have an Intel processor. The current build runs only on Apple silicon.",
|
||||
"chromeos": "for Linux on ChromeOS",
|
||||
"mobile_text": "ChessPenguin is a desktop app for Windows, macOS and Linux. Open this page on your computer to download it.",
|
||||
"share_link": "Share link",
|
||||
"copy_link": "Copy link",
|
||||
"link_copied": "Link copied",
|
||||
"see_all": "See all downloads",
|
||||
"platforms": "Platforms",
|
||||
"badge_macos": "macOS · Apple silicon",
|
||||
"free_line": "Free and open source. No account, no ads, no tracking.",
|
||||
"started": "Your download has started.",
|
||||
"try_again": "Didn't start? Try again",
|
||||
"choose_another": "Choose another file",
|
||||
"close": "Close",
|
||||
"next_windows": "Unzip the archive and run ChessPenguin.exe.",
|
||||
"next_macos_title": "First launch on macOS",
|
||||
"next_macos15": "macOS 15 and later: see the steps",
|
||||
"next_linux": "Install it with:",
|
||||
"gallery_title": "See it in action",
|
||||
"shot1": "Read annotated games on a large, clear board.",
|
||||
"shot2": "Live engine analysis: up to five lines, evaluation bar and best-move arrows.",
|
||||
"shot3": "Variations, comments and symbols stay readable, however deep they go.",
|
||||
"shot4": "Analyse the whole game: evaluation graph, accuracy and mistakes for each player.",
|
||||
"shot5": "See where the game turned, with the better move for every mistake.",
|
||||
"shot6": "Step through an engine line without touching the game, then add it as a variation in one click.",
|
||||
"shot7": "Keep all your databases at hand: PGN files, ChessBase databases and archives.",
|
||||
"shot8": "Millions of games open in seconds. Filter by player, event, years, rating, ECO and result as you type.",
|
||||
"shot9": "Find every game that reaches a position, with the moves played next and how they scored.",
|
||||
"shot10": "Make it yours: 17 piece sets, 37 boards, 7 sound sets, dark and light themes.",
|
||||
"alt1": "ChessPenguin game screen: Morphy's Opera game on a large board, with notation, comments and a variation on the right.",
|
||||
"alt2": "Live Stockfish analysis of the Immortal Game: three engine lines, evaluation bar and blue arrows for the best moves.",
|
||||
"alt3": "An annotated game with nested variations, comments and move symbols, and the author's arrows on the board.",
|
||||
"alt4": "Game analysis report: accuracy, inaccuracies, mistakes and blunders for each player, and the evaluation graph under the board.",
|
||||
"alt5": "Engine marks in the notation, each mistake with the better line, and arrows showing the refutation.",
|
||||
"alt6": "Engine line preview: the board shows a move inside an engine line, with buttons to add it as a variation or exit.",
|
||||
"alt7": "The library: several databases on a shelf and a sortable table of games.",
|
||||
"alt8": "A database of millions of games filtered by player, years and rating, with the active conditions above the table.",
|
||||
"alt9": "Position search: a Sicilian Najdorf position on the board, the moves played next with results, and the games that reached it.",
|
||||
"alt10": "Board and piece settings in the light theme: a grid of piece sets and boards, with the chosen board behind.",
|
||||
"lb_label": "Screenshots",
|
||||
"lb_full": "Open full size",
|
||||
"lb_prev": "Previous screenshot",
|
||||
"lb_next": "Next screenshot",
|
||||
"lb_count": "Screenshot {n} of {total}",
|
||||
"features_title": "Everything you need to study chess",
|
||||
"f1_title": "PGN and ChessBase",
|
||||
"f1_text": "Open PGN files, ChessBase databases (.cbh, .cbv) and .zip or .7z archives. Old encodings and unusual PGN just work, and your files are never modified.",
|
||||
"f2_title": "Annotated games, readable",
|
||||
"f2_text": "The main line as a clean two-column table, comments and variations as blocks, move symbols and the author's arrows on the board.",
|
||||
"f3_title": "Live engine analysis",
|
||||
"f3_text": "Up to five engine lines, an evaluation bar and best-move arrows. Step through an engine line without touching the game and add it as a variation in one click.",
|
||||
"f4_title": "Whole-game analysis",
|
||||
"f4_text": "An evaluation graph, accuracy, and inaccuracies, mistakes and blunders for each player and game phase, with better moves right in the notation.",
|
||||
"f5_title": "Millions of games",
|
||||
"f5_text": "Large ChessBase databases open in seconds. Filter by player, event, years, rating, ECO and result, and the list updates as you type.",
|
||||
"f6_title": "Search by position",
|
||||
"f6_text": "Play moves on a board to find every game that reaches the position, by any move order, with the moves played next and how they scored.",
|
||||
"f7_title": "Enter your own games",
|
||||
"f7_text": "Add moves and variations, promote or delete lines, undo and redo, copy PGN or FEN, and save to a new PGN file.",
|
||||
"f8_title": "Make it yours",
|
||||
"f8_text": "17 piece sets, 37 boards, 7 sound sets, dark and light themes, and six languages: English, Russian, French, German, Spanish and Italian.",
|
||||
"download_title": "Download",
|
||||
"download_meta": "Version {version} · released {date} ·",
|
||||
"release_notes": "Release notes",
|
||||
"your_system": "your system",
|
||||
"row_download": "Download",
|
||||
"copy": "Copy",
|
||||
"copied": "Copied",
|
||||
"copy_aria": "Copy command",
|
||||
"win_title": "Windows 10 and 11, 64-bit",
|
||||
"win_step1": "Unzip the archive (right-click → Extract All).",
|
||||
"win_step2": "Run ChessPenguin.exe from the extracted folder.",
|
||||
"win_note": "If Windows shows “Windows protected your PC”, click More info, then Run anyway. ChessPenguin isn't signed with a Microsoft certificate yet; you only need to do this once.",
|
||||
"mac_title": "Mac with Apple silicon (M1 or later), macOS 11 or later",
|
||||
"mac_step1": "Open the .dmg file and drag ChessPenguin to the Applications folder.",
|
||||
"mac_step2": "The first time, open Applications, Control-click (or right-click) ChessPenguin and choose Open, then click Open again.",
|
||||
"mac15_title": "On macOS 15 Sequoia and later",
|
||||
"mac15_step1": "Double-click ChessPenguin. When macOS says it can't verify the app, click Done.",
|
||||
"mac15_step2": "Open System Settings → Privacy & Security and scroll down to Security.",
|
||||
"mac15_step3": "Click Open Anyway next to “ChessPenguin was blocked”, then confirm with your password.",
|
||||
"mac_why": "You only need to do this once. ChessPenguin isn't signed by Apple yet because that requires a paid developer account. The app is open source and built on GitHub from the published code.",
|
||||
"mac_still": "Still won't open?",
|
||||
"mac_still_text": "Run this in Terminal, then open ChessPenguin again:",
|
||||
"mac_intel": "Macs with Intel processors are not supported yet.",
|
||||
"linux_intro": "Pick the package for your distribution. Commands assume the file is in ~/Downloads; if your browser saves files elsewhere, change the path.",
|
||||
"lx_deb": "Debian, Ubuntu, Linux Mint",
|
||||
"lx_rpm": "Fedora, openSUSE",
|
||||
"lx_rpm_suse": "On openSUSE:",
|
||||
"lx_arch": "Arch Linux, Manjaro, EndeavourOS",
|
||||
"lx_appimage": "AppImage — any distribution",
|
||||
"lx_flatpak": "Flatpak — Stockfish included",
|
||||
"lx_flatpak_note": "If Flatpak asks for a runtime, add Flathub first: flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo",
|
||||
"lx_tar": "Portable archive",
|
||||
"lx_tar_text": "Unpack it anywhere and run chesspenguin. No installation, no menu entry.",
|
||||
"verify": "Verify your download:",
|
||||
"all_releases": "All releases on GitHub",
|
||||
"source_code": "Source code",
|
||||
"how_verify": "How to verify",
|
||||
"how_verify_text": "Download SHA256SUMS.txt into the same folder as the file, then run:",
|
||||
"how_verify_win": "Compare the result with the line for this file in SHA256SUMS.txt.",
|
||||
"engine_title": "Chess engine",
|
||||
"engine_text": "ChessPenguin analyses with Stockfish, the strongest free chess engine. To keep the download small, Stockfish isn't inside the app: the first time you start an analysis, ChessPenguin offers to download the official build (about 80 MB), checks it and starts the analysis. You can also do it any time in Settings → Engines.",
|
||||
"engine_b1": "The Flatpak already includes Stockfish.",
|
||||
"engine_b2": "Prefer to install it yourself? A stockfish installed on your system is found automatically, or point ChessPenguin to the file.",
|
||||
"engine_b3": "Any UCI engine can be added in Settings → Engines.",
|
||||
"engine_link1": "Stockfish downloads",
|
||||
"engine_link2": "Stockfish on GitHub",
|
||||
"oss_title": "Open source",
|
||||
"oss_text": "ChessPenguin is free software under the GNU GPL 3.0 or later, written in Rust. The source code and every release build are on GitHub, built automatically from the published code. Use it, study it, share it, improve it.",
|
||||
"oss_button": "View on GitHub",
|
||||
"oss_small": "Piece sets, boards and sounds come from Lichess under their own free licenses.",
|
||||
"third_party": "Third-party licenses",
|
||||
"support_title": "Support",
|
||||
"support_text": "Found a problem or have an idea? Write to us — every message is read, and suggestions shape what comes next.",
|
||||
"email": "Email",
|
||||
"support_issues": "You can also open an issue on GitHub:",
|
||||
"support_hint": "When reporting a problem, please mention your ChessPenguin version and system, and attach the PGN file if the problem is with a game.",
|
||||
"footer_license": "Free software under GPL-3.0-or-later",
|
||||
"footer_privacy": "No cookies, no trackers. Download counts and country statistics are collected on the server only.",
|
||||
"footer_geo": "IP geolocation by",
|
||||
"nf_title": "Page not found",
|
||||
"nf_text": "The page or file you were looking for isn't here.",
|
||||
"nf_link": "Go to ChessPenguin downloads"
|
||||
}
|
||||
150
website/site/i18n/es.json
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
{
|
||||
"meta_title": "ChessPenguin — base de datos de ajedrez gratuita para Windows, macOS y Linux",
|
||||
"meta_description": "Base de datos de ajedrez gratuita y de código abierto. Abre archivos PGN y bases de ChessBase, lee partidas comentadas y analízalas con Stockfish. Para Windows, macOS y Linux.",
|
||||
"skip": "Ir al contenido",
|
||||
"nav_label": "Secciones",
|
||||
"nav_screenshots": "Capturas",
|
||||
"nav_features": "Funciones",
|
||||
"nav_download": "Descargar",
|
||||
"nav_support": "Soporte",
|
||||
"language": "Idioma",
|
||||
"header_download": "Descargar",
|
||||
"hero_title": "La base de datos de ajedrez gratuita para Windows, macOS y Linux",
|
||||
"hero_subtitle": "Abre archivos PGN y bases de ChessBase, lee partidas comentadas y analízalas con Stockfish. Rápida, nativa y de código abierto.",
|
||||
"btn_windows": "Descargar para Windows",
|
||||
"btn_macos": "Descargar para macOS",
|
||||
"btn_linux": "Descargar para Linux",
|
||||
"btn_choose": "Elegir descarga",
|
||||
"btn_choose_2": "Todas las plataformas y formatos",
|
||||
"btn_version": "Versión {version}",
|
||||
"btn_latest": "Última versión",
|
||||
"apple_silicon": "Apple silicon",
|
||||
"other_platforms": "Otras plataformas y formatos",
|
||||
"whats_new": "Novedades de la {version}",
|
||||
"other_formats": "Otros formatos:",
|
||||
"more": "Más…",
|
||||
"mac_requires": "Requiere un Mac con chip de Apple (M1 o posterior) y macOS 11 o posterior.",
|
||||
"mac_intel_warning": "Este Mac parece tener un procesador Intel. La versión actual solo funciona en chips de Apple.",
|
||||
"chromeos": "para Linux en ChromeOS",
|
||||
"mobile_text": "ChessPenguin es una aplicación para ordenadores con Windows, macOS o Linux. Abre esta página en tu ordenador para descargarla.",
|
||||
"share_link": "Compartir enlace",
|
||||
"copy_link": "Copiar enlace",
|
||||
"link_copied": "Enlace copiado",
|
||||
"see_all": "Todas las descargas",
|
||||
"platforms": "Plataformas",
|
||||
"badge_macos": "macOS · Apple silicon",
|
||||
"free_line": "Gratis y de código abierto. Sin cuenta, sin anuncios, sin rastreo.",
|
||||
"started": "Tu descarga ha comenzado.",
|
||||
"try_again": "¿No empezó? Inténtalo de nuevo",
|
||||
"choose_another": "Elegir otro archivo",
|
||||
"close": "Cerrar",
|
||||
"next_windows": "Descomprime el archivo y ejecuta ChessPenguin.exe.",
|
||||
"next_macos_title": "Primer inicio en macOS",
|
||||
"next_macos15": "macOS 15 y posterior: ver los pasos",
|
||||
"next_linux": "Instálalo con:",
|
||||
"gallery_title": "Míralo en acción",
|
||||
"shot1": "Lee partidas comentadas en un tablero grande y claro.",
|
||||
"shot2": "Análisis en directo: hasta cinco líneas, barra de evaluación y flechas de las mejores jugadas.",
|
||||
"shot3": "Variantes, comentarios y símbolos se leen bien, por profundas que sean.",
|
||||
"shot4": "Analiza toda la partida: gráfico de evaluación, precisión y errores de cada jugador.",
|
||||
"shot5": "Mira dónde cambió la partida, con la mejor jugada para cada error.",
|
||||
"shot6": "Recorre una línea del motor sin tocar la partida y añádela como variante con un clic.",
|
||||
"shot7": "Todas tus bases a mano: archivos PGN, bases de ChessBase y archivos comprimidos.",
|
||||
"shot8": "Millones de partidas abiertas en segundos. Filtra por jugador, torneo, años, Elo, ECO y resultado mientras escribes.",
|
||||
"shot9": "Encuentra cada partida que llega a una posición, con las jugadas siguientes y sus resultados.",
|
||||
"shot10": "A tu gusto: 17 juegos de piezas, 37 tableros, 7 juegos de sonidos, temas oscuro y claro.",
|
||||
"alt1": "Pantalla de partida de ChessPenguin: la partida de la Ópera de Morphy en un tablero grande, con la notación comentada y una variante a la derecha.",
|
||||
"alt2": "Análisis de Stockfish de la Inmortal: tres líneas del motor, barra de evaluación y flechas azules de las mejores jugadas.",
|
||||
"alt3": "Una partida comentada con variantes anidadas, comentarios, símbolos y las flechas del autor en el tablero.",
|
||||
"alt4": "Informe de análisis: precisión, imprecisiones, errores y errores graves de cada jugador, y el gráfico de evaluación bajo el tablero.",
|
||||
"alt5": "Marcas del motor en la notación, cada error con la mejor línea y flechas que muestran la refutación.",
|
||||
"alt6": "Vista previa de una línea del motor: el tablero muestra una jugada de la línea, con botones para añadirla como variante o salir.",
|
||||
"alt7": "La biblioteca: varias bases en una estantería y una tabla de partidas ordenable.",
|
||||
"alt8": "Una base de millones de partidas filtrada por jugador, años y Elo, con las condiciones activas sobre la tabla.",
|
||||
"alt9": "Búsqueda por posición: una Siciliana Najdorf en el tablero, las jugadas siguientes con resultados y las partidas encontradas.",
|
||||
"alt10": "Ajustes de tablero y piezas en el tema claro: una cuadrícula de juegos de piezas y tableros, con el tablero elegido detrás.",
|
||||
"lb_label": "Capturas de pantalla",
|
||||
"lb_full": "Abrir a tamaño completo",
|
||||
"lb_prev": "Captura anterior",
|
||||
"lb_next": "Captura siguiente",
|
||||
"lb_count": "Captura {n} de {total}",
|
||||
"features_title": "Todo lo que necesitas para estudiar ajedrez",
|
||||
"f1_title": "PGN y ChessBase",
|
||||
"f1_text": "Abre archivos PGN, bases de ChessBase (.cbh, .cbv) y archivos .zip o .7z. Las codificaciones antiguas y el PGN poco habitual funcionan sin más, y tus archivos nunca se modifican.",
|
||||
"f2_title": "Partidas comentadas legibles",
|
||||
"f2_text": "La línea principal en una tabla limpia de dos columnas, comentarios y variantes en bloques, símbolos de jugadas y las flechas del autor en el tablero.",
|
||||
"f3_title": "Análisis en directo",
|
||||
"f3_text": "Hasta cinco líneas del motor, una barra de evaluación y flechas de las mejores jugadas. Recorre una línea del motor sin tocar la partida y añádela como variante con un clic.",
|
||||
"f4_title": "Análisis de toda la partida",
|
||||
"f4_text": "Un gráfico de evaluación, precisión, imprecisiones, errores y errores graves de cada jugador y por fase de la partida, con mejores jugadas en la notación.",
|
||||
"f5_title": "Millones de partidas",
|
||||
"f5_text": "Las grandes bases de ChessBase se abren en segundos. Filtra por jugador, torneo, años, Elo, ECO y resultado: la lista se actualiza mientras escribes.",
|
||||
"f6_title": "Búsqueda por posición",
|
||||
"f6_text": "Mueve en el tablero para encontrar cada partida que llega a la posición, en cualquier orden de jugadas, con las jugadas siguientes y sus resultados.",
|
||||
"f7_title": "Introduce tus partidas",
|
||||
"f7_text": "Añade jugadas y variantes, promueve o elimina líneas, deshaz y rehaz, copia PGN o FEN y guarda en un nuevo archivo PGN.",
|
||||
"f8_title": "A tu gusto",
|
||||
"f8_text": "17 juegos de piezas, 37 tableros, 7 juegos de sonidos, temas oscuro y claro, y seis idiomas: inglés, ruso, francés, alemán, español e italiano.",
|
||||
"download_title": "Descargar",
|
||||
"download_meta": "Versión {version} · publicada el {date} ·",
|
||||
"release_notes": "Notas de la versión",
|
||||
"your_system": "tu sistema",
|
||||
"row_download": "Descargar",
|
||||
"copy": "Copiar",
|
||||
"copied": "Copiado",
|
||||
"copy_aria": "Copiar el comando",
|
||||
"win_title": "Windows 10 y 11, 64 bits",
|
||||
"win_step1": "Descomprime el archivo (clic derecho → Extraer todo).",
|
||||
"win_step2": "Ejecuta ChessPenguin.exe desde la carpeta descomprimida.",
|
||||
"win_note": "Si Windows muestra «Windows protegió su PC», haz clic en «Más información» y luego en «Ejecutar de todas formas». ChessPenguin aún no está firmado con un certificado de Microsoft; solo hace falta una vez.",
|
||||
"mac_title": "Mac con chip de Apple (M1 o posterior), macOS 11 o posterior",
|
||||
"mac_step1": "Abre el archivo .dmg y arrastra ChessPenguin a la carpeta Aplicaciones.",
|
||||
"mac_step2": "La primera vez, abre Aplicaciones, haz Control-clic (o clic derecho) en ChessPenguin, elige Abrir y vuelve a hacer clic en Abrir.",
|
||||
"mac15_title": "En macOS 15 Sequoia y posterior",
|
||||
"mac15_step1": "Haz doble clic en ChessPenguin. Cuando macOS diga que no puede verificar la app, haz clic en OK.",
|
||||
"mac15_step2": "Abre Ajustes del Sistema → Privacidad y seguridad y desplázate hasta Seguridad.",
|
||||
"mac15_step3": "Haz clic en «Abrir igualmente» junto a «Se ha bloqueado ChessPenguin» y confirma con tu contraseña.",
|
||||
"mac_why": "Solo hace falta una vez. ChessPenguin aún no está firmado por Apple, lo que requiere una cuenta de desarrollador de pago. La app es de código abierto y se compila en GitHub a partir del código publicado.",
|
||||
"mac_still": "¿Sigue bloqueada?",
|
||||
"mac_still_text": "Ejecuta esto en Terminal y vuelve a abrir ChessPenguin:",
|
||||
"mac_intel": "Los Mac con procesador Intel aún no son compatibles.",
|
||||
"linux_intro": "Elige el paquete de tu distribución. Los comandos suponen que el archivo está en ~/Downloads; si tu navegador guarda en otro sitio, cambia la ruta.",
|
||||
"lx_deb": "Debian, Ubuntu, Linux Mint",
|
||||
"lx_rpm": "Fedora, openSUSE",
|
||||
"lx_rpm_suse": "En openSUSE:",
|
||||
"lx_arch": "Arch Linux, Manjaro, EndeavourOS",
|
||||
"lx_appimage": "AppImage — cualquier distribución",
|
||||
"lx_flatpak": "Flatpak — con Stockfish incluido",
|
||||
"lx_flatpak_note": "Si Flatpak pide un runtime, añade primero Flathub: flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo",
|
||||
"lx_tar": "Archivo portátil",
|
||||
"lx_tar_text": "Descomprímelo donde quieras y ejecuta chesspenguin. Sin instalación ni entrada de menú.",
|
||||
"verify": "Verifica tu descarga:",
|
||||
"all_releases": "Todas las versiones en GitHub",
|
||||
"source_code": "Código fuente",
|
||||
"how_verify": "Cómo verificar",
|
||||
"how_verify_text": "Descarga SHA256SUMS.txt en la misma carpeta que el archivo y ejecuta:",
|
||||
"how_verify_win": "Compara el resultado con la línea de ese archivo en SHA256SUMS.txt.",
|
||||
"engine_title": "Motor de ajedrez",
|
||||
"engine_text": "ChessPenguin analiza con Stockfish, el motor de ajedrez gratuito más fuerte. Para que la descarga sea pequeña, Stockfish no va incluido: la primera vez que analizas, ChessPenguin ofrece descargar la versión oficial (unos 80 MB), la verifica e inicia el análisis. También puedes hacerlo cuando quieras en Ajustes → Motores.",
|
||||
"engine_b1": "El Flatpak ya incluye Stockfish.",
|
||||
"engine_b2": "¿Prefieres instalarlo tú? Un stockfish instalado en tu sistema se detecta automáticamente, o indícale el archivo a ChessPenguin.",
|
||||
"engine_b3": "Cualquier motor UCI se puede añadir en Ajustes → Motores.",
|
||||
"engine_link1": "Descargas de Stockfish",
|
||||
"engine_link2": "Stockfish en GitHub",
|
||||
"oss_title": "Código abierto",
|
||||
"oss_text": "ChessPenguin es software libre bajo la GNU GPL 3.0 o posterior, escrito en Rust. El código fuente y cada versión están en GitHub, compilados automáticamente a partir del código publicado. Úsalo, estúdialo, compártelo, mejóralo.",
|
||||
"oss_button": "Ver en GitHub",
|
||||
"oss_small": "Los juegos de piezas, tableros y sonidos provienen de Lichess, con sus propias licencias libres.",
|
||||
"third_party": "Licencias de terceros",
|
||||
"support_title": "Soporte",
|
||||
"support_text": "¿Has encontrado un problema o tienes una idea? Escríbenos: leemos cada mensaje y las sugerencias deciden lo que viene después.",
|
||||
"email": "Correo",
|
||||
"support_issues": "También puedes abrir una incidencia en GitHub:",
|
||||
"support_hint": "Al informar de un problema, indica tu versión de ChessPenguin y tu sistema, y adjunta el archivo PGN si el problema es con una partida.",
|
||||
"footer_license": "Software libre bajo GPL-3.0-or-later",
|
||||
"footer_privacy": "Sin cookies ni rastreadores. Las descargas y los países se cuentan solo en el servidor.",
|
||||
"footer_geo": "Geolocalización IP por",
|
||||
"nf_title": "Página no encontrada",
|
||||
"nf_text": "La página o el archivo que buscabas no está aquí.",
|
||||
"nf_link": "Ir a las descargas de ChessPenguin"
|
||||
}
|
||||
150
website/site/i18n/fr.json
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
{
|
||||
"meta_title": "ChessPenguin — base de données d'échecs gratuite pour Windows, macOS et Linux",
|
||||
"meta_description": "Base de données d'échecs gratuite et open source. Ouvrez des fichiers PGN et des bases ChessBase, lisez des parties commentées et analysez-les avec Stockfish. Pour Windows, macOS et Linux.",
|
||||
"skip": "Aller au contenu",
|
||||
"nav_label": "Sections",
|
||||
"nav_screenshots": "Captures",
|
||||
"nav_features": "Fonctions",
|
||||
"nav_download": "Télécharger",
|
||||
"nav_support": "Assistance",
|
||||
"language": "Langue",
|
||||
"header_download": "Télécharger",
|
||||
"hero_title": "La base de données d'échecs gratuite pour Windows, macOS et Linux",
|
||||
"hero_subtitle": "Ouvrez des fichiers PGN et des bases ChessBase, lisez des parties commentées et analysez-les avec Stockfish. Rapide, natif et open source.",
|
||||
"btn_windows": "Télécharger pour Windows",
|
||||
"btn_macos": "Télécharger pour macOS",
|
||||
"btn_linux": "Télécharger pour Linux",
|
||||
"btn_choose": "Choisir un téléchargement",
|
||||
"btn_choose_2": "Toutes les plateformes et formats",
|
||||
"btn_version": "Version {version}",
|
||||
"btn_latest": "Dernière version",
|
||||
"apple_silicon": "Apple silicon",
|
||||
"other_platforms": "Autres plateformes et formats",
|
||||
"whats_new": "Nouveautés de la {version}",
|
||||
"other_formats": "Autres formats :",
|
||||
"more": "Plus…",
|
||||
"mac_requires": "Nécessite un Mac avec puce Apple (M1 ou plus récent) et macOS 11 ou plus récent.",
|
||||
"mac_intel_warning": "Ce Mac semble avoir un processeur Intel. La version actuelle ne fonctionne que sur les puces Apple.",
|
||||
"chromeos": "pour Linux sur ChromeOS",
|
||||
"mobile_text": "ChessPenguin est une application pour ordinateur sous Windows, macOS ou Linux. Ouvrez cette page sur votre ordinateur pour la télécharger.",
|
||||
"share_link": "Partager le lien",
|
||||
"copy_link": "Copier le lien",
|
||||
"link_copied": "Lien copié",
|
||||
"see_all": "Tous les téléchargements",
|
||||
"platforms": "Plateformes",
|
||||
"badge_macos": "macOS · Apple silicon",
|
||||
"free_line": "Gratuit et open source. Sans compte, sans publicité, sans pistage.",
|
||||
"started": "Votre téléchargement a commencé.",
|
||||
"try_again": "Il n'a pas démarré ? Réessayer",
|
||||
"choose_another": "Choisir un autre fichier",
|
||||
"close": "Fermer",
|
||||
"next_windows": "Décompressez l'archive et lancez ChessPenguin.exe.",
|
||||
"next_macos_title": "Premier lancement sur macOS",
|
||||
"next_macos15": "macOS 15 et plus récent : voir les étapes",
|
||||
"next_linux": "Installez-le avec :",
|
||||
"gallery_title": "En images",
|
||||
"shot1": "Lisez des parties commentées sur un grand échiquier bien lisible.",
|
||||
"shot2": "Analyse en direct : jusqu'à cinq lignes, barre d'évaluation et flèches des meilleurs coups.",
|
||||
"shot3": "Variantes, commentaires et symboles restent lisibles, quelle que soit leur profondeur.",
|
||||
"shot4": "Analysez toute la partie : courbe d'évaluation, précision et erreurs de chaque joueur.",
|
||||
"shot5": "Voyez où la partie a basculé, avec le meilleur coup pour chaque erreur.",
|
||||
"shot6": "Parcourez une ligne du moteur sans toucher à la partie, puis ajoutez-la en variante d'un clic.",
|
||||
"shot7": "Toutes vos bases à portée de main : fichiers PGN, bases ChessBase et archives.",
|
||||
"shot8": "Des millions de parties ouvertes en quelques secondes. Filtrez par joueur, tournoi, années, classement, ECO et résultat pendant la saisie.",
|
||||
"shot9": "Trouvez chaque partie qui atteint une position, avec les coups joués ensuite et leurs résultats.",
|
||||
"shot10": "À votre goût : 17 jeux de pièces, 37 échiquiers, 7 jeux de sons, thèmes sombre et clair.",
|
||||
"alt1": "Écran de partie de ChessPenguin : la partie de l'Opéra de Morphy sur un grand échiquier, avec la notation commentée et une variante à droite.",
|
||||
"alt2": "Analyse Stockfish de l'Immortelle : trois lignes du moteur, barre d'évaluation et flèches bleues des meilleurs coups.",
|
||||
"alt3": "Une partie commentée avec des variantes imbriquées, des commentaires, des symboles et les flèches de l'auteur sur l'échiquier.",
|
||||
"alt4": "Rapport d'analyse : précision, imprécisions, erreurs et gaffes de chaque joueur, et courbe d'évaluation sous l'échiquier.",
|
||||
"alt5": "Marques du moteur dans la notation, chaque erreur avec la meilleure ligne, et des flèches montrant la réfutation.",
|
||||
"alt6": "Aperçu d'une ligne du moteur : l'échiquier montre un coup de la ligne, avec des boutons pour l'ajouter en variante ou sortir.",
|
||||
"alt7": "La bibliothèque : plusieurs bases sur une étagère et un tableau de parties triable.",
|
||||
"alt8": "Une base de millions de parties filtrée par joueur, années et classement, avec les conditions actives au-dessus du tableau.",
|
||||
"alt9": "Recherche de position : une Sicilienne Najdorf sur l'échiquier, les coups joués ensuite avec leurs résultats et les parties trouvées.",
|
||||
"alt10": "Réglages de l'échiquier et des pièces en thème clair : une grille de jeux de pièces et d'échiquiers, l'échiquier choisi derrière.",
|
||||
"lb_label": "Captures d'écran",
|
||||
"lb_full": "Ouvrir en taille réelle",
|
||||
"lb_prev": "Capture précédente",
|
||||
"lb_next": "Capture suivante",
|
||||
"lb_count": "Capture {n} sur {total}",
|
||||
"features_title": "Tout pour étudier les échecs",
|
||||
"f1_title": "PGN et ChessBase",
|
||||
"f1_text": "Ouvrez des fichiers PGN, des bases ChessBase (.cbh, .cbv) et des archives .zip ou .7z. Les anciens encodages et les PGN inhabituels fonctionnent, et vos fichiers ne sont jamais modifiés.",
|
||||
"f2_title": "Parties commentées lisibles",
|
||||
"f2_text": "La ligne principale dans un tableau clair à deux colonnes, les commentaires et variantes en blocs, les symboles de coups et les flèches de l'auteur sur l'échiquier.",
|
||||
"f3_title": "Analyse en direct",
|
||||
"f3_text": "Jusqu'à cinq lignes du moteur, une barre d'évaluation et des flèches des meilleurs coups. Parcourez une ligne du moteur sans toucher à la partie et ajoutez-la en variante d'un clic.",
|
||||
"f4_title": "Analyse de toute la partie",
|
||||
"f4_text": "Une courbe d'évaluation, la précision, les imprécisions, erreurs et gaffes de chaque joueur et par phase de jeu, avec les meilleurs coups dans la notation.",
|
||||
"f5_title": "Des millions de parties",
|
||||
"f5_text": "Les grandes bases ChessBase s'ouvrent en quelques secondes. Filtrez par joueur, tournoi, années, classement, ECO et résultat : la liste se met à jour pendant la saisie.",
|
||||
"f6_title": "Recherche par position",
|
||||
"f6_text": "Jouez des coups sur l'échiquier pour trouver chaque partie qui atteint la position, dans n'importe quel ordre de coups, avec les coups joués ensuite et leurs résultats.",
|
||||
"f7_title": "Saisissez vos parties",
|
||||
"f7_text": "Ajoutez des coups et des variantes, promouvez ou supprimez des lignes, annulez et rétablissez, copiez le PGN ou le FEN et enregistrez dans un nouveau fichier PGN.",
|
||||
"f8_title": "À votre goût",
|
||||
"f8_text": "17 jeux de pièces, 37 échiquiers, 7 jeux de sons, thèmes sombre et clair, et six langues : anglais, russe, français, allemand, espagnol et italien.",
|
||||
"download_title": "Télécharger",
|
||||
"download_meta": "Version {version} · publiée le {date} ·",
|
||||
"release_notes": "Notes de version",
|
||||
"your_system": "votre système",
|
||||
"row_download": "Télécharger",
|
||||
"copy": "Copier",
|
||||
"copied": "Copié",
|
||||
"copy_aria": "Copier la commande",
|
||||
"win_title": "Windows 10 et 11, 64 bits",
|
||||
"win_step1": "Décompressez l'archive (clic droit → Extraire tout).",
|
||||
"win_step2": "Lancez ChessPenguin.exe depuis le dossier extrait.",
|
||||
"win_note": "Si Windows affiche « Windows a protégé votre ordinateur », cliquez sur « Informations complémentaires », puis « Exécuter quand même ». ChessPenguin n'est pas encore signé par un certificat Microsoft ; cela n'est nécessaire qu'une fois.",
|
||||
"mac_title": "Mac avec puce Apple (M1 ou plus récent), macOS 11 ou plus récent",
|
||||
"mac_step1": "Ouvrez le fichier .dmg et faites glisser ChessPenguin dans le dossier Applications.",
|
||||
"mac_step2": "La première fois, ouvrez Applications, faites un Contrôle-clic (ou clic droit) sur ChessPenguin, choisissez Ouvrir, puis cliquez encore sur Ouvrir.",
|
||||
"mac15_title": "Sur macOS 15 Sequoia et plus récent",
|
||||
"mac15_step1": "Double-cliquez sur ChessPenguin. Quand macOS indique qu'il ne peut pas vérifier l'app, cliquez sur Terminé.",
|
||||
"mac15_step2": "Ouvrez Réglages Système → Confidentialité et sécurité et faites défiler jusqu'à Sécurité.",
|
||||
"mac15_step3": "Cliquez sur « Ouvrir quand même » à côté de « ChessPenguin a été bloqué », puis confirmez avec votre mot de passe.",
|
||||
"mac_why": "Cela n'est nécessaire qu'une fois. ChessPenguin n'est pas encore signé par Apple, ce qui demande un compte développeur payant. L'app est open source et compilée sur GitHub à partir du code publié.",
|
||||
"mac_still": "Toujours bloqué ?",
|
||||
"mac_still_text": "Exécutez ceci dans le Terminal, puis rouvrez ChessPenguin :",
|
||||
"mac_intel": "Les Mac à processeur Intel ne sont pas encore pris en charge.",
|
||||
"linux_intro": "Choisissez le paquet de votre distribution. Les commandes supposent que le fichier est dans ~/Downloads ; si votre navigateur enregistre ailleurs, adaptez le chemin.",
|
||||
"lx_deb": "Debian, Ubuntu, Linux Mint",
|
||||
"lx_rpm": "Fedora, openSUSE",
|
||||
"lx_rpm_suse": "Sur openSUSE :",
|
||||
"lx_arch": "Arch Linux, Manjaro, EndeavourOS",
|
||||
"lx_appimage": "AppImage — toute distribution",
|
||||
"lx_flatpak": "Flatpak — Stockfish inclus",
|
||||
"lx_flatpak_note": "Si Flatpak demande un runtime, ajoutez d'abord Flathub : flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo",
|
||||
"lx_tar": "Archive portable",
|
||||
"lx_tar_text": "Décompressez-la n'importe où et lancez chesspenguin. Sans installation ni entrée de menu.",
|
||||
"verify": "Vérifiez votre téléchargement :",
|
||||
"all_releases": "Toutes les versions sur GitHub",
|
||||
"source_code": "Code source",
|
||||
"how_verify": "Comment vérifier",
|
||||
"how_verify_text": "Téléchargez SHA256SUMS.txt dans le même dossier que le fichier et exécutez :",
|
||||
"how_verify_win": "Comparez le résultat avec la ligne de ce fichier dans SHA256SUMS.txt.",
|
||||
"engine_title": "Moteur d'échecs",
|
||||
"engine_text": "ChessPenguin analyse avec Stockfish, le meilleur moteur d'échecs gratuit. Pour garder le téléchargement léger, Stockfish n'est pas inclus : à la première analyse, ChessPenguin propose de télécharger la version officielle (environ 80 Mo), la vérifie et lance l'analyse. Vous pouvez aussi le faire à tout moment dans Réglages → Moteurs.",
|
||||
"engine_b1": "Le Flatpak inclut déjà Stockfish.",
|
||||
"engine_b2": "Vous préférez l'installer vous-même ? Un stockfish installé sur votre système est détecté automatiquement, ou indiquez le fichier à ChessPenguin.",
|
||||
"engine_b3": "Tout moteur UCI peut être ajouté dans Réglages → Moteurs.",
|
||||
"engine_link1": "Téléchargements Stockfish",
|
||||
"engine_link2": "Stockfish sur GitHub",
|
||||
"oss_title": "Open source",
|
||||
"oss_text": "ChessPenguin est un logiciel libre sous licence GNU GPL 3.0 ou ultérieure, écrit en Rust. Le code source et chaque version sont sur GitHub, compilés automatiquement à partir du code publié. Utilisez-le, étudiez-le, partagez-le, améliorez-le.",
|
||||
"oss_button": "Voir sur GitHub",
|
||||
"oss_small": "Les jeux de pièces, échiquiers et sons viennent de Lichess, sous leurs propres licences libres.",
|
||||
"third_party": "Licences tierces",
|
||||
"support_title": "Assistance",
|
||||
"support_text": "Un problème ou une idée ? Écrivez-nous : chaque message est lu, et les suggestions orientent la suite.",
|
||||
"email": "E-mail",
|
||||
"support_issues": "Vous pouvez aussi ouvrir un ticket sur GitHub :",
|
||||
"support_hint": "Pour signaler un problème, indiquez votre version de ChessPenguin et votre système, et joignez le fichier PGN si le problème concerne une partie.",
|
||||
"footer_license": "Logiciel libre sous GPL-3.0-or-later",
|
||||
"footer_privacy": "Sans cookies ni traceurs. Les nombres de téléchargements et les pays sont comptés uniquement sur le serveur.",
|
||||
"footer_geo": "Géolocalisation IP par",
|
||||
"nf_title": "Page introuvable",
|
||||
"nf_text": "La page ou le fichier que vous cherchiez n'est pas ici.",
|
||||
"nf_link": "Aller aux téléchargements de ChessPenguin"
|
||||
}
|
||||
150
website/site/i18n/it.json
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
{
|
||||
"meta_title": "ChessPenguin — database di scacchi gratuito per Windows, macOS e Linux",
|
||||
"meta_description": "Database di scacchi gratuito e open source. Apri file PGN e database ChessBase, leggi partite commentate e analizzale con Stockfish. Per Windows, macOS e Linux.",
|
||||
"skip": "Vai al contenuto",
|
||||
"nav_label": "Sezioni",
|
||||
"nav_screenshots": "Screenshot",
|
||||
"nav_features": "Funzioni",
|
||||
"nav_download": "Scarica",
|
||||
"nav_support": "Supporto",
|
||||
"language": "Lingua",
|
||||
"header_download": "Scarica",
|
||||
"hero_title": "Il database di scacchi gratuito per Windows, macOS e Linux",
|
||||
"hero_subtitle": "Apri file PGN e database ChessBase, leggi partite commentate e analizzale con Stockfish. Veloce, nativo e open source.",
|
||||
"btn_windows": "Scarica per Windows",
|
||||
"btn_macos": "Scarica per macOS",
|
||||
"btn_linux": "Scarica per Linux",
|
||||
"btn_choose": "Scegli il download",
|
||||
"btn_choose_2": "Tutte le piattaforme e i formati",
|
||||
"btn_version": "Versione {version}",
|
||||
"btn_latest": "Ultima versione",
|
||||
"apple_silicon": "Apple silicon",
|
||||
"other_platforms": "Altre piattaforme e formati",
|
||||
"whats_new": "Novità della {version}",
|
||||
"other_formats": "Altri formati:",
|
||||
"more": "Altro…",
|
||||
"mac_requires": "Richiede un Mac con chip Apple (M1 o successivo) e macOS 11 o successivo.",
|
||||
"mac_intel_warning": "Questo Mac sembra avere un processore Intel. La versione attuale funziona solo sui chip Apple.",
|
||||
"chromeos": "per Linux su ChromeOS",
|
||||
"mobile_text": "ChessPenguin è un'app per computer con Windows, macOS o Linux. Apri questa pagina sul computer per scaricarla.",
|
||||
"share_link": "Condividi il link",
|
||||
"copy_link": "Copia il link",
|
||||
"link_copied": "Link copiato",
|
||||
"see_all": "Tutti i download",
|
||||
"platforms": "Piattaforme",
|
||||
"badge_macos": "macOS · Apple silicon",
|
||||
"free_line": "Gratuito e open source. Niente account, niente pubblicità, niente tracciamento.",
|
||||
"started": "Il download è iniziato.",
|
||||
"try_again": "Non è partito? Riprova",
|
||||
"choose_another": "Scegli un altro file",
|
||||
"close": "Chiudi",
|
||||
"next_windows": "Estrai l'archivio ed esegui ChessPenguin.exe.",
|
||||
"next_macos_title": "Primo avvio su macOS",
|
||||
"next_macos15": "macOS 15 e successivi: vedi i passaggi",
|
||||
"next_linux": "Installalo con:",
|
||||
"gallery_title": "Guardalo in azione",
|
||||
"shot1": "Leggi partite commentate su una scacchiera grande e nitida.",
|
||||
"shot2": "Analisi in tempo reale: fino a cinque linee, barra di valutazione e frecce delle mosse migliori.",
|
||||
"shot3": "Varianti, commenti e simboli restano leggibili, a qualsiasi profondità.",
|
||||
"shot4": "Analizza l'intera partita: grafico di valutazione, precisione ed errori di ogni giocatore.",
|
||||
"shot5": "Guarda dove è girata la partita, con la mossa migliore per ogni errore.",
|
||||
"shot6": "Scorri una linea del motore senza toccare la partita, poi aggiungila come variante con un clic.",
|
||||
"shot7": "Tutti i tuoi database a portata di mano: file PGN, database ChessBase e archivi.",
|
||||
"shot8": "Milioni di partite aperte in pochi secondi. Filtra per giocatore, torneo, anni, Elo, ECO e risultato mentre scrivi.",
|
||||
"shot9": "Trova ogni partita che raggiunge una posizione, con le mosse giocate dopo e i loro risultati.",
|
||||
"shot10": "Come piace a te: 17 set di pezzi, 37 scacchiere, 7 set di suoni, tema scuro e chiaro.",
|
||||
"alt1": "Schermata di partita di ChessPenguin: la partita dell'Opera di Morphy su una grande scacchiera, con la notazione commentata e una variante a destra.",
|
||||
"alt2": "Analisi Stockfish dell'Immortale: tre linee del motore, barra di valutazione e frecce blu delle mosse migliori.",
|
||||
"alt3": "Una partita commentata con varianti annidate, commenti, simboli e le frecce dell'autore sulla scacchiera.",
|
||||
"alt4": "Rapporto di analisi: precisione, imprecisioni, errori e svarioni di ogni giocatore, e il grafico di valutazione sotto la scacchiera.",
|
||||
"alt5": "Segni del motore nella notazione, ogni errore con la linea migliore e frecce che mostrano la confutazione.",
|
||||
"alt6": "Anteprima di una linea del motore: la scacchiera mostra una mossa della linea, con pulsanti per aggiungerla come variante o uscire.",
|
||||
"alt7": "La libreria: diversi database su uno scaffale e una tabella di partite ordinabile.",
|
||||
"alt8": "Un database di milioni di partite filtrato per giocatore, anni ed Elo, con le condizioni attive sopra la tabella.",
|
||||
"alt9": "Ricerca per posizione: una Siciliana Najdorf sulla scacchiera, le mosse giocate dopo con i risultati e le partite trovate.",
|
||||
"alt10": "Impostazioni di scacchiera e pezzi nel tema chiaro: una griglia di set di pezzi e scacchiere, con la scacchiera scelta dietro.",
|
||||
"lb_label": "Screenshot",
|
||||
"lb_full": "Apri a dimensione intera",
|
||||
"lb_prev": "Screenshot precedente",
|
||||
"lb_next": "Screenshot successivo",
|
||||
"lb_count": "Screenshot {n} di {total}",
|
||||
"features_title": "Tutto ciò che serve per studiare gli scacchi",
|
||||
"f1_title": "PGN e ChessBase",
|
||||
"f1_text": "Apri file PGN, database ChessBase (.cbh, .cbv) e archivi .zip o .7z. Le vecchie codifiche e i PGN insoliti funzionano senza problemi, e i tuoi file non vengono mai modificati.",
|
||||
"f2_title": "Partite commentate leggibili",
|
||||
"f2_text": "La linea principale in una tabella pulita a due colonne, commenti e varianti in blocchi, simboli delle mosse e le frecce dell'autore sulla scacchiera.",
|
||||
"f3_title": "Analisi in tempo reale",
|
||||
"f3_text": "Fino a cinque linee del motore, una barra di valutazione e frecce delle mosse migliori. Scorri una linea del motore senza toccare la partita e aggiungila come variante con un clic.",
|
||||
"f4_title": "Analisi dell'intera partita",
|
||||
"f4_text": "Un grafico di valutazione, precisione, imprecisioni, errori e svarioni per ogni giocatore e fase di gioco, con le mosse migliori nella notazione.",
|
||||
"f5_title": "Milioni di partite",
|
||||
"f5_text": "I grandi database ChessBase si aprono in pochi secondi. Filtra per giocatore, torneo, anni, Elo, ECO e risultato: l'elenco si aggiorna mentre scrivi.",
|
||||
"f6_title": "Ricerca per posizione",
|
||||
"f6_text": "Muovi sulla scacchiera per trovare ogni partita che raggiunge la posizione, in qualsiasi ordine di mosse, con le mosse giocate dopo e i loro risultati.",
|
||||
"f7_title": "Inserisci le tue partite",
|
||||
"f7_text": "Aggiungi mosse e varianti, promuovi o elimina linee, annulla e ripeti, copia PGN o FEN e salva in un nuovo file PGN.",
|
||||
"f8_title": "Come piace a te",
|
||||
"f8_text": "17 set di pezzi, 37 scacchiere, 7 set di suoni, tema scuro e chiaro e sei lingue: inglese, russo, francese, tedesco, spagnolo e italiano.",
|
||||
"download_title": "Scarica",
|
||||
"download_meta": "Versione {version} · rilasciata il {date} ·",
|
||||
"release_notes": "Note di rilascio",
|
||||
"your_system": "il tuo sistema",
|
||||
"row_download": "Scarica",
|
||||
"copy": "Copia",
|
||||
"copied": "Copiato",
|
||||
"copy_aria": "Copia il comando",
|
||||
"win_title": "Windows 10 e 11, 64 bit",
|
||||
"win_step1": "Estrai l'archivio (clic destro → Estrai tutto).",
|
||||
"win_step2": "Esegui ChessPenguin.exe dalla cartella estratta.",
|
||||
"win_note": "Se Windows mostra «PC protetto da Windows», fai clic su «Ulteriori informazioni» e poi su «Esegui comunque». ChessPenguin non è ancora firmato con un certificato Microsoft; serve solo la prima volta.",
|
||||
"mac_title": "Mac con chip Apple (M1 o successivo), macOS 11 o successivo",
|
||||
"mac_step1": "Apri il file .dmg e trascina ChessPenguin nella cartella Applicazioni.",
|
||||
"mac_step2": "La prima volta apri Applicazioni, fai Ctrl-clic (o clic destro) su ChessPenguin, scegli Apri e poi di nuovo Apri.",
|
||||
"mac15_title": "Su macOS 15 Sequoia e successivi",
|
||||
"mac15_step1": "Fai doppio clic su ChessPenguin. Quando macOS dice che non può verificare l'app, fai clic su Fine.",
|
||||
"mac15_step2": "Apri Impostazioni di Sistema → Privacy e sicurezza e scorri fino a Sicurezza.",
|
||||
"mac15_step3": "Fai clic su «Apri comunque» accanto a «ChessPenguin è stato bloccato» e conferma con la password.",
|
||||
"mac_why": "Serve solo la prima volta. ChessPenguin non è ancora firmato da Apple, che richiede un account sviluppatore a pagamento. L'app è open source e viene compilata su GitHub dal codice pubblicato.",
|
||||
"mac_still": "Ancora bloccato?",
|
||||
"mac_still_text": "Esegui questo nel Terminale, poi riapri ChessPenguin:",
|
||||
"mac_intel": "I Mac con processore Intel non sono ancora supportati.",
|
||||
"linux_intro": "Scegli il pacchetto per la tua distribuzione. I comandi presuppongono che il file sia in ~/Downloads; se il browser salva altrove, cambia il percorso.",
|
||||
"lx_deb": "Debian, Ubuntu, Linux Mint",
|
||||
"lx_rpm": "Fedora, openSUSE",
|
||||
"lx_rpm_suse": "Su openSUSE:",
|
||||
"lx_arch": "Arch Linux, Manjaro, EndeavourOS",
|
||||
"lx_appimage": "AppImage — qualsiasi distribuzione",
|
||||
"lx_flatpak": "Flatpak — Stockfish incluso",
|
||||
"lx_flatpak_note": "Se Flatpak chiede un runtime, aggiungi prima Flathub: flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo",
|
||||
"lx_tar": "Archivio portatile",
|
||||
"lx_tar_text": "Estrailo dove vuoi ed esegui chesspenguin. Senza installazione né voce di menu.",
|
||||
"verify": "Verifica il download:",
|
||||
"all_releases": "Tutte le versioni su GitHub",
|
||||
"source_code": "Codice sorgente",
|
||||
"how_verify": "Come verificare",
|
||||
"how_verify_text": "Scarica SHA256SUMS.txt nella stessa cartella del file ed esegui:",
|
||||
"how_verify_win": "Confronta il risultato con la riga di quel file in SHA256SUMS.txt.",
|
||||
"engine_title": "Motore scacchistico",
|
||||
"engine_text": "ChessPenguin analizza con Stockfish, il motore scacchistico gratuito più forte. Per mantenere leggero il download, Stockfish non è incluso: alla prima analisi ChessPenguin propone di scaricare la versione ufficiale (circa 80 MB), la verifica e avvia l'analisi. Puoi farlo anche in qualsiasi momento da Impostazioni → Motori.",
|
||||
"engine_b1": "Il Flatpak include già Stockfish.",
|
||||
"engine_b2": "Preferisci installarlo da te? Uno stockfish installato nel sistema viene trovato automaticamente, oppure indica il file a ChessPenguin.",
|
||||
"engine_b3": "Qualsiasi motore UCI si può aggiungere da Impostazioni → Motori.",
|
||||
"engine_link1": "Download di Stockfish",
|
||||
"engine_link2": "Stockfish su GitHub",
|
||||
"oss_title": "Open source",
|
||||
"oss_text": "ChessPenguin è software libero sotto la GNU GPL 3.0 o successiva, scritto in Rust. Il codice sorgente e ogni versione sono su GitHub, compilati automaticamente dal codice pubblicato. Usalo, studialo, condividilo, miglioralo.",
|
||||
"oss_button": "Vedi su GitHub",
|
||||
"oss_small": "Set di pezzi, scacchiere e suoni provengono da Lichess, con le loro licenze libere.",
|
||||
"third_party": "Licenze di terze parti",
|
||||
"support_title": "Supporto",
|
||||
"support_text": "Hai trovato un problema o hai un'idea? Scrivici: ogni messaggio viene letto e i suggerimenti decidono cosa arriverà dopo.",
|
||||
"email": "Email",
|
||||
"support_issues": "Puoi anche aprire una segnalazione su GitHub:",
|
||||
"support_hint": "Quando segnali un problema, indica la versione di ChessPenguin e il sistema, e allega il file PGN se il problema riguarda una partita.",
|
||||
"footer_license": "Software libero sotto GPL-3.0-or-later",
|
||||
"footer_privacy": "Niente cookie né tracker. Download e paesi sono contati solo sul server.",
|
||||
"footer_geo": "Geolocalizzazione IP di",
|
||||
"nf_title": "Pagina non trovata",
|
||||
"nf_text": "La pagina o il file che cercavi non è qui.",
|
||||
"nf_link": "Vai ai download di ChessPenguin"
|
||||
}
|
||||
150
website/site/i18n/ru.json
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
{
|
||||
"meta_title": "ChessPenguin — бесплатная шахматная база для Windows, macOS и Linux",
|
||||
"meta_description": "Бесплатная шахматная база с открытым кодом. Открывайте PGN и базы ChessBase, читайте аннотированные партии и анализируйте их со Stockfish. Для Windows, macOS и Linux.",
|
||||
"skip": "К содержимому",
|
||||
"nav_label": "Разделы",
|
||||
"nav_screenshots": "Скриншоты",
|
||||
"nav_features": "Возможности",
|
||||
"nav_download": "Скачать",
|
||||
"nav_support": "Поддержка",
|
||||
"language": "Язык",
|
||||
"header_download": "Скачать",
|
||||
"hero_title": "Бесплатная шахматная база для Windows, macOS и Linux",
|
||||
"hero_subtitle": "Открывайте PGN и базы ChessBase, читайте аннотированные партии и анализируйте их со Stockfish. Быстро, нативно и с открытым кодом.",
|
||||
"btn_windows": "Скачать для Windows",
|
||||
"btn_macos": "Скачать для macOS",
|
||||
"btn_linux": "Скачать для Linux",
|
||||
"btn_choose": "Выбрать загрузку",
|
||||
"btn_choose_2": "Все платформы и форматы",
|
||||
"btn_version": "Версия {version}",
|
||||
"btn_latest": "Последняя версия",
|
||||
"apple_silicon": "Apple silicon",
|
||||
"other_platforms": "Другие платформы и форматы",
|
||||
"whats_new": "Что нового в {version}",
|
||||
"other_formats": "Другие форматы:",
|
||||
"more": "Ещё…",
|
||||
"mac_requires": "Нужен Mac с процессором Apple (M1 или новее) и macOS 11 или новее.",
|
||||
"mac_intel_warning": "Похоже, в этом Mac процессор Intel. Текущая сборка работает только на процессорах Apple.",
|
||||
"chromeos": "для Linux в ChromeOS",
|
||||
"mobile_text": "ChessPenguin — программа для компьютера с Windows, macOS или Linux. Откройте эту страницу на компьютере, чтобы скачать её.",
|
||||
"share_link": "Поделиться ссылкой",
|
||||
"copy_link": "Скопировать ссылку",
|
||||
"link_copied": "Ссылка скопирована",
|
||||
"see_all": "Все загрузки",
|
||||
"platforms": "Платформы",
|
||||
"badge_macos": "macOS · Apple silicon",
|
||||
"free_line": "Бесплатно и с открытым кодом. Без регистрации, рекламы и слежки.",
|
||||
"started": "Загрузка началась.",
|
||||
"try_again": "Не началась? Попробуйте ещё раз",
|
||||
"choose_another": "Выбрать другой файл",
|
||||
"close": "Закрыть",
|
||||
"next_windows": "Распакуйте архив и запустите ChessPenguin.exe.",
|
||||
"next_macos_title": "Первый запуск на macOS",
|
||||
"next_macos15": "macOS 15 и новее: смотрите шаги",
|
||||
"next_linux": "Установите командой:",
|
||||
"gallery_title": "Посмотрите в деле",
|
||||
"shot1": "Читайте аннотированные партии на большой, чёткой доске.",
|
||||
"shot2": "Анализ движком в реальном времени: до пяти линий, шкала оценки и стрелки лучших ходов.",
|
||||
"shot3": "Варианты, комментарии и знаки читаются легко на любой глубине.",
|
||||
"shot4": "Анализ всей партии: график оценки, точность и ошибки каждого игрока.",
|
||||
"shot5": "Видно, где решилась партия, и лучший ход для каждой ошибки.",
|
||||
"shot6": "Пройдите линию движка, не трогая партию, и добавьте её вариантом одним щелчком.",
|
||||
"shot7": "Все ваши базы под рукой: файлы PGN, базы ChessBase и архивы.",
|
||||
"shot8": "Миллионы партий открываются за секунды. Фильтр по игроку, турниру, годам, рейтингу, ECO и результату прямо во время ввода.",
|
||||
"shot9": "Найдите все партии с позицией — с ходами, которые в ней играли, и их результатами.",
|
||||
"shot10": "Под себя: 17 наборов фигур, 37 досок, 7 наборов звуков, тёмная и светлая темы.",
|
||||
"alt1": "Экран партии ChessPenguin: «Оперная партия» Морфи на большой доске, справа нотация с комментариями и вариантом.",
|
||||
"alt2": "Анализ «Бессмертной партии» Stockfish: три линии движка, шкала оценки и синие стрелки лучших ходов.",
|
||||
"alt3": "Аннотированная партия с вложенными вариантами, комментариями и знаками, на доске — стрелки автора.",
|
||||
"alt4": "Отчёт анализа партии: точность, неточности, ошибки и зевки каждого игрока и график оценки под доской.",
|
||||
"alt5": "Отметки движка в нотации, у каждой ошибки — лучшая линия, стрелки показывают опровержение.",
|
||||
"alt6": "Просмотр линии движка: на доске ход внутри линии, кнопки «добавить вариантом» и «выйти».",
|
||||
"alt7": "Библиотека: несколько баз на полке и сортируемая таблица партий.",
|
||||
"alt8": "База из миллионов партий с фильтром по игроку, годам и рейтингу, над таблицей — заданные условия.",
|
||||
"alt9": "Поиск по позиции: на доске Сицилианская защита, вариант Найдорфа, продолжения с результатами и найденные партии.",
|
||||
"alt10": "Настройки досок и фигур в светлой теме: сетка наборов фигур и досок, за окном — выбранная доска.",
|
||||
"lb_label": "Скриншоты",
|
||||
"lb_full": "Открыть в полном размере",
|
||||
"lb_prev": "Предыдущий скриншот",
|
||||
"lb_next": "Следующий скриншот",
|
||||
"lb_count": "Скриншот {n} из {total}",
|
||||
"features_title": "Всё, что нужно для изучения шахмат",
|
||||
"f1_title": "PGN и ChessBase",
|
||||
"f1_text": "Файлы PGN, базы ChessBase (.cbh, .cbv) и архивы .zip и .7z. Старые кодировки и необычный PGN просто работают, а ваши файлы никогда не изменяются.",
|
||||
"f2_title": "Аннотированные партии",
|
||||
"f2_text": "Основная линия — аккуратной таблицей в две колонки, комментарии и варианты — блоками, знаки ходов и стрелки автора на доске.",
|
||||
"f3_title": "Анализ движком",
|
||||
"f3_text": "До пяти линий движка, шкала оценки и стрелки лучших ходов. Пройдите линию движка, не меняя партию, и добавьте её вариантом одним щелчком.",
|
||||
"f4_title": "Анализ всей партии",
|
||||
"f4_text": "График оценки, точность, неточности, ошибки и зевки каждого игрока и по стадиям партии, лучшие ходы прямо в нотации.",
|
||||
"f5_title": "Миллионы партий",
|
||||
"f5_text": "Большие базы ChessBase открываются за секунды. Фильтр по игроку, турниру, годам, рейтингу, ECO и результату — список обновляется во время ввода.",
|
||||
"f6_title": "Поиск по позиции",
|
||||
"f6_text": "Делайте ходы на доске и находите все партии, пришедшие к позиции любым порядком ходов, с продолжениями и их результатами.",
|
||||
"f7_title": "Ввод своих партий",
|
||||
"f7_text": "Добавляйте ходы и варианты, повышайте и удаляйте линии, отменяйте и повторяйте, копируйте PGN и FEN, сохраняйте в новый файл PGN.",
|
||||
"f8_title": "Под себя",
|
||||
"f8_text": "17 наборов фигур, 37 досок, 7 наборов звуков, тёмная и светлая темы и шесть языков: английский, русский, французский, немецкий, испанский и итальянский.",
|
||||
"download_title": "Скачать",
|
||||
"download_meta": "Версия {version} · выпущена {date} ·",
|
||||
"release_notes": "Список изменений",
|
||||
"your_system": "ваша система",
|
||||
"row_download": "Скачать",
|
||||
"copy": "Копировать",
|
||||
"copied": "Скопировано",
|
||||
"copy_aria": "Скопировать команду",
|
||||
"win_title": "Windows 10 и 11, 64 бита",
|
||||
"win_step1": "Распакуйте архив (правый щелчок → «Извлечь всё»).",
|
||||
"win_step2": "Запустите ChessPenguin.exe из распакованной папки.",
|
||||
"win_note": "Если Windows покажет «Система Windows защитила ваш компьютер», нажмите «Подробнее», затем «Выполнить в любом случае». ChessPenguin пока не подписан сертификатом Microsoft; это нужно сделать один раз.",
|
||||
"mac_title": "Mac с процессором Apple (M1 или новее), macOS 11 или новее",
|
||||
"mac_step1": "Откройте файл .dmg и перетащите ChessPenguin в папку «Программы».",
|
||||
"mac_step2": "В первый раз откройте «Программы», щёлкните ChessPenguin с нажатой Control (или правой кнопкой), выберите «Открыть» и ещё раз «Открыть».",
|
||||
"mac15_title": "На macOS 15 Sequoia и новее",
|
||||
"mac15_step1": "Дважды щёлкните ChessPenguin. Когда macOS сообщит, что не может проверить программу, нажмите «Готово».",
|
||||
"mac15_step2": "Откройте «Системные настройки» → «Конфиденциальность и безопасность» и прокрутите до раздела «Безопасность».",
|
||||
"mac15_step3": "Нажмите «Всё равно открыть» рядом с «ChessPenguin заблокирован» и подтвердите паролем.",
|
||||
"mac_why": "Это нужно сделать один раз. ChessPenguin пока не подписан Apple: для этого нужен платный аккаунт разработчика. Программа с открытым кодом и собирается на GitHub из опубликованных исходников.",
|
||||
"mac_still": "Всё равно не открывается?",
|
||||
"mac_still_text": "Выполните в «Терминале» и снова откройте ChessPenguin:",
|
||||
"mac_intel": "Mac с процессорами Intel пока не поддерживаются.",
|
||||
"linux_intro": "Выберите пакет для своего дистрибутива. Команды рассчитаны на файл в ~/Downloads; если браузер сохраняет файлы в другую папку, поправьте путь.",
|
||||
"lx_deb": "Debian, Ubuntu, Linux Mint",
|
||||
"lx_rpm": "Fedora, openSUSE",
|
||||
"lx_rpm_suse": "В openSUSE:",
|
||||
"lx_arch": "Arch Linux, Manjaro, EndeavourOS",
|
||||
"lx_appimage": "AppImage — любой дистрибутив",
|
||||
"lx_flatpak": "Flatpak — Stockfish уже внутри",
|
||||
"lx_flatpak_note": "Если Flatpak попросит среду выполнения, сначала добавьте Flathub: flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo",
|
||||
"lx_tar": "Переносной архив",
|
||||
"lx_tar_text": "Распакуйте куда угодно и запустите chesspenguin. Без установки и пункта в меню.",
|
||||
"verify": "Проверьте загрузку:",
|
||||
"all_releases": "Все выпуски на GitHub",
|
||||
"source_code": "Исходный код",
|
||||
"how_verify": "Как проверить",
|
||||
"how_verify_text": "Скачайте SHA256SUMS.txt в ту же папку, что и файл, и выполните:",
|
||||
"how_verify_win": "Сравните результат со строкой этого файла в SHA256SUMS.txt.",
|
||||
"engine_title": "Шахматный движок",
|
||||
"engine_text": "ChessPenguin анализирует со Stockfish — самым сильным бесплатным шахматным движком. Чтобы загрузка была маленькой, Stockfish не входит в программу: при первом анализе ChessPenguin предложит скачать официальную сборку (около 80 МБ), проверит её и запустит анализ. Это можно сделать и в любой момент в «Настройки → Движки».",
|
||||
"engine_b1": "Во Flatpak Stockfish уже есть.",
|
||||
"engine_b2": "Хотите поставить сами? Установленный в системе stockfish находится автоматически, или укажите ChessPenguin файл.",
|
||||
"engine_b3": "Любой UCI-движок добавляется в «Настройки → Движки».",
|
||||
"engine_link1": "Загрузки Stockfish",
|
||||
"engine_link2": "Stockfish на GitHub",
|
||||
"oss_title": "Открытый код",
|
||||
"oss_text": "ChessPenguin — свободная программа под лицензией GNU GPL 3.0 или новее, написанная на Rust. Исходный код и каждая сборка выпуска лежат на GitHub и собираются автоматически из опубликованного кода. Пользуйтесь, изучайте, делитесь, улучшайте.",
|
||||
"oss_button": "Открыть на GitHub",
|
||||
"oss_small": "Наборы фигур, доски и звуки взяты из Lichess под их собственными свободными лицензиями.",
|
||||
"third_party": "Сторонние лицензии",
|
||||
"support_title": "Поддержка",
|
||||
"support_text": "Нашли проблему или есть идея? Напишите — каждое сообщение читается, а предложения определяют, что появится дальше.",
|
||||
"email": "Почта",
|
||||
"support_issues": "Можно также открыть задачу на GitHub:",
|
||||
"support_hint": "Сообщая о проблеме, укажите версию ChessPenguin и систему, а если проблема с партией — приложите файл PGN.",
|
||||
"footer_license": "Свободная программа под GPL-3.0-or-later",
|
||||
"footer_privacy": "Без cookie и трекеров. Число загрузок и страны считаются только на сервере.",
|
||||
"footer_geo": "Геолокация по IP —",
|
||||
"nf_title": "Страница не найдена",
|
||||
"nf_text": "Страницы или файла, который вы искали, здесь нет.",
|
||||
"nf_link": "К загрузкам ChessPenguin"
|
||||
}
|
||||
255
website/site/index.html
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
<!doctype html>
|
||||
<html lang="{{lang}}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>{{t:meta_title}}</title>
|
||||
<meta name="description" content="{{t:meta_description}}">
|
||||
<link rel="canonical" href="{{page_url}}">
|
||||
{{alternates}}
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="ChessPenguin">
|
||||
<meta property="og:title" content="{{t:meta_title}}">
|
||||
<meta property="og:description" content="{{t:meta_description}}">
|
||||
<meta property="og:url" content="{{page_url}}">
|
||||
<meta property="og:image" content="{{site}}/og-image.png">
|
||||
<meta property="og:image:alt" content="{{t:alt1}}">
|
||||
<meta property="og:locale" content="{{locale}}">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#161718">
|
||||
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/icon-32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/img/icon-16.png">
|
||||
<link rel="apple-touch-icon" href="/img/icon-180.png">
|
||||
<link rel="stylesheet" href="/css/site.css?v={{asset_version}}">
|
||||
{{root_redirect}}
|
||||
<script type="application/ld+json">{{json_ld}}</script>
|
||||
</head>
|
||||
<body>
|
||||
<a class="skip" href="#main">{{t:skip}}</a>
|
||||
|
||||
<header class="top">
|
||||
<div class="wrap top-in">
|
||||
<a class="brand" href="{{home}}"><img src="/img/icon-64.png" width="28" height="28" alt=""><span>ChessPenguin</span></a>
|
||||
<nav class="nav" aria-label="{{t:nav_label}}">
|
||||
<a href="#screenshots">{{t:nav_screenshots}}</a>
|
||||
<a href="#features">{{t:nav_features}}</a>
|
||||
<a href="#download">{{t:nav_download}}</a>
|
||||
<a href="#support">{{t:nav_support}}</a>
|
||||
<a href="https://github.com/vrubelroman/chessPenguin" rel="noopener">GitHub</a>
|
||||
</nav>
|
||||
<label class="lang">
|
||||
<svg aria-hidden="true" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z"/></svg>
|
||||
<select id="lang" aria-label="{{t:language}}">{{lang_options}}</select>
|
||||
</label>
|
||||
<a class="btn btn-small btn-accent top-dl" href="#download">{{t:header_download}}</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main id="main">
|
||||
<section class="hero wrap">
|
||||
<h1>{{t:hero_title}}</h1>
|
||||
<p class="sub">{{t:hero_subtitle}}</p>
|
||||
|
||||
<div class="cta" id="cta">
|
||||
<a class="btn btn-hero btn-accent" id="hero-btn" href="#download">
|
||||
<span class="l1" id="hero-l1">{{t:btn_choose}}</span>
|
||||
<span class="l2" id="hero-l2">{{t:btn_choose_2}}</span>
|
||||
</a>
|
||||
<p class="note" id="hero-note" hidden></p>
|
||||
<p class="links" id="hero-links">
|
||||
<a href="#download">{{t:other_platforms}}</a> ·
|
||||
<a href="https://github.com/vrubelroman/chessPenguin/releases/tag/v{version}" rel="noopener">{{t:whats_new}}</a>
|
||||
</p>
|
||||
<p class="links" id="hero-formats" hidden>{{t:other_formats}}
|
||||
<a href="/download/deb" data-platform="deb">.deb</a> ·
|
||||
<a href="/download/rpm" data-platform="rpm">.rpm</a> ·
|
||||
<a href="/download/arch" data-platform="arch">Arch</a> ·
|
||||
<a href="/download/appimage" data-platform="appimage">AppImage</a> ·
|
||||
<a href="/download/flatpak" data-platform="flatpak">Flatpak</a> ·
|
||||
<a href="#download-linux">{{t:more}}</a>
|
||||
</p>
|
||||
<div class="mobile" id="hero-mobile" hidden>
|
||||
<p>{{t:mobile_text}}</p>
|
||||
<button class="btn btn-small btn-secondary" id="share" type="button">{{t:share_link}}</button>
|
||||
<a href="#download">{{t:see_all}}</a>
|
||||
</div>
|
||||
<div class="started" id="started" role="status" hidden></div>
|
||||
</div>
|
||||
|
||||
<ul class="badges" aria-label="{{t:platforms}}">
|
||||
<li><a href="#download-windows">Windows</a></li>
|
||||
<li><a href="#download-macos">{{t:badge_macos}}</a></li>
|
||||
<li><a href="#download-linux-deb">.deb</a></li>
|
||||
<li><a href="#download-linux-rpm">.rpm</a></li>
|
||||
<li><a href="#download-linux-arch">Arch</a></li>
|
||||
<li><a href="#download-linux-appimage">AppImage</a></li>
|
||||
<li><a href="#download-linux-flatpak">Flatpak</a></li>
|
||||
</ul>
|
||||
<p class="free">{{t:free_line}}</p>
|
||||
|
||||
<figure class="shot hero-shot">
|
||||
<a href="/screenshots/01-game.png" data-shot="1">
|
||||
<picture>
|
||||
<source type="image/webp" srcset="/screenshots/01-game-1280.webp 1280w, /screenshots/01-game-1920.webp 1920w" sizes="(min-width: 1168px) 1120px, 100vw">
|
||||
<img src="/screenshots/01-game-1280.jpg" width="1920" height="1080" alt="{{t:alt1}}" fetchpriority="high">
|
||||
</picture>
|
||||
</a>
|
||||
<figcaption>{{t:shot1}}</figcaption>
|
||||
</figure>
|
||||
</section>
|
||||
|
||||
<section class="wrap block" id="screenshots">
|
||||
<h2>{{t:gallery_title}}</h2>
|
||||
<ol class="gallery">
|
||||
{{gallery}}
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section class="wrap block" id="features">
|
||||
<h2>{{t:features_title}}</h2>
|
||||
<ul class="features">
|
||||
<li><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 3h8l4 4v14H6z"/><path d="M14 3v4h4M9 12h6M9 16h6"/></svg><h3>{{t:f1_title}}</h3><p>{{t:f1_text}}</p></li>
|
||||
<li><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 5h7a3 3 0 0 1 3 3v12a2 2 0 0 0-2-2H4zM20 5h-4a3 3 0 0 0-2 1"/><path d="M20 5v13h-6"/></svg><h3>{{t:f2_title}}</h3><p>{{t:f2_text}}</p></li>
|
||||
<li><svg viewBox="0 0 24 24" aria-hidden="true"><rect x="5" y="5" width="14" height="14" rx="2"/><path d="M9 2v3M15 2v3M9 19v3M15 19v3M2 9h3M2 15h3M19 9h3M19 15h3M9 9h6v6H9z"/></svg><h3>{{t:f3_title}}</h3><p>{{t:f3_text}}</p></li>
|
||||
<li><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 20h18"/><path d="M4 16l5-6 4 3 7-8"/></svg><h3>{{t:f4_title}}</h3><p>{{t:f4_text}}</p></li>
|
||||
<li><svg viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="12" cy="5" rx="8" ry="3"/><path d="M4 5v14c0 1.7 3.6 3 8 3s8-1.3 8-3V5M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3"/></svg><h3>{{t:f5_title}}</h3><p>{{t:f5_text}}</p></li>
|
||||
<li><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 3h8v8H3zM13 13h8v8h-8z"/><path d="M13 3h8v8h-8zM3 13h8v8H3z" opacity=".35"/><circle cx="17" cy="17" r="0.5"/></svg><h3>{{t:f6_title}}</h3><p>{{t:f6_text}}</p></li>
|
||||
<li><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 20l4-1 11-11-3-3L5 16z"/><path d="M14 6l3 3"/></svg><h3>{{t:f7_title}}</h3><p>{{t:f7_text}}</p></li>
|
||||
<li><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><circle cx="8.5" cy="10" r="1.2"/><circle cx="12" cy="7.5" r="1.2"/><circle cx="15.5" cy="10" r="1.2"/><path d="M12 21c-1.5 0-2-1-2-2s1-2 0-3"/></svg><h3>{{t:f8_title}}</h3><p>{{t:f8_text}}</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="wrap block" id="download">
|
||||
<h2>{{t:download_title}}</h2>
|
||||
<p class="meta">{{t:download_meta}} <a href="https://github.com/vrubelroman/chessPenguin/releases/tag/v{version}" rel="noopener">{{t:release_notes}} ↗</a></p>
|
||||
<div class="started" id="started2" role="status" hidden></div>
|
||||
|
||||
<div class="tabs" role="tablist" aria-label="{{t:download_title}}">
|
||||
<button role="tab" id="tab-windows" aria-controls="download-windows" aria-selected="true">Windows<small hidden>{{t:your_system}}</small></button>
|
||||
<button role="tab" id="tab-macos" aria-controls="download-macos" aria-selected="false" tabindex="-1">macOS<small hidden>{{t:your_system}}</small></button>
|
||||
<button role="tab" id="tab-linux" aria-controls="download-linux" aria-selected="false" tabindex="-1">Linux<small hidden>{{t:your_system}}</small></button>
|
||||
</div>
|
||||
|
||||
<div class="panel" role="tabpanel" id="download-windows" aria-labelledby="tab-windows">
|
||||
<h3 class="panel-h">Windows</h3>
|
||||
<div class="row" id="download-windows-zip">
|
||||
<div class="row-h"><h4>{{t:win_title}}</h4><span class="fmt">.zip · {size:windows}</span><a class="btn btn-small btn-accent" href="/download/windows" data-platform="windows">{{t:row_download}}</a></div>
|
||||
<ol class="steps"><li>{{t:win_step1}}</li><li>{{t:win_step2}}</li></ol>
|
||||
<p class="hint">{{t:win_note}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel" role="tabpanel" id="download-macos" aria-labelledby="tab-macos">
|
||||
<h3 class="panel-h">macOS</h3>
|
||||
<div class="row" id="download-macos-dmg">
|
||||
<div class="row-h"><h4>{{t:mac_title}}</h4><span class="fmt">.dmg · {size:macos}</span><a class="btn btn-small btn-accent" href="/download/macos" data-platform="macos">{{t:row_download}}</a></div>
|
||||
<ol class="steps"><li>{{t:mac_step1}}</li><li>{{t:mac_step2}}</li></ol>
|
||||
<h5>{{t:mac15_title}}</h5>
|
||||
<ol class="steps"><li>{{t:mac15_step1}}</li><li>{{t:mac15_step2}}</li><li>{{t:mac15_step3}}</li></ol>
|
||||
<p class="hint">{{t:mac_why}}</p>
|
||||
<details><summary>{{t:mac_still}}</summary><p>{{t:mac_still_text}}</p>
|
||||
<div class="cmd"><code>xattr -dr com.apple.quarantine /Applications/ChessPenguin.app</code><button type="button" class="copy" aria-label="{{t:copy_aria}}">{{t:copy}}</button></div></details>
|
||||
<p class="hint">{{t:mac_intel}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel" role="tabpanel" id="download-linux" aria-labelledby="tab-linux">
|
||||
<h3 class="panel-h">Linux</h3>
|
||||
<p class="hint">{{t:linux_intro}}</p>
|
||||
<div class="linux-rows">
|
||||
<div class="row" id="download-linux-appimage" data-os="other">
|
||||
<div class="row-h"><h4>{{t:lx_appimage}}</h4><span class="fmt">.AppImage · {size:appimage}</span><a class="btn btn-small btn-secondary" href="/download/appimage" data-platform="appimage">{{t:row_download}}</a></div>
|
||||
<div class="cmd"><code>chmod +x ~/Downloads/{file:appimage}</code><button type="button" class="copy" aria-label="{{t:copy_aria}}">{{t:copy}}</button></div>
|
||||
<div class="cmd"><code>~/Downloads/{file:appimage}</code><button type="button" class="copy" aria-label="{{t:copy_aria}}">{{t:copy}}</button></div>
|
||||
</div>
|
||||
<div class="row" id="download-linux-deb" data-os="deb">
|
||||
<div class="row-h"><h4>{{t:lx_deb}}</h4><span class="fmt">.deb · {size:deb}</span><a class="btn btn-small btn-secondary" href="/download/deb" data-platform="deb">{{t:row_download}}</a></div>
|
||||
<div class="cmd"><code>sudo apt install ~/Downloads/{file:deb}</code><button type="button" class="copy" aria-label="{{t:copy_aria}}">{{t:copy}}</button></div>
|
||||
</div>
|
||||
<div class="row" id="download-linux-rpm" data-os="rpm">
|
||||
<div class="row-h"><h4>{{t:lx_rpm}}</h4><span class="fmt">.rpm · {size:rpm}</span><a class="btn btn-small btn-secondary" href="/download/rpm" data-platform="rpm">{{t:row_download}}</a></div>
|
||||
<div class="cmd"><code>sudo dnf install ~/Downloads/{file:rpm}</code><button type="button" class="copy" aria-label="{{t:copy_aria}}">{{t:copy}}</button></div>
|
||||
<p class="hint">{{t:lx_rpm_suse}} <code>sudo zypper install ~/Downloads/{file:rpm}</code></p>
|
||||
</div>
|
||||
<div class="row" id="download-linux-arch" data-os="arch">
|
||||
<div class="row-h"><h4>{{t:lx_arch}}</h4><span class="fmt">.pkg.tar.zst · {size:arch}</span><a class="btn btn-small btn-secondary" href="/download/arch" data-platform="arch">{{t:row_download}}</a></div>
|
||||
<div class="cmd"><code>sudo pacman -U ~/Downloads/{file:arch}</code><button type="button" class="copy" aria-label="{{t:copy_aria}}">{{t:copy}}</button></div>
|
||||
</div>
|
||||
<div class="row" id="download-linux-flatpak" data-os="flatpak">
|
||||
<div class="row-h"><h4>{{t:lx_flatpak}}</h4><span class="fmt">.flatpak · {size:flatpak}</span><a class="btn btn-small btn-secondary" href="/download/flatpak" data-platform="flatpak">{{t:row_download}}</a></div>
|
||||
<div class="cmd"><code>flatpak install --user ~/Downloads/{file:flatpak}</code><button type="button" class="copy" aria-label="{{t:copy_aria}}">{{t:copy}}</button></div>
|
||||
<div class="cmd"><code>flatpak run io.github.vrubelroman.chessPenguin</code><button type="button" class="copy" aria-label="{{t:copy_aria}}">{{t:copy}}</button></div>
|
||||
<p class="hint">{{t:lx_flatpak_note}}</p>
|
||||
</div>
|
||||
<div class="row quiet" id="download-linux-tar" data-os="tar">
|
||||
<div class="row-h"><h4>{{t:lx_tar}}</h4><span class="fmt">.tar.gz · {size:tarball}</span><a class="btn btn-small btn-secondary" href="/download/tarball" data-platform="tarball">{{t:row_download}}</a></div>
|
||||
<p class="hint">{{t:lx_tar_text}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="verify">{{t:verify}} <a href="/download/checksums">SHA256SUMS.txt</a> · <a href="https://github.com/vrubelroman/chessPenguin/releases" rel="noopener">{{t:all_releases}} ↗</a> · <a href="https://github.com/vrubelroman/chessPenguin" rel="noopener">{{t:source_code}} ↗</a></p>
|
||||
<details class="verify-how"><summary>{{t:how_verify}}</summary>
|
||||
<p>{{t:how_verify_text}}</p>
|
||||
<p class="hint">Linux</p><div class="cmd"><code>sha256sum -c --ignore-missing SHA256SUMS.txt</code><button type="button" class="copy" aria-label="{{t:copy_aria}}">{{t:copy}}</button></div>
|
||||
<p class="hint">macOS</p><div class="cmd"><code>shasum -a 256 -c --ignore-missing SHA256SUMS.txt</code><button type="button" class="copy" aria-label="{{t:copy_aria}}">{{t:copy}}</button></div>
|
||||
<p class="hint">Windows (PowerShell)</p><div class="cmd"><code>Get-FileHash .\{file:windows}</code><button type="button" class="copy" aria-label="{{t:copy_aria}}">{{t:copy}}</button></div>
|
||||
<p class="hint">{{t:how_verify_win}}</p>
|
||||
</details>
|
||||
</section>
|
||||
|
||||
<div class="wrap block two">
|
||||
<section id="engine">
|
||||
<h2>{{t:engine_title}}</h2>
|
||||
<p>{{t:engine_text}}</p>
|
||||
<ul class="dots"><li>{{t:engine_b1}}</li><li>{{t:engine_b2}}</li><li>{{t:engine_b3}}</li></ul>
|
||||
<p><a href="https://stockfishchess.org/download/" rel="noopener">{{t:engine_link1}} ↗</a> · <a href="https://github.com/official-stockfish/Stockfish/releases" rel="noopener">{{t:engine_link2}} ↗</a></p>
|
||||
</section>
|
||||
<section id="open-source">
|
||||
<h2>{{t:oss_title}}</h2>
|
||||
<p>{{t:oss_text}}</p>
|
||||
<p><a class="btn btn-small btn-secondary" href="https://github.com/vrubelroman/chessPenguin" rel="noopener">{{t:oss_button}} ↗</a></p>
|
||||
<p class="hint">{{t:oss_small}} <a href="https://github.com/vrubelroman/chessPenguin/blob/main/THIRD_PARTY_NOTICES.md" rel="noopener">{{t:third_party}}</a></p>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<section class="wrap block" id="support">
|
||||
<h2>{{t:support_title}}</h2>
|
||||
<p>{{t:support_text}}</p>
|
||||
<div class="cards">
|
||||
<a class="card" href="mailto:vrubelroman@gmail.com?subject=ChessPenguin">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg>
|
||||
<span><b>{{t:email}}</b>vrubelroman@gmail.com</span></a>
|
||||
<a class="card" href="https://t.me/vrubelr" rel="noopener">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M21 4L3 11l6 2 2 6 3-4 5 4z"/><path d="M9 13l12-9"/></svg>
|
||||
<span><b>Telegram</b>@vrubelr</span></a>
|
||||
</div>
|
||||
<p class="hint">{{t:support_issues}} <a href="https://github.com/vrubelroman/chessPenguin/issues" rel="noopener">GitHub Issues ↗</a></p>
|
||||
<p class="hint">{{t:support_hint}}</p>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer class="foot">
|
||||
<div class="wrap">
|
||||
<p>ChessPenguin · {{t:footer_license}} · <a href="https://github.com/vrubelroman/chessPenguin" rel="noopener">GitHub</a> · <a href="https://github.com/vrubelroman/chessPenguin/blob/main/THIRD_PARTY_NOTICES.md" rel="noopener">{{t:third_party}}</a></p>
|
||||
<p>{{t:footer_privacy}} {{t:footer_geo}} <a href="https://db-ip.com" rel="noopener">DB-IP</a>.</p>
|
||||
<p class="langs">{{lang_links}}</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<div class="lightbox" id="lightbox" role="dialog" aria-modal="true" aria-label="{{t:lb_label}}" hidden>
|
||||
<div class="lb-top">
|
||||
<span class="lb-count" id="lb-count" aria-live="polite"></span>
|
||||
<a class="lb-full" id="lb-full" href="#" target="_blank" rel="noopener">{{t:lb_full}} ↗</a>
|
||||
<button class="lb-btn" id="lb-close" type="button" aria-label="{{t:close}}">✕</button>
|
||||
</div>
|
||||
<button class="lb-btn lb-prev" id="lb-prev" type="button" aria-label="{{t:lb_prev}}">‹</button>
|
||||
<figure class="lb-fig"><img id="lb-img" alt=""><figcaption id="lb-cap"></figcaption></figure>
|
||||
<button class="lb-btn lb-next" id="lb-next" type="button" aria-label="{{t:lb_next}}">›</button>
|
||||
</div>
|
||||
|
||||
<script>window.CP = {{client_json}};</script>
|
||||
<script src="/js/site.js?v={{asset_version}}" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
201
website/static/css/site.css
Normal file
|
|
@ -0,0 +1,201 @@
|
|||
/* ChessPenguin site. Visual system: docs/design/website.md §5. */
|
||||
:root {
|
||||
color-scheme: dark light;
|
||||
--bg: #161718; --surface: #1f2022; --code-bg: #111213;
|
||||
--border: #2e3033; --border-strong: #4a4d52;
|
||||
--text: #e8e8e8; --text-2: #a3a7ad;
|
||||
--accent: #1f6fa8; --accent-hover: #2a7fbd; --accent-text: #62aee6;
|
||||
--focus: #62aee6; --warn: #e0a64a; --ok: #7cbf6a;
|
||||
--shadow: none;
|
||||
--font: system-ui, -apple-system, "Segoe UI", Ubuntu, Cantarell, "Noto Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
--mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
|
||||
}
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root {
|
||||
--bg: #ffffff; --surface: #f5f6f7; --code-bg: #f0f1f3;
|
||||
--border: #e1e3e6; --border-strong: #c4c8cd;
|
||||
--text: #1c1d1f; --text-2: #5d636b;
|
||||
--accent-hover: #195d8e; --accent-text: #1a5f91;
|
||||
--focus: #1f6fa8; --warn: #9a5b00; --ok: #2f7d32;
|
||||
--shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.08);
|
||||
}
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
html { scroll-behavior: smooth; scroll-padding-top: 72px; scrollbar-gutter: stable; }
|
||||
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before { transition: none !important; animation: none !important; } }
|
||||
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
|
||||
img { max-width: 100%; height: auto; display: block; }
|
||||
a { color: var(--accent-text); text-decoration: none; }
|
||||
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
|
||||
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
|
||||
code { font: 14px/1.5 var(--mono); }
|
||||
h1, h2, h3, h4, h5 { margin: 0; }
|
||||
p { margin: 0 0 12px; }
|
||||
|
||||
.wrap { max-width: 1168px; margin: 0 auto; padding: 0 24px; }
|
||||
@media (max-width: 639px) { .wrap { padding: 0 16px; } }
|
||||
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 50; }
|
||||
.skip:focus { left: 8px; }
|
||||
|
||||
/* Header */
|
||||
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s; }
|
||||
.top.scrolled { border-bottom-color: var(--border); }
|
||||
.top-in { display: flex; align-items: center; gap: 24px; height: 56px; }
|
||||
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; }
|
||||
.brand:hover { text-decoration: none; }
|
||||
.nav { display: flex; gap: 20px; margin-left: 8px; }
|
||||
.nav a { color: var(--text-2); font-size: 15px; }
|
||||
.nav a:hover { color: var(--text); text-decoration: none; }
|
||||
.lang { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--text-2); }
|
||||
.lang svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
|
||||
.lang select { background: transparent; color: var(--text); border: 1px solid transparent; border-radius: 6px; font: 15px var(--font); padding: 4px 6px; cursor: pointer; }
|
||||
.lang select:hover { border-color: var(--border); }
|
||||
.lang select option { background: var(--surface); color: var(--text); }
|
||||
.top-dl { visibility: hidden; opacity: 0; transition: opacity .2s; }
|
||||
.top.show-dl .top-dl { visibility: visible; opacity: 1; }
|
||||
@media (max-width: 899px) { .nav { display: none; } }
|
||||
@media (max-width: 639px) {
|
||||
.top-in { gap: 8px; }
|
||||
.brand { flex-shrink: 0; }
|
||||
.lang svg { display: none; }
|
||||
.lang select { font-size: 14px; padding: 4px 2px; }
|
||||
.top-dl { padding: 0 12px; flex-shrink: 0; }
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; font: 600 15px/1.2 var(--font); border: 1px solid transparent; cursor: pointer; text-decoration: none !important; }
|
||||
.btn-small { height: 36px; padding: 0 16px; }
|
||||
.btn-accent { background: var(--accent); color: #fff; }
|
||||
.btn-accent:hover { background: var(--accent-hover); }
|
||||
.btn-secondary { background: transparent; color: var(--accent-text); border-color: var(--accent-text); }
|
||||
.btn-secondary:hover { background: var(--surface); }
|
||||
.btn-hero { flex-direction: column; align-items: flex-start; min-width: 280px; height: 60px; padding: 0 28px; border-radius: 10px; }
|
||||
.btn-hero .l1 { font-size: 17px; }
|
||||
.btn-hero .l2 { font-size: 13px; font-weight: 400; opacity: .85; margin-top: 3px; }
|
||||
@media (max-width: 639px) { .btn-hero { width: 100%; } }
|
||||
|
||||
/* Hero */
|
||||
.hero { padding-top: 72px; }
|
||||
.hero h1 { font-size: 48px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; max-width: 18ch; text-wrap: balance; }
|
||||
.hero .sub { font-size: 19px; line-height: 1.5; color: var(--text-2); max-width: 60ch; margin: 16px 0 32px; }
|
||||
.cta .links { margin: 12px 0 0; font-size: 14px; color: var(--text-2); }
|
||||
.cta .note { margin: 10px 0 0; font-size: 14px; color: var(--text-2); }
|
||||
.cta .note.warn { color: var(--warn); }
|
||||
.mobile p { color: var(--text-2); max-width: 52ch; }
|
||||
.mobile .btn { margin-right: 16px; }
|
||||
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 24px 0 8px; }
|
||||
.badges a { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border: 1px solid var(--border); border-radius: 14px; font-size: 13px; color: var(--text-2); }
|
||||
.badges a:hover { border-color: var(--border-strong); color: var(--text); text-decoration: none; }
|
||||
.free { font-size: 13px; color: var(--text-2); margin-bottom: 48px; }
|
||||
@media (max-width: 639px) { .hero { padding-top: 48px; } .hero h1 { font-size: 32px; } .hero .sub { font-size: 17px; } }
|
||||
|
||||
.started { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-top: 16px; max-width: 640px; position: relative; font-size: 15px; }
|
||||
.started .ok { color: var(--ok); font-weight: 600; }
|
||||
.started .file { color: var(--text-2); font-size: 14px; }
|
||||
.started h4 { font-size: 15px; margin: 12px 0 4px; }
|
||||
.started ol { margin: 0; padding-left: 20px; }
|
||||
.started .x { position: absolute; right: 8px; top: 8px; background: none; border: 0; color: var(--text-2); font-size: 18px; cursor: pointer; width: 32px; height: 32px; border-radius: 6px; }
|
||||
.started .x:hover { background: var(--bg); color: var(--text); }
|
||||
|
||||
/* Screenshots */
|
||||
.shot a, .gallery a { display: block; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); cursor: zoom-in; }
|
||||
.shot a:hover, .gallery a:hover { border-color: var(--border-strong); }
|
||||
.shot figcaption { margin-top: 10px; font-size: 14px; color: var(--text-2); }
|
||||
.hero-shot { margin: 0; }
|
||||
.block { padding-top: 96px; }
|
||||
.block h2 { font-size: 32px; line-height: 1.2; margin-bottom: 32px; }
|
||||
@media (max-width: 639px) { .block { padding-top: 64px; } .block h2 { font-size: 26px; margin-bottom: 24px; } }
|
||||
.gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; }
|
||||
.gallery a { border-radius: 8px; aspect-ratio: 16 / 9; }
|
||||
.gallery img { width: 100%; height: 100%; object-fit: cover; }
|
||||
.gallery p { margin: 10px 0 0; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
||||
@media (max-width: 899px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
|
||||
@media (max-width: 639px) {
|
||||
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 8px; }
|
||||
.gallery li { flex: 0 0 85%; scroll-snap-align: start; }
|
||||
}
|
||||
|
||||
/* Features */
|
||||
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 32px; }
|
||||
.features svg { width: 24px; height: 24px; fill: none; stroke: var(--accent-text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
|
||||
.features h3 { font-size: 17px; line-height: 1.35; font-weight: 600; margin-bottom: 6px; }
|
||||
.features p { font-size: 15px; color: var(--text-2); margin: 0; }
|
||||
@media (max-width: 1099px) { .features { grid-template-columns: repeat(2, 1fr); } }
|
||||
@media (max-width: 639px) { .features { grid-template-columns: 1fr; } }
|
||||
|
||||
/* Download */
|
||||
.meta { color: var(--text-2); margin-top: -20px; margin-bottom: 24px; }
|
||||
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
|
||||
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--text-2); font: 600 15px var(--font); padding: 10px 16px 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; margin-bottom: -1px; }
|
||||
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
|
||||
.tabs small { font-size: 12px; font-weight: 400; color: var(--text-2); }
|
||||
.js .panel[hidden] { display: none; }
|
||||
.panel { padding-top: 8px; }
|
||||
.js .panel-h { display: none; }
|
||||
.panel-h { font-size: 20px; margin: 24px 0 8px; }
|
||||
.row { padding: 20px 0; border-bottom: 1px solid var(--border); }
|
||||
.row:last-child { border-bottom: 0; }
|
||||
.row:target { background: var(--surface); border-radius: 8px; padding: 20px 12px; }
|
||||
.row-h { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
|
||||
.row-h h4 { font-size: 16px; font-weight: 600; flex: 1 1 280px; }
|
||||
.fmt { color: var(--text-2); font-size: 14px; }
|
||||
.row.quiet .row-h { margin-bottom: 4px; }
|
||||
.steps { margin: 0 0 8px; padding-left: 20px; }
|
||||
.steps li { margin-bottom: 4px; }
|
||||
.row h5 { font-size: 15px; margin: 14px 0 6px; }
|
||||
.hint { font-size: 14px; color: var(--text-2); margin: 8px 0 0; }
|
||||
.hint code { font-size: 13px; }
|
||||
.cmd { display: flex; align-items: center; gap: 8px; background: var(--code-bg); border-radius: 8px; padding: 8px 8px 8px 16px; margin: 8px 0 0; }
|
||||
.cmd code { flex: 1; overflow-x: auto; white-space: nowrap; padding: 4px 0; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
|
||||
.cmd code::before { content: "$ "; color: var(--text-2); user-select: none; }
|
||||
.copy { flex: none; background: transparent; border: 1px solid var(--border); color: var(--text-2); border-radius: 6px; font: 13px var(--font); height: 30px; padding: 0 10px; cursor: pointer; }
|
||||
.copy:hover { color: var(--text); border-color: var(--border-strong); }
|
||||
.copy.done { color: var(--ok); }
|
||||
details { margin-top: 10px; }
|
||||
summary { cursor: pointer; color: var(--accent-text); }
|
||||
.verify { margin-top: 24px; color: var(--text-2); font-size: 15px; }
|
||||
.verify-how { font-size: 15px; }
|
||||
|
||||
/* Engine, open source, support */
|
||||
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
|
||||
@media (max-width: 899px) { .two { grid-template-columns: 1fr; gap: 0; } .two section + section { padding-top: 64px; } }
|
||||
.two p, #support > p { max-width: 68ch; }
|
||||
.dots { padding-left: 20px; margin: 0 0 12px; }
|
||||
.dots li { margin-bottom: 6px; }
|
||||
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0 16px; max-width: 760px; }
|
||||
@media (max-width: 639px) { .cards { grid-template-columns: 1fr; } }
|
||||
.card { display: flex; align-items: center; gap: 16px; min-height: 72px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; color: var(--text); }
|
||||
.card:hover { border-color: var(--border-strong); text-decoration: none; }
|
||||
.card svg { width: 24px; height: 24px; fill: none; stroke: var(--accent-text); stroke-width: 1.5; stroke-linejoin: round; flex: none; }
|
||||
.card span { display: flex; flex-direction: column; font-size: 16px; overflow-wrap: anywhere; }
|
||||
.card b { font-size: 13px; font-weight: 600; color: var(--text-2); }
|
||||
|
||||
/* Footer */
|
||||
.foot { margin-top: 96px; border-top: 1px solid var(--border); padding: 32px 0 48px; font-size: 14px; color: var(--text-2); }
|
||||
.foot p { margin: 0 0 8px; }
|
||||
.foot .langs a { color: var(--text-2); }
|
||||
|
||||
/* Lightbox */
|
||||
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); color: #fff; display: grid; grid-template-rows: 56px 1fr; }
|
||||
.lightbox[hidden] { display: none; }
|
||||
.lb-top { display: flex; align-items: center; gap: 16px; padding: 0 16px; }
|
||||
.lb-count { font-size: 14px; opacity: .8; }
|
||||
.lb-full { margin-left: auto; color: #fff; opacity: .85; font-size: 14px; }
|
||||
.lb-btn { background: rgba(255,255,255,.08); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 22px; font-size: 26px; line-height: 1; cursor: pointer; }
|
||||
.lb-btn:hover { background: rgba(255,255,255,.18); }
|
||||
.lb-btn:focus-visible { outline-color: #fff; }
|
||||
#lb-close { font-size: 18px; }
|
||||
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }
|
||||
.lb-prev { left: 16px; } .lb-next { right: 16px; }
|
||||
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 80px 16px; min-height: 0; }
|
||||
.lb-fig img { max-width: 100%; max-height: calc(100vh - 56px - 96px); object-fit: contain; border-radius: 6px; transition: transform .2s ease-out, opacity .2s; touch-action: pan-y; user-select: none; }
|
||||
.lb-fig figcaption { max-width: 70ch; text-align: center; font-size: 16px; margin-top: 16px; min-height: 48px; opacity: .9; }
|
||||
@media (max-width: 639px) {
|
||||
.lb-fig { padding: 0 0 72px; }
|
||||
.lb-fig figcaption { padding: 0 16px; font-size: 15px; }
|
||||
.lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
|
||||
}
|
||||
|
||||
.nf { padding-top: 96px; }
|
||||
.nf h1 { font-size: 40px; margin-bottom: 16px; }
|
||||
BIN
website/static/img/icon-16.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
website/static/img/icon-180.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
website/static/img/icon-32.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
website/static/img/icon-64.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
315
website/static/js/site.js
Normal file
|
|
@ -0,0 +1,315 @@
|
|||
// ChessPenguin site: the download button for the visitor's system, the panel after a
|
||||
// download starts, download tabs, copy buttons, language choice and the screenshot
|
||||
// lightbox. Nothing is sent anywhere: downloads are counted by the server.
|
||||
(function () {
|
||||
"use strict";
|
||||
var CP = window.CP || { t: {}, assets: {}, shots: [] };
|
||||
var t = function (k) { return (CP.t && CP.t[k]) || k; };
|
||||
var $ = function (id) { return document.getElementById(id); };
|
||||
document.documentElement.classList.add("js");
|
||||
|
||||
// --- The visitor's system --------------------------------------------------------
|
||||
function detect() {
|
||||
var ua = navigator.userAgent || "";
|
||||
var platform = (navigator.userAgentData && navigator.userAgentData.platform) || navigator.platform || "";
|
||||
var touchMac = /Mac/.test(platform) && navigator.maxTouchPoints > 1;
|
||||
if (/iPhone|iPod|iPad|Android/i.test(ua) || touchMac) return { os: "mobile" };
|
||||
if (/CrOS/.test(ua)) return { os: "linux", slug: "deb", chromeos: true };
|
||||
if (/Win/.test(platform) || /Windows/.test(ua)) return { os: "windows", slug: "windows" };
|
||||
if (/Mac/.test(platform) || /Macintosh/.test(ua)) return { os: "macos", slug: "macos" };
|
||||
if (/Linux|X11/.test(platform) || /Linux/.test(ua)) {
|
||||
if (/Ubuntu|Debian|Mint/i.test(ua)) return { os: "linux", slug: "deb" };
|
||||
if (/Fedora|openSUSE|SUSE|Red Hat/i.test(ua)) return { os: "linux", slug: "rpm" };
|
||||
return { os: "linux", slug: "appimage" };
|
||||
}
|
||||
return { os: "unknown" };
|
||||
}
|
||||
var sys = detect();
|
||||
var FORMAT = { windows: ".zip", deb: ".deb", rpm: ".rpm", appimage: "AppImage" };
|
||||
|
||||
function intelMac() {
|
||||
try {
|
||||
var gl = document.createElement("canvas").getContext("webgl");
|
||||
var ext = gl && gl.getExtension("WEBGL_debug_renderer_info");
|
||||
var r = ext ? gl.getParameter(ext.UNMASKED_RENDERER_WEBGL) : "";
|
||||
return /Intel/i.test(r) && !/Apple/i.test(r);
|
||||
} catch (e) { return false; }
|
||||
}
|
||||
|
||||
// --- Hero button -----------------------------------------------------------------
|
||||
(function hero() {
|
||||
var btn = $("hero-btn"), l1 = $("hero-l1"), l2 = $("hero-l2");
|
||||
if (!btn) return;
|
||||
if (sys.os === "mobile") {
|
||||
btn.hidden = true;
|
||||
$("hero-links").hidden = true;
|
||||
$("hero-mobile").hidden = false;
|
||||
var share = $("share");
|
||||
if (!navigator.share) share.textContent = t("copy_link");
|
||||
share.addEventListener("click", function () {
|
||||
var url = location.origin + CP.home;
|
||||
if (navigator.share) { navigator.share({ url: url, title: t("meta_title") }).catch(function () {}); return; }
|
||||
if (navigator.clipboard) navigator.clipboard.writeText(url).then(function () {
|
||||
share.textContent = t("link_copied");
|
||||
setTimeout(function () { share.textContent = t("copy_link"); }, 2000);
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!sys.slug) return;
|
||||
var asset = CP.assets[sys.slug];
|
||||
btn.href = "/download/" + sys.slug;
|
||||
btn.dataset.platform = sys.slug;
|
||||
l1.textContent = t(sys.os === "windows" ? "btn_windows" : sys.os === "macos" ? "btn_macos" : "btn_linux");
|
||||
var parts = [CP.version ? t("btn_version").replace("{version}", CP.version) : t("btn_latest")];
|
||||
if (asset) parts.push(asset.size);
|
||||
parts.push(sys.os === "macos" ? t("apple_silicon") : FORMAT[sys.slug]);
|
||||
if (sys.chromeos) parts.push(t("chromeos"));
|
||||
l2.textContent = parts.join(" · ");
|
||||
if (sys.os === "macos") {
|
||||
var note = $("hero-note");
|
||||
note.hidden = false;
|
||||
if (intelMac()) { note.textContent = t("mac_intel_warning"); note.classList.add("warn"); }
|
||||
else note.textContent = t("mac_requires");
|
||||
}
|
||||
if (sys.os === "linux") {
|
||||
$("hero-links").hidden = true;
|
||||
var formats = $("hero-formats");
|
||||
formats.hidden = false;
|
||||
var cur = formats.querySelector('[data-platform="' + sys.slug + '"]');
|
||||
if (cur) {
|
||||
var prev = cur.previousSibling;
|
||||
cur.remove();
|
||||
if (prev && prev.nodeType === 3) prev.textContent = prev.textContent.replace(/·\s*$/, "");
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
// --- After a download starts -----------------------------------------------------
|
||||
function el(tag, attrs, text) {
|
||||
var e = document.createElement(tag);
|
||||
for (var k in attrs || {}) e.setAttribute(k, attrs[k]);
|
||||
if (text != null) e.textContent = text;
|
||||
return e;
|
||||
}
|
||||
function cmd(text) {
|
||||
var box = el("div", { class: "cmd" });
|
||||
box.appendChild(el("code", null, text));
|
||||
var b = el("button", { type: "button", class: "copy", "aria-label": t("copy") }, t("copy"));
|
||||
box.appendChild(b);
|
||||
return box;
|
||||
}
|
||||
var COMMANDS = {
|
||||
deb: function (f) { return ["sudo apt install ~/Downloads/" + f]; },
|
||||
rpm: function (f) { return ["sudo dnf install ~/Downloads/" + f]; },
|
||||
arch: function (f) { return ["sudo pacman -U ~/Downloads/" + f]; },
|
||||
appimage: function (f) { return ["chmod +x ~/Downloads/" + f, "~/Downloads/" + f]; },
|
||||
flatpak: function (f) { return ["flatpak install --user ~/Downloads/" + f, "flatpak run io.github.vrubelroman.chessPenguin"]; },
|
||||
};
|
||||
function started(platform, panelId) {
|
||||
if (platform === "checksums") return;
|
||||
["started", "started2"].forEach(function (id) { var p = $(id); if (p) { p.hidden = true; p.textContent = ""; } });
|
||||
var panel = $(panelId);
|
||||
if (!panel) return;
|
||||
var asset = CP.assets[platform] || {};
|
||||
panel.appendChild(el("div", { class: "ok" }, "✓ " + t("started")));
|
||||
if (asset.file) panel.appendChild(el("div", { class: "file" }, asset.file + " · " + asset.size));
|
||||
var again = el("p", { class: "file" });
|
||||
var a1 = el("a", { href: "/download/" + platform }, t("try_again"));
|
||||
var a2 = el("a", { href: "#download" }, t("choose_another"));
|
||||
again.appendChild(a1); again.appendChild(document.createTextNode(" · ")); again.appendChild(a2);
|
||||
panel.appendChild(again);
|
||||
if (platform === "windows") panel.appendChild(el("p", null, t("next_windows")));
|
||||
else if (platform === "macos") {
|
||||
panel.appendChild(el("h4", null, t("next_macos_title")));
|
||||
var ol = el("ol");
|
||||
ol.appendChild(el("li", null, t("mac_step1")));
|
||||
ol.appendChild(el("li", null, t("mac_step2")));
|
||||
panel.appendChild(ol);
|
||||
var d = el("details");
|
||||
d.appendChild(el("summary", null, t("next_macos15")));
|
||||
var ol2 = el("ol");
|
||||
["mac15_step1", "mac15_step2", "mac15_step3"].forEach(function (k) { ol2.appendChild(el("li", null, t(k))); });
|
||||
d.appendChild(ol2);
|
||||
panel.appendChild(d);
|
||||
} else if (COMMANDS[platform] && asset.file) {
|
||||
panel.appendChild(el("p", { class: "file" }, t("next_linux")));
|
||||
COMMANDS[platform](asset.file).forEach(function (c) { panel.appendChild(cmd(c)); });
|
||||
}
|
||||
var x = el("button", { type: "button", class: "x", "aria-label": t("close") }, "×");
|
||||
x.addEventListener("click", function () { panel.hidden = true; });
|
||||
panel.appendChild(x);
|
||||
panel.hidden = false;
|
||||
}
|
||||
document.addEventListener("click", function (e) {
|
||||
var a = e.target.closest && e.target.closest('a[href^="/download/"]');
|
||||
if (!a) return;
|
||||
var platform = a.getAttribute("href").split("/")[2];
|
||||
// The link is followed as usual (the server redirects to the file); the panel only
|
||||
// tells what happens next.
|
||||
started(platform, a.closest("#download") ? "started2" : "started");
|
||||
});
|
||||
|
||||
// --- Copy buttons ----------------------------------------------------------------
|
||||
if (!navigator.clipboard) document.querySelectorAll(".copy").forEach(function (b) { b.hidden = true; });
|
||||
document.addEventListener("click", function (e) {
|
||||
var b = e.target.closest && e.target.closest(".copy");
|
||||
if (!b || !navigator.clipboard) return;
|
||||
var code = b.parentNode.querySelector("code");
|
||||
navigator.clipboard.writeText(code.textContent).then(function () {
|
||||
b.textContent = t("copied"); b.classList.add("done");
|
||||
setTimeout(function () { b.textContent = t("copy"); b.classList.remove("done"); }, 2000);
|
||||
});
|
||||
});
|
||||
|
||||
// --- Download tabs ---------------------------------------------------------------
|
||||
var tabs = Array.prototype.slice.call(document.querySelectorAll('.tabs [role="tab"]'));
|
||||
function select(tab, focus) {
|
||||
tabs.forEach(function (x) {
|
||||
var on = x === tab;
|
||||
x.setAttribute("aria-selected", on ? "true" : "false");
|
||||
x.tabIndex = on ? 0 : -1;
|
||||
$(x.getAttribute("aria-controls")).hidden = !on;
|
||||
});
|
||||
if (focus) tab.focus();
|
||||
}
|
||||
tabs.forEach(function (tab, i) {
|
||||
tab.addEventListener("click", function () { select(tab); });
|
||||
tab.addEventListener("keydown", function (e) {
|
||||
var j = { ArrowRight: i + 1, ArrowLeft: i - 1, Home: 0, End: tabs.length - 1 }[e.key];
|
||||
if (j == null) return;
|
||||
e.preventDefault();
|
||||
select(tabs[(j + tabs.length) % tabs.length], true);
|
||||
});
|
||||
});
|
||||
var mine = { windows: "tab-windows", macos: "tab-macos", linux: "tab-linux" }[sys.os];
|
||||
if (mine) {
|
||||
$(mine).querySelector("small").hidden = false;
|
||||
select($(mine));
|
||||
} else if (tabs.length) select(tabs[0]);
|
||||
// The visitor's Linux format first, with the accent button.
|
||||
if (sys.os === "linux") {
|
||||
var rows = document.querySelector(".linux-rows");
|
||||
var row = rows && rows.querySelector('[data-os="' + sys.slug + '"]');
|
||||
if (row) {
|
||||
rows.insertBefore(row, rows.firstChild);
|
||||
var b = row.querySelector(".btn");
|
||||
b.classList.remove("btn-secondary"); b.classList.add("btn-accent");
|
||||
}
|
||||
}
|
||||
function openHash() {
|
||||
var id = location.hash.slice(1);
|
||||
if (!id || id.indexOf("download-") !== 0) return;
|
||||
var panelId = id.replace(/^(download-(windows|macos|linux)).*/, "$1");
|
||||
var tab = tabs.filter(function (x) { return x.getAttribute("aria-controls") === panelId; })[0];
|
||||
if (tab) select(tab);
|
||||
var target = $(id);
|
||||
if (target) target.scrollIntoView();
|
||||
}
|
||||
window.addEventListener("hashchange", openHash);
|
||||
openHash();
|
||||
|
||||
// --- Header: border and the small download button --------------------------------
|
||||
var top = document.querySelector(".top"), cta = $("cta");
|
||||
function onScroll() {
|
||||
top.classList.toggle("scrolled", window.scrollY > 4);
|
||||
if (cta) top.classList.toggle("show-dl", cta.getBoundingClientRect().bottom < 56);
|
||||
}
|
||||
window.addEventListener("scroll", onScroll, { passive: true });
|
||||
onScroll();
|
||||
|
||||
// --- Language --------------------------------------------------------------------
|
||||
function remember(code) { try { localStorage.setItem("lang", code); } catch (e) {} }
|
||||
var langSel = $("lang");
|
||||
if (langSel) langSel.addEventListener("change", function () {
|
||||
remember(langSel.value);
|
||||
location.href = (langSel.value === "en" ? "/" : "/" + langSel.value + "/") + location.hash;
|
||||
});
|
||||
document.querySelectorAll("[data-lang]").forEach(function (a) {
|
||||
a.addEventListener("click", function () { remember(a.dataset.lang); });
|
||||
});
|
||||
|
||||
// --- Lightbox --------------------------------------------------------------------
|
||||
var lb = $("lightbox"), img = $("lb-img"), cap = $("lb-cap"), count = $("lb-count"), full = $("lb-full");
|
||||
var shots = CP.shots || [], cur = 0, opener = null, viaHistory = false;
|
||||
var webp = document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp") === 0;
|
||||
function src(s) { return webp ? s.src : s.fallback; }
|
||||
function preload(i) { var s = shots[(i + shots.length) % shots.length]; if (s) new Image().src = src(s); }
|
||||
function show(i) {
|
||||
cur = (i + shots.length) % shots.length;
|
||||
var s = shots[cur];
|
||||
img.src = src(s);
|
||||
img.alt = s.alt;
|
||||
cap.textContent = s.caption;
|
||||
full.href = s.full;
|
||||
count.textContent = t("lb_count").replace("{n}", cur + 1).replace("{total}", shots.length);
|
||||
preload(cur + 1); preload(cur - 1);
|
||||
if (viaHistory) history.replaceState({ lb: true }, "", "#screenshot-" + (cur + 1));
|
||||
}
|
||||
function open(i, from) {
|
||||
if (!shots.length) return;
|
||||
opener = from || null;
|
||||
lb.hidden = false;
|
||||
document.documentElement.style.overflow = "hidden";
|
||||
history.pushState({ lb: true }, "", "#screenshot-" + (i + 1));
|
||||
viaHistory = true;
|
||||
show(i);
|
||||
$("lb-close").focus();
|
||||
}
|
||||
function close(fromPop) {
|
||||
if (lb.hidden) return;
|
||||
lb.hidden = true;
|
||||
document.documentElement.style.overflow = "";
|
||||
if (viaHistory && !fromPop) { viaHistory = false; history.back(); }
|
||||
viaHistory = false;
|
||||
var thumb = document.querySelector('[data-shot="' + (cur + 1) + '"]') || opener;
|
||||
if (thumb) { thumb.scrollIntoView({ block: "nearest" }); thumb.focus(); }
|
||||
}
|
||||
document.querySelectorAll("[data-shot]").forEach(function (a) {
|
||||
a.addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
open(parseInt(a.dataset.shot, 10) - 1, a);
|
||||
});
|
||||
});
|
||||
$("lb-close").addEventListener("click", function () { close(); });
|
||||
$("lb-prev").addEventListener("click", function () { show(cur - 1); });
|
||||
$("lb-next").addEventListener("click", function () { show(cur + 1); });
|
||||
lb.addEventListener("click", function (e) { if (e.target === lb || e.target.classList.contains("lb-fig")) close(); });
|
||||
document.addEventListener("keydown", function (e) {
|
||||
if (lb.hidden) return;
|
||||
if (e.key === "Escape") close();
|
||||
else if (e.key === "ArrowRight") show(cur + 1);
|
||||
else if (e.key === "ArrowLeft") show(cur - 1);
|
||||
else if (e.key === "Home") show(0);
|
||||
else if (e.key === "End") show(shots.length - 1);
|
||||
else if (e.key === "Tab") {
|
||||
// Keep the focus inside the lightbox.
|
||||
var f = [$("lb-close"), $("lb-prev"), $("lb-next"), full];
|
||||
var i = f.indexOf(document.activeElement);
|
||||
e.preventDefault();
|
||||
f[(i + (e.shiftKey ? -1 : 1) + f.length) % f.length].focus();
|
||||
}
|
||||
});
|
||||
window.addEventListener("popstate", function () { if (!lb.hidden) close(true); });
|
||||
// Swipe: left/right turns, down closes.
|
||||
var sx = 0, sy = 0, dx = 0, dy = 0, touching = false;
|
||||
img.addEventListener("touchstart", function (e) { touching = true; sx = e.touches[0].clientX; sy = e.touches[0].clientY; dx = dy = 0; }, { passive: true });
|
||||
img.addEventListener("touchmove", function (e) {
|
||||
if (!touching) return;
|
||||
dx = e.touches[0].clientX - sx; dy = e.touches[0].clientY - sy;
|
||||
if (Math.abs(dx) > Math.abs(dy)) img.style.transform = "translateX(" + dx + "px)";
|
||||
else if (dy > 0) { img.style.transform = "translateY(" + dy + "px)"; img.style.opacity = String(Math.max(0.3, 1 - dy / 400)); }
|
||||
}, { passive: true });
|
||||
img.addEventListener("touchend", function () {
|
||||
touching = false;
|
||||
img.style.transform = ""; img.style.opacity = "";
|
||||
if (Math.abs(dx) > Math.abs(dy) && Math.abs(dx) > window.innerWidth * 0.2) show(cur + (dx < 0 ? 1 : -1));
|
||||
else if (dy > 80 && Math.abs(dy) > Math.abs(dx)) close();
|
||||
});
|
||||
// A link to #screenshot-N opens that screenshot.
|
||||
var m = /^#screenshot-(\d+)$/.exec(location.hash);
|
||||
if (m) {
|
||||
history.replaceState(null, "", location.pathname);
|
||||
open(Math.min(parseInt(m[1], 10), shots.length) - 1);
|
||||
}
|
||||
})();
|
||||
BIN
website/static/og-image.png
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
website/static/screenshots/01-game-1280.jpg
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
website/static/screenshots/01-game-1280.webp
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
website/static/screenshots/01-game-1920.webp
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
website/static/screenshots/01-game-640.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
website/static/screenshots/01-game-640.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
website/static/screenshots/01-game.png
Normal file
|
After Width: | Height: | Size: 554 KiB |
BIN
website/static/screenshots/02-engine-1280.jpg
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
website/static/screenshots/02-engine-1280.webp
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
website/static/screenshots/02-engine-1920.webp
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
website/static/screenshots/02-engine-640.jpg
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
website/static/screenshots/02-engine-640.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
website/static/screenshots/02-engine.png
Normal file
|
After Width: | Height: | Size: 557 KiB |
BIN
website/static/screenshots/03-variations-1280.jpg
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
website/static/screenshots/03-variations-1280.webp
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
website/static/screenshots/03-variations-1920.webp
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
website/static/screenshots/03-variations-640.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
website/static/screenshots/03-variations-640.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
website/static/screenshots/03-variations.png
Normal file
|
After Width: | Height: | Size: 542 KiB |
BIN
website/static/screenshots/04-review-1280.jpg
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
website/static/screenshots/04-review-1280.webp
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
website/static/screenshots/04-review-1920.webp
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
website/static/screenshots/04-review-640.jpg
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
website/static/screenshots/04-review-640.webp
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
website/static/screenshots/04-review.png
Normal file
|
After Width: | Height: | Size: 436 KiB |
BIN
website/static/screenshots/05-marks-1280.jpg
Normal file
|
After Width: | Height: | Size: 104 KiB |
BIN
website/static/screenshots/05-marks-1280.webp
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
website/static/screenshots/05-marks-1920.webp
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
website/static/screenshots/05-marks-640.jpg
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
website/static/screenshots/05-marks-640.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
website/static/screenshots/05-marks.png
Normal file
|
After Width: | Height: | Size: 575 KiB |
BIN
website/static/screenshots/06-preview-1280.jpg
Normal file
|
After Width: | Height: | Size: 101 KiB |
BIN
website/static/screenshots/06-preview-1280.webp
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
website/static/screenshots/06-preview-1920.webp
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
website/static/screenshots/06-preview-640.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
website/static/screenshots/06-preview-640.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
website/static/screenshots/06-preview.png
Normal file
|
After Width: | Height: | Size: 550 KiB |
BIN
website/static/screenshots/07-library-1280.jpg
Normal file
|
After Width: | Height: | Size: 112 KiB |
BIN
website/static/screenshots/07-library-1280.webp
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
website/static/screenshots/07-library-1920.webp
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
website/static/screenshots/07-library-640.jpg
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
website/static/screenshots/07-library-640.webp
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
website/static/screenshots/07-library.png
Normal file
|
After Width: | Height: | Size: 769 KiB |
BIN
website/static/screenshots/08-filters-1280.jpg
Normal file
|
After Width: | Height: | Size: 111 KiB |
BIN
website/static/screenshots/08-filters-1280.webp
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
website/static/screenshots/08-filters-1920.webp
Normal file
|
After Width: | Height: | Size: 105 KiB |
BIN
website/static/screenshots/08-filters-640.jpg
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
website/static/screenshots/08-filters-640.webp
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
website/static/screenshots/08-filters.png
Normal file
|
After Width: | Height: | Size: 762 KiB |
BIN
website/static/screenshots/09-position-search-1280.jpg
Normal file
|
After Width: | Height: | Size: 151 KiB |
BIN
website/static/screenshots/09-position-search-1280.webp
Normal file
|
After Width: | Height: | Size: 87 KiB |
BIN
website/static/screenshots/09-position-search-1920.webp
Normal file
|
After Width: | Height: | Size: 146 KiB |
BIN
website/static/screenshots/09-position-search-640.jpg
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
website/static/screenshots/09-position-search-640.webp
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
website/static/screenshots/09-position-search.png
Normal file
|
After Width: | Height: | Size: 998 KiB |
BIN
website/static/screenshots/10-looks-1280.jpg
Normal file
|
After Width: | Height: | Size: 149 KiB |
BIN
website/static/screenshots/10-looks-1280.webp
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
website/static/screenshots/10-looks-1920.webp
Normal file
|
After Width: | Height: | Size: 130 KiB |
BIN
website/static/screenshots/10-looks-640.jpg
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
website/static/screenshots/10-looks-640.webp
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
website/static/screenshots/10-looks.png
Normal file
|
After Width: | Height: | Size: 1.8 MiB |