Compare commits

..

2 Commits

Author SHA1 Message Date
Priec
0b9df4549e production website 2026-06-02 23:23:48 +02:00
Priec
78407ae9e8 prod ready 2026-06-02 23:06:09 +02:00
8 changed files with 26544 additions and 35345 deletions

20
Caddyfile Normal file
View File

@@ -0,0 +1,20 @@
tui-pages.farmeris.sk {
encode gzip
# website at the root
handle {
root * /app/tui-pages-web
file_server
handle_errors {
rewrite * /404.html
file_server
}
}
# mdbook served under /book (book.toml has site-url = "/book/")
redir /book /book/
handle /book/* {
root * /app/tui-pages-docs
file_server
}
}

View File

@@ -37,9 +37,20 @@ the page plays back.
- `SCALE` — source pixel width fed to chafa; scale it up with `SIZE`.
After changing `SIZE`, set a matching `font-size` in `static/css/ascii.css`
(it halves each time you double the grid) so the ASCII fills the screen.
(lines 3233, the two `font-size: max(...)` declarations) so the ASCII fills
the screen. The font-size scales **inversely** with the grid: halve the grid →
double the font-size. The two `max()` multipliers are:
Current setup: `480x144`, font-size `max(0.35vw, 0.695vh)`.
- vw multiplier ≈ `1 / (cols × 0.6)` (0.6 ≈ JetBrains Mono char aspect ratio)
- vh multiplier ≈ `1 / rows`
| `SIZE` | `font-size` in `ascii.css` |
| --------- | ------------------------------ |
| `480x144` | `max(0.35vw, 0.695vh)` |
| `360x108` | `max(0.463vw, 0.926vh)` |
| `240x72` | `max(0.7vw, 1.39vh)` |
Current setup: `240x72`, font-size `max(0.7vw, 1.39vh)`.
## License

View File

@@ -10,7 +10,7 @@
<title>Examples — tui-pages</title>
<meta name="description" content="Three runnable TUI apps built with tui-pages: a default multi-page app, a canvas login form, and a keybindings modal. Clone, cargo run, learn.">
<link rel="icon" href="/static/img/favicon.svg" type="image/svg+xml">
<link rel="canonical" href="https://tui-pages.dev/examples.html">
<link rel="canonical" href="https://tui-pages.farmeris.sk/examples.html">
<meta property="og:title" content="Examples — tui-pages">
<meta property="og:description" content="Three runnable TUI apps built with tui-pages. Clone, cargo run, learn.">
@@ -82,7 +82,7 @@
<ul class="hidden md:flex items-center gap-1 ml-4 text-sm">
<li><a href="/examples.html" class="px-3 py-1.5 text-white rounded-md bg-zinc-800/60" aria-current="page">Examples</a></li>
<li><a href="https://tui-pages.farmeris.sk" class="px-3 py-1.5 text-zinc-300 hover:text-white rounded-md hover:bg-zinc-800/50 transition-colors">Book</a></li>
<li><a href="https://tui-pages.farmeris.sk/book" class="px-3 py-1.5 text-zinc-300 hover:text-white rounded-md hover:bg-zinc-800/50 transition-colors">Book</a></li>
<li><a href="https://docs.rs/tui-pages" class="px-3 py-1.5 text-zinc-300 hover:text-white rounded-md hover:bg-zinc-800/50 transition-colors">API</a></li>
<li><a href="https://gitlab.com/filipriec/tui-pages" class="px-3 py-1.5 text-zinc-300 hover:text-white rounded-md hover:bg-zinc-800/50 transition-colors">GitLab</a></li>
</ul>
@@ -265,7 +265,7 @@
The book walks you from <code class="font-mono text-zinc-300">cargo new</code> to a working multi-page app. Or read the API reference and dive in.
</p>
<div class="mt-8 flex flex-wrap items-center justify-center gap-3">
<a href="https://tui-pages.farmeris.sk" class="inline-flex items-center gap-2 h-11 px-5 rounded-lg bg-accent text-accent-fg font-medium hover:bg-accent/90 transition-colors">
<a href="https://tui-pages.farmeris.sk/book" class="inline-flex items-center gap-2 h-11 px-5 rounded-lg bg-accent text-accent-fg font-medium hover:bg-accent/90 transition-colors">
Start the tutorial
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg>
</a>

View File

@@ -14,13 +14,13 @@
<meta name="author" content="Filip Riečický">
<link rel="icon" href="/static/img/favicon.svg" type="image/svg+xml">
<link rel="canonical" href="https://tui-pages.dev/">
<link rel="canonical" href="https://tui-pages.farmeris.sk/">
<!-- Open Graph -->
<meta property="og:type" content="website">
<meta property="og:title" content="tui-pages — a framework for building TUIs in Rust">
<meta property="og:description" content="A complete framework for building TUIs in Rust on top of ratatui. Pre-programmed focus manager, input pipeline, keymaps, and page navigation.">
<meta property="og:url" content="https://tui-pages.dev/">
<meta property="og:url" content="https://tui-pages.farmeris.sk/">
<meta property="og:image" content="/static/img/og-image.svg">
<meta property="og:site_name" content="tui-pages">
@@ -129,7 +129,7 @@
<ul class="hidden md:flex items-center gap-1 ml-4 text-sm">
<li><a href="/examples.html" class="px-3 py-1.5 text-zinc-300 hover:text-white rounded-md hover:bg-zinc-800/50 transition-colors">Examples</a></li>
<li><a href="https://tui-pages.farmeris.sk" class="px-3 py-1.5 text-zinc-300 hover:text-white rounded-md hover:bg-zinc-800/50 transition-colors">Book</a></li>
<li><a href="https://tui-pages.farmeris.sk/book" class="px-3 py-1.5 text-zinc-300 hover:text-white rounded-md hover:bg-zinc-800/50 transition-colors">Book</a></li>
<li><a href="https://docs.rs/tui-pages" class="px-3 py-1.5 text-zinc-300 hover:text-white rounded-md hover:bg-zinc-800/50 transition-colors">API</a></li>
<li><a href="https://gitlab.com/filipriec/tui-pages" class="px-3 py-1.5 text-zinc-300 hover:text-white rounded-md hover:bg-zinc-800/50 transition-colors">GitLab</a></li>
</ul>
@@ -179,7 +179,7 @@
>
<ul class="px-4 py-3 space-y-1 text-sm">
<li><a href="/examples.html" class="block px-3 py-2 rounded-md text-zinc-300 hover:bg-zinc-800/60">Examples</a></li>
<li><a href="https://tui-pages.farmeris.sk" class="block px-3 py-2 rounded-md text-zinc-300 hover:bg-zinc-800/60">Book</a></li>
<li><a href="https://tui-pages.farmeris.sk/book" class="block px-3 py-2 rounded-md text-zinc-300 hover:bg-zinc-800/60">Book</a></li>
<li><a href="https://docs.rs/tui-pages" class="block px-3 py-2 rounded-md text-zinc-300 hover:bg-zinc-800/60">API</a></li>
<li><a href="https://gitlab.com/filipriec/tui-pages" class="block px-3 py-2 rounded-md text-zinc-300 hover:bg-zinc-800/60">GitLab</a></li>
</ul>
@@ -218,7 +218,7 @@
Get started
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg>
</a>
<a href="https://tui-pages.farmeris.sk" class="inline-flex items-center gap-2 h-11 px-5 rounded-lg border border-zinc-700 bg-zinc-900/40 text-zinc-100 font-medium hover:border-zinc-500 hover:bg-zinc-900 transition-colors">
<a href="https://tui-pages.farmeris.sk/book" class="inline-flex items-center gap-2 h-11 px-5 rounded-lg border border-zinc-700 bg-zinc-900/40 text-zinc-100 font-medium hover:border-zinc-500 hover:bg-zinc-900 transition-colors">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2zM22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>
Read the book
</a>
@@ -682,7 +682,7 @@ rt.run() // framework handles the rest</code></pre>
The book walks you from <code class="font-mono text-zinc-300">cargo new</code> to a working multi-page app. Or read the API reference and dive in.
</p>
<div class="mt-10 flex flex-wrap items-center justify-center gap-3">
<a href="https://tui-pages.farmeris.sk" class="inline-flex items-center gap-2 h-12 px-6 rounded-lg bg-accent text-accent-fg font-medium hover:bg-accent/90 transition-colors">
<a href="https://tui-pages.farmeris.sk/book" class="inline-flex items-center gap-2 h-12 px-6 rounded-lg bg-accent text-accent-fg font-medium hover:bg-accent/90 transition-colors">
Start the tutorial
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg>
</a>
@@ -713,7 +713,7 @@ rt.run() // framework handles the rest</code></pre>
<h4 class="text-xs font-semibold uppercase tracking-widest text-zinc-400">Resources</h4>
<ul class="mt-3 space-y-2 text-sm">
<li><a href="https://docs.rs/tui-pages" class="text-zinc-300 hover:text-white">API reference</a></li>
<li><a href="https://tui-pages.farmeris.sk" class="text-zinc-300 hover:text-white">The Book</a></li>
<li><a href="https://tui-pages.farmeris.sk/book" class="text-zinc-300 hover:text-white">The Book</a></li>
<li><a href="/examples.html" class="text-zinc-300 hover:text-white">Examples</a></li>
<li><a href="https://crates.io/crates/tui-pages" class="text-zinc-300 hover:text-white">crates.io</a></li>
</ul>

View File

@@ -1,4 +1,4 @@
User-agent: *
Allow: /
Sitemap: https://tui-pages.dev/sitemap.xml
Sitemap: https://tui-pages.farmeris.sk/sitemap.xml

View File

@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://tui-pages.dev/</loc>
<loc>https://tui-pages.farmeris.sk/</loc>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://tui-pages.dev/examples.html</loc>
<loc>https://tui-pages.farmeris.sk/examples.html</loc>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>

View File

@@ -29,8 +29,8 @@
margin: 0;
padding: 0;
font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: max(0.35vw, 0.695vh);
font-size: max(0.35vw, 0.695svh);
/* font-size: max(0.7vw, 1.39vh); */ /* 240p */
font-size: max(0.463vw, 0.926vh); /* 360p */
line-height: 1.0;
letter-spacing: 0;
color: var(--tp-mountain-color, #f4a26b);

File diff suppressed because it is too large Load Diff