mirror of
https://github.com/vinta/awesome-python.git
synced 2026-11-08 02:15:12 -06:00
style: drop the scroll-in reveal animation from every section
Sections faded and slid in as they scrolled into view, so screenshots and quick scrolls caught the sponsor band and search box half-drawn. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -21,40 +21,6 @@ const rows = document.querySelectorAll(".table tbody tr.row");
|
||||
const tbody = document.querySelector(".table tbody");
|
||||
const groupRows = document.querySelectorAll(".table tbody tr.group-row");
|
||||
|
||||
function initRevealSections() {
|
||||
const sections = document.querySelectorAll("[data-reveal]");
|
||||
if (!sections.length) return;
|
||||
|
||||
if (!("IntersectionObserver" in window)) {
|
||||
sections.forEach(function (section) {
|
||||
section.classList.add("is-visible");
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const observer = new IntersectionObserver(
|
||||
function (entries) {
|
||||
entries.forEach(function (entry) {
|
||||
if (!entry.isIntersecting) return;
|
||||
entry.target.classList.add("is-visible");
|
||||
observer.unobserve(entry.target);
|
||||
});
|
||||
},
|
||||
{
|
||||
threshold: 0.12,
|
||||
rootMargin: "0px 0px -8% 0px",
|
||||
},
|
||||
);
|
||||
|
||||
sections.forEach(function (section, index) {
|
||||
section.classList.add("will-reveal");
|
||||
section.style.transitionDelay = Math.min(index * 70, 180) + "ms";
|
||||
observer.observe(section);
|
||||
});
|
||||
}
|
||||
|
||||
initRevealSections();
|
||||
|
||||
// Smooth scroll without hash in URL
|
||||
document.querySelectorAll("[data-scroll-to]").forEach(function (link) {
|
||||
link.addEventListener("click", function (e) {
|
||||
|
||||
@@ -1686,19 +1686,6 @@ th[data-sort].sort-asc::after {
|
||||
color: var(--ink-muted);
|
||||
}
|
||||
|
||||
[data-reveal].will-reveal {
|
||||
opacity: 0;
|
||||
transform: translateY(1.8rem);
|
||||
}
|
||||
|
||||
[data-reveal].will-reveal.is-visible {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
transition:
|
||||
opacity 600ms ease,
|
||||
transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% if sponsors %}
|
||||
<section class="sponsor-band" aria-labelledby="sponsor-heading" data-reveal>
|
||||
<section class="sponsor-band" aria-labelledby="sponsor-heading">
|
||||
<div class="section-shell sponsor-shell">
|
||||
<header class="sponsor-meta">
|
||||
<p class="section-label" id="sponsor-heading">Sponsors</p>
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
|
||||
<section class="results-section" id="library-index">
|
||||
{% set single_entry = entries | length == 1 %}
|
||||
<div class="results-intro section-shell" data-reveal>
|
||||
<div class="results-intro section-shell">
|
||||
{% if entry_groups and not single_entry %}
|
||||
{% set named_groups = entry_groups | selectattr("name") | list %}
|
||||
<p class="order-note">
|
||||
@@ -229,7 +229,7 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="controls section-shell" data-reveal>
|
||||
<div class="controls section-shell">
|
||||
<h2 class="sr-only">Search and filter</h2>
|
||||
<div class="search-wrap">
|
||||
<svg
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
{% include "_sponsor_band.html" %}
|
||||
|
||||
<section class="results-section" id="library-index">
|
||||
<div class="results-intro section-shell" data-reveal>
|
||||
<div class="results-intro section-shell">
|
||||
<div>
|
||||
<h2>Search every project in one place</h2>
|
||||
</div>
|
||||
@@ -89,7 +89,7 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="controls section-shell" data-reveal>
|
||||
<div class="controls section-shell">
|
||||
<h2 class="sr-only">Search and filter</h2>
|
||||
<div class="search-wrap">
|
||||
<svg
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
</div>
|
||||
</header>
|
||||
{% endblock %} {% block content %}
|
||||
<section class="sponsorship-section sponsorship-audience" data-reveal>
|
||||
<section class="sponsorship-section sponsorship-audience">
|
||||
<div class="section-shell sponsorship-shell">
|
||||
<header class="sponsorship-meta">
|
||||
<p class="section-label">Audience</p>
|
||||
@@ -101,7 +101,7 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="sponsorship-section sponsorship-tiers" data-reveal>
|
||||
<section class="sponsorship-section sponsorship-tiers">
|
||||
<div class="section-shell sponsorship-shell">
|
||||
<header class="sponsorship-meta">
|
||||
<p class="section-label">Tiers</p>
|
||||
@@ -196,7 +196,7 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="sponsorship-section sponsorship-past" data-reveal>
|
||||
<section class="sponsorship-section sponsorship-past">
|
||||
<div class="section-shell sponsorship-shell">
|
||||
<header class="sponsorship-meta">
|
||||
<p class="section-label">Previously sponsored by</p>
|
||||
@@ -222,7 +222,7 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="sponsorship-section sponsorship-getstarted" data-reveal>
|
||||
<section class="sponsorship-section sponsorship-getstarted">
|
||||
<div class="section-shell sponsorship-shell">
|
||||
<header class="sponsorship-meta">
|
||||
<p class="section-label">Get started</p>
|
||||
@@ -283,7 +283,7 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="sponsorship-section sponsorship-independence" data-reveal>
|
||||
<section class="sponsorship-section sponsorship-independence">
|
||||
<div class="section-shell sponsorship-shell">
|
||||
<header class="sponsorship-meta">
|
||||
<p class="section-label">Editorial independence</p>
|
||||
|
||||
Reference in New Issue
Block a user