Sponsor component
This commit is contained in:
parent
783d46cb82
commit
7510969eeb
@ -71,6 +71,11 @@ module.exports = function(config) {
|
||||
return [...collection.getFilteredByGlob("./src/members/*.md")]
|
||||
.slice(0, site.maxProfilePreview);
|
||||
});
|
||||
config.addCollection('customers', collection => {
|
||||
return [...collection.getFilteredByGlob("./src/customers/*.md")]
|
||||
.reverse()
|
||||
.slice(0, site.maxSponsorPerPage);
|
||||
});
|
||||
|
||||
// Plugins
|
||||
config.addPlugin(rssPlugin);
|
||||
|
@ -20,5 +20,6 @@
|
||||
"maxPostsPerPage": 5,
|
||||
"maxNewsPerPage": 4,
|
||||
"maxProfilePreview": 3,
|
||||
"maxSponsorPerPage": 4,
|
||||
"faviconPath": "/images/favicon.png"
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
{# Set lists content #}
|
||||
{% set newsListHeading = newsHeading %}
|
||||
{% set newsListItems = collections.newsFeed %}
|
||||
{% set customersListItems = collections.customers %}
|
||||
|
||||
{% block content %}
|
||||
<main id="main-content" class="home" tabindex="-1">
|
||||
|
@ -1,3 +1,16 @@
|
||||
<section>
|
||||
<div style="background-color: #f1f0f6; height: 14rem;"></div>
|
||||
<section class="[ sponsor ]">
|
||||
<div class="[ wrapper ]">
|
||||
<p class="[ sponsor__heading ]">Ils nous font confiance</p>
|
||||
{% if customersListItems.length %}
|
||||
<ol class="[ sponsor__list ]">
|
||||
{% for item in customersListItems %}
|
||||
<li class="sponsor__list-item">
|
||||
<a href="{{ item.data.url }}" title="{{ item.data.name }}" target="_blank">
|
||||
<img src="{{ item.data.thumbnail }}" alt="logo de {{ item.data.name }}">
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
|
5
src/customers/lewebenplus.md
Normal file
5
src/customers/lewebenplus.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
name: 'Le Web en plus'
|
||||
thumbnail: '/images/customers/logo-lewebenplus.png'
|
||||
url: 'https://www.lewebenplus.net/'
|
||||
---
|
5
src/customers/naega.md
Normal file
5
src/customers/naega.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
name: 'Naega'
|
||||
thumbnail: '/images/customers/logo-naega.png'
|
||||
url: 'https://www.crealead.com/naega'
|
||||
---
|
5
src/customers/technicolor.md
Normal file
5
src/customers/technicolor.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
name: 'Technicolor'
|
||||
thumbnail: '/images/customers/logo-technicolor.png'
|
||||
url: 'https://www.technicolor.com/'
|
||||
---
|
BIN
src/images/customers/logo-lewebenplus.png
Normal file
BIN
src/images/customers/logo-lewebenplus.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
src/images/customers/logo-naega.png
Normal file
BIN
src/images/customers/logo-naega.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
src/images/customers/logo-technicolor.png
Normal file
BIN
src/images/customers/logo-technicolor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
36
src/scss/components/_sponsor.scss
Normal file
36
src/scss/components/_sponsor.scss
Normal file
@ -0,0 +1,36 @@
|
||||
.sponsor {
|
||||
background-color: var(--color-light-gray);
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
&__heading {
|
||||
align-self: center;
|
||||
text-transform: uppercase;
|
||||
font-size: 1.125rem;
|
||||
font-weight: 300;
|
||||
margin: 1.5rem 0 3rem;
|
||||
}
|
||||
|
||||
&__list {
|
||||
list-style: none;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-template-rows: 1fr;
|
||||
grid-column-gap: 1.5rem;
|
||||
grid-row-gap: 0;
|
||||
}
|
||||
|
||||
&__list-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
img {
|
||||
max-width: 8rem;
|
||||
}
|
||||
}
|
||||
}
|
@ -77,6 +77,7 @@ img {
|
||||
@import 'components/presentation';
|
||||
@import 'components/site-head';
|
||||
@import 'components/site-foot';
|
||||
@import 'components/sponsor';
|
||||
@import 'components/skip-link';
|
||||
@import 'components/syntax-highlighting';
|
||||
@import 'components/video-player';
|
||||
|
Loading…
Reference in New Issue
Block a user