diff options
Diffstat (limited to 'templates/partials/weblog_list.html')
| -rw-r--r-- | templates/partials/weblog_list.html | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/templates/partials/weblog_list.html b/templates/partials/weblog_list.html new file mode 100644 index 00000000..f166610e --- /dev/null +++ b/templates/partials/weblog_list.html @@ -0,0 +1,44 @@ +{% load tz %} +{% load static %} +<link rel="stylesheet" href="{% static 'css/core/post_list.css' %}"> +{% for post in posts %} + <div class="post"> + <div class="post-body"> + <div class="post-image"> + <img src="{{ post.image_url }}" alt="{% if request.LANGUAGE_CODE == 'ja' %}{{ post.title_ja }}{% else %}{{ post.title }}{% endif %}"> + </div> + <div class="post-content"> + <h2> + <a href="#">{% if request.LANGUAGE_CODE == 'ja' %}{{ post.title_ja }}{% else %}{{ post.title }}{% endif %}</a> + </h2> + <div class="author-info"> + {% with post.author.userprofile_set.first as authorprofile %} + <img src="{% static 'images/avatars/' %}{{ authorprofile.avatar_url }}.gif" class="post-profile-image" alt="{{ post.author.first_name }}'s Avatar"> + {% endwith %} + <a href="#"> {{ post.author.first_name }} {{ post.author.last_name }}</a> + <span>{% if request.LANGUAGE_CODE == 'ja' %}投稿カテゴリー:{% else %}posted in{% endif %}</span> + <a href="#{{ post.category.slug }}">{% if request.LANGUAGE_CODE == 'ja' %}{{ post.category.name_ja }}{% else %}{{ post.category }}{% endif %}</a> + <span>{% if request.LANGUAGE_CODE == 'ja' %}投稿日:{% else %}on{% endif %}</span> + <span style="margin-left: 4px;">{% localtime on %}{{ post.date | date:"M d, Y" }}{% endlocaltime %}</span> + </div> + {{ post.excerpt | safe }} + </div> + </div> + <div class="post-actions"> + <div class="post-links"> + <a href="#">{% if request.LANGUAGE_CODE == 'ja' %}続きを読む{% else %}Continue Reading{% endif %}</a> | + <a href="##comments">{{ post.num_comments }} + {% if request.LANGUAGE_CODE == 'ja' %} + コメント + {% else %} + Comment{% if not post.num_comments == 1 %}s{% endif %} + {% endif %}</a> + </div> + <div class="post-tags"> + {% for tag in post.tags.all %} + <a class="post-tag" href="#{{ tag.slug }}">{% if request.LANGUAGE_CODE == 'ja' %}{{ tag.name_ja }}{% else %}{{ tag.name }}{% endif %}</a> + {% endfor %} + </div> + </div> + </div> +{% endfor %}
\ No newline at end of file |
