Skip to content

Commit

Permalink
Date courte sur mobile (topics sur home, fix zestedesavoir#2695)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandhose committed May 17, 2015
1 parent 3f5ccc0 commit 182c2f1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions assets/scss/components/_content-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $content-reaction-offset: -14px; // -30px to not offset the meta
white-space: nowrap;
text-overflow: ellipsis;

& > * {
&:not(.inline) > * {
display: inline;
}
}
Expand Down Expand Up @@ -156,6 +156,10 @@ $content-reaction-offset: -14px; // -30px to not offset the meta
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

.short {
display: none;
}
}

.content-meta {
Expand All @@ -164,7 +168,7 @@ $content-reaction-offset: -14px; // -30px to not offset the meta
font-size: 1.3rem;
line-height: 15px;

& > * {
&:not(.inline) > * {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
Expand Down Expand Up @@ -350,7 +354,7 @@ $content-reaction-offset: -14px; // -30px to not offset the meta
display: none;
}

.content-meta {
.content-meta, .content-description {
.short {
display: inline;
}
Expand Down
10 changes: 7 additions & 3 deletions templates/forum/includes/topic_item.part.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,20 @@ <h3 class="content-title" itemprop="itemListElement">
<p class="content-description">
{{ topic.forum.title }},
{% trans "par" %}{% include "misc/member_item.part.html" with member=topic.author %}
- {{ topic.pubdate|format_date|capfirst }}
-
<time pubdate="{{ topic.pubdate|date:"c" }}">
<span class="long">{{ topic.pubdate|format_date|capfirst }}</span>
<span class="short">{{ topic.pubdate|format_date:True|capfirst }}</span>
</time>
</p>

<p class="content-meta">
<p class="content-meta inline">
{% with answer=topic.get_last_answer last_read=topic.last_read_post %}
{% if answer %}
{% spaceless %}
<a href="{{ last_read.get_absolute_url }}" class="last-read-link">
{% trans "Dernière réponse :" %}
<time class="content-pubdate" pubdate="{{ anwser.pubdate|date:"c" }}">
<time class="content-pubdate" pubdate="{{ answer.pubdate|date:"c" }}">
<span class="long">{{ answer.pubdate|format_date|capfirst }}</span>
<span class="short">{{ answer.pubdate|format_date:True|capfirst }}</span>
</time>
Expand Down

0 comments on commit 182c2f1

Please sign in to comment.