Added partners component

This commit is contained in:
Yves Gatesoupe 2020-07-16 13:12:24 +02:00
parent 7510969eeb
commit bc241e9af1
14 changed files with 48 additions and 3 deletions

View File

@ -76,6 +76,11 @@ module.exports = function(config) {
.reverse()
.slice(0, site.maxSponsorPerPage);
});
config.addCollection('sponsors', collection => {
return [...collection.getFilteredByGlob("./src/sponsors/*.md")]
.reverse()
.slice(0, site.maxSponsorPerPage);
});
// Plugins
config.addPlugin(rssPlugin);

View File

@ -4,6 +4,7 @@
{% set newsListHeading = newsHeading %}
{% set newsListItems = collections.newsFeed %}
{% set customersListItems = collections.customers %}
{% set sponsorsListItems = collections.sponsors %}
{% block content %}
<main id="main-content" class="home" tabindex="-1">
@ -11,8 +12,8 @@
{% include "partials/components/posts-list-home.njk" %}
{% include "partials/components/post-list.njk" %}
{% include "partials/components/presentation.njk" %}
{% include "partials/components/sponsor.njk" %}
{% include "partials/components/customers.njk" %}
{% include "partials/components/contact-form.njk" %}
{% include "partials/components/sponsor.njk" %}
{% include "partials/components/sponsors.njk" %}
</main>
{% endblock %}

View File

@ -1,6 +1,6 @@
<section class="[ sponsor ]">
<div class="[ wrapper ]">
<p class="[ sponsor__heading ]">Ils nous font confiance</p>
<p class="[ sponsor__heading ]">{{ customersHeading }}</p>
{% if customersListItems.length %}
<ol class="[ sponsor__list ]">
{% for item in customersListItems %}

View File

@ -0,0 +1,16 @@
<section class="[ sponsor ]">
<div class="[ wrapper ]">
<p class="[ sponsor__heading ]">{{ sponsorsHeading }}</p>
{% if sponsorsListItems.length %}
<ol class="[ sponsor__list ]">
{% for item in sponsorsListItems %}
<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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -3,5 +3,7 @@ layout: home
title: Accueil
brandHeading: La Coopérative d'Activité et d'Emploi spécialisée en informatique !
newsHeading: Actualité & Évenements
customersHeading: Ils nous font confiance
sponsorsHeading: Nos partenaires
metaDesc: 'Hylia is a lightweight Eleventy starter kit to help you to create your own blog or personal website.'
---

View File

@ -21,6 +21,7 @@
grid-template-rows: 1fr;
grid-column-gap: 1.5rem;
grid-row-gap: 0;
margin-bottom: 2rem;
}
&__list-item {

5
src/sponsors/copea.md Normal file
View File

@ -0,0 +1,5 @@
---
name: 'Copea'
thumbnail: '/images/sponsors/logo-copea.png'
url: 'https://www.copea.fr/'
---

5
src/sponsors/cpe.md Normal file
View File

@ -0,0 +1,5 @@
---
name: 'Coopérer pour entreprendre'
thumbnail: '/images/sponsors/logo-cpe.png'
url: 'https://cooperer.coop/'
---

5
src/sponsors/e-care.md Normal file
View File

@ -0,0 +1,5 @@
---
name: 'e-care expertise comptable & innovation'
thumbnail: '/images/sponsors/logo-ecare.png'
url: 'http://www.e-care.fr/'
---

5
src/sponsors/les-scop.md Normal file
View File

@ -0,0 +1,5 @@
---
name: 'Les Scop sociétés coopératives'
thumbnail: '/images/sponsors/logo-lesscop.png'
url: 'https://www.les-scop.coop/sites/fr/'
---