File tree Expand file tree Collapse file tree 16 files changed +32
-1
lines changed
Expand file tree Collapse file tree 16 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 216216 '25' : [ 22 , 25 ]
217217 } ;
218218
219+ const noResultsMsg = document . getElementById ( 'noResultsMessage' ) ;
220+
219221 const applyFilters = ( ) => {
222+ let visibleCount = 0 ;
220223 cards . forEach ( card => {
221224 const matchesCategory = ! activeCategory || card . dataset . category === activeCategory ;
222225 let matchesJdk = true ;
225228 const range = LTS_RANGES [ activeJdk ] ;
226229 matchesJdk = range && version >= range [ 0 ] && version <= range [ 1 ] ;
227230 }
228- card . classList . toggle ( 'filter-hidden' , ! ( matchesCategory && matchesJdk ) ) ;
231+ const visible = matchesCategory && matchesJdk ;
232+ card . classList . toggle ( 'filter-hidden' , ! visible ) ;
233+ if ( visible ) visibleCount ++ ;
229234 } ) ;
230235
236+ if ( noResultsMsg ) {
237+ noResultsMsg . style . display = visibleCount === 0 ? '' : 'none' ;
238+ }
239+
231240 if ( window . updateViewToggleState ) {
232241 window . updateViewToggleState ( ) ;
233242 }
Original file line number Diff line number Diff line change @@ -415,6 +415,14 @@ nav {
415415 display : none;
416416}
417417
418+ .no-results-message {
419+ text-align : center;
420+ color : var (--text-muted );
421+ padding : 3rem 1rem ;
422+ font-size : 1.1rem ;
423+ width : 100% ;
424+ }
425+
418426.tip-card {
419427 background : var (--surface );
420428 border : 1px solid var (--border );
Original file line number Diff line number Diff line change @@ -275,6 +275,7 @@ <h2 class="section-title">{{site.allComparisons}}</h2>
275275 < div class ="tips-grid " id ="tipsGrid ">
276276{{tipCards}}
277277 </ div >
278+ < p class ="no-results-message " id ="noResultsMessage " style ="display:none "> {{filters.noResults}}</ p >
278279 </ section >
279280
280281 < div class ="stats-bar ">
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ sections:
3131filters :
3232 show : " عرض:"
3333 all : الكل
34+ noResults : لم يتم العثور على أنماط برمجية لهذا الفلتر.
3435difficulty :
3536 beginner : مبتدئ
3637 intermediate : متوسط
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ filters:
3434 all : সব
3535 jdk : ' JDK:'
3636 category : ' বিভাগ:'
37+ noResults : এই ফিল্টারের জন্য কোনো কোড প্যাটার্ন পাওয়া যায়নি।
3738difficulty :
3839 beginner : প্রাথমিক
3940 intermediate : মধ্যম
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ sections:
3333filters :
3434 show : ' Anzeigen:'
3535 all : Alle
36+ noResults : Keine Code-Muster für diesen Filter gefunden.
3637difficulty :
3738 beginner : Einsteiger
3839 intermediate : Fortgeschritten
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ filters:
3535 all : All
3636 jdk : ' JDK:'
3737 category : ' Category:'
38+ noResults : No code patterns found for this filter.
3839difficulty :
3940 beginner : Beginner
4041 intermediate : Intermediate
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ sections:
3333filters :
3434 show : ' Mostrar:'
3535 all : Todos
36+ noResults : No se encontraron patrones de código para este filtro.
3637difficulty :
3738 beginner : Principiante
3839 intermediate : Intermedio
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ sections:
3333filters :
3434 show : ' Afficher :'
3535 all : Tous
36+ noResults : Aucun patron de code trouvé pour ce filtre.
3637difficulty :
3738 beginner : Débutant
3839 intermediate : Intermédiaire
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ sections:
3333filters :
3434 show : ' Mostra:'
3535 all : Tutti
36+ noResults : Nessun pattern di codice trovato per questo filtro.
3637difficulty :
3738 beginner : Principiante
3839 intermediate : Intermedio
You can’t perform that action at this time.
0 commit comments