From 302fa76fa75447324fc7ee4d312a1b0f2daa8a2a Mon Sep 17 00:00:00 2001 From: ashley Date: Sat, 18 Oct 2025 22:35:17 +0200 Subject: [PATCH] Update html/account-me.ejs --- html/account-me.ejs | 55 ++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/html/account-me.ejs b/html/account-me.ejs index c52e3009..6acb5965 100644 --- a/html/account-me.ejs +++ b/html/account-me.ejs @@ -151,7 +151,6 @@ background:rgba(255,255,255,0.05); border:1px solid transparent; transition:all .25s ease; - cursor:pointer; } .channel:hover{ background:rgba(255,255,255,0.15); @@ -176,6 +175,22 @@ font-size:14px; } + .pill--unsub{ + font-size:12px; + color:var(--ink); + background:rgba(255,255,255,0.08); + padding:4px 10px; + border-radius:999px; + border:1px solid var(--border); + transition:background .2s ease, color .2s ease; + white-space:nowrap; + } + .pill--unsub:hover{ + background:rgba(255,80,80,0.2); + border-color:#ff7777; + color:#ffaaaa; + } + .sidebar-footer{ border-top:1px solid var(--border); padding:14px; @@ -336,10 +351,13 @@
<% subs.forEach(c => { %> - - -
<%= c.name %>
-
+ <% }) %>
@@ -378,15 +396,24 @@ document.addEventListener("DOMContentLoaded",()=>{ const viewer=document.getElementById("viewer"); const title=document.getElementById("channelTitle"); - // hide no-js links behaviour - channels.forEach(ch=>ch.removeAttribute("href")); + // disable direct link loading when JS active + document.querySelectorAll(".channel-name-link").forEach(link=>{ + link.addEventListener("click",e=>{ + e.preventDefault(); + const parent=link.closest(".channel"); + const id=parent.dataset.id; + const name=parent.querySelector(".channel-name").textContent; + channels.forEach(c=>c.classList.remove("active")); + parent.classList.add("active"); + renderIframe(id,name); + }); + }); function renderIframe(id,name){ viewer.innerHTML=`
`; title.textContent=name; - const closeBtn=viewer.querySelector(".close-view"); closeBtn.addEventListener("click",()=>{ viewer.innerHTML='
select a channel on the left to view it
'; @@ -395,15 +422,7 @@ document.addEventListener("DOMContentLoaded",()=>{ }); } - channels.forEach(ch=>{ - ch.addEventListener("click",e=>{ - e.preventDefault(); - channels.forEach(c=>c.classList.remove("active")); - ch.classList.add("active"); - renderIframe(ch.dataset.id,ch.querySelector(".channel-name").textContent); - }); - }); - + // search + sorting function filter(){ const term=search.value.toLowerCase(); channels.forEach(c=>{ @@ -433,4 +452,4 @@ document.addEventListener("DOMContentLoaded",()=>{ }); - + \ No newline at end of file