Skip to content

Commit

Permalink
Met des illustrations par défaut pour les contenus (#4381)
Browse files Browse the repository at this point in the history
  • Loading branch information
Situphen authored and pierre-24 committed Aug 4, 2017
1 parent a7ef93e commit b344d36
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
Binary file added assets/images/article-illu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/opinion-illu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/tutorial-illu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions assets/scss/components/_content-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,23 @@ $content-reaction-offset: -14px; // -30px to not offset the meta
flex: 0 0 $content-illu-size;
height: $content-illu-size;
background-color: $content-border-color;
background-size: contain;

img {
width: 100%;
height: 100%;
background-color: #FFF;
}

&.article-illu {
background-image: url("/static/images/article-illu.png");
}
&.tutorial-illu {
background-image: url("/static/images/tutorial-illu.png");
}
&.opinion-illu {
background-image: url("/static/images/opinion-illu.png");
}
}

.content-info {
Expand Down
2 changes: 1 addition & 1 deletion templates/tutorialv2/includes/content_item.part.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

<article class="content-item{% if online and show_reactions %} has-reactions{% endif %}{{ item_class }}">

<a href="{{ link }}" tabindex="-1" class="content-illu">
<a href="{{ link }}" tabindex="-1" class="content-illu {{ content.type|lower }}-illu">
{% if content.image %}
<img src="{{ content.image.physical.content_thumb.url }}" alt="">
{% endif %}
Expand Down

0 comments on commit b344d36

Please sign in to comment.