mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Styling cards
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
ad6e4fc383
commit
3f6fff3daa
@ -3,14 +3,94 @@
|
|||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.ExtensionCard {
|
.hr {
|
||||||
margin-bottom: 10px;
|
padding: 80px 0;
|
||||||
list-style-type: none;
|
}
|
||||||
font-size: 1.2em;
|
|
||||||
border-radius: 6px;
|
.extensionCard {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
border-radius: 4px;
|
||||||
border: 1px solid #181a1f;
|
border: 1px solid #181a1f;
|
||||||
background-color: #333842;
|
background-color: #333842;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: var(--padding);
|
padding: 16px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 16px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #373d48;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.contents {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.head {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nameAndVersion {
|
||||||
|
display: flex;
|
||||||
|
gap: var(--padding);
|
||||||
|
margin-bottom: var(--padding);
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-weight: bolder;
|
||||||
|
color: #d7dae0;
|
||||||
|
font-size: larger;
|
||||||
|
}
|
||||||
|
|
||||||
|
.version {
|
||||||
|
font-size: .8em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.downloads {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--padding);
|
||||||
|
}
|
||||||
|
|
||||||
|
.description {
|
||||||
|
line-height: 1.4;
|
||||||
|
margin-bottom: var(--padding);
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.author a {
|
||||||
|
color: rgba(157, 165, 180, 0.6)!important;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
height: 50px;
|
||||||
|
border-radius: 4px;
|
||||||
|
min-width: 50px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-clip: content-box;
|
||||||
|
background-color: #3a404c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.install button {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.installButtonIco {
|
||||||
|
margin-right: var(--margin);
|
||||||
}
|
}
|
||||||
@ -39,17 +39,15 @@ export function Install() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<section>
|
<section>
|
||||||
<h2><Icon material="add"/> Install Extensions</h2>
|
<h2><Icon material="add" style={{ opacity: ".3" }}/> Install Extensions</h2>
|
||||||
|
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
<SearchInput/>
|
<SearchInput/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mx-7">
|
<hr />
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h2><Icon material="star"/> Featured Extensions</h2>
|
<h2 style={{ marginTop: "30px" }}><Icon material="star" small style={{ opacity: ".3" }}/> Featured Extensions</h2>
|
||||||
{renderExtensionsOrSpinner()}
|
{renderExtensionsOrSpinner()}
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
@ -64,31 +62,34 @@ function ExtensionList({ extensions }: { extensions: Extension[] }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function ExtensionCard({ extension }: { extension: Extension }) {
|
function ExtensionCard({ extension }: { extension: Extension }) {
|
||||||
const { name, version, totalNumberOfInstallations, shortDescription, publisher } = extension;
|
const { name, version, totalNumberOfInstallations, shortDescription, publisher, githubRepositoryUrl, appIconUrl } = extension;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.ExtensionCard}>
|
<div className={styles.extensionCard}>
|
||||||
<div className="head">
|
<div className={styles.icon} style={{ backgroundImage: `url(${appIconUrl})` }}/>
|
||||||
<div className="nameAndVersion">
|
<div className={styles.contents}>
|
||||||
<div className="name">{name}</div>
|
<div className={styles.head}>
|
||||||
<div className="version">{version}</div>
|
<div className={styles.nameAndVersion}>
|
||||||
|
<div className={styles.name}>{name}</div>
|
||||||
|
<div className={styles.version}>{version}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className={styles.downloads}>
|
||||||
|
<Icon material="cloud_download"/> {totalNumberOfInstallations}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="downloads">
|
<div className={styles.description}>
|
||||||
<Icon material="cloud_download"/> {totalNumberOfInstallations}
|
{shortDescription}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="description">
|
<div className={styles.footer}>
|
||||||
{shortDescription}
|
<div className={styles.author}>
|
||||||
</div>
|
<a href={githubRepositoryUrl} rel="noreferrer" target="_blank">{publisher.username}</a>
|
||||||
|
</div>
|
||||||
<div className="footer">
|
<div className={styles.install}>
|
||||||
<div className="author">
|
<Button primary><Icon className={styles.installButtonIco} material="cloud_download"/> Install</Button>
|
||||||
<img src="https://avatars.githubusercontent.com/u/455844?v=4"/> {publisher.username}
|
</div>
|
||||||
</div>
|
|
||||||
<div className="install">
|
|
||||||
<Button primary><Icon material="cloud_download"/> Install</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user