Skip to content

Commit

Permalink
Merge pull request #4 from andi1984/sponsoren-banner
Browse files Browse the repository at this point in the history
Sponsors - Change requests for using the new plugin
  • Loading branch information
andi1984 authored Sep 9, 2019
2 parents d78b8c5 + f8eeef1 commit b697ae5
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 2 deletions.
3 changes: 2 additions & 1 deletion css/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ html {

/** Header **/

header {
body > header {
background-color: hsl(199, 100%, 42%);
font-size: 112%;
font-weight: 700;
Expand Down Expand Up @@ -221,6 +221,7 @@ footer .nav-horizontal li {
-webkit-order: 0;
-ms-flex-order: 0;
order: 0;
max-width: 100%;
}

.layout-container aside:not(:empty) + main {
Expand Down
27 changes: 27 additions & 0 deletions css/slick-slider-custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.slick-initialized .slick-track {
display: flex;
align-items: center;
}

.slick-slide img {
max-width: 100%;
margin: 0 auto;
max-height: 300px;
}

.slick-prev,
.slick-next {
z-index: 1;
}

.slick-prev {
left: 5px;
}

.slick-next {
right: 5px;
}

.slick-slide {
padding: 0 5px;
}
12 changes: 11 additions & 1 deletion templates/partials/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@
{% do assets.addCss('theme://css/lato-latin-fonts.css', 70) %}
{% do assets.addCss('theme://css/font-awesome.css', 60) %}
{% do assets.addCss('theme://css/content.css', 50) %}
{% do assets.addCss('//cdn.jsdelivr.net/gh/kenwheeler/[email protected]/slick/slick.css') %}
{% do assets.addCss('//cdn.jsdelivr.net/gh/kenwheeler/[email protected]/slick/slick-theme.css') %}
{% do assets.addCss('theme://css/slick-slider-custom.css') %}
{% endblock %}
{{ assets.css() }}

{% block javascripts %}
{% do assets.addJs('jquery', 100) %}
{% do assets.addJs('//cdn.jsdelivr.net/gh/kenwheeler/[email protected]/slick/slick.min.js', {'group': 'bottom'}) %}
{% endblock %}
{{ assets.js() }}
{% endblock head%}
Expand All @@ -49,7 +53,13 @@
{% block body %}
<div class="body wrapper padding layout-container">
<aside>{% block aside %}{% endblock %}</aside>
<main>{% block content %}{% endblock %}</main>
<main>
{% block content %}{% endblock %}
{% if page.home %}
{# Zeige die Sponsoren auf der Startseite nach dem Hauptinhalt #}
{{ sponsoren() }}
{% endif %}
</main>
</div>
{% endblock %}

Expand Down
14 changes: 14 additions & 0 deletions templates/partials/sponsors.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<section>
<header><h2>CoderDojo Deutschland e.V. wird unterstützt von…</h2></header>
<div data-sponsor-slider data-slick='{"slidesToShow": 3, "slidesToScroll": 1, "autoplay": true}'>
{% for key, sponsor in sponsors %}
<a href="{{sponsor.url}}" target="_blank" rel="noopener nofollow"><img src="{{ sponsor.image }}" alt="{{sponsor.label}} logo" /></a>
{% endfor %}
</div>
</section>

<script type="text/javascript">
$(document).ready(function(){
$('[data-sponsor-slider]').slick();
});
</script>

0 comments on commit b697ae5

Please sign in to comment.