12 Commits

Author SHA1 Message Date
Archos a863ae498d feat: filtrování účtů podle instance 2026-05-15 10:05:54 +02:00
Archos 00768bd887 fix: odebrán vhsky z manual_accounts.csv, nyní v adresáři instancí 2026-05-03 14:10:07 +02:00
Archos 5ba472f87a feat: podpora GTS instancí s GTS_TOKEN, přidán arch@gts.arch-linux.cz 2026-05-03 08:03:02 +02:00
Archos 7d115e8b43 fix: odebrán politiq@mastodon.arch-linux.cz, instance vypnuta 2026-05-03 06:46:43 +02:00
Archos 6a69b2c4ba fix: archlinux@mamutovo.cz → arch@arch-linux.cz 2026-05-03 06:41:32 +02:00
Archos b958d6616b feat: přidán vhsky@mamutovo.cz 2026-04-27 20:38:06 +02:00
Archos 430cbb6c10 feat: přidána kartička mxchat.cz 2026-04-25 20:14:47 +02:00
Archos 7754449b8b fix: patička – #pomoc nahrazen #tip_mastodon 2026-04-16 21:36:44 +02:00
Archos a530ebae35 Merge branch 'dev'
Merge branch 'dev' - v1.2.0

- CATEGORIES rozšířeny: fediverse, cestovani, priroda, jidlo
- Limit featured_tags zvýšen na 6, zobrazení na 4
- Klikací hashtagy u kartiček – filtrování na stránce
- Odkaz na about.mamutovo.cz v hero sekci start.html
- Přidáni noví účty: mirek@rodina-sucha.cz, michal@vltava.cloud,
  sesivany@social.vivaldi.net, jimmac@mastodon.social,
  Oskar456@mastodon.social, jmlich@fosstodon.org,
  ronny@metalhead.club, vancura@mastodon.design
2026-04-13 19:16:20 +02:00
Archos 662b462192 feat: přidán vancura@mastodon.design, opraven sesivany na social.vivaldi.net 2026-04-12 10:35:20 +02:00
Archos 1f5bf3fc02 V manual_accounts.csv opraveno: sesivany@vivaldi.net
za:
sesivany@social.vivaldi.ne
2026-04-12 09:49:59 +02:00
Archos faf2ae3c5e feat: přidáni jimmac@mastodon.social
Oskar456@mastodon.social
jmlich@fosstodon.org
ronny@metalhead.club
2026-04-12 09:20:24 +02:00
7 changed files with 60 additions and 434 deletions
+28 -35
View File
@@ -4,7 +4,6 @@
<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');
@@ -21,22 +20,7 @@
--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; }
@@ -54,7 +38,7 @@ nav {
justify-content: space-between;
padding: 1rem 2rem;
border-bottom: 1px solid var(--border);
background: var(--nav-bg);
background: rgba(13,13,13,0.9);
backdrop-filter: blur(10px);
position: sticky;
top: 0;
@@ -319,11 +303,6 @@ 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);
@@ -587,7 +566,6 @@ 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>
@@ -598,7 +576,6 @@ 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>
@@ -614,6 +591,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>
@@ -649,13 +629,6 @@ 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
// ────────────────────────────────
@@ -795,19 +768,22 @@ function filterByTag(tag) {
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) => {
@@ -881,7 +857,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="" onclick="event.stopPropagation();openModal(filtered[${idx}])" onerror="this.src='${avatarFallback(a.name)}'">
<img class="card-avatar" src="${av}" alt="" onerror="this.src='${avatarFallback(a.name)}'">
</div>
<div class="card-body">
<div class="card-name">${a.name}</div>
@@ -934,6 +910,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 => {
@@ -993,6 +970,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 => {
@@ -1125,6 +1119,5 @@ 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>
-22
View File
@@ -4,7 +4,6 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<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');
@@ -22,19 +21,6 @@
--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; }
@@ -292,7 +278,6 @@ h1 span { color: var(--accent); }
</style>
</head>
<body>
<button id="theme-toggle" class="theme-toggle" onclick="toggleTheme()" aria-label="Přepnout téma">🌙</button>
<div class="header">
<a href="https://fedi.mamutovo.cz" class="badge">🦣 MAMUTOVO · APLIKACE</a>
@@ -500,13 +485,6 @@ h1 span { color: var(--accent); }
</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');
-21
View File
@@ -4,7 +4,6 @@
<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');
@@ -19,17 +18,6 @@
--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; }
@@ -186,7 +174,6 @@
</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>
@@ -256,13 +243,5 @@
<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>
-326
View File
@@ -1,326 +0,0 @@
<!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>
+7 -3
View File
@@ -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,
@@ -106,4 +105,9 @@ ozzelot@mstdn.social,true,false,
j4n3z@mastodon.social,true,false,
prahou@merveilles.town,true,false,
mirek@rodina-sucha.cz,true,false,
sesivany@vivaldi.net,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,
1 medvidekpu@mastodon.social true false
55 anlexcz@witter.cz true false
56 lacertacz@mastodonczech.cz true false
57 srandista@mastodonczech.cz true false
politiq@mastodon.arch-linux.cz true false
58 aikencz@f.cz true false
59 sandruska93@mas.to true false
60 karelcapek@mastodonczech.cz true false
96 sledge@mastodonczech.cz true false
97 tensob_@mastodonczech.cz true false
98 archos@mamutovo.cz true false
99 archlinux@mamutovo.cz arch@gts.arch-linux.cz true false
100 electric@vaclavpasek.cz true false
101 adamhavelka@mastodon.prorocketeers.com true false
102 Kipe@mastodon.social true false
105 j4n3z@mastodon.social true false
106 prahou@merveilles.town true false
107 mirek@rodina-sucha.cz true false
108 sesivany@vivaldi.net sesivany@social.vivaldi.net true false
109 jimmac@mastodon.social true false
110 Oskar456@mastodon.social true false
111 jmlich@fosstodon.org true false
112 ronny@metalhead.club true false
113 vancura@mastodon.design true false
+17 -3
View File
@@ -50,9 +50,19 @@ _TOKENS = _load_tokens()
MASTODON_TOKEN = _TOKENS.get("MASTODON_TOKEN")
GTS_TOKEN = _TOKENS.get("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:
if GTS_TOKEN and _is_gts(instance):
return GTS_TOKEN
return MASTODON_TOKEN
@@ -167,6 +177,11 @@ def load_manual_accounts(seen_handles=None):
url = f"https://{instance}/api/v1/accounts/lookup?acct={urllib.parse.quote(handle_part)}"
token = _token_for(instance)
acc = api_get(url, token=token)
if not acc or not isinstance(acc, dict):
log.debug(f" {instance}: is_gts={_is_gts(instance)}, gts_token={GTS_TOKEN is not None}")
if GTS_TOKEN and _is_gts(instance):
log.debug(f" {handle}: zkouším GTS_TOKEN")
acc = api_get(url, token=GTS_TOKEN)
if not acc or not isinstance(acc, dict):
log.warning(f" {handle}: lookup selhal")
continue
@@ -272,7 +287,6 @@ 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),
+8 -24
View File
@@ -4,7 +4,6 @@
<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');
@@ -19,17 +18,6 @@
--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; }
@@ -101,7 +89,7 @@
/* --- CARDS GRID --- */
.cards {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-columns: 1fr 1fr 1fr;
gap: 1rem;
}
@@ -394,7 +382,6 @@
</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>
@@ -402,7 +389,7 @@
<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.<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>
<a href="https://about.mamutovo.cz" target="_blank" class="about-link">Co je Mamutovo.cz?</a>
</p>
</div>
@@ -484,12 +471,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>
@@ -497,13 +488,6 @@ 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(() => {