"FeatureLinks" component done, with example backgrounds
This commit is contained in:
parent
9cacc0427e
commit
c84d88153e
4 changed files with 75 additions and 10 deletions
|
@ -1,12 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<ul class="feature-links">
|
<ul class="feature-links">
|
||||||
<li v-for="featureLink in this.$page.frontmatter.featureLinks">
|
<li v-for="featureLink in this.$page.frontmatter.featureLinks" class="feature-link">
|
||||||
<a :href="featureLink.href">{{ featureLink.title }}</a>
|
<div>
|
||||||
<div v-if="featureLink.details">{{ featureLink.details }}</div>
|
<a :href="featureLink.href" class="feature-link__title">{{ featureLink.title }}</a>
|
||||||
|
<div v-if="featureLink.details" class="feature-link__details">{{ featureLink.details }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<figure>
|
<figure class="feature-link__background">
|
||||||
<img v-if="featureLink.image" src="featureLink.image" alt="featureLink.title"/>
|
<img v-if="featureLink.image" :src="featureLink.image" :alt="featureLink.title"/>
|
||||||
</figure>
|
</figure>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -18,4 +20,5 @@
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "../scss/init/colors";
|
@import "../scss/init/colors";
|
||||||
@import "../scss/init/mixins";
|
@import "../scss/init/mixins";
|
||||||
|
@import "../scss/components/feature-links";
|
||||||
</style>
|
</style>
|
||||||
|
|
57
.vuepress/scss/components/_feature-links.scss
Normal file
57
.vuepress/scss/components/_feature-links.scss
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
.feature-links {
|
||||||
|
list-style-type: none;
|
||||||
|
padding-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-link {
|
||||||
|
width: 320px; min-height: 135px;
|
||||||
|
|
||||||
|
background-color: $white;
|
||||||
|
border: 1px solid rgba($black, 0.1);
|
||||||
|
border-radius: 3px;
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
position: relative;
|
||||||
|
vertical-align: top;
|
||||||
|
|
||||||
|
> div:first-of-type {
|
||||||
|
top: 85px; left: 5%;
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
width: 90%;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:last-of-type) {
|
||||||
|
margin-right: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-link__title {
|
||||||
|
background-color: $white;
|
||||||
|
border: 1px solid rgba($black, 0.1);
|
||||||
|
box-decoration-break: clone;
|
||||||
|
display: inline;
|
||||||
|
font-size: 1.15rem;
|
||||||
|
line-height: 1.7;
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-link__background {
|
||||||
|
width: calc(100% + 2px); height: 100px;
|
||||||
|
top: -1px; left: -1px;
|
||||||
|
|
||||||
|
background-color: $teal;
|
||||||
|
border-top-right-radius: 3px;
|
||||||
|
border-top-left-radius: 3px;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 0;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%; height: 100%;
|
||||||
|
|
||||||
|
object-fit: cover;
|
||||||
|
object-position: center;
|
||||||
|
}
|
||||||
|
}
|
|
@ -130,7 +130,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
p, ol, ul:not(.overview__ecosystem__module) {
|
p, ol, ul:not(.overview__ecosystem__module):not(.feature-links) {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
@media (min-width: 901px) {
|
@media (min-width: 901px) {
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ol, ul:not(.overview__ecosystem__module) {
|
ol, ul:not(.overview__ecosystem__module):not(.feature-links) {
|
||||||
padding-top: 0.5rem;
|
padding-top: 0.5rem;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
|
@ -163,7 +163,7 @@
|
||||||
padding-left: 1.6rem;
|
padding-left: 1.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul:not(.overview__ecosystem__module) {
|
ul:not(.overview__ecosystem__module):not(.feature-links) {
|
||||||
padding-left: 1.25rem;
|
padding-left: 1.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,17 +3,22 @@ title: Community
|
||||||
featureLinks:
|
featureLinks:
|
||||||
- title: Join us in chat
|
- title: Join us in chat
|
||||||
href: https://discord.gg/YjYbwhS
|
href: https://discord.gg/YjYbwhS
|
||||||
details: we need a chat that devs actually hang out in :/
|
image: http://static.simpledesktops.com/static/images/sd-bg.png
|
||||||
- title: Join the developer email list for technical updates
|
- title: Join the developer email list
|
||||||
href: https://lbry.io/developer
|
href: https://lbry.io/developer
|
||||||
|
image: http://static.simpledesktops.com/uploads/desktops/2017/02/28/GeoShapes_2880x1800.png
|
||||||
- title: Host a meet-up
|
- title: Host a meet-up
|
||||||
href: https://lbry.io/meet
|
href: https://lbry.io/meet
|
||||||
|
image: http://static.simpledesktops.com/uploads/desktops/2016/12/05/Untitled-1-03-01.png
|
||||||
- title: Reddit
|
- title: Reddit
|
||||||
href: https://www.reddit.com/r/lbry
|
href: https://www.reddit.com/r/lbry
|
||||||
|
image: http://static.simpledesktops.com/uploads/desktops/2016/08/28/Wind-Vector-resize.png
|
||||||
- title: Get funding for a project
|
- title: Get funding for a project
|
||||||
href: https://lbry.fund
|
href: https://lbry.fund
|
||||||
|
image: http://static.simpledesktops.com/uploads/desktops/2015/08/20/Sunset_by_Banned.png
|
||||||
- title: Get a job
|
- title: Get a job
|
||||||
href: https://lbry.io/join-us
|
href: https://lbry.io/join-us
|
||||||
|
image: http://static.simpledesktops.com/uploads/desktops/2015/09/25/Siri.png
|
||||||
- title: Twitter
|
- title: Twitter
|
||||||
href: https://lbry.io/twitter
|
href: https://lbry.io/twitter
|
||||||
---
|
---
|
||||||
|
|
Loading…
Add table
Reference in a new issue