File tree Expand file tree Collapse file tree 3 files changed +18
-13
lines changed
Expand file tree Collapse file tree 3 files changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ jsonify
3939Jyeshtha
4040Kartika
4141kmeans
42+ letterpad
4243linalg
4344lucide
4445LXXX
Original file line number Diff line number Diff line change 1+ .container__page {
2+ container-type : inline-size;
3+ container-name : letterpad;
4+ }
5+
16.page__header {
27 display : flex;
38 align-items : center;
4045 padding : 1rem ;
4146 height : calc (100vh - 5rem );
4247 overflow-y : auto;
43- container-type : inline-size;
48+
4449
4550 .page__grid {
4651 display : grid;
4752 gap : 1.25rem ;
48- grid-template-columns : 1fr ;
53+ grid-template-columns : repeat (auto-fit , minmax ( 20 rem , 1fr )) ;
4954 justify-content : center;
5055 margin-top : 1rem ;
5156 }
57+ }
5258
53- @container (min-width: 600px) {
54- .page__grid {
55- display : grid;
56- grid-template-columns : repeat (auto-fit, minmax (20rem , 1fr ));
57- gap : 1.5rem ;
58- }
59+ @container letterpad (max-width : 700px ) {
60+ .page__title {
61+ display : none;
5962 }
60- }
63+ }
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import BackButton from "@/components/BackButton.astro";
44import LetterCard from " @/components/LetterCard.astro" ;
55import glossaryData from " @/data/glossary.json" ;
66import BaseLayout from " @/layouts/Base" ;
7+ import type { AlphabetEntry } from " @/types/alphabet" ;
78
89export async function getStaticPaths() {
910 return Object .keys (glossaryData ).map ((value ) => ({
@@ -20,16 +21,16 @@ if (!categoryData) {
2021}
2122---
2223
23- <BaseLayout meta ={ { title: title ?? item }} >
24- <BackButton href =" /glossary" />
24+ <BaseLayout meta ={ { title: title }} >
2525 <div class =" container__page" >
2626 <div class =" page__header" >
27- <h2 class =" page__title" >{ title ?? item } </h2 >
27+ <BackButton href =" /glossary" />
28+ <h2 class =" page__title" >{ title } </h2 >
2829 <button id =" flip-all-button" class =" btn__flip__all" >Flip All Cards</button >
2930 </div >
3031 <div class =" page__content" >
3132 <div class =" page__grid" >
32- { data && data .map ((entry : any ) => <LetterCard item = { entry } category = { category ?? item } />)}
33+ { data .map ((entry : AlphabetEntry ) => <LetterCard item = { entry } category = { category } />)}
3334 </div >
3435 </div >
3536 </div >
You can’t perform that action at this time.
0 commit comments