Merge pull request #2967 from abhishekjakhar/fix/plugins-page

fix(microsite): plugins page, plugins card and plugins header
This commit is contained in:
Fredrik Adelöw
2020-10-19 16:24:25 +02:00
committed by GitHub
2 changed files with 63 additions and 35 deletions
+16 -17
View File
@@ -44,7 +44,7 @@ const Plugins = () => (
</span>
</div>
<BulletLine style={{ width: '100% ' }} />
<Container wrapped className="grid">
<Container wrapped className="PluginGrid">
{pluginMetadata.map(
({
iconUrl,
@@ -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>
),
)}
+47 -18
View File
@@ -6,7 +6,7 @@
flex-direction: column;
}
.grid {
.PluginGrid {
display: grid;
grid-gap: 1rem;
grid-template-columns: repeat(4, 1fr);
@@ -15,17 +15,23 @@
}
@media (max-width: 1200px) {
.grid {
.PluginGrid {
grid-template-columns: repeat(3, 1fr);
}
}
@media only screen and (max-width: 815px) {
.grid {
.PluginGrid {
grid-template-columns: repeat(2, 1fr);
}
}
@media only screen and (max-width: 485px) {
.PluginGrid {
grid-template-columns: 1fr;
}
}
.PluginCard img {
float: left;
margin: 0px 16px 8px 0px;
@@ -34,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 {
@@ -50,11 +74,16 @@
right: 0px;
}
@media only screen and (max-width: 485px) {
.PluginAddNewButton {
bottom: -4px;
}
}
.ButtonFilled {
padding: 4px 8px;
border-radius: 4px;
color: #69ddc7;
margin-top: 36px;
}
.ButtonFilled:hover {
@@ -62,7 +91,7 @@
background-color: transparent;
}
.ChipOutlined {
.PluginCardChipOutlined {
font-size: small;
border-radius: 16px;
padding: 2px 8px;
@@ -70,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 {
@@ -95,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;
}