Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview #1243

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Preview #1243

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/components/card/BlogCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ const BlogCard = ({ title, desc, tags, cover, locale, path, className }) => {

return (
<Link to={to} className={`${styles.BlogCardWrapper} ${className}`}>
<div
className={styles.coverWrapper}
style={{ backgroundImage: `url(${cover})` }}
></div>
<div className={styles.coverWrapper}>
<img src={cover} alt={title} />
</div>
<div className={styles.descWrapper}>
<div className={styles.bottomWrapper}>
<Tags list={tags} tagsClass={styles.tags} />
Expand Down
17 changes: 5 additions & 12 deletions src/components/card/BlogCard.module.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import (reference) "../../css/responsive.less";
@import (reference) '../../css/responsive.less';

.BlogCardWrapper {
display: block;
Expand All @@ -13,20 +13,13 @@
}

.coverWrapper {
height: 290px;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
width: 100%;
aspect-ratio: 350/ 219;
border-radius: 6px;
overflow: hidden;

@media @tablet {
img {
width: 100%;
height: 305px;
}

@media @phone {
width: 100%;
height: 250px;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/templates/blogTemplate.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
width: 100%;
height: 440px;
background-repeat: no-repeat;
background-size: contain;
background-size: cover;
background-position: center;
&::after {
content: '';
Expand Down