aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/en/core/home.html5
-rw-r--r--templates/ja/core/home.html4
-rw-r--r--templates/partials/weblog_list.html44
-rw-r--r--templates/shared/left_sidebar.html33
4 files changed, 65 insertions, 21 deletions
diff --git a/templates/en/core/home.html b/templates/en/core/home.html
index 2cc7e75d..281560c2 100644
--- a/templates/en/core/home.html
+++ b/templates/en/core/home.html
@@ -46,7 +46,10 @@
{% endif %}
</div>
<div class="pamphlet pamphlet-banner"></div>
-
+<h1 class="section-title">Contemplations of Late</h1>
+<div class="recent-weblogs">
+ {% include 'partials/weblog_list.html' with posts=recent_weblogs %}
+</div>
<h1 class="section-title">Recent Weeb Degenerecy</h1>
<div class="recent-anime">
diff --git a/templates/ja/core/home.html b/templates/ja/core/home.html
index 1a8597bc..20d8747e 100644
--- a/templates/ja/core/home.html
+++ b/templates/ja/core/home.html
@@ -46,6 +46,10 @@
{% endif %}
</div>
<div class="pamphlet pamphlet-banner"></div>
+<h1 class="section-title">最近の考察</h1>
+<div class="recent-weblogs">
+ {% include 'partials/weblog_list.html' with posts=recent_weblogs %}
+</div>
<h1 class="section-title">最近のアニメ活動</h1>
<div class="recent-anime">
{% for anime in recent_mal_activity.anime %}
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
diff --git a/templates/shared/left_sidebar.html b/templates/shared/left_sidebar.html
index 975ad9a3..78ec7e2c 100644
--- a/templates/shared/left_sidebar.html
+++ b/templates/shared/left_sidebar.html
@@ -28,27 +28,20 @@
<div class="user-item">
<img src="{% static 'images/core/icons/journals.png' %}" alt="Journals Icon" />
<a href="#journals">{% if request.LANGUAGE_CODE == 'ja' %}ジャーナル{% else %}Journals{% endif %}</a>
+ </div>
+ <div class="user-item">
+ <img src="{% static 'images/core/icons/pagodarealm.png' %}" alt="The Pagoda Realm Icon" />
+ <a href="#pagodarealm">{% if request.LANGUAGE_CODE == 'ja' %}パゴダレルム{% else %}The Pagoda Realm{% endif %}</a>
+ </div>
+ <div class="user-item">
+ <img src="{% static 'images/core/icons/mypage.png' %}" alt="My Page Icon" />
+ <a href="#mypage">{% if request.LANGUAGE_CODE == 'ja' %}マイページ{% else %}My Page{% endif %}</a>
+ </div>
+ <div class="user-item">
+ <img src="{% static 'images/core/icons/logout.png' %}" alt="Logout Icon" />
+ <a href="#logout">{% if request.LANGUAGE_CODE == 'ja' %}ログアウト{% else %}Logout{% endif %}</a>
+ </div>
</div>
- <div class="user-item">
- <img src="{% static 'images/core/icons/pagodarealm.png' %}" alt="The Pagoda Realm Icon" />
- <a href="#pagodarealm">{% if request.LANGUAGE_CODE == 'ja' %}パゴダレルム{% else %}The Pagoda Realm{% endif %}</a>
- </div>
- <div class="user-item">
- <img src="{% static 'images/core/icons/mypage.png' %}" alt="My Page Icon" />
- <a href="#mypage">{% if request.LANGUAGE_CODE == 'ja' %}マイページ{% else %}My Page{% endif %}</a>
- </div>
- <div class="user-item">
- <img src="{% static 'images/core/icons/logout.png' %}" alt="Logout Icon" />
- <a href="#logout">{% if request.LANGUAGE_CODE == 'ja' %}ログアウト{% else %}Logout{% endif %}</a>
- </div>
- </div>
-
- {% comment %} <div class="user-links">
- <a href="#journals">{% if request.LANGUAGE_CODE == 'ja' %}ジャーナル{% else %}Journals{% endif %}</a>
- <a href="#mymatrix">{% if request.LANGUAGE_CODE == 'ja' %}マトリックス{% else %}My Matrix{% endif %}</a>
- <a href="#mypage">{% if request.LANGUAGE_CODE == 'ja' %}マイページ{% else %}My Page{% endif %}</a>
- <a href="#logout">{% if request.LANGUAGE_CODE == 'ja' %}ログアウト{% else %}Logout{% endif %}</a>
- </div> {% endcomment %}
</div>
{% endif %}