|
@@ -6,47 +6,56 @@
|
|
|
|
|
|
{% block title %}{{ macros.page_title(_('Your News Feed')) }}{% endblock %}
|
|
|
|
|
|
-{% block content %}
|
|
|
-<div class="page-header">
|
|
|
- <h1>{% trans %}Your News Feed{% endtrans %}</h1>
|
|
|
+{% block container %}
|
|
|
+<div class="page-header header-primary">
|
|
|
+ <div class="container">
|
|
|
+ {% if messages %}
|
|
|
+ <div class="messages-list">
|
|
|
+ {{ messages_list(messages) }}
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+ <h1>{% trans %}Your News Feed{% endtrans %}</h1>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
-{% if follows %}
|
|
|
-<p class="lead">{% trans count=follows|length -%}
|
|
|
- You are following one member, find out what he posted recently:
|
|
|
- {%- pluralize -%}
|
|
|
- You are following {{ count }} members, find out what they posted recently:
|
|
|
- {%- endtrans %}</p>
|
|
|
-{% if posts %}
|
|
|
-<ul class="unstyled shorts-list">
|
|
|
- {% for item in posts %}
|
|
|
- <li>
|
|
|
- <img src="{{ item.user.get_avatar(36) }}" class="avatar">
|
|
|
- <p class="message"><a href="{% url 'thread_find' thread=item.thread.pk, slug=item.thread.slug, post=item.pk %}">{{ item.post_preparsed|markdown_short(300) }}</a></p>
|
|
|
- <p class="location">{% if item.thread.start_post_id == item.pk -%}
|
|
|
+<div class="container container-primary">
|
|
|
+ {% if follows %}
|
|
|
+ {% if posts %}
|
|
|
+ <div class="news-feed">
|
|
|
+ {% for item in posts %}
|
|
|
+ <div class="media">
|
|
|
+ <a href="{% url 'user' user=item.user.pk, username=item.user.username_slug %}" class="pull-left">
|
|
|
+ <img class="media-object" src="{{ item.user.get_avatar(52) }}">
|
|
|
+ </a>
|
|
|
+ <div class="media-body">
|
|
|
+ <a href="{% url 'thread_find' thread=item.thread.pk, slug=item.thread.slug, post=item.pk %}" class="post-preview">{{ item.post_preparsed|markdown_short(300) }}</a>
|
|
|
+ <div class="media-footer">{% if item.thread.start_post_id == item.pk -%}
|
|
|
{% trans thread=thread(item), forum=forum(item.forum), user=username(item.user), date=item.date|reldate|low %}Thread {{ thread }} posted in {{ forum }} by {{ user }} {{ date }}{% endtrans %}
|
|
|
{%- else -%}
|
|
|
{% trans thread=thread(item), forum=forum(item.forum), user=username(item.user), date=item.date|reldate|low %}Reply to {{ thread }} posted in {{ forum }} by {{ user }} {{ date }}{% endtrans %}
|
|
|
- {%- endif %}</p>
|
|
|
- </li>
|
|
|
- {% endfor %}
|
|
|
-</ul>
|
|
|
-{% else %}
|
|
|
-<p class="lead">{% trans username=user.username %}{{ username }}, there is nothing to display in your news feed... yet!{% endtrans %}</p>
|
|
|
-{% endif %}
|
|
|
-{% else %}
|
|
|
-<p class="lead">{% trans username=user.username %}{{ username }}, you have to follow other users in order to fill your news feed.{% endtrans %}</p>
|
|
|
-{% endif %}
|
|
|
+ {%- endif %}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <hr>
|
|
|
+ {% endfor %}
|
|
|
+ </div>
|
|
|
+ {% else %}
|
|
|
+ <p class="lead">{% trans username=user.username %}{{ username }}, there is nothing to display in your news feed... yet!{% endtrans %}</p>
|
|
|
+ {% endif %}
|
|
|
+ {% else %}
|
|
|
+ <p class="lead">{% trans username=user.username %}{{ username }}, you have to follow other users in order to fill your news feed.{% endtrans %}</p>
|
|
|
+ {% endif %}
|
|
|
+</div>
|
|
|
{% endblock %}
|
|
|
|
|
|
{% macro thread(item) -%}
|
|
|
-<a href="{% url 'thread_find' thread=item.thread.pk, slug=item.thread.slug, post=item.pk %}">{{ item.thread.name }}</a>
|
|
|
+<a href="{% url 'thread_find' thread=item.thread.pk, slug=item.thread.slug, post=item.pk %}" class="thread-link">{{ item.thread.name }}</a>
|
|
|
{%- endmacro %}
|
|
|
|
|
|
{% macro forum(forum) -%}
|
|
|
-<a href="{% url 'forum' forum=forum.pk, slug=forum.slug %}">{{ forum.name }}</a>
|
|
|
+<a href="{% url 'forum' forum=forum.pk, slug=forum.slug %}" class="forum-link">{{ forum.name }}</a>
|
|
|
{%- endmacro %}
|
|
|
|
|
|
{% macro username(user) -%}
|
|
|
-<a href="{% url 'user' user=user.pk, username=user.username_slug %}">{{ user.username }}</a>
|
|
|
+<a href="{% url 'user' user=user.pk, username=user.username_slug %}" class="user-link">{{ user.username }}</a>
|
|
|
{%- endmacro %}
|