Skip to content

Commit

Permalink
Merge pull request #1243 from milvus-io/preview
Browse files Browse the repository at this point in the history
Preview
  • Loading branch information
ThyeeZz authored Nov 10, 2023
2 parents acceb61 + 731b286 commit daf805a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
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

0 comments on commit daf805a

Please sign in to comment.