diff --git a/website/static/main.js b/website/static/main.js index 8ca095ba..aa027eab 100644 --- a/website/static/main.js +++ b/website/static/main.js @@ -12,6 +12,10 @@ const defaultSort = : { col: "downloads", order: "desc" }; let activeSort = defaultSort; const searchInput = document.querySelector(".search"); +// The full placeholder is cut off on phones +if (searchInput && window.matchMedia("(max-width: 680px)").matches) { + searchInput.placeholder = searchInput.dataset.shortPlaceholder; +} const noResults = document.querySelector(".no-results"); const rows = document.querySelectorAll(".table tbody tr.row"); const tbody = document.querySelector(".table tbody"); diff --git a/website/static/style.css b/website/static/style.css index 110b995f..3f09cf55 100644 --- a/website/static/style.css +++ b/website/static/style.css @@ -467,7 +467,18 @@ kbd { .no-results-clear:focus-visible, .table a:focus-visible, .footer a:focus-visible, -.sort-btn:focus-visible { +.sort-btn:focus-visible, +.hero-sub a:focus-visible, +.hero-proof a:focus-visible, +.category-breadcrumb a:focus-visible, +.category-subtitle a:focus-visible, +.category-intro a:focus-visible, +.guide-body a:focus-visible, +.group-lead a:focus-visible, +.sponsor-become:focus-visible, +.sponsor-link:focus-visible, +.sponsor-desc a:focus-visible, +.sponsorship-body a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; } diff --git a/website/templates/category.html b/website/templates/category.html index e27e5f90..89d4367c 100644 --- a/website/templates/category.html +++ b/website/templates/category.html @@ -250,6 +250,7 @@ type="search" class="search" placeholder="Search {{ entries | length }} projects in {{ category.name }}..." + data-short-placeholder="Search {{ entries | length }} projects..." aria-label="Search projects" /> diff --git a/website/templates/index.html b/website/templates/index.html index 6020f35b..c4e18fba 100644 --- a/website/templates/index.html +++ b/website/templates/index.html @@ -112,6 +112,7 @@ type="search" class="search" placeholder="Search {{ entries | length }} projects across {{ total_categories }} categories..." + data-short-placeholder="Search {{ entries | length }} projects..." aria-label="Search projects" /> diff --git a/website/templates/sponsorship.html b/website/templates/sponsorship.html index 59fc3da7..7aacb019 100644 --- a/website/templates/sponsorship.html +++ b/website/templates/sponsorship.html @@ -270,7 +270,7 @@

Sponsor links carry UTM tags, so clicks show up in your own analytics as - awesome-python / sponsorship. + awesome-python / sponsorship.