@@ -31,10 +31,26 @@ body {
3131 color : var (--ink );
3232 font : var (--font );
3333}
34+ header {
35+ text-align : center;
36+ }
3437a {
35- padding : var (--space );
36- border : var (--line );
37- max-width : fit-content;
38+ display : inline-block;
39+ width : fit-content;
40+ height : 40px ;
41+ line-height : 40px ;
42+ padding : 0 1.2em ;
43+ background : rgb (154 , 206 , 227 );
44+ color : black;
45+ text-decoration : none;
46+ border-radius : 6px ;
47+ font-weight : 600 ;
48+ text-align : center;
49+ vertical-align : bottom;
50+ }
51+
52+ a : hover {
53+ background : rgb (193 , 214 , 230 );
3854}
3955img ,
4056svg {
@@ -48,11 +64,16 @@ https://www.w3.org/WAI/tutorials/page-structure/regions/
4864main {
4965 max-width : var (--container );
5066 margin : 0 auto calc (var (--space ) * 4 ) auto;
67+ padding-bottom : calc (var (--space ) * 6 );
5168}
5269footer {
5370 position : fixed;
5471 bottom : 0 ;
72+ width : 100% ;
5573 text-align : center;
74+ background : white;
75+ border-top : var (--line );
76+ padding : var (--space );
5677}
5778/* ====== Articles Grid Layout ====
5879Setting the rules for how articles are placed in the main element.
@@ -64,6 +85,7 @@ https://gridbyexample.com/learn/
6485main {
6586 display : grid;
6687 grid-template-columns : 1fr 1fr ;
88+ grid-template-rows : auto 1fr auto; /* Add this */
6789 gap : var (--space );
6890 > * : first-child {
6991 grid-column : span 2 ;
@@ -86,4 +108,22 @@ article {
86108 > img {
87109 grid-column : span 3 ;
88110 }
111+
112+ > a {
113+ align-self : end; /* Add this */
114+ }
115+ }
116+
117+ article > h2 {
118+ padding-top : var (--space );
89119}
120+
121+ article : first-child > img {
122+ grid-column : span 3 ;
123+ /* no aspect-ratio here, so it keeps its natural height */
124+ }
125+
126+ article : not (: first-child ) > img {
127+ grid-column : span 3 ;
128+ aspect-ratio : 16 / 9 ; /* force same height for bottom two */
129+ object-fit : cover;
0 commit comments