Skip to content

Commit 5c02933

Browse files
authored
Update news.html
1 parent 2525497 commit 5c02933

1 file changed

Lines changed: 4 additions & 23 deletions

File tree

‎_layouts/news.html‎

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@
252252
.comment-action-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
253253
.comment-action-btn.delete:hover { color: #ef4444; }
254254

255-
/* PŁYWAJĄCY PRZYCISK POWROTU DO ARCHIWUM NEWSÓW */
255+
/* STAŁY PŁYWAJĄCY PRZYCISK POWROTU DO NEWSÓW (ZAWSZE WIDOCZNY) */
256256
.back-to-news-floating {
257257
position: fixed;
258258
bottom: 30px;
@@ -273,16 +273,9 @@
273273
gap: 8px;
274274
z-index: 999;
275275
transition: 0.3s ease;
276-
opacity: 0;
277-
visibility: hidden;
278276
text-decoration: none;
279277
}
280278

281-
.back-to-news-floating.visible {
282-
opacity: 1;
283-
visibility: visible;
284-
}
285-
286279
.back-to-news-floating:hover {
287280
background: var(--accent-blue);
288281
color: #0f172a;
@@ -333,16 +326,16 @@ <h3 class="comments-title">// Komentarze & Opinie</h3>
333326
</section>
334327
</article>
335328

336-
<!-- BOCZNY PANEL: SPIS TREŚCI (TOC) -->
329+
<!-- BOCZny PANEL: SPIS TREŚCI (TOC) -->
337330
<aside class="sidebar-toc">
338331
<h4 class="toc-title">// Spis Treści</h4>
339332
<ul class="toc-list" id="tocList"></ul>
340333
</aside>
341334

342335
</div>
343336

344-
<!-- PŁYWAJĄCY PRZYCISK POWROTU DO LISTY NEWSÓW -->
345-
<a href="/newsy.html" id="backToNewsBtn" class="back-to-news-floating">
337+
<!-- STAŁY PŁYWAJĄCY PRZYCISK POWROTU DO LISTY NEWSÓW -->
338+
<a href="/newsy" class="back-to-news-floating">
346339
<span>&larr;</span> // NEWSY
347340
</a>
348341

@@ -371,18 +364,6 @@ <h4 class="toc-title">// Spis Treści</h4>
371364
document.getElementById('shareX').href = `https://twitter.com/intent/tweet?url=${currentUrl}&text=${currentTitle}`;
372365
document.getElementById('shareFB').href = `https://www.facebook.com/sharer/sharer.php?u=${currentUrl}`;
373366

374-
// OBSŁUGA PŁYWAJĄCEGO PRZYCISKU POWROTU DO NEWSÓW
375-
const backToNewsBtn = document.getElementById('backToNewsBtn');
376-
377-
window.addEventListener('scroll', () => {
378-
// Pokaż przycisk, gdy użytkownik przewinie stronę w dół o więcej niż 300px
379-
if (window.scrollY > 300) {
380-
backToNewsBtn.classList.add('visible');
381-
} else {
382-
backToNewsBtn.classList.remove('visible');
383-
}
384-
});
385-
386367
// SYSTEM KOMENTARZY (LOCALSTORAGE)
387368
const postId = window.location.pathname;
388369
const commentAuthor = document.getElementById('commentAuthor');

0 commit comments

Comments
 (0)