mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-09 12:27:47 +00:00
added image to card
This commit is contained in:
@@ -8,16 +8,18 @@ export default function BlogCard({
|
|||||||
link,
|
link,
|
||||||
title,
|
title,
|
||||||
tags,
|
tags,
|
||||||
|
creatorImage,
|
||||||
image,
|
image,
|
||||||
excerpt,
|
excerpt,
|
||||||
name,
|
name,
|
||||||
views,
|
views,
|
||||||
replies
|
replies,
|
||||||
|
id
|
||||||
}) {
|
}) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link to={link}>
|
<Link to={link}>
|
||||||
<div className={styles.card}>
|
<div className={styles.card} >
|
||||||
|
|
||||||
<span className={styles.cardData}>
|
<span className={styles.cardData}>
|
||||||
<img className={styles.cardEye} src={useBaseUrl('/blog/eye-regular.svg')}></img>
|
<img className={styles.cardEye} src={useBaseUrl('/blog/eye-regular.svg')}></img>
|
||||||
@@ -28,22 +30,29 @@ export default function BlogCard({
|
|||||||
<span className={styles.cardDataText}>{replies}</span>
|
<span className={styles.cardDataText}>{replies}</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<img className={styles.cardFace} src={useBaseUrl(image)}></img>
|
<div className={styles.cardUser}>
|
||||||
|
<img className={styles.cardFace} src={useBaseUrl(creatorImage)}></img>
|
||||||
|
<div className={styles.cardName}>{name}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div className={styles.cardText}>
|
<div className={styles.cardText}>
|
||||||
|
<img className={styles.cardImage} src={useBaseUrl(image)}></img>
|
||||||
<div className={styles.cardTitle}>{title}</div>
|
<div className={styles.cardTitle}>{title}</div>
|
||||||
|
<div className={styles.tags}>
|
||||||
|
{tags?.map((tag, index) => {
|
||||||
|
if (index > 2) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return <div key={tag} className={styles.tag}>{tag}</div>;
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
<div className={styles.cardBody}>{excerpt}</div>
|
<div className={styles.cardBody}>{excerpt}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.cardName}>{name}</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div className={styles.tags}>
|
|
||||||
{tags?.map((tag, index) => {
|
|
||||||
if (index > 2) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
return <div className={styles.tag}>{tag}</div>;
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
.card {
|
.card {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
height: 400px;
|
height: 650px;
|
||||||
/* UI Properties */
|
/* UI Properties */
|
||||||
background: var(--dev-card-background);
|
background: var(--dev-card-background);
|
||||||
box-shadow: var(--dev-card-shadow);
|
box-shadow: var(--dev-card-shadow);
|
||||||
@@ -25,13 +25,7 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cardName {
|
|
||||||
position: absolute;
|
|
||||||
margin: 22px;
|
|
||||||
min-width: 170px;
|
|
||||||
bottom: 0px;
|
|
||||||
left: 150px;
|
|
||||||
}
|
|
||||||
.cardTitle {
|
.cardTitle {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
@@ -46,33 +40,49 @@
|
|||||||
|
|
||||||
|
|
||||||
.tag {
|
.tag {
|
||||||
font-size: 12px;
|
font-size: 16px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--dev-secondary-text);
|
color: var(--dev-secondary-text);
|
||||||
|
background-color: #eaeef1;
|
||||||
|
padding: 0px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tags {
|
.tags {
|
||||||
position: absolute;
|
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
width: 230px;
|
width: 230px;
|
||||||
top: 10px;
|
|
||||||
left: 20px;
|
|
||||||
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: max-content max-content max-content;
|
grid-template-columns: max-content max-content max-content;
|
||||||
grid-gap: 10px;
|
grid-gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cardFace {
|
.cardUser {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border-radius: 9999px;
|
|
||||||
bottom: 10px;
|
bottom: 10px;
|
||||||
left: 120px;
|
left: 120px;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardFace {
|
||||||
|
border-radius: 9999px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cardName {
|
||||||
|
min-width: 170px;
|
||||||
|
margin-top: 7px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.cardData {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 50px;
|
||||||
|
left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.cardEye {
|
.cardEye {
|
||||||
fill: #96a9bb;
|
fill: #96a9bb;
|
||||||
/* computed from codepen https://codepen.io/sosuke/pen/Pjoqqp */
|
/* computed from codepen https://codepen.io/sosuke/pen/Pjoqqp */
|
||||||
@@ -117,8 +127,3 @@
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cardData {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 50px;
|
|
||||||
left: 20px;
|
|
||||||
}
|
|
||||||
@@ -26,17 +26,19 @@ export default function BlogCards() {
|
|||||||
return (
|
return (
|
||||||
<div className={styles.center}>
|
<div className={styles.center}>
|
||||||
<div className={styles.gridContainer}>
|
<div className={styles.gridContainer}>
|
||||||
|
|
||||||
{ans.map(function(a, index){
|
{ans.map(function(a, index){
|
||||||
return <BlogCard
|
return <BlogCard
|
||||||
|
key={a.link}
|
||||||
|
id={index + a.link}
|
||||||
excerpt={a.excerpt}
|
excerpt={a.excerpt}
|
||||||
name={a.name}
|
name={a.name}
|
||||||
tags={a.tags}
|
tags={a.tags}
|
||||||
link={a.link}
|
link={a.link}
|
||||||
|
image={a.image}
|
||||||
title={a.title}
|
title={a.title}
|
||||||
views={a.views}
|
views={a.views}
|
||||||
replies={a.replies}
|
replies={a.replies}
|
||||||
image={a.image}></BlogCard>
|
creatorImage={a.creatorImage}></BlogCard>
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -52,8 +54,9 @@ async function getPostList(topic) {
|
|||||||
return {
|
return {
|
||||||
name: fullTopic.details.created_by.name,
|
name: fullTopic.details.created_by.name,
|
||||||
excerpt: styleExcerpt(topic.excerpt),
|
excerpt: styleExcerpt(topic.excerpt),
|
||||||
image: getavatarURL(fullTopic.details.created_by.avatar_template),
|
creatorImage: getavatarURL(fullTopic.details.created_by.avatar_template),
|
||||||
tags: topic.tags,
|
tags: topic.tags,
|
||||||
|
image: fullTopic.image_url,
|
||||||
link:
|
link:
|
||||||
'https://developer.sailpoint.com/discuss/t/' +
|
'https://developer.sailpoint.com/discuss/t/' +
|
||||||
topic.slug +
|
topic.slug +
|
||||||
|
|||||||
Reference in New Issue
Block a user