Skip to content

Commit cd44267

Browse files
DedelweissDedelweiss
andauthored
fix: cover size for articles (#270)
Co-authored-by: Dedelweiss <[email protected]>
1 parent 4cd1175 commit cd44267

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,11 @@ export default {
3434

3535
- npm install
3636
- npm run dev
37+
38+
# Branch Promotion Workflow
39+
40+
- Step 1: `branch` to `main` : PR
41+
42+
- Step 2: `main` to `acceptance` : switch `acceptance` -> rebase `main` -> push to `acceptance`
43+
44+
- Step 3: `acceptance` to `production` : switch `production` -> rebase `acceptance` -> push to `production`

src/components/Articles/Articles.scss

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@
1515
padding-bottom: 32px;
1616
}
1717
}
18-
&__img {
19-
height: 100%;
20-
background-size: cover;
21-
border-radius: 10px;
22-
grid-column: span 6;
23-
@include tablet {grid-column: span 12;}
24-
@include phone-portrait {
25-
grid-column: span 12;
18+
&__cover {
19+
height: 320px;
20+
img {
21+
width: 100%;
22+
height: 100%;
23+
object-fit: cover;
24+
border-radius: 10px;
25+
grid-column: span 6;
26+
@include tablet {grid-column: span 12;}
27+
@include phone-portrait {
28+
grid-column: span 12;
29+
}
2630
}
2731
}
2832
}

src/components/Articles/Articles.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ const Articles = () => {
6565
<Text size="medium" className="mgb24">{truncateText(article.excerpt, 25)}</Text>
6666
<ButtonSecondary iconUrl={arrowRight} newPage={true} size="large" to={"https://blog.lunatech.com" + article.slug}><Trans i18nKey="buttonReadMore" /></ButtonSecondary>
6767
</div>
68-
<img className="blog__img" src={article.image_url} alt={article.title} />
68+
<div className='blog__cover'>
69+
<img src={article.image_url} alt={article.title} />
70+
</div>
6971
</div>
7072
</li>
7173
</SpotlightCard>

0 commit comments

Comments
 (0)