From bc241e9af1988b2ef7ab9a139824beb318c32b30 Mon Sep 17 00:00:00 2001 From: Yves Gatesoupe Date: Thu, 16 Jul 2020 13:12:24 +0200 Subject: [PATCH] Added partners component --- .eleventy.js | 5 +++++ src/_includes/layouts/home.njk | 5 +++-- .../components/{sponsor.njk => customers.njk} | 2 +- src/_includes/partials/components/sponsors.njk | 16 ++++++++++++++++ src/images/sponsors/logo-copea.png | Bin 0 -> 19972 bytes src/images/sponsors/logo-cpe.png | Bin 0 -> 8643 bytes src/images/sponsors/logo-ecare.png | Bin 0 -> 17556 bytes src/images/sponsors/logo-lesscop.png | Bin 0 -> 6093 bytes src/index.md | 2 ++ src/scss/components/_sponsor.scss | 1 + src/sponsors/copea.md | 5 +++++ src/sponsors/cpe.md | 5 +++++ src/sponsors/e-care.md | 5 +++++ src/sponsors/les-scop.md | 5 +++++ 14 files changed, 48 insertions(+), 3 deletions(-) rename src/_includes/partials/components/{sponsor.njk => customers.njk} (88%) create mode 100644 src/_includes/partials/components/sponsors.njk create mode 100644 src/images/sponsors/logo-copea.png create mode 100644 src/images/sponsors/logo-cpe.png create mode 100644 src/images/sponsors/logo-ecare.png create mode 100644 src/images/sponsors/logo-lesscop.png create mode 100644 src/sponsors/copea.md create mode 100644 src/sponsors/cpe.md create mode 100644 src/sponsors/e-care.md create mode 100644 src/sponsors/les-scop.md diff --git a/.eleventy.js b/.eleventy.js index 4fab91b..33b661b 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -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); diff --git a/src/_includes/layouts/home.njk b/src/_includes/layouts/home.njk index 14e556d..3b19cb0 100644 --- a/src/_includes/layouts/home.njk +++ b/src/_includes/layouts/home.njk @@ -4,6 +4,7 @@ {% set newsListHeading = newsHeading %} {% set newsListItems = collections.newsFeed %} {% set customersListItems = collections.customers %} +{% set sponsorsListItems = collections.sponsors %} {% block content %}
@@ -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" %}
{% endblock %} diff --git a/src/_includes/partials/components/sponsor.njk b/src/_includes/partials/components/customers.njk similarity index 88% rename from src/_includes/partials/components/sponsor.njk rename to src/_includes/partials/components/customers.njk index b406795..968f684 100644 --- a/src/_includes/partials/components/sponsor.njk +++ b/src/_includes/partials/components/customers.njk @@ -1,6 +1,6 @@