1
0
mirror of https://github.com/bigchaindb/site.git synced 2024-12-24 18:36:11 +01:00

more reusable partners section

This commit is contained in:
Matthias Kretschmann 2017-04-13 12:49:17 +02:00
parent f9cb071f17
commit a4580531bd
Signed by: m
GPG Key ID: BD3C1F3EDD7831FC
5 changed files with 67 additions and 47 deletions

View File

@ -4,7 +4,12 @@
// bigchaindb.com // bigchaindb.com
// //
.page-enterprise { .page-enterprise {
.section--partners {
@extend .background--darker;
.partner {
pointer-events: none;
}
}
} }
.hero--enterprise { .hero--enterprise {

View File

@ -5,7 +5,7 @@
// //
.page-front { .page-front {
.section-partners { .section--partners {
@extend .background--darker @extend .background--darker
} }
} }

View File

@ -1,4 +1,4 @@
.section-partners { .section--partners {
.grid__col { .grid__col {
padding-right: $gutter-space; padding-right: $gutter-space;
} }

View File

@ -1,26 +1,70 @@
<section class="section section-partners"> <!--
//////////////////////////////////
HEADS UP!
By default, this section spits out all partners added to the `_partners` collection.
You can limit those on a per-page basis by defining a partners.logos array in the YAML front
matter like so:
partners:
title: "Proudly Trusted By"
description: "La la la"
logos:
- innogy
- mongodb
- microsoft
//////////////////////////////////
-->
<section class="section section--partners">
<div class="row"> <div class="row">
<header class="section-header"> <header class="section-header">
<h1 class="section-title">Partners</h1> <h1 class="section-title">
<p class="section-description">We are proud to partner and collaborate with</p> {% if page.partners.title %}
{{ page.partners.title }}
{% else %}
Partners
{% endif %}
</h1>
<p class="section-description">
{% if page.partners.description %}
{{ page.partners.description }}
{% else %}
We are proud to partner and collaborate with
{% endif %}
</p>
</header> </header>
</div> </div>
<div class="row row--wide"> <div class="row row--wide">
<article class="grid grid--full grid-small--half grid-medium--fit grid-medium--columns grid--justifycenter grid--gutters"> <article class="grid grid--full grid-small--half grid-medium--fit grid-medium--columns grid--justifycenter grid--gutters">
{% assign partners_sorted = (site.partners | sort: 'date') %} {% if page.partners.logos %}
{% assign partners_sorted = page.partners.logos %}
{% else %}
{% assign partners_sorted = (site.partners | sort: 'date') %}
{% endif %}
{% assign partners_page = page.partners %}
{% for partner in partners_sorted %} {% for partner in partners_sorted %}
<div class="grid__col grid__col--1"> <div class="grid__col grid__col--1">
<a class="partner" href="{{ partner.link }}"> {% if page.partners.logos %}
<svg class="partner__logo partner__logo--{{ partner.slug }}" aria-labelledby="title"> <span class="partner">
<title>{{ partner.title }}</title> <svg class="partner__logo partner__logo--{{ partner }}" aria-labelledby="title">
<use xlink:href="/assets/img/sprite.svg#logo-{{ partner.slug }}"></use> <title>{{ partner }}</title>
<use xlink:href="/assets/img/sprite.svg#logo-{{ partner }}"></use>
</svg> </svg>
</a> </span>
{% else %}
<a class="partner" href="{{ partner.link }}">
<svg class="partner__logo partner__logo--{{ partner.slug }}" aria-labelledby="title">
<title>{{ partner.title }}</title>
<use xlink:href="/assets/img/sprite.svg#logo-{{ partner.slug }}"></use>
</svg>
</a>
{% endif %}
</div> </div>

View File

@ -29,6 +29,10 @@ intro:
description: "Real-time data triggers business logic" description: "Real-time data triggers business logic"
- title: "Share the Story" - title: "Share the Story"
description: "Trust and identity out-of-the-box with verifiable audit trails, provenance and tracking" description: "Trust and identity out-of-the-box with verifiable audit trails, provenance and tracking"
partners:
title: "Proudly Trusted By"
description: "La la la"
--- ---
<header class="hero hero--enterprise"> <header class="hero hero--enterprise">
@ -74,40 +78,7 @@ intro:
</div> </div>
</section> </section>
<section class="section section--enterprisepartners background--darker"> {% include sections/section-partners.html %}
<div class="row">
<header class="section-header">
<h1 class="section-title">Proudly trusted by</h1>
<p class="section-description">La la la.</p>
</header>
</div>
<div class="row row--wide">
<article class="grid grid--full grid-small--half grid-medium--fit grid-medium--columns grid--justifycenter grid--gutters">
{% assign partners_sorted = (site.partners | sort: 'date') %}
{% for partner in partners_sorted %}
<div class="grid__col grid__col--1">
<a class="partner" href="{{ partner.link }}">
<svg class="partner__logo partner__logo--{{ partner.slug }}" aria-labelledby="title">
<title>{{ partner.title }}</title>
<use xlink:href="/assets/img/sprite.svg#logo-{{ partner.slug }}"></use>
</svg>
</a>
</div>
{% endfor %}
</article>
</div>
</div>
</section>
<section class="section section--enterpriseedition background--photo"> <section class="section section--enterpriseedition background--photo">
<div class="row row--wide"> <div class="row row--wide">