Skip to content

Commit

Permalink
fix zestedesavoir#3492: Corrige le design des content-item de la home
Browse files Browse the repository at this point in the history
  • Loading branch information
sandhose committed Apr 5, 2016
1 parent dfea181 commit 9fe6412
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 36 deletions.
35 changes: 2 additions & 33 deletions assets/scss/components/_content-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ $content-reaction-offset: -14px; // -30px to not offset the meta
font-size: 15px;
font-size: 1.5rem;
line-height: 26px;
height: 26px;
color: #999;
margin-bottom: 2px;

Expand Down Expand Up @@ -179,7 +180,7 @@ $content-reaction-offset: -14px; // -30px to not offset the meta
display: none;
}

& > a {
& a {
color: darken($color-secondary, 10%);

&:hover, &:focus {
Expand Down Expand Up @@ -305,38 +306,6 @@ $content-reaction-offset: -14px; // -30px to not offset the meta
}
}

@media only screen and #{$media-wide} {
.content-item {
&.mini {
flex-basis: 200px;
.content-description {
display: none;
}

.content-title {
white-space: normal;
font-size: 14px;
line-height: 15px;
height: 45px; // 3 lines
}

.content-meta {
padding-top: 1px;

&:not(.inline) {
.content-pubdate {
display: none;
}

& > * {
display: block;
}
}
}
}
}
}

@media only screen and #{$media-mobile-tablet} {
.full-content-wrapper .content-item {
.content-info {
Expand Down
3 changes: 2 additions & 1 deletion templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ <h2 class="ico-after ico-tutorials home-heading" itemprop="name">

<div class="content-item-list">
{% for tutorial in last_tutorials %}
{% include 'tutorialv2/includes/content_item.part.html' with public_content=tutorial show_description=True item_class=forloop.first|yesno:", mini" %}
{% include 'tutorialv2/includes/content_item.part.html' with public_content=tutorial show_description=True %}
{% empty %}
<p>{% trans "Aucun tutoriel disponible." %}</p>
{% endfor %}

<div class="content-item write-tutorial">
<div class="write-tutorial-text">
<p>{% blocktrans %}Il y a {{ tutorials_count }} tutoriels sur Zeste de Savoir.{% endblocktrans %}</p>
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 @@ -48,7 +48,7 @@
{% for category in content.subcategory.all %}{% if forloop.first %}{% trans "dans" %}{% elif forloop.last %} {% trans "et" %}{% else %},{% endif %} <a href="{% url 'content:list' %}?category={{ category.slug }}">{{ category.title }}</a>{% endfor %}
{% endcaptureas %}

<article class="content-item has-reactions">
<article class="content-item has-reactions{{ item_class }}">
<a href="{{ link }}" tabindex="-1" class="content-illu">
{% if content.image %}
<img src="{{ content.image.physical.content_thumb.url }}" alt="">
Expand Down
2 changes: 1 addition & 1 deletion zds/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@
'repo_path': os.path.join(BASE_DIR, 'tutoriels-private'),
'repo_public_path': os.path.join(BASE_DIR, 'tutoriels-public'),
'default_license_pk': 7,
'home_number': 5,
'home_number': 3,
'helps_per_page': 20,
'content_per_page': 42,
'feed_length': 5,
Expand Down

0 comments on commit 9fe6412

Please sign in to comment.