From 454c52916f78bd4226ba212cb33b8538f3ca42e3 Mon Sep 17 00:00:00 2001 From: Ivan Kuzmenko <6745157+rndtrash@users.noreply.github.com> Date: Sat, 19 Jul 2025 03:48:03 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D1=80=D0=B0=D1=81=D0=BF=D0=BE=D0=B7=D0=BD=D0=B0=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=81=D1=81=D1=8B=D0=BB=D0=BE=D0=BA=20?= =?UTF-8?q?=D0=BD=D0=B0=20RSS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/util/LinkResolver.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/util/LinkResolver.ts b/src/lib/util/LinkResolver.ts index 9d1570e..aa7a40e 100644 --- a/src/lib/util/LinkResolver.ts +++ b/src/lib/util/LinkResolver.ts @@ -16,7 +16,8 @@ const icons: Record = { 'hl.teasanctuary.ru': '/icons/half-life.svg', 'git.teasanctuary.ru': 'devicon-plain:git', localhost: '/icons/tea-sanctuary-white.svg', - email: 'material-symbols:alternate-email' + email: 'material-symbols:alternate-email', + rss: 'material-symbols:rss-feed' }; // Особые случаи, когда одним доменом второго уровня не ограничишься (например, randomtrash.itch.io) @@ -44,6 +45,8 @@ function getIconFromUrl(url: URL): string | undefined { const href = url.href; if (href.startsWith('mailto:')) return 'email'; + if (href.endsWith('/rss.xml')) + return 'rss'; const hostname = url.hostname; const secondLevel = hostname.match(/(([A-Za-z0-9\-])+\.([A-Za-z0-9\-])+)$/)?.at(0) ?? '';