fix the plugin card on plugins page

This commit is contained in:
Abhishek Jakhar
2020-10-19 17:22:44 +05:30
parent 765dbeb2e4
commit 1367bad0e7
2 changed files with 47 additions and 31 deletions
+15 -16
View File
@@ -57,26 +57,25 @@ const Plugins = () => (
}) => (
<div className="PluginCard">
<div className="PluginCardHeader">
<img src={iconUrl || defaultIconUrl} alt={title} />
<h2 className="PluginCardTitle">{title}</h2>
<p className="Author">
by <a href={authorUrl}>{author}</a>
</p>
<span className="ChipOutlined">{category}</span>
<div className="PluginCardImage">
<img src={iconUrl || defaultIconUrl} alt={title} />
</div>
<div className="PluginCardInfo">
<h3 className="PluginCardTitle">{title}</h3>
<p className="PluginCardAuthor">
by <a href={authorUrl}>{author}</a>
</p>
<span className="PluginCardChipOutlined">{category}</span>
</div>
</div>
<div className="PluginCardBody">
<p>{truncate(description)}</p>
</div>
<Container className="PluginCardFooter">
<span>
<a
className="PluginCardLink ButtonFilled"
href={documentation}
>
Explore
</a>
</span>
</Container>
<div className="PluginCardFooter">
<a className="ButtonFilled" href={documentation}>
Explore
</a>
</div>
</div>
),
)}
+32 -15
View File
@@ -40,14 +40,32 @@
}
.PluginCardHeader {
display: flex;
flex-direction: row;
align-items: center;
max-height: fit-content;
min-height: fit-content;
}
.PluginCardImage {
width: 80px;
height: 80px;
margin-right: 16px;
}
.PluginCardImage img {
width: 100%;
max-width: 100%;
}
.PluginCardTitle {
color: white;
vertical-align: top;
margin: 8px 0px 0px 16px;
margin: 8px 0 0;
}
.PluginCardInfo {
flex: 1;
}
.PluginAddNewButton {
@@ -66,7 +84,6 @@
padding: 4px 8px;
border-radius: 4px;
color: #69ddc7;
margin-top: 36px;
}
.ButtonFilled:hover {
@@ -74,7 +91,7 @@
background-color: transparent;
}
.ChipOutlined {
.PluginCardChipOutlined {
font-size: small;
border-radius: 16px;
padding: 2px 8px;
@@ -82,11 +99,16 @@
color: #69ddc7;
}
.PluginCardLink {
.PluginCardFooter {
display: flex;
justify-content: flex-end;
align-items: flex-end;
margin-top: auto;
min-height: 2em;
}
.PluginCardFooter a {
padding: 2px 8px;
position: absolute;
bottom: 0;
right: 0;
}
.PluginPageLayout {
@@ -107,18 +129,13 @@
padding-top: 8px;
}
.PluginCardFooter {
position: relative;
min-height: 2em;
}
.Author,
.Author a {
.PluginCardAuthor,
.PluginCardAuthor a {
margin-bottom: 0.25em;
color: rgba(255, 255, 255, 0.6);
}
.Author a:hover {
.PluginCardAuthor a:hover {
color: white;
}