Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
f2711bd3c3
|
|||
|
1c61a8736f
|
|||
|
6a76c377fa
|
|||
|
c863d45cf0
|
|||
|
6839670a8c
|
|||
|
efdddd2527
|
|||
|
944092f474
|
|||
|
aaa8774dea
|
|||
|
89f6d9b85c
|
|||
|
724fc33f87
|
|||
|
a863ae498d
|
|||
|
00768bd887
|
|||
|
5ba472f87a
|
|||
|
7d115e8b43
|
|||
|
6a69b2c4ba
|
|||
|
b958d6616b
|
|||
|
430cbb6c10
|
|||
|
7754449b8b
|
|||
|
a530ebae35
|
|||
|
689fd437f6
|
|||
|
3cc80eaef9
|
|||
|
662b462192
|
|||
|
1f5bf3fc02
|
|||
|
faf2ae3c5e
|
|||
|
3460e45a37
|
|||
|
55359c25c3
|
|||
|
fe1ad16e50
|
|||
|
83992f6112
|
|||
|
1944c56d9c
|
|||
|
5d2931f314
|
|||
|
a4ed559bb0
|
|||
|
671d603cb0
|
|||
|
31a2c976a4
|
@@ -1,84 +1,262 @@
|
||||
# fedi_start
|
||||
|
||||
Onboarding systém pro nové uživatele Mastodonu (CZ/SK komunita).
|
||||
Onboarding průvodce pro [Mamutovo.cz](https://mamutovo.cz) – pomáhá nováčkům začít na Fediverse.
|
||||
|
||||
## Soubory
|
||||
- **Web:** https://fedi.mamutovo.cz
|
||||
- **Repo:** https://git.arch-linux.cz/Mamutovo/fedi_start
|
||||
- **Účet:** [@archlinuxcz@mamutovo.cz](https://mamutovo.cz/@archlinuxcz)
|
||||
|
||||
---
|
||||
|
||||
## Obsah projektu
|
||||
|
||||
| Soubor | Popis |
|
||||
|---|---|
|
||||
| `start.html` | Úvodní onboarding stránka |
|
||||
| `accounts.html` | Interaktivní seznam CZ účtů s filtry |
|
||||
| `accounts.json` | Data účtů (generováno skriptem) |
|
||||
| `starter-general.csv` | Starter pack pro import do Mastodonu |
|
||||
| `mastodon_cz_accounts.py` | Automatický sběr CZ/SK účtů |
|
||||
| `upload_surfer.sh` | Upload dat na Surfer |
|
||||
| `index.html` | Hlavní stránka |
|
||||
| `start.html` | Krok za krokem onboarding pro nováčky |
|
||||
| `basics.html` | Základy Mastodonu |
|
||||
| `accounts.html` | Interaktivní seznam CZ/SK účtů s filtry |
|
||||
| `apps.html` | Doporučené aplikace (Android / iOS / Web / Desktop) |
|
||||
| `accounts.json` | Data účtů (generováno skriptem, nahrává se na Surfer) |
|
||||
| `accounts.csv` | Totéž v CSV (nahrává se na Surfer) |
|
||||
| `manual_accounts.csv` | Ručně přidané účty (GTS instance a výjimky) |
|
||||
| `starter-general.csv` | Starter pack – obecný – pro import do Mastodonu |
|
||||
| `starter-tech.csv` | Starter pack – tech – pro import do Mastodonu |
|
||||
| `mastodon_cz_accounts.py` | Hlavní skript – scraping CZ/SK účtů |
|
||||
| `upload_surfer.sh` | Upload `accounts.json` a `accounts.csv` na Cloudron Surfer |
|
||||
|
||||
---
|
||||
|
||||
## Lokální vývoj
|
||||
|
||||
## Lokální spuštění
|
||||
```bash
|
||||
# Spustí lokální HTTP server
|
||||
python3 -m http.server 8080
|
||||
# http://localhost:8080/accounts.html
|
||||
# Otevři v prohlížeči: http://localhost:8080/
|
||||
```
|
||||
|
||||
## Generování dat
|
||||
```bash
|
||||
python3 mastodon_cz_accounts.py --output .
|
||||
---
|
||||
|
||||
## Skript `mastodon_cz_accounts.py`
|
||||
|
||||
Sbírá CZ/SK účty z Mastodonu a GoToSocial instancí, filtruje je a ukládá do `accounts.json` a `accounts.csv`.
|
||||
|
||||
### Jak funguje sběr dat
|
||||
|
||||
1. Pro každou instanci v `QUERY_INSTANCES` volá `/api/v1/directory` (veřejné Mastodon API).
|
||||
2. Načte `manual_accounts.csv` a dohledá každý účet přes `/api/v1/accounts/lookup`.
|
||||
3. Sloučí obojí, odstraní duplicity, seřadí a ořízne na `TOP_N` (výchozí 250) automatických účtů + všechny manuální.
|
||||
|
||||
### Kritéria pro zařazení (automatické účty)
|
||||
|
||||
| Podmínka | Hodnota |
|
||||
|---|---|
|
||||
| `discoverable = true` | Uživatel chce být nalezen |
|
||||
| Aktivní za posledních | 90 dní |
|
||||
| Min. počet příspěvků | 10 |
|
||||
| Min. počet sledujících | 10 |
|
||||
|
||||
**Manuálně přidané účty** (`manual_accounts.csv`) jsou vždy zahrnuty bez ohledu na tato kritéria.
|
||||
|
||||
### Sledované instance
|
||||
|
||||
CZ/SK instance jsou v konstantě `QUERY_INSTANCES` v hlavičce skriptu:
|
||||
|
||||
```
|
||||
mastodonczech.cz, cztwitter.cz, witter.cz, mastodon.pirati.cz,
|
||||
f.cz, lgbtcz.social, boskovice.social, mamutovo.cz,
|
||||
gts.arch-linux.cz, kompost.cz, spondr.cz, skorpil.cz,
|
||||
ajtaci.club, toot.whatever.cz
|
||||
```
|
||||
|
||||
### Spuštění
|
||||
|
||||
```bash
|
||||
# Základní spuštění (výstup do aktuálního adresáře)
|
||||
python3 mastodon_cz_accounts.py
|
||||
|
||||
# Výstup do konkrétního adresáře
|
||||
python3 mastodon_cz_accounts.py --output /var/www/start/
|
||||
|
||||
# Omezení počtu účtů
|
||||
python3 mastodon_cz_accounts.py --top 100
|
||||
|
||||
# Ladění
|
||||
python3 mastodon_cz_accounts.py --debug
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Konfigurace `.env`
|
||||
|
||||
Vytvoř soubor `.env` v kořeni projektu (je v `.gitignore`, nikdy ho necommituj):
|
||||
|
||||
```ini
|
||||
# Volitelný Mastodon token (pro vyšší rate limity)
|
||||
MASTODON_TOKEN=tvuj_mastodon_token
|
||||
|
||||
# GoToSocial tokeny per-instance (viz sekce níže)
|
||||
GTS_TOKEN_GTS_ARCH_LINUX_CZ=tvuj_token_zde
|
||||
GTS_TOKEN_DALSI_INSTANCE_CZ=dalsi_token
|
||||
|
||||
# Surfer token pro upload na web
|
||||
SURFER_TOKEN=tvuj_surfer_token
|
||||
|
||||
# Volitelně: jiný Surfer server (výchozí je fedi.mamutovo.cz)
|
||||
# SURFER_SERVER=cloud.oscloud.cz
|
||||
```
|
||||
|
||||
### Proměnné prostředí
|
||||
|
||||
| Proměnná | Povinná | Popis |
|
||||
|---|---|---|
|
||||
| `MASTODON_TOKEN` | ne | Token pro Mastodon API (vyšší rate limity) |
|
||||
| `GTS_TOKEN_<DOMAIN>` | pro GTS instance | Read token per GoToSocial instance |
|
||||
| `SURFER_TOKEN` | pro upload | Token z Cloudron Surfer |
|
||||
| `SURFER_SERVER` | ne | Server Surferu, pokud není výchozí |
|
||||
|
||||
Název proměnné pro GTS token se tvoří z domény – tečky a pomlčky se nahradí podtržítkem a vše se převede na VELKÁ PÍSMENA:
|
||||
|
||||
```
|
||||
gts.arch-linux.cz → GTS_TOKEN_GTS_ARCH_LINUX_CZ
|
||||
shimon.gts.example → GTS_TOKEN_SHIMON_GTS_EXAMPLE
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## GoToSocial instance – jak získat read token
|
||||
|
||||
GoToSocial nepodporuje veřejné `/api/v1/directory`, takže každá GTS instance potřebuje vlastní read token. Postup:
|
||||
|
||||
### 1. Přihlášení a vytvoření aplikace
|
||||
|
||||
Přihlas se na dané GTS instanci a jdi do **Settings → Applications → New application**.
|
||||
|
||||
Vyplň:
|
||||
- **Název aplikace:** např. `fedi_start scraper`
|
||||
- **Scopes:** zaškrtni pouze `read`
|
||||
- Ostatní pole nech prázdná nebo vyplň libovolně
|
||||
|
||||
Uložíš aplikaci a GTS ti vygeneruje `client_id` a `client_secret`. Poznamenej si obojí.
|
||||
|
||||
### 2. Získání authorization code
|
||||
|
||||
Otevři v prohlížeči tuto URL (nahraď `INSTANCI.CZ` a `CLIENT_ID`):
|
||||
|
||||
```
|
||||
https://INSTANCI.CZ/oauth/authorize?client_id=CLIENT_ID&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&scope=read
|
||||
```
|
||||
|
||||
Přihlášený prohlížeč zobrazí stránku s kódem – zkopíruj ho (jednorázový, platí jen chvíli).
|
||||
|
||||
### 3. Výměna code za access token
|
||||
|
||||
```bash
|
||||
curl -X POST "https://INSTANCI.CZ/oauth/token" \
|
||||
-d "client_id=CLIENT_ID" \
|
||||
-d "client_secret=CLIENT_SECRET" \
|
||||
-d "redirect_uri=urn:ietf:wg:oauth:2.0:oob" \
|
||||
-d "grant_type=authorization_code" \
|
||||
-d "code=AUTHORIZATION_CODE" \
|
||||
-d "scope=read"
|
||||
```
|
||||
|
||||
V odpovědi dostaneš JSON s `access_token`.
|
||||
|
||||
### 4. Přidání tokenu do `.env`
|
||||
|
||||
```ini
|
||||
GTS_TOKEN_GTS_ARCH_LINUX_CZ=ziskany_access_token
|
||||
```
|
||||
|
||||
### 5. Ověření
|
||||
|
||||
```bash
|
||||
curl -H "Authorization: Bearer TVUJ_TOKEN" "https://INSTANCI.CZ/api/v1/accounts/verify_credentials"
|
||||
```
|
||||
|
||||
Pokud vrátí JSON s tvým účtem, token funguje.
|
||||
|
||||
---
|
||||
|
||||
## Přidání nového účtu
|
||||
|
||||
### Mastodon instance
|
||||
|
||||
Uživatel se zobrazí automaticky, pokud má v nastavení zapnuté:
|
||||
|
||||
> **Settings → Privacy → Appearance in search engines** (nebo česky „Zobrazovat profil ve vyhledávacích algoritmech")
|
||||
|
||||
A splňuje kritéria výše (aktivita, min. počet příspěvků atd.).
|
||||
|
||||
Pokud chceš účet přidat ručně bez ohledu na kritéria, přidej ho do `manual_accounts.csv`:
|
||||
|
||||
```csv
|
||||
handle@instance.cz,true,false,
|
||||
```
|
||||
|
||||
### GoToSocial instance
|
||||
|
||||
GTS nemá veřejný adresář, proto:
|
||||
|
||||
1. Získej read token (viz postup výše).
|
||||
2. Přidej `GTS_TOKEN_<DOMAIN>=token` do `.env`.
|
||||
3. Přidej konkrétní účty do `manual_accounts.csv` (GTS adresář je přístupný s tokenem, ale pro jistotu je lepší přidat je ručně).
|
||||
4. Přidej instanci do `QUERY_INSTANCES` v `mastodon_cz_accounts.py`.
|
||||
|
||||
---
|
||||
|
||||
## Nasazení na VPS
|
||||
|
||||
Projekt běží na VPS Hetzner v `/opt/fedi_start/`.
|
||||
|
||||
### Závislosti
|
||||
|
||||
```bash
|
||||
pip3 install requests python-dateutil
|
||||
# Python (stdlib only, žádné externí balíčky)
|
||||
python3 --version # 3.10+
|
||||
|
||||
# Node.js – Cloudron Surfer CLI
|
||||
npm install -g cloudron-surfer
|
||||
```
|
||||
|
||||
### Nastavení .env
|
||||
Vytvoř soubor `.env` v kořeni projektu:
|
||||
```
|
||||
MASTODON_TOKEN=tvuj_mastodon_token
|
||||
GTS_TOKEN=tvuj_gts_token
|
||||
SURFER_TOKEN=tvuj_surfer_token
|
||||
### Nastavení na serveru
|
||||
|
||||
```bash
|
||||
git clone https://git.arch-linux.cz/Mamutovo/fedi_start /opt/fedi_start
|
||||
cd /opt/fedi_start
|
||||
cp .env.example .env # nebo vytvoř .env ručně
|
||||
# Vyplň tokeny v .env
|
||||
```
|
||||
|
||||
- **MASTODON_TOKEN** — přístupový token z nastavení Mastodon účtu (Settings → Development → New application)
|
||||
- **GTS_TOKEN** — token pro GoToSocial instanci
|
||||
- **SURFER_TOKEN** — token z Cloudron Surfer (viz sekce Upload na Surfer)
|
||||
### Cron
|
||||
|
||||
## Cron
|
||||
Automatická aktualizace 4× denně:
|
||||
|
||||
Automatické generování dat každý den ve 3:00:
|
||||
```
|
||||
0 3 * * * cd /opt/fedi_start && python3 mastodon_cz_accounts.py --output . && bash upload_surfer.sh
|
||||
0 6,12,18,0 * * * cd /opt/fedi_start && python3 mastodon_cz_accounts.py --output . && bash upload_surfer.sh >> /var/log/fedi_start.log 2>&1
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Upload na Surfer
|
||||
|
||||
### Instalace
|
||||
```bash
|
||||
npm install -g cloudron-surfer
|
||||
```
|
||||
[Cloudron Surfer](https://cloudron.io/store/io.cloudron.surfer.html) je jednoduchý statický file hosting.
|
||||
|
||||
### Konfigurace
|
||||
```bash
|
||||
surfer config --server fedi.mamutovo.cz --token TOKEN
|
||||
```
|
||||
### Ruční spuštění uploadu
|
||||
|
||||
### Spuštění uploadu
|
||||
```bash
|
||||
bash upload_surfer.sh
|
||||
```
|
||||
|
||||
### CLI — manuální upload
|
||||
Skript načte `SURFER_TOKEN` z `.env` a nahraje `accounts.json` + `accounts.csv` do kořene Surfer serveru.
|
||||
|
||||
### Manuální Surfer příkazy
|
||||
|
||||
```bash
|
||||
# Nahrát konkrétní soubor do kořene
|
||||
surfer put -t $SURFER_TOKEN accounts.json /
|
||||
|
||||
# Nahrát více souborů najednou
|
||||
# Nahrát konkrétní soubory
|
||||
surfer put -t $SURFER_TOKEN accounts.json accounts.csv /
|
||||
|
||||
# Nahrát celý adresář
|
||||
surfer put -t $SURFER_TOKEN dist/ /
|
||||
|
||||
# Zobrazit obsah na serveru
|
||||
surfer get
|
||||
|
||||
@@ -86,6 +264,30 @@ surfer get
|
||||
surfer del /accounts.json
|
||||
```
|
||||
|
||||
## Web
|
||||
---
|
||||
|
||||
Stránka je dostupná na: https://fedi.mamutovo.cz
|
||||
## Struktura dat `accounts.json`
|
||||
|
||||
Každý záznam v poli `accounts` obsahuje:
|
||||
|
||||
```json
|
||||
{
|
||||
"handle": "uzivatel@instance.cz",
|
||||
"display_name": "Zobrazované jméno",
|
||||
"note": "Bio uživatele",
|
||||
"followers": 123,
|
||||
"following": 45,
|
||||
"statuses": 678,
|
||||
"last_active": "2024-03-15",
|
||||
"avatar": "https://...",
|
||||
"url": "https://instance.cz/@uzivatel",
|
||||
"fields": [...],
|
||||
"tags": ["linux", "opensource"]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Přispívání
|
||||
|
||||
Pull requesty vítány. Repo: https://git.arch-linux.cz/Mamutovo/fedi_start
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>CZ účty na Mastodonu – Mamutovo</title>
|
||||
<script>if(localStorage.getItem('theme')==='light')document.documentElement.classList.add('light');</script>
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;700;800&display=swap');
|
||||
|
||||
@@ -20,7 +21,22 @@
|
||||
--muted2: #555;
|
||||
--border: #282828;
|
||||
--radius: 10px;
|
||||
--nav-bg: rgba(13,13,13,0.9);
|
||||
}
|
||||
html.light {
|
||||
--bg: #ffffff;
|
||||
--surface: #f8f8f8;
|
||||
--surface2: #f0f0f0;
|
||||
--surface3: #e8e8e8;
|
||||
--border: #e0e0e0;
|
||||
--text: #1a1a1a;
|
||||
--muted: #666666;
|
||||
--muted2: #999999;
|
||||
--accent: #06b6d4;
|
||||
--nav-bg: rgba(245,245,245,0.9);
|
||||
}
|
||||
.theme-toggle { background: none; border: 1px solid var(--border); border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 1rem; line-height: 1; flex-shrink: 0; color: var(--text); transition: border-color .15s; }
|
||||
.theme-toggle:hover { border-color: var(--accent); }
|
||||
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
@@ -38,7 +54,7 @@ nav {
|
||||
justify-content: space-between;
|
||||
padding: 1rem 2rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: rgba(13,13,13,0.9);
|
||||
background: var(--nav-bg);
|
||||
backdrop-filter: blur(10px);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
@@ -303,6 +319,11 @@ select:focus { border-color: var(--accent); }
|
||||
inset: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
.card-avatar {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
border-color: var(--accent);
|
||||
@@ -384,6 +405,15 @@ select:focus { border-color: var(--accent); }
|
||||
border: 1px solid rgba(0,200,150,0.15);
|
||||
border-radius: 999px;
|
||||
padding: 0.15rem 0.5rem;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
transition: background 0.15s, border-color 0.15s;
|
||||
}
|
||||
|
||||
.card-tag:hover {
|
||||
background: rgba(0,200,150,0.22);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.card-stats {
|
||||
@@ -557,6 +587,7 @@ select:focus { border-color: var(--accent); }
|
||||
}
|
||||
|
||||
.site-footer-inner a:hover { color: var(--accent); }
|
||||
.modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.7);z-index:1000;align-items:center;justify-content:center} .modal-overlay.active{display:flex} .modal-card{background:var(--surface);border-radius:16px;max-width:420px;width:90%;overflow:hidden;position:relative} .modal-close{position:absolute;top:.75rem;right:.75rem;background:none;border:none;color:var(--muted);font-size:1.2rem;cursor:pointer} .modal-header{position:relative;height:120px;background:var(--surface2)} .modal-header-img{width:100%;height:120px;object-fit:cover} .modal-avatar{width:72px;height:72px;border-radius:12px;border:3px solid var(--surface);position:absolute;bottom:-36px;left:1.2rem} .modal-body{padding:2.5rem 1.2rem 1.2rem} .modal-name{font-size:1.2rem;font-weight:700;color:var(--text)} .modal-handle{color:var(--muted);font-size:.85rem;margin-bottom:.5rem} .modal-bio{color:var(--muted);font-size:.9rem;margin-bottom:.75rem;line-height:1.5} .modal-tags{display:flex;flex-wrap:wrap;gap:.4rem;margin-bottom:.75rem} .modal-stats{display:flex;gap:1.5rem}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -567,6 +598,7 @@ select:focus { border-color: var(--accent); }
|
||||
<a href="start.html">← Průvodce</a>
|
||||
<a href="accounts.html" class="active">CZ účty</a>
|
||||
</div>
|
||||
<button id="theme-toggle" class="theme-toggle" onclick="toggleTheme()" aria-label="Přepnout téma">🌙</button>
|
||||
<span class="nav-updated"><span id="lastUpdated">načítám...</span><span id="refreshCountdown" style="margin-left:0.4rem;color:var(--muted2);font-size:0.65rem;font-family:'Space Mono',monospace;"></span><span id="refreshBadge" style="margin-left:0.5rem;font-size:0.65rem;font-family:'Space Mono',monospace;transition:color 0.3s;"></span></span>
|
||||
</nav>
|
||||
|
||||
@@ -582,6 +614,9 @@ select:focus { border-color: var(--accent); }
|
||||
<select id="categoryFilter">
|
||||
<option value="">Všechny kategorie</option>
|
||||
</select>
|
||||
<select id="instanceFilter">
|
||||
<option value="">Všechny instance</option>
|
||||
</select>
|
||||
<select id="sortFilter">
|
||||
<option value="score">Nejvyšší skóre</option>
|
||||
<option value="followers" selected>Nejvíce sledujících</option>
|
||||
@@ -617,6 +652,13 @@ select:focus { border-color: var(--accent); }
|
||||
<div class="empty" id="emptyEl">Žádné účty neodpovídají filtru. Zkus jiný výraz.</div>
|
||||
|
||||
<script>
|
||||
function toggleTheme() {
|
||||
const light = document.documentElement.classList.toggle('light');
|
||||
localStorage.setItem('theme', light ? 'light' : 'dark');
|
||||
document.getElementById('theme-toggle').textContent = light ? '☀️' : '🌙';
|
||||
}
|
||||
if (localStorage.getItem('theme') === 'light') document.getElementById('theme-toggle').textContent = '☀️';
|
||||
|
||||
// ────────────────────────────────
|
||||
// DATA – fallback když není JSON
|
||||
// ────────────────────────────────
|
||||
@@ -731,22 +773,47 @@ let viewMode = 'grid'; // 'grid' | 'list'
|
||||
// ────────────────────────────────
|
||||
// FILTER + SORT
|
||||
// ────────────────────────────────
|
||||
function filterByTag(tag) {
|
||||
const wrap = document.getElementById('filterTags');
|
||||
const existing = wrap.querySelector(`.ftag[data-tag="${CSS.escape(tag)}"]`);
|
||||
if (existing) {
|
||||
wrap.querySelectorAll('.ftag').forEach(b => b.classList.remove('active'));
|
||||
existing.classList.add('active');
|
||||
} else {
|
||||
const btn = document.createElement('button');
|
||||
btn.className = 'ftag active';
|
||||
btn.dataset.tag = tag;
|
||||
btn.textContent = '#' + tag;
|
||||
btn.addEventListener('click', () => {
|
||||
wrap.querySelectorAll('.ftag').forEach(b => b.classList.remove('active'));
|
||||
btn.classList.add('active');
|
||||
applyFilters();
|
||||
});
|
||||
wrap.querySelectorAll('.ftag').forEach(b => b.classList.remove('active'));
|
||||
wrap.appendChild(btn);
|
||||
}
|
||||
applyFilters();
|
||||
}
|
||||
|
||||
function applyFilters() {
|
||||
const q = document.getElementById('searchInput').value.toLowerCase().trim();
|
||||
const cat = document.getElementById('categoryFilter').value;
|
||||
const inst = document.getElementById('instanceFilter').value;
|
||||
const sort = document.getElementById('sortFilter').value;
|
||||
const activeTag = document.querySelector('.ftag.active')?.dataset.tag || '';
|
||||
|
||||
filtered = allAccounts.filter(a => {
|
||||
const handle = a.acct || a.handle || '';
|
||||
const matchQ = !q ||
|
||||
a.name.toLowerCase().includes(q) ||
|
||||
(a.bio || '').toLowerCase().includes(q) ||
|
||||
(a.handle || '').toLowerCase().includes(q) ||
|
||||
handle.toLowerCase().includes(q) ||
|
||||
(a.tags || []).some(t => t.toLowerCase().includes(q));
|
||||
const matchCat = !cat || a.category === cat;
|
||||
const matchInst = !inst || handle.split('@').pop() === inst;
|
||||
const matchTag = !activeTag ||
|
||||
(a.tags || []).some(t => t.toLowerCase().includes(activeTag.toLowerCase()));
|
||||
return matchQ && matchCat && matchTag;
|
||||
return matchQ && matchCat && matchInst && matchTag;
|
||||
});
|
||||
|
||||
filtered.sort((a, b) => {
|
||||
@@ -792,8 +859,8 @@ function avatarFallback(name) {
|
||||
|
||||
function cardHTML(a, idx) {
|
||||
const av = a.avatar || avatarFallback(a.name);
|
||||
const tags = (a.tags || []).slice(0, 3).map(t =>
|
||||
`<span class="card-tag">#${t}</span>`).join('');
|
||||
const tags = (a.tags || []).slice(0, 4).map(t =>
|
||||
`<span class="card-tag" onclick="event.stopPropagation();filterByTag('${t.replace(/'/g, "\\'")}')">#${t}</span>`).join('');
|
||||
|
||||
if (viewMode === 'list') {
|
||||
return `
|
||||
@@ -820,7 +887,7 @@ function cardHTML(a, idx) {
|
||||
<a class="card-link" href="${a.url}" target="_blank" rel="noopener noreferrer" aria-label="Profil ${a.name}"></a>
|
||||
<div class="card-header">
|
||||
${a.header ? `<img class="card-header-img" src="${a.header}" alt="">` : ''}
|
||||
<img class="card-avatar" src="${av}" alt="" onerror="this.src='${avatarFallback(a.name)}'">
|
||||
<img class="card-avatar" src="${av}" alt="" onclick="event.stopPropagation();openModal(filtered[${idx}])" onerror="this.src='${avatarFallback(a.name)}'">
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-name">${a.name}</div>
|
||||
@@ -873,6 +940,7 @@ function downloadCSV(content, filename) {
|
||||
// ────────────────────────────────
|
||||
document.getElementById('searchInput').addEventListener('input', applyFilters);
|
||||
document.getElementById('categoryFilter').addEventListener('change', applyFilters);
|
||||
document.getElementById('instanceFilter').addEventListener('change', applyFilters);
|
||||
document.getElementById('sortFilter').addEventListener('change', applyFilters);
|
||||
|
||||
document.querySelectorAll('.ftag').forEach(btn => {
|
||||
@@ -932,6 +1000,23 @@ function buildDynamicUI() {
|
||||
sel.appendChild(opt);
|
||||
});
|
||||
|
||||
// --- Instance select ---
|
||||
const instanceCount = {};
|
||||
allAccounts.forEach(a => {
|
||||
const handle = a.acct || a.handle || '';
|
||||
const instance = handle.includes('@') ? handle.split('@').pop() : '';
|
||||
if (instance) instanceCount[instance] = (instanceCount[instance] || 0) + 1;
|
||||
});
|
||||
const instances = Object.keys(instanceCount).sort((a, b) => a.localeCompare(b, 'cs'));
|
||||
const instSel = document.getElementById('instanceFilter');
|
||||
instSel.innerHTML = '<option value="">Všechny instance</option>';
|
||||
instances.forEach(instance => {
|
||||
const opt = document.createElement('option');
|
||||
opt.value = instance;
|
||||
opt.textContent = `${instance} (${instanceCount[instance]})`;
|
||||
instSel.appendChild(opt);
|
||||
});
|
||||
|
||||
// --- Hashtag tlačítka – top 8 nejčastějších tagů ---
|
||||
const tagCount = {};
|
||||
allAccounts.forEach(a => (a.tags || []).forEach(t => {
|
||||
@@ -1064,5 +1149,6 @@ loadAccounts();
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<div id="profile-modal" class="modal-overlay" onclick="closeModal()"><div class="modal-card" onclick="event.stopPropagation()"><button class="modal-close" onclick="closeModal()">✕</button><div class="modal-header"><img id="modal-header-img" class="modal-header-img" src="" alt="" style="display:none"><img id="modal-avatar" class="modal-avatar" src="" alt=""></div><div class="modal-body"><div id="modal-name" class="modal-name"></div><div id="modal-handle" class="modal-handle"></div><div id="modal-bio" class="modal-bio"></div><div id="modal-tags" class="modal-tags"></div><div class="modal-stats"><div class="stat"><span id="modal-followers" class="stat-val"></span><span class="stat-label">Sledující</span></div><div class="stat"><span id="modal-statuses" class="stat-val"></span><span class="stat-label">Postů</span></div></div><a id="modal-follow" href="" target="_blank" class="follow-btn" style="margin-top:1rem;display:inline-block">+ Sledovat</a></div></div></div><script>function openModal(a){const av=a.avatar||avatarFallback(a.name);document.getElementById('modal-avatar').src=av;document.getElementById('modal-avatar').onerror=function(){this.src=avatarFallback(a.name);};const hi=document.getElementById('modal-header-img');if(a.header){hi.src=a.header;hi.style.display='block';}else{hi.style.display='none';}document.getElementById('modal-name').textContent=a.name;document.getElementById('modal-handle').textContent='@'+a.handle;document.getElementById('modal-bio').textContent=a.bio||'';document.getElementById('modal-tags').innerHTML=(a.tags||[]).map(t=>`<span class="card-tag">#${t}</span>`).join('');document.getElementById('modal-followers').textContent=fmt(a.followers);document.getElementById('modal-statuses').textContent=fmt(a.statuses);document.getElementById('modal-follow').href=followUrl(a.handle);document.getElementById('profile-modal').classList.add('active');document.body.style.overflow='hidden';}function closeModal(){document.getElementById('profile-modal').classList.remove('active');document.body.style.overflow='';}document.addEventListener('keydown',e=>{if(e.key==='Escape')closeModal();});</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,225 +3,491 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Mobilní aplikace – Mamutovo</title>
|
||||
<title>Aplikace – Mamutovo</title>
|
||||
<script>if(localStorage.getItem('theme')==='light')document.documentElement.classList.add('light');</script>
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;700;800&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;700;800&display=swap');
|
||||
|
||||
:root {
|
||||
--bg: #0f0f0f;
|
||||
--surface: #1a1a1a;
|
||||
--surface2: #242424;
|
||||
--accent: #6364ff;
|
||||
--accent2: #ff6b6b;
|
||||
--text: #f0f0f0;
|
||||
--muted: #888;
|
||||
--border: #2e2e2e;
|
||||
--radius: 10px;
|
||||
:root {
|
||||
--bg: #0d0d0d;
|
||||
--surface: #161616;
|
||||
--surface2: #1e1e1e;
|
||||
--surface3: #252525;
|
||||
--accent: #00c896;
|
||||
--accent2: #ff6b6b;
|
||||
--accent3: #fbbf24;
|
||||
--text: #f0f0f0;
|
||||
--muted: #777;
|
||||
--muted2: #555;
|
||||
--border: #282828;
|
||||
--radius: 10px;
|
||||
}
|
||||
html.light {
|
||||
--bg: #ffffff;
|
||||
--surface: #f8f8f8;
|
||||
--surface2: #f0f0f0;
|
||||
--surface3: #e8e8e8;
|
||||
--border: #e0e0e0;
|
||||
--text: #1a1a1a;
|
||||
--muted: #666666;
|
||||
--muted2: #999999;
|
||||
--accent: #06b6d4;
|
||||
}
|
||||
.theme-toggle { background: var(--surface); border: 1px solid var(--border); border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 1rem; line-height: 1; position: fixed; top: 1rem; right: 1rem; z-index: 200; transition: border-color .15s; }
|
||||
.theme-toggle:hover { border-color: var(--accent); }
|
||||
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
body {
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: 'Syne', sans-serif;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* HEADER */
|
||||
.header {
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
padding: 2.5rem 1.5rem 1.5rem;
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
background: var(--surface2);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--muted);
|
||||
font-family: 'Space Mono', monospace;
|
||||
font-size: 0.78rem;
|
||||
padding: 0.4rem 1rem;
|
||||
border-radius: 999px;
|
||||
margin-bottom: 1.2rem;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
transition: border-color 0.15s, color 0.15s;
|
||||
}
|
||||
|
||||
.badge:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: clamp(1.6rem, 4vw, 2.4rem);
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.02em;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
h1 span { color: var(--accent); }
|
||||
|
||||
.subtitle {
|
||||
color: var(--muted);
|
||||
font-size: 0.9rem;
|
||||
margin-bottom: 1.8rem;
|
||||
}
|
||||
|
||||
/* FILTER BUTTONS */
|
||||
.filters {
|
||||
max-width: 960px;
|
||||
margin: 0 auto 1.5rem;
|
||||
padding: 0 1.5rem;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.4rem;
|
||||
}
|
||||
|
||||
.ftag {
|
||||
font-family: 'Space Mono', monospace;
|
||||
font-size: 0.72rem;
|
||||
padding: 0.35rem 0.9rem;
|
||||
border-radius: 999px;
|
||||
border: 1px solid var(--border);
|
||||
background: transparent;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
|
||||
.ftag:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
background: rgba(0,200,150,0.06);
|
||||
}
|
||||
|
||||
.ftag.active {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
background: rgba(0,200,150,0.1);
|
||||
}
|
||||
|
||||
/* GRID */
|
||||
.grid {
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
padding: 0 1.5rem 3rem;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 0.9rem;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
/* CARD */
|
||||
.card {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 1.1rem 1.1rem 1rem;
|
||||
display: flex;
|
||||
gap: 0.9rem;
|
||||
align-items: flex-start;
|
||||
transition: border-color 0.2s, transform 0.15s;
|
||||
animation: fadeIn 0.3s ease both;
|
||||
}
|
||||
|
||||
body {
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: 'Syne', sans-serif;
|
||||
min-height: 100vh;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
.card:hover {
|
||||
border-color: var(--accent);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
/* --- HERO --- */
|
||||
.hero {
|
||||
max-width: 680px;
|
||||
margin: 0 auto;
|
||||
padding: 3rem 0 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
.card[hidden] { display: none; }
|
||||
|
||||
a.badge { text-decoration: none; }
|
||||
a.badge:hover { border-color: var(--accent); color: var(--accent); }
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(6px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
background: var(--surface2);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--muted);
|
||||
font-family: 'Space Mono', monospace;
|
||||
font-size: 0.85rem;
|
||||
padding: 0.45rem 1.1rem;
|
||||
border-radius: 999px;
|
||||
margin-bottom: 1.5rem;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
/* LOGO */
|
||||
.app-logo {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
min-width: 64px;
|
||||
border-radius: 14px;
|
||||
background: var(--surface3);
|
||||
border: 1px solid var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 2rem;
|
||||
line-height: 1;
|
||||
overflow: hidden;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: clamp(1.4rem, 4vw, 2.5rem);
|
||||
font-weight: 700;
|
||||
line-height: 1.1;
|
||||
margin-bottom: 1rem;
|
||||
letter-spacing: -0.02em;
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
.app-logo img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
h1 span { color: var(--accent); }
|
||||
/* CARD BODY */
|
||||
.card-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.4rem;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.tagline {
|
||||
color: var(--muted);
|
||||
font-size: 1.05rem;
|
||||
line-height: 1.6;
|
||||
max-width: 480px;
|
||||
margin: 0 auto 2.5rem;
|
||||
}
|
||||
.card-name {
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.01em;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* --- SECTIONS --- */
|
||||
.sections {
|
||||
max-width: 680px;
|
||||
margin: 0 auto 3rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
/* TAGS */
|
||||
.card-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.section {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 1.4rem 1.6rem;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
.tag {
|
||||
font-family: 'Space Mono', monospace;
|
||||
font-size: 0.62rem;
|
||||
padding: 0.15rem 0.5rem;
|
||||
border-radius: 999px;
|
||||
border: 1px solid;
|
||||
}
|
||||
|
||||
.section:hover { border-color: var(--accent); }
|
||||
.tag-platform {
|
||||
color: var(--accent);
|
||||
background: rgba(0,200,150,0.07);
|
||||
border-color: rgba(0,200,150,0.18);
|
||||
}
|
||||
|
||||
.section h2 {
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 0.8rem;
|
||||
letter-spacing: -0.01em;
|
||||
color: var(--text);
|
||||
}
|
||||
.tag-free {
|
||||
color: #94d5a0;
|
||||
background: rgba(148,213,160,0.07);
|
||||
border-color: rgba(148,213,160,0.18);
|
||||
}
|
||||
|
||||
.section a {
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
}
|
||||
.tag-paid {
|
||||
color: var(--accent3);
|
||||
background: rgba(251,191,36,0.07);
|
||||
border-color: rgba(251,191,36,0.18);
|
||||
}
|
||||
|
||||
.section a:hover { text-decoration: underline; }
|
||||
.tag-open {
|
||||
color: #7eb8f7;
|
||||
background: rgba(126,184,247,0.07);
|
||||
border-color: rgba(126,184,247,0.18);
|
||||
}
|
||||
|
||||
/* --- APP LIST --- */
|
||||
.app-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
/* BUTTON */
|
||||
.btn-dl {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.3rem;
|
||||
font-family: 'Space Mono', monospace;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 700;
|
||||
padding: 0.4rem 0.85rem;
|
||||
border-radius: 7px;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--surface2);
|
||||
color: var(--text);
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
transition: all 0.15s;
|
||||
align-self: flex-start;
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
|
||||
.app-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.2rem;
|
||||
padding-bottom: 0.75rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.btn-dl:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.app-item:last-child {
|
||||
padding-bottom: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
/* FOOTER */
|
||||
.footer-note {
|
||||
max-width: 960px;
|
||||
margin: 0 auto 3rem;
|
||||
padding: 1rem 1.5rem 0;
|
||||
border-top: 1px solid var(--border);
|
||||
text-align: center;
|
||||
color: var(--muted);
|
||||
font-size: 0.82rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.app-name {
|
||||
font-weight: 700;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
.footer-note a {
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font-family: 'Space Mono', monospace;
|
||||
font-size: 0.78rem;
|
||||
}
|
||||
|
||||
.app-name a {
|
||||
color: var(--text);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.app-name a:hover {
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.app-desc {
|
||||
color: var(--muted);
|
||||
font-size: 0.88rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* --- FOOTER NOTE --- */
|
||||
.footer-note {
|
||||
max-width: 680px;
|
||||
margin: 0 auto 3rem;
|
||||
text-align: center;
|
||||
color: var(--muted);
|
||||
font-size: 0.82rem;
|
||||
line-height: 1.6;
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.footer-note a {
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font-family: 'Space Mono', monospace;
|
||||
font-size: 0.78rem;
|
||||
}
|
||||
|
||||
.footer-note a:hover { text-decoration: underline; }
|
||||
.footer-note a:hover { text-decoration: underline; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<button id="theme-toggle" class="theme-toggle" onclick="toggleTheme()" aria-label="Přepnout téma">🌙</button>
|
||||
|
||||
<div class="hero">
|
||||
<div class="header">
|
||||
<a href="https://fedi.mamutovo.cz" class="badge">🦣 MAMUTOVO · APLIKACE</a>
|
||||
<h1>Mobilní <span>aplikace</span></h1>
|
||||
<p class="tagline">Doporučené appky pro Mastodon na Android a iOS.</p>
|
||||
<h1>Aplikace pro <span>Mastodon</span></h1>
|
||||
<p class="subtitle">Doporučené klienty pro Android, iOS, web a počítač.</p>
|
||||
</div>
|
||||
|
||||
<div class="sections">
|
||||
<div class="filters">
|
||||
<button class="ftag active" data-filter="vse">Vše</button>
|
||||
<button class="ftag" data-filter="android">Android</button>
|
||||
<button class="ftag" data-filter="ios">iOS</button>
|
||||
<button class="ftag" data-filter="web">Web</button>
|
||||
<button class="ftag" data-filter="pocitac">Počítač</button>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Android</h2>
|
||||
<div class="app-list">
|
||||
<div class="app-item">
|
||||
<div class="app-name"><a href="https://tusky.app">Tusky</a></div>
|
||||
<div class="app-desc">Jednoduchý a přehledný, skvělý pro začátečníky.</div>
|
||||
</div>
|
||||
<div class="app-item">
|
||||
<div class="app-name"><a href="https://pachli.app">Pachli</a></div>
|
||||
<div class="app-desc">Fork Tusky s aktivním vývojem a více funkcemi.</div>
|
||||
</div>
|
||||
<div class="app-item">
|
||||
<div class="app-name"><a href="https://fedilab.app">Fedilab</a></div>
|
||||
<div class="app-desc">Pokročilý, podporuje více účtů.</div>
|
||||
</div>
|
||||
<div class="app-item">
|
||||
<div class="app-name"><a href="https://play.google.com/store/apps/details?id=org.joinmastodon.android">Mastodon</a></div>
|
||||
<div class="app-desc">Oficiální aplikace.</div>
|
||||
<div class="grid" id="grid">
|
||||
|
||||
<!-- ANDROID -->
|
||||
<div class="card" data-platforms="android">
|
||||
<div class="app-logo"><img src="img/apps/tusky.png" alt="Tusky"></div>
|
||||
<div class="card-body">
|
||||
<div class="card-name">Tusky</div>
|
||||
<div class="card-tags">
|
||||
<span class="tag tag-platform">Android</span>
|
||||
<span class="tag tag-free">Zdarma</span>
|
||||
<span class="tag tag-open">Otevřená</span>
|
||||
</div>
|
||||
<a href="https://tusky.app" class="btn-dl" target="_blank" rel="noopener">Stáhnout →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>iOS</h2>
|
||||
<div class="app-list">
|
||||
<div class="app-item">
|
||||
<div class="app-name"><a href="https://tapbots.com/ivory">Ivory</a></div>
|
||||
<div class="app-desc">Nejlepší UX, placená.</div>
|
||||
<div class="card" data-platforms="android">
|
||||
<div class="app-logo"><img src="img/apps/pachli.png" alt="Pachli"></div>
|
||||
<div class="card-body">
|
||||
<div class="card-name">Pachli</div>
|
||||
<div class="card-tags">
|
||||
<span class="tag tag-platform">Android</span>
|
||||
<span class="tag tag-free">Zdarma</span>
|
||||
<span class="tag tag-open">Otevřená</span>
|
||||
</div>
|
||||
<div class="app-item">
|
||||
<div class="app-name"><a href="https://apps.apple.com/app/ice-cubes-for-mastodon/id6444915884">Ice Cubes</a></div>
|
||||
<div class="app-desc">Zdarma, open source.</div>
|
||||
<a href="https://pachli.app" class="btn-dl" target="_blank" rel="noopener">Stáhnout →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" data-platforms="android">
|
||||
<div class="app-logo"><img src="img/apps/fedilab.png" alt="Fedilab"></div>
|
||||
<div class="card-body">
|
||||
<div class="card-name">Fedilab</div>
|
||||
<div class="card-tags">
|
||||
<span class="tag tag-platform">Android</span>
|
||||
<span class="tag tag-free">Zdarma</span>
|
||||
<span class="tag tag-open">Otevřená</span>
|
||||
</div>
|
||||
<div class="app-item">
|
||||
<div class="app-name"><a href="https://apps.apple.com/app/toot-for-mastodon/id1229021451">Toot!</a></div>
|
||||
<div class="app-desc">Kvalitní a udržovaná appka.</div>
|
||||
<a href="https://fedilab.app" class="btn-dl" target="_blank" rel="noopener">Stáhnout →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" data-platforms="android">
|
||||
<div class="app-logo"><img src="img/apps/mastodon.png" alt="Mastodon"></div>
|
||||
<div class="card-body">
|
||||
<div class="card-name">Mastodon</div>
|
||||
<div class="card-tags">
|
||||
<span class="tag tag-platform">Android</span>
|
||||
<span class="tag tag-free">Zdarma</span>
|
||||
</div>
|
||||
<div class="app-item">
|
||||
<div class="app-name"><a href="https://apps.apple.com/app/mastodon-for-iphone/id1571998974">Mastodon</a></div>
|
||||
<div class="app-desc">Oficiální aplikace.</div>
|
||||
<a href="https://play.google.com/store/apps/details?id=org.joinmastodon.android" class="btn-dl" target="_blank" rel="noopener">Stáhnout →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- iOS -->
|
||||
<div class="card" data-platforms="ios">
|
||||
<div class="app-logo"><img src="img/apps/ivory.webp" alt="Ivory"></div>
|
||||
<div class="card-body">
|
||||
<div class="card-name">Ivory</div>
|
||||
<div class="card-tags">
|
||||
<span class="tag tag-platform">iOS</span>
|
||||
<span class="tag tag-paid">Placené</span>
|
||||
</div>
|
||||
<a href="https://tapbots.com/ivory" class="btn-dl" target="_blank" rel="noopener">Otevřít →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" data-platforms="ios">
|
||||
<div class="app-logo"><img src="img/apps/icecubes.webp" alt="Ice Cubes"></div>
|
||||
<div class="card-body">
|
||||
<div class="card-name">Ice Cubes</div>
|
||||
<div class="card-tags">
|
||||
<span class="tag tag-platform">iOS</span>
|
||||
<span class="tag tag-free">Zdarma</span>
|
||||
<span class="tag tag-open">Otevřená</span>
|
||||
</div>
|
||||
<a href="https://apps.apple.com/app/ice-cubes-for-mastodon/id6444915884" class="btn-dl" target="_blank" rel="noopener">Stáhnout →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" data-platforms="ios">
|
||||
<div class="app-logo"><img src="img/apps/toot.webp" alt="Toot!"></div>
|
||||
<div class="card-body">
|
||||
<div class="card-name">Toot!</div>
|
||||
<div class="card-tags">
|
||||
<span class="tag tag-platform">iOS</span>
|
||||
<span class="tag tag-paid">Placené</span>
|
||||
</div>
|
||||
<a href="https://apps.apple.com/app/toot-for-mastodon/id1229021451" class="btn-dl" target="_blank" rel="noopener">Stáhnout →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" data-platforms="ios">
|
||||
<div class="app-logo"><img src="img/apps/mastodon_ios.webp" alt="Mastodon"></div>
|
||||
<div class="card-body">
|
||||
<div class="card-name">Mastodon</div>
|
||||
<div class="card-tags">
|
||||
<span class="tag tag-platform">iOS</span>
|
||||
<span class="tag tag-free">Zdarma</span>
|
||||
</div>
|
||||
<a href="https://apps.apple.com/app/mastodon-for-iphone/id1571998974" class="btn-dl" target="_blank" rel="noopener">Stáhnout →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- WEB -->
|
||||
<div class="card" data-platforms="web">
|
||||
<div class="app-logo"><img src="img/apps/phanpy.svg" alt="Phanpy"></div>
|
||||
<div class="card-body">
|
||||
<div class="card-name">Phanpy</div>
|
||||
<div class="card-tags">
|
||||
<span class="tag tag-platform">Web</span>
|
||||
<span class="tag tag-free">Zdarma</span>
|
||||
<span class="tag tag-open">Otevřená</span>
|
||||
</div>
|
||||
<a href="https://phanpy.cz" class="btn-dl" target="_blank" rel="noopener">Otevřít →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" data-platforms="web">
|
||||
<div class="app-logo"><img src="img/apps/elk.png" alt="Elk"></div>
|
||||
<div class="card-body">
|
||||
<div class="card-name">Elk</div>
|
||||
<div class="card-tags">
|
||||
<span class="tag tag-platform">Web</span>
|
||||
<span class="tag tag-free">Zdarma</span>
|
||||
<span class="tag tag-open">Otevřená</span>
|
||||
</div>
|
||||
<a href="https://elk.zone" class="btn-dl" target="_blank" rel="noopener">Otevřít →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" data-platforms="web">
|
||||
<div class="app-logo"><img src="img/apps/pinafore.webp" alt="Pinafore"></div>
|
||||
<div class="card-body">
|
||||
<div class="card-name">Pinafore</div>
|
||||
<div class="card-tags">
|
||||
<span class="tag tag-platform">Web</span>
|
||||
<span class="tag tag-free">Zdarma</span>
|
||||
<span class="tag tag-open">Otevřená</span>
|
||||
</div>
|
||||
<a href="https://pinafore.social" class="btn-dl" target="_blank" rel="noopener">Otevřít →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" data-platforms="web">
|
||||
<div class="app-logo"><img src="img/apps/mastodeck.webp" alt="Mastodeck"></div>
|
||||
<div class="card-body">
|
||||
<div class="card-name">Mastodeck</div>
|
||||
<div class="card-tags">
|
||||
<span class="tag tag-platform">Web</span>
|
||||
<span class="tag tag-free">Zdarma</span>
|
||||
</div>
|
||||
<a href="https://mastodeck.com/" class="btn-dl" target="_blank" rel="noopener">Otevřít →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- POČÍTAČ -->
|
||||
<div class="card" data-platforms="pocitac">
|
||||
<div class="app-logo"><img src="img/apps/tuba.svg" alt="Tuba"></div>
|
||||
<div class="card-body">
|
||||
<div class="card-name">Tuba</div>
|
||||
<div class="card-tags">
|
||||
<span class="tag tag-platform">Počítač</span>
|
||||
<span class="tag tag-free">Zdarma</span>
|
||||
<span class="tag tag-open">Otevřená</span>
|
||||
</div>
|
||||
<a href="https://tuba.geopjr.dev" class="btn-dl" target="_blank" rel="noopener">Stáhnout →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" data-platforms="pocitac">
|
||||
<div class="app-logo"><img src="img/apps/sengi.png" alt="Sengi"></div>
|
||||
<div class="card-body">
|
||||
<div class="card-name">Sengi</div>
|
||||
<div class="card-tags">
|
||||
<span class="tag tag-platform">Počítač</span>
|
||||
<span class="tag tag-free">Zdarma</span>
|
||||
<span class="tag tag-open">Otevřená</span>
|
||||
</div>
|
||||
<a href="https://nicolasconstant.github.io/sengi" class="btn-dl" target="_blank" rel="noopener">Stáhnout →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -229,7 +495,41 @@
|
||||
|
||||
<div class="footer-note">
|
||||
<a href="start.html">← Zpět na průvodce</a>
|
||||
·
|
||||
<a href="https://mamutovo.cz/@archos">@archos@mamutovo.cz</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function toggleTheme() {
|
||||
const light = document.documentElement.classList.toggle('light');
|
||||
localStorage.setItem('theme', light ? 'light' : 'dark');
|
||||
document.getElementById('theme-toggle').textContent = light ? '☀️' : '🌙';
|
||||
}
|
||||
if (localStorage.getItem('theme') === 'light') document.getElementById('theme-toggle').textContent = '☀️';
|
||||
|
||||
(function () {
|
||||
const filters = document.querySelectorAll('.ftag');
|
||||
const cards = document.querySelectorAll('.card');
|
||||
|
||||
filters.forEach(function (btn) {
|
||||
btn.addEventListener('click', function () {
|
||||
const filter = btn.dataset.filter;
|
||||
|
||||
filters.forEach(function (b) { b.classList.remove('active'); });
|
||||
btn.classList.add('active');
|
||||
|
||||
cards.forEach(function (card) {
|
||||
if (filter === 'vse') {
|
||||
card.hidden = false;
|
||||
} else {
|
||||
const platforms = card.dataset.platforms.split(' ');
|
||||
card.hidden = !platforms.includes(filter);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Základy Mastodonu – Mamutovo</title>
|
||||
<script>if(localStorage.getItem('theme')==='light')document.documentElement.classList.add('light');</script>
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;700;800&display=swap');
|
||||
|
||||
@@ -18,6 +19,17 @@
|
||||
--border: #2e2e2e;
|
||||
--radius: 10px;
|
||||
}
|
||||
html.light {
|
||||
--bg: #ffffff;
|
||||
--surface: #f8f8f8;
|
||||
--surface2: #f0f0f0;
|
||||
--border: #e0e0e0;
|
||||
--text: #1a1a1a;
|
||||
--muted: #666666;
|
||||
--accent: #06b6d4;
|
||||
}
|
||||
.theme-toggle { background: var(--surface); border: 1px solid var(--border); border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 1rem; line-height: 1; position: fixed; top: 1rem; right: 1rem; z-index: 200; transition: border-color .15s; }
|
||||
.theme-toggle:hover { border-color: var(--accent); }
|
||||
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
@@ -174,6 +186,7 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<button id="theme-toggle" class="theme-toggle" onclick="toggleTheme()" aria-label="Přepnout téma">🌙</button>
|
||||
|
||||
<div class="hero">
|
||||
<a href="https://fedi.mamutovo.cz" class="badge">🦣 MAMUTOVO · ZÁKLADY</a>
|
||||
@@ -208,6 +221,16 @@
|
||||
<p><code>@Archos@mamutovo.cz</code> a <code>@archos@mamutovo.cz</code> jsou stejný účet. Velká a malá písmena nehrají roli.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Co je toot?</h2>
|
||||
<p>Toot je příspěvek na Mastodonu – jako tweet na Twitteru. Může mít až 2000 znaků (na Mamutovo), obrázky, ankety nebo upozornění pro citlivý obsah. Veřejné tooty vidí celý Fediverse.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Co je boost?</h2>
|
||||
<p>Boost je přesdílení cizího tootu – jako retweet. Toot se zobrazí tvým sledujícím. Boost je způsob jak podpořit zajímavý obsah a pomoci mu se šířit. Na rozdíl od Twitteru nelze boost okomentovat.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Jak správně odpovídat</h2>
|
||||
<p>Při odpovědi na toot se automaticky přidají zmínky (@) všech lidí v konverzaci.</p>
|
||||
@@ -218,6 +241,12 @@
|
||||
<p>Hashtagy jsou na Mastodonu důležité – slouží k objevování obsahu. Přidávej je na konec tootů. Můžeš sledovat i samotný hashtag a jeho příspěvky se ti budou zobrazovat v timeline. Příklady: <code>#cesky</code> <code>#fotografie</code> <code>#linux</code></p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Zvýrazněné hashtagy</h2>
|
||||
<p>Nastav si zvýrazněné hashtagy – zobrazí se na tvém profilu a v seznamu CZ/SK účtů na <a href="https://fedi.mamutovo.cz">fedi.mamutovo.cz</a>.</p>
|
||||
<p style="margin-top:0.5rem;">Jak na to: <code>Předvolby → Profil → Zvýrazněné hashtagy</code></p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Užitečné odkazy</h2>
|
||||
<ul>
|
||||
@@ -237,5 +266,13 @@
|
||||
<a href="start.html">← Zpět na průvodce</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function toggleTheme() {
|
||||
const light = document.documentElement.classList.toggle('light');
|
||||
localStorage.setItem('theme', light ? 'light' : 'dark');
|
||||
document.getElementById('theme-toggle').textContent = light ? '☀️' : '🌙';
|
||||
}
|
||||
if (localStorage.getItem('theme') === 'light') document.getElementById('theme-toggle').textContent = '☀️';
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,326 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="cs">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Co se děje na Mastodonu | Mamutovo</title>
|
||||
<script>if(localStorage.getItem('theme')==='light')document.documentElement.classList.add('light');</script>
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;700;800&display=swap');
|
||||
:root {
|
||||
--bg: #0d0d0d;
|
||||
--surface: #1a1a1a;
|
||||
--surface2: #222;
|
||||
--border: #2a2a2a;
|
||||
--text: #f0f0f0;
|
||||
--muted: #888;
|
||||
--accent: #00c896;
|
||||
--accent2: #ff6b6b;
|
||||
--nav-bg: rgba(13,13,13,0.95);
|
||||
}
|
||||
html.light {
|
||||
--bg: #ffffff;
|
||||
--surface: #f8f8f8;
|
||||
--surface2: #f0f0f0;
|
||||
--border: #e0e0e0;
|
||||
--text: #1a1a1a;
|
||||
--muted: #666666;
|
||||
--accent: #06b6d4;
|
||||
--nav-bg: rgba(245,245,245,0.95);
|
||||
}
|
||||
.theme-toggle { background: none; border: 1px solid var(--border); border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 1rem; line-height: 1; flex-shrink: 0; color: var(--text); transition: border-color .15s; }
|
||||
.theme-toggle:hover { border-color: var(--accent); }
|
||||
html.light .post { box-shadow: 0 1px 3px rgba(0,0,0,.08); }
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body { background: var(--bg); color: var(--text); font-family: 'Syne', sans-serif; min-height: 100vh; }
|
||||
|
||||
/* NAV */
|
||||
nav { display: flex; align-items: center; justify-content: space-between; padding: .9rem 2rem; border-bottom: 1px solid var(--border); background: var(--nav-bg); position: sticky; top: 0; z-index: 100; }
|
||||
.nav-logo { font-family: 'Space Mono', monospace; font-size: .85rem; color: var(--accent); text-decoration: none; font-weight: 700; }
|
||||
.nav-links { display: flex; gap: 1.5rem; }
|
||||
.nav-links a { font-family: 'Space Mono', monospace; font-size: .75rem; color: var(--muted); text-decoration: none; transition: color .15s; }
|
||||
.nav-links a:hover { color: var(--text); }
|
||||
|
||||
/* HERO */
|
||||
.hero { text-align: center; padding: 3rem 2rem 1.5rem; }
|
||||
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; line-height: 1.1; margin-bottom: .75rem; }
|
||||
.hero h1 span { color: var(--accent); }
|
||||
.hero p { color: var(--muted); font-size: 1rem; max-width: 480px; margin: 0 auto 1.5rem; }
|
||||
.cta-bar { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
|
||||
.btn-primary { background: var(--accent); color: #000; padding: .65rem 1.3rem; border-radius: 8px; font-family: 'Space Mono', monospace; font-size: .8rem; font-weight: 700; text-decoration: none; }
|
||||
.btn-secondary { background: transparent; color: var(--text); padding: .65rem 1.3rem; border-radius: 8px; border: 1px solid var(--border); font-family: 'Space Mono', monospace; font-size: .8rem; text-decoration: none; }
|
||||
.btn-primary:hover { opacity: .85; }
|
||||
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
/* TOP LINKS */
|
||||
.top-links-wrap { padding: 0 1.5rem 1.5rem; max-width: 900px; margin: 0 auto; }
|
||||
.section-label { font-family: 'Space Mono', monospace; font-size: .7rem; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
|
||||
.top-links-scroll { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
|
||||
.link-card { flex-shrink: 0; width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--text); transition: border-color .15s; }
|
||||
.link-card:hover { border-color: var(--accent); }
|
||||
.link-card-img { width: 100%; height: 120px; object-fit: cover; background: var(--surface2); display: block; }
|
||||
.link-card-img-placeholder { width: 100%; height: 120px; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 2rem; }
|
||||
.link-card-body { padding: .75rem; }
|
||||
.link-domain { font-family: 'Space Mono', monospace; font-size: .65rem; color: var(--muted); margin-bottom: .25rem; }
|
||||
.link-title { font-size: .85rem; font-weight: 700; line-height: 1.3; margin-bottom: .5rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
||||
.link-shared { display: flex; align-items: center; gap: .4rem; font-family: 'Space Mono', monospace; font-size: .65rem; color: var(--muted); }
|
||||
.link-shared img { width: 18px; height: 18px; border-radius: 4px; }
|
||||
|
||||
/* FILTERS */
|
||||
.filters-wrap { max-width: 900px; margin: 0 auto; padding: 0 1.5rem 1rem; }
|
||||
.filter-tabs { display: flex; gap: .5rem; flex-wrap: wrap; }
|
||||
.filter-tab { font-family: 'Space Mono', monospace; font-size: .75rem; padding: .4rem .9rem; border-radius: 20px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; transition: all .15s; }
|
||||
.filter-tab:hover { border-color: var(--accent); color: var(--accent); }
|
||||
.filter-tab.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700; }
|
||||
.filter-count { opacity: .7; }
|
||||
|
||||
/* AUTHORS */
|
||||
.authors-wrap { max-width: 900px; margin: 0 auto; padding: 0 1.5rem .75rem; }
|
||||
.authors-scroll { display: flex; gap: .75rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
|
||||
.author-chip { display: flex; flex-direction: column; align-items: center; gap: .3rem; flex-shrink: 0; }
|
||||
.author-chip img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
|
||||
.author-chip-fallback { width: 48px; height: 48px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
|
||||
.author-chip-name { font-size: .65rem; color: var(--muted); text-align: center; max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
|
||||
/* FEED */
|
||||
.feed-wrap { max-width: 900px; margin: 0 auto; padding: 0 1.5rem 4rem; }
|
||||
.feed { display: flex; flex-direction: column; gap: .75rem; }
|
||||
.post { display: flex; gap: .75rem; padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; cursor: default; transition: background .1s; }
|
||||
.post:hover { background: rgba(255,255,255,.02); }
|
||||
.post-avatar { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; object-fit: cover; }
|
||||
.post-avatar-fallback { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: .85rem; color: var(--text); }
|
||||
.post-main { flex: 1; min-width: 0; }
|
||||
.post-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .2rem; }
|
||||
.post-author { font-weight: 700; font-size: .85rem; }
|
||||
.post-time { font-family: 'Space Mono', monospace; font-size: .65rem; color: var(--muted); flex-shrink: 0; margin-left: .5rem; }
|
||||
.post-handle { font-family: 'Space Mono', monospace; font-size: .65rem; color: var(--muted); margin-bottom: .35rem; }
|
||||
.post-text { font-size: .82rem; line-height: 1.55; color: var(--text); word-break: break-word; }
|
||||
.post-text a { color: var(--accent); text-decoration: none; }
|
||||
.post-media { float: right; margin: 0 0 .25rem .75rem; width: 120px; border-radius: 8px; overflow: hidden; }
|
||||
.post-media img { width: 120px; height: 120px; aspect-ratio: 1/1; object-fit: cover; display: block; }
|
||||
.post-boost { font-family: 'Space Mono', monospace; font-size: .7rem; color: var(--muted); margin-bottom: .3rem; }
|
||||
.post-boost span { color: var(--accent); }
|
||||
|
||||
.loading { text-align: center; color: var(--muted); font-family: 'Space Mono', monospace; font-size: .8rem; padding: 3rem; }
|
||||
|
||||
/* STARTER */
|
||||
.starter-wrap { max-width: 900px; margin: 0 auto; padding: 0 1.5rem 4rem; }
|
||||
.starter { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; text-align: center; }
|
||||
.starter h2 { font-size: 1.3rem; margin-bottom: .5rem; }
|
||||
.starter p { color: var(--muted); margin-bottom: 1.5rem; font-size: .95rem; }
|
||||
.starter-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<a class="nav-logo" href="/">🦣 Mamutovo</a>
|
||||
<div class="nav-links">
|
||||
<a href="start.html">Průvodce</a>
|
||||
<a href="accounts.html">CZ účty</a>
|
||||
</div>
|
||||
<button id="theme-toggle" class="theme-toggle" onclick="toggleTheme()" aria-label="Přepnout téma">🌙</button>
|
||||
</nav>
|
||||
|
||||
<div class="hero">
|
||||
<h1>Co se teď děje<br>na <span>Mamutovu</span>?</h1>
|
||||
<p>Živý přehled příspěvků z české Mastodon komunity. Bez registrace.</p>
|
||||
<div class="cta-bar">
|
||||
<a href="start.html" class="btn-primary">Začni tady →</a>
|
||||
<a href="accounts.html" class="btn-secondary">Procházet účty</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="top-links-wrap">
|
||||
<div class="section-label">🔗 Top odkazy</div>
|
||||
<div class="top-links-scroll" id="top-links">
|
||||
<div class="loading">Načítám…</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filters-wrap">
|
||||
<div class="filter-tabs" style="margin-bottom:.75rem">
|
||||
<button class="filter-tab active" data-scope="local" onclick="setScope('local')">🦣 Mamutovo</button>
|
||||
<button class="filter-tab" data-scope="federated" onclick="setScope('federated')">🌍 Celá fediverse</button>
|
||||
</div>
|
||||
<div class="filter-tabs">
|
||||
<button class="filter-tab active" data-filter="all">Vše <span class="filter-count" id="count-all"></span></button>
|
||||
<button class="filter-tab" data-filter="original">Originální <span class="filter-count" id="count-original"></span></button>
|
||||
<button class="filter-tab" data-filter="replies">Odpovědi <span class="filter-count" id="count-replies"></span></button>
|
||||
<button class="filter-tab" data-filter="boosts">Boosty <span class="filter-count" id="count-boosts"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="authors-wrap">
|
||||
<div class="authors-scroll" id="authors-scroll"></div>
|
||||
</div>
|
||||
|
||||
<div class="feed-wrap">
|
||||
<div class="feed" id="feed">
|
||||
<div class="loading">Načítám příspěvky…</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="starter-wrap">
|
||||
<div class="starter">
|
||||
<h2>Líbí se ti to?</h2>
|
||||
<p>Začni sledovat českou komunitu — stáhni starter pack a importuj ho do Mastodonu.</p>
|
||||
<div class="starter-btns">
|
||||
<a href="starter-general.csv" class="btn-primary" download>⬇ Stáhnout CSV</a>
|
||||
<a href="accounts.html" class="btn-secondary">Procházet účty</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function toggleTheme() {
|
||||
const light = document.documentElement.classList.toggle('light');
|
||||
localStorage.setItem('theme', light ? 'light' : 'dark');
|
||||
document.getElementById('theme-toggle').textContent = light ? '☀️' : '🌙';
|
||||
}
|
||||
if (localStorage.getItem('theme') === 'light') document.getElementById('theme-toggle').textContent = '☀️';
|
||||
|
||||
let allPosts = [];
|
||||
let currentFilter = 'all';
|
||||
let currentScope = 'local';
|
||||
|
||||
function setScope(scope) {
|
||||
currentScope = scope;
|
||||
currentFilter = 'all';
|
||||
document.querySelectorAll('[data-scope]').forEach(b => b.classList.toggle('active', b.dataset.scope === scope));
|
||||
document.querySelectorAll('.filter-tab[data-filter]').forEach(b => b.classList.toggle('active', b.dataset.filter === 'all'));
|
||||
loadFeed();
|
||||
}
|
||||
|
||||
function timeAgo(dateStr) {
|
||||
const diff = Math.floor((Date.now() - new Date(dateStr)) / 1000);
|
||||
if (diff < 60) return `${diff}s`;
|
||||
if (diff < 3600) return `${Math.floor(diff/60)}m`;
|
||||
if (diff < 86400) return `${Math.floor(diff/3600)}h`;
|
||||
return new Date(dateStr).toLocaleDateString('cs-CZ', {day:'numeric', month:'numeric'});
|
||||
}
|
||||
|
||||
function stripHTML(html) {
|
||||
return html.replace(/<[^>]+>/g, ' ').replace(/\s+/g, ' ').trim();
|
||||
}
|
||||
|
||||
function postType(p) {
|
||||
if (p.reblog) return 'boosts';
|
||||
if (p.in_reply_to_id) return 'replies';
|
||||
return 'original';
|
||||
}
|
||||
|
||||
function renderPost(p) {
|
||||
const isBoost = !!p.reblog;
|
||||
const src = isBoost ? p.reblog : p;
|
||||
const av = src.account.avatar
|
||||
? `<img class="post-avatar" src="${src.account.avatar}" alt="" onerror="this.style.display='none'">`
|
||||
: `<div class="post-avatar-fallback">${(src.account.display_name||src.account.username).charAt(0)}</div>`;
|
||||
const text = stripHTML(src.content || '');
|
||||
const media = src.media_attachments?.find(m => m.type === 'image');
|
||||
const boostLine = isBoost
|
||||
? `<div class="post-boost">🔁 <span>${p.account.display_name||p.account.username}</span> boostnul/a</div>`
|
||||
: '';
|
||||
return `
|
||||
<div class="post">
|
||||
${av}
|
||||
<div class="post-main">
|
||||
${boostLine}
|
||||
<div class="post-top">
|
||||
<span class="post-author">${src.account.display_name||src.account.username}</span>
|
||||
<span class="post-time">${timeAgo(p.created_at)}</span>
|
||||
</div>
|
||||
<div class="post-handle">@${src.account.acct}</div>
|
||||
<div class="post-text">${text.slice(0,300)}${text.length>300?'…':''}</div>
|
||||
${media ? `<div class="post-media"><img src="${media.preview_url}" alt=""></div>` : ''}
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
function renderFeed() {
|
||||
const feed = document.getElementById('feed');
|
||||
const filtered = currentFilter === 'all' ? allPosts : allPosts.filter(p => postType(p) === currentFilter);
|
||||
if (!filtered.length) { feed.innerHTML = '<div class="loading">Žádné příspěvky.</div>'; return; }
|
||||
try { feed.innerHTML = filtered.map(renderPost).join(''); } catch(e) { console.error('renderFeed error:', e); feed.innerHTML = '<div class="loading">Chyba vykreslování.</div>'; }
|
||||
}
|
||||
|
||||
function updateAuthors() {
|
||||
const scroll = document.getElementById('authors-scroll');
|
||||
if (!scroll) return;
|
||||
const counts = {};
|
||||
allPosts.forEach(p => {
|
||||
const src = p.reblog ? p.reblog : p;
|
||||
const key = src.account.acct;
|
||||
if (!counts[key]) counts[key] = { account: src.account, count: 0 };
|
||||
counts[key].count++;
|
||||
});
|
||||
const sorted = Object.values(counts).sort((a, b) => b.count - a.count).slice(0, 20);
|
||||
scroll.innerHTML = sorted.map(({ account }) => {
|
||||
const av = account.avatar
|
||||
? `<img src="${account.avatar}" alt="" onerror="this.style.display='none'">`
|
||||
: `<div class="author-chip-fallback">${(account.display_name||account.username).charAt(0)}</div>`;
|
||||
const name = account.display_name || account.username;
|
||||
return `<div class="author-chip">${av}<span class="author-chip-name">${name}</span></div>`;
|
||||
}).join('');
|
||||
}
|
||||
|
||||
function updateCounts() {
|
||||
document.getElementById('count-all').textContent = allPosts.length;
|
||||
document.getElementById('count-original').textContent = allPosts.filter(p => postType(p) === 'original').length;
|
||||
document.getElementById('count-replies').textContent = allPosts.filter(p => postType(p) === 'replies').length;
|
||||
document.getElementById('count-boosts').textContent = allPosts.filter(p => postType(p) === 'boosts').length;
|
||||
}
|
||||
|
||||
async function loadFeed() {
|
||||
try {
|
||||
const res = await fetch('https://mamutovo.cz/api/v1/timelines/public?limit=30' + (currentScope === 'local' ? '&local=true' : ''));
|
||||
allPosts = await res.json();
|
||||
updateCounts();
|
||||
renderFeed();
|
||||
updateAuthors();
|
||||
} catch(e) {
|
||||
document.getElementById('feed').innerHTML = '<div class="loading">Nepodařilo se načíst příspěvky.</div>';
|
||||
}
|
||||
}
|
||||
|
||||
async function loadTopLinks() {
|
||||
const el = document.getElementById('top-links');
|
||||
try {
|
||||
const res = await fetch('https://mamutovo.cz/api/v1/trends/links?limit=8');
|
||||
const links = await res.json();
|
||||
if (!links.length) { el.innerHTML = '<div class="loading">Žádné trendy.</div>'; return; }
|
||||
el.innerHTML = links.map(l => {
|
||||
const img = l.image
|
||||
? `<img class="link-card-img" src="${l.image}" alt="" onerror="this.parentElement.innerHTML='<div class=link-card-img-placeholder>🔗</div>'">`
|
||||
: `<div class="link-card-img-placeholder">🔗</div>`;
|
||||
const domain = new URL(l.url).hostname.replace('www.','');
|
||||
const sharedBy = l.history?.[0] ? `${l.history[0].accounts} lidí` : '';
|
||||
return `
|
||||
<a class="link-card" href="${l.url}" target="_blank" rel="noopener">
|
||||
${img}
|
||||
<div class="link-card-body">
|
||||
<div class="link-domain">${domain}</div>
|
||||
<div class="link-title">${l.title||l.url}</div>
|
||||
<div class="link-shared">👥 Sdílelo ${sharedBy}</div>
|
||||
</div>
|
||||
</a>`;
|
||||
}).join('');
|
||||
} catch(e) {
|
||||
el.innerHTML = '<div class="loading">Trendy nedostupné.</div>';
|
||||
}
|
||||
}
|
||||
|
||||
document.querySelectorAll('.filter-tab[data-filter]').forEach(btn => {
|
||||
btn.addEventListener('click', () => {
|
||||
document.querySelectorAll('.filter-tab[data-filter]').forEach(b => b.classList.remove('active'));
|
||||
btn.classList.add('active');
|
||||
currentFilter = btn.dataset.filter;
|
||||
renderFeed();
|
||||
});
|
||||
});
|
||||
|
||||
loadTopLinks();
|
||||
loadFeed();
|
||||
setInterval(loadFeed, 60000);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 9.6 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' fill-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='2' clip-rule='evenodd' viewBox='0 0 64 64'><path fill='#a4bff7' d='M37.774 11.471c14.639 3.752 19.034 16.557 15.889 31.304-.696 3.261-2.563 6.661-6.356 8.693-3.204 1.717-8.07 2.537-15.338.55l-9.634-2.404C11.651 46.992 8.378 38.733 10.027 31.823c3.627-15.201 15.543-23.48 27.747-20.352Z'/><path fill='#d8e7fe' d='M36.76 15.429c12.289 3.15 15.547 14.114 12.907 26.493-.947 4.44-4.937 9.365-16.664 6.143l-9.684-2.417c-7.854-1.923-10.53-7.8-9.318-12.877 3.016-12.639 12.611-19.943 22.759-17.342Z'/><path fill='#6081e6' d='M27.471 24.991c-1.457-.698-7.229 3.213-7.663 8.926-.182 2.39 4.55 3.237 5.071-.169.725-4.743 3.715-8.218 2.592-8.757Zm10.746 2.005c-2.083.327-.382 5.901-.595 10.727-.123 2.8 4.388 3.464 4.703 2.011 1.098-5.073-2.066-13.058-4.108-12.738Z'/></svg>
|
||||
|
After Width: | Height: | Size: 887 B |
|
After Width: | Height: | Size: 690 B |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 30 KiB |
@@ -55,7 +55,6 @@ amarok@mastodonczech.cz,true,false,
|
||||
anlexcz@witter.cz,true,false,
|
||||
lacertacz@mastodonczech.cz,true,false,
|
||||
srandista@mastodonczech.cz,true,false,
|
||||
politiq@mastodon.arch-linux.cz,true,false,
|
||||
aikencz@f.cz,true,false,
|
||||
sandruska93@mas.to,true,false,
|
||||
karelcapek@mastodonczech.cz,true,false,
|
||||
@@ -97,7 +96,7 @@ nacelnik01@mamutovo.cz,true,false,
|
||||
sledge@mastodonczech.cz,true,false,
|
||||
tensob_@mastodonczech.cz,true,false
|
||||
archos@mamutovo.cz,true,false,
|
||||
archlinux@mamutovo.cz,true,false,
|
||||
arch@gts.arch-linux.cz,true,false,
|
||||
electric@vaclavpasek.cz,true,false,
|
||||
adamhavelka@mastodon.prorocketeers.com,true,false,
|
||||
Kipe@mastodon.social,true,false,
|
||||
@@ -105,3 +104,11 @@ zpravobot@zpravobot.news,true,false,
|
||||
ozzelot@mstdn.social,true,false,
|
||||
j4n3z@mastodon.social,true,false,
|
||||
prahou@merveilles.town,true,false,
|
||||
mirek@rodina-sucha.cz,true,false,
|
||||
sesivany@social.vivaldi.net,true,false,
|
||||
jimmac@mastodon.social,true,false,
|
||||
Oskar456@mastodon.social,true,false,
|
||||
jmlich@fosstodon.org,true,false,
|
||||
ronny@metalhead.club,true,false,
|
||||
vancura@mastodon.design,true,false,
|
||||
shimon@gts.shimonh.eu,true,false,
|
||||
|
||||
|
@@ -37,6 +37,17 @@ def _load_tokens():
|
||||
break
|
||||
if val:
|
||||
tokens[key] = val.strip()
|
||||
# per-instance GTS tokeny: GTS_TOKEN_<DOMAIN>
|
||||
for key, val in os.environ.items():
|
||||
if key.startswith("GTS_TOKEN_") and val:
|
||||
tokens[key] = val.strip()
|
||||
for line in env_lines:
|
||||
line = line.strip()
|
||||
if line.startswith("GTS_TOKEN_") and "=" in line:
|
||||
key, val = line.split("=", 1)
|
||||
key = key.strip()
|
||||
if key not in tokens and val.strip():
|
||||
tokens[key] = val.strip()
|
||||
# fallback: raw token value (legacy .env bez klíče)
|
||||
if "MASTODON_TOKEN" not in tokens:
|
||||
for line in env_lines:
|
||||
@@ -47,13 +58,27 @@ def _load_tokens():
|
||||
return tokens
|
||||
|
||||
_TOKENS = _load_tokens()
|
||||
MASTODON_TOKEN = _TOKENS.get("MASTODON_TOKEN")
|
||||
GTS_TOKEN = _TOKENS.get("GTS_TOKEN")
|
||||
MASTODON_TOKEN = _TOKENS.get("MASTODON_TOKEN")
|
||||
GTS_TOKEN = _TOKENS.get("GTS_TOKEN") # legacy fallback
|
||||
_GTS_INSTANCE_TOKENS = {k: v for k, v in _TOKENS.items() if k.startswith("GTS_TOKEN_")}
|
||||
|
||||
_gts_cache: dict[str, bool] = {}
|
||||
|
||||
def _is_gts(instance: str) -> bool:
|
||||
if instance in _gts_cache:
|
||||
return _gts_cache[instance]
|
||||
info = api_get(f"https://{instance}/api/v1/instance")
|
||||
version = (info or {}).get("version", "") if isinstance(info, dict) else ""
|
||||
result = "git" in version or version.startswith("0.")
|
||||
_gts_cache[instance] = result
|
||||
return result
|
||||
|
||||
def _token_for(instance: str) -> str | None:
|
||||
"""Vrátí GTS_TOKEN pro GoToSocial instance (obsahují 'gts.' v doméně), jinak MASTODON_TOKEN."""
|
||||
if GTS_TOKEN and "gts." in instance:
|
||||
return GTS_TOKEN
|
||||
if _is_gts(instance):
|
||||
key = "GTS_TOKEN_" + re.sub(r"[.\-]", "_", instance).upper()
|
||||
token = _GTS_INSTANCE_TOKENS.get(key) or GTS_TOKEN
|
||||
if token:
|
||||
return token
|
||||
return MASTODON_TOKEN
|
||||
|
||||
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s", datefmt="%H:%M:%S")
|
||||
@@ -216,15 +241,28 @@ def score(acc):
|
||||
|
||||
# ── KATEGORIE ─────────────────────────────────
|
||||
CATEGORIES = {
|
||||
"tech": ["linux", "python", "programov", "software", "opensource", "developer", "sysadmin", "git"],
|
||||
"foto": ["fotografi", "foto", "photograph", "objektiv", "kamera"],
|
||||
"veda": ["věda", "fyzika", "biologi", "astronom", "výzkum", "science", "matematik"],
|
||||
"kultura": ["knihy", "literatura", "film", "hudba", "divadlo", "umění"],
|
||||
"gaming": ["gaming", "hry", "videohry", "steam", "gamer"],
|
||||
"zpravy": ["novinář", "zprávy", "politik", "média", "journalist"],
|
||||
"tech": ["linux", "python", "programov", "software", "opensource", "developer", "sysadmin", "git", "foss", "selfhosted", "homelab", "arch"],
|
||||
"foto": ["fotografi", "foto", "photograph", "objektiv", "kamera"],
|
||||
"veda": ["věda", "fyzika", "biologi", "astronom", "výzkum", "science", "matematik"],
|
||||
"kultura": ["knihy", "literatura", "film", "hudba", "divadlo", "umění"],
|
||||
"gaming": ["gaming", "hry", "videohry", "steam", "gamer"],
|
||||
"zpravy": ["novinář", "zprávy", "politik", "média", "journalist", "zpravy", "news", "aktualne"],
|
||||
"sport": ["sport", "fotbal", "hokej", "cycling", "running", "fitness", "tenis", "atletika", "cyklistika", "kolo", "beh", "plavani", "turistika"],
|
||||
"politika": ["politika", "politics", "czech", "democracy", "volby", "eu"],
|
||||
"fediverse": ["fediverse", "mastodon", "activitypub", "mamutovo"],
|
||||
"cestovani": ["cestovani", "cestování", "travel", "dovolena"],
|
||||
"priroda": ["příroda", "priroda", "les", "hory", "zahrada"],
|
||||
"jidlo": ["jídlo", "jidlo", "vareni", "vaření", "recept", "food"],
|
||||
}
|
||||
|
||||
def categorize(acc):
|
||||
# Primárně matchuj featured_tags proti CATEGORIES
|
||||
for tag in acc.get("_featured_tags", []):
|
||||
tag_lower = tag.lower()
|
||||
for cat, kws in CATEGORIES.items():
|
||||
if any(kw in tag_lower for kw in kws):
|
||||
return cat
|
||||
# Fallback: bio text + display_name
|
||||
text = re.sub(r"<[^>]+>", " ", acc.get("note", "") or "").lower()
|
||||
text += " " + (acc.get("display_name", "") or "").lower()
|
||||
for cat, kws in CATEGORIES.items():
|
||||
@@ -232,14 +270,23 @@ def categorize(acc):
|
||||
return cat
|
||||
return "ostatni"
|
||||
|
||||
def extract_tags(acc):
|
||||
text = re.sub(r"<[^>]+>", " ", acc.get("note", "") or "").lower()
|
||||
found = []
|
||||
for kws in CATEGORIES.values():
|
||||
for kw in kws:
|
||||
if kw in text and kw not in found and len(kw) > 3:
|
||||
found.append(kw.strip())
|
||||
return found[:4]
|
||||
def fetch_featured_tags(acc):
|
||||
if "_featured_tags" in acc:
|
||||
return acc["_featured_tags"]
|
||||
account_id = acc.get("id")
|
||||
instance = acc.get("_source_instance", "")
|
||||
if not account_id or not instance:
|
||||
acc["_featured_tags"] = []
|
||||
return []
|
||||
url = f"https://{instance}/api/v1/accounts/{account_id}/featured_tags"
|
||||
token = _token_for(instance)
|
||||
data = api_get(url, token=token)
|
||||
if not data or not isinstance(data, list):
|
||||
acc["_featured_tags"] = []
|
||||
return []
|
||||
tags = [t["name"] for t in data if isinstance(t, dict) and t.get("name")][:6]
|
||||
acc["_featured_tags"] = tags
|
||||
return tags
|
||||
|
||||
# ── VÝSTUP ────────────────────────────────────
|
||||
def _to_output(acc):
|
||||
@@ -250,10 +297,11 @@ def _to_output(acc):
|
||||
"handle": handle,
|
||||
"bio": bio[:220],
|
||||
"avatar": acc.get("avatar", ""),
|
||||
"header": acc.get("header_static", "") if "missing" not in acc.get("header_static", "") else "",
|
||||
"followers": acc.get("followers_count", 0),
|
||||
"statuses": acc.get("statuses_count", 0),
|
||||
"score": score(acc),
|
||||
"tags": extract_tags(acc),
|
||||
"tags": fetch_featured_tags(acc),
|
||||
"category": categorize(acc),
|
||||
"last_active": acc.get("last_status_at", ""),
|
||||
"url": acc.get("url", ""),
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Začni na Mastodonu – Mamutovo</title>
|
||||
<script>if(localStorage.getItem('theme')==='light')document.documentElement.classList.add('light');</script>
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;700;800&display=swap');
|
||||
|
||||
@@ -18,6 +19,17 @@
|
||||
--border: #2e2e2e;
|
||||
--radius: 10px;
|
||||
}
|
||||
html.light {
|
||||
--bg: #ffffff;
|
||||
--surface: #f8f8f8;
|
||||
--surface2: #f0f0f0;
|
||||
--border: #e0e0e0;
|
||||
--text: #1a1a1a;
|
||||
--muted: #666666;
|
||||
--accent: #06b6d4;
|
||||
}
|
||||
.theme-toggle { background: var(--surface); border: 1px solid var(--border); border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 1rem; line-height: 1; position: fixed; top: 1rem; right: 1rem; z-index: 200; transition: border-color .15s; }
|
||||
.theme-toggle:hover { border-color: var(--accent); }
|
||||
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
@@ -76,10 +88,20 @@
|
||||
|
||||
.tagline strong { color: var(--text); }
|
||||
|
||||
.about-link {
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font-size: 0.92rem;
|
||||
opacity: 0.75;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
.about-link:hover { opacity: 1; text-decoration: underline; }
|
||||
|
||||
/* --- CARDS GRID --- */
|
||||
.cards {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
@@ -372,13 +394,15 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<button id="theme-toggle" class="theme-toggle" onclick="toggleTheme()" aria-label="Přepnout téma">🌙</button>
|
||||
|
||||
<div class="hero">
|
||||
<a href="https://fedi.mamutovo.cz" class="badge">🦣 MAMUTOVO · PRŮVODCE</a>
|
||||
<h1>🦣 Mamutovo za 3 minuty.</h1>
|
||||
<p class="tagline">
|
||||
Žádné algoritmy. Žádné reklamy. <strong>Patří komunitě.</strong><br>
|
||||
Tyhle 4 kroky ti zaplní feed a pomůžou udělat první post.
|
||||
Tyhle 4 kroky ti zaplní feed a pomůžou udělat první post.<br>
|
||||
<a href="https://about.mamutovo.cz" target="_blank" class="about-link">Co je Mamutovo.cz?</a> · <a href="deni.html" class="about-link">Co se teď děje? ⚡</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -460,12 +484,16 @@ Rád/a poznám nové lidi 🙂 #Představení #novacek #cesky
|
||||
<p>Doporučené appky pro Android a iOS.</p>
|
||||
<a href="apps.html" class="btn btn-secondary">Zobrazit →</a>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>💬 Chat v reálném čase</h3>
|
||||
<p>Mastodon je na příspěvky, Matrix na chat. mxchat.cz je český Matrix server.</p>
|
||||
<a href="https://web.mxchat.cz" class="btn btn-secondary" target="_blank">Otevřít →</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-note">
|
||||
Zasekl/a ses? Napiš na <a href="https://mamutovo.cz/@archos">@archos@mamutovo.cz</a> nebo
|
||||
se zeptej v <a href="https://mamutovo.cz/tags/pomoc">#pomoc</a>.<br>
|
||||
Tipy a triky: <a href="https://mamutovo.cz/tags/tip_mastodon">#tip_mastodon</a> · Potřebuješ pomoc? Napiš <a href="https://mamutovo.cz/@archos">@archos@mamutovo.cz</a><br>
|
||||
Tato stránka je open source: <a href="https://git.arch-linux.cz/Mamutovo/fedi_start">Gitea</a> ·
|
||||
<a href="https://oscloud.cz">oscloud.cz</a>
|
||||
</div>
|
||||
@@ -473,6 +501,13 @@ Rád/a poznám nové lidi 🙂 #Představení #novacek #cesky
|
||||
<div class="copy-toast" id="toast">Zkopírováno! Vlož do pole pro post ✓</div>
|
||||
|
||||
<script>
|
||||
function toggleTheme() {
|
||||
const light = document.documentElement.classList.toggle('light');
|
||||
localStorage.setItem('theme', light ? 'light' : 'dark');
|
||||
document.getElementById('theme-toggle').textContent = light ? '☀️' : '🌙';
|
||||
}
|
||||
if (localStorage.getItem('theme') === 'light') document.getElementById('theme-toggle').textContent = '☀️';
|
||||
|
||||
function copyPost(el) {
|
||||
const text = el.innerText.trim();
|
||||
navigator.clipboard.writeText(text).then(() => {
|
||||
|
||||