diff options
Diffstat (limited to 'templates/shared/blog/single_weblog.html')
| -rw-r--r-- | templates/shared/blog/single_weblog.html | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/templates/shared/blog/single_weblog.html b/templates/shared/blog/single_weblog.html index 42180de0..4bffbd1f 100644 --- a/templates/shared/blog/single_weblog.html +++ b/templates/shared/blog/single_weblog.html @@ -2,7 +2,7 @@ {% load static %} {% load tz %} {% block title %} -<title>{% if request.LANGUAGE_CODE == 'ja' %}{{ post.title_ja }}{% else %}{{ post.title }}{% endif %}</title> +<title>{{ post.title }}</title> {% endblock title %} {% block head %} <link rel="stylesheet" href="{% static 'css/core/post_list.css' %}"> @@ -15,7 +15,7 @@ <div class="weblog-container"> <div class="weblog-title-area"> <h1> - {% if request.LANGUAGE_CODE == 'ja' %}{{ post.title_ja }}{% else %}{{ post.title }}{% endif %} + {{ post.title }} </h1> <div class="weblog-details"> <div class="author-info"> @@ -24,7 +24,7 @@ {% 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> + <a href="#{{ post.category.slug }}">{{ post.category.name }}</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> @@ -39,7 +39,7 @@ {{ post.first_paragraph | safe }} </div> <div class="weblog-image"> - <img src="{{ post.image_url }}" alt="{% if request.LANGUAGE_CODE == 'ja' %}{{ post.title_ja }}{% else %}{{ post.title }}{% endif %}"> + <img src="{{ post.image_url }}" alt="{{ post.title }}"> </div> <div class="weblog-content" id="weblog-body-content"> {{ post.body | safe }} @@ -48,10 +48,21 @@ <div class="post-tags"> {% if request.LANGUAGE_CODE == 'ja' %}タグ: {% else %}Tagged with: {% endif %} {% 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> + <a class="post-tag" href="#{{ tag.slug }}">{{ tag.name }}</a> {% endfor %} </div> </div> + <div class="comments-section" id="comments"> + <h2>{% if request.LANGUAGE_CODE == 'ja' %}コメント{% else %}Comments{% endif %}</h2> + {% for comment in post.comments.all %} + {% if not comment.parent %} + {% include 'partials/_comment.html' with comment=comment %} + {% endif %} + {% endfor %} + {% if post.comments.all|length == 0 %} + <p>{% if request.LANGUAGE_CODE == 'ja' %}コメントはありません。{% else %}No comments yet.{% endif %}</p> + {% endif %} + </div> </div> {% endblock content %} {% block scripts %} @@ -91,5 +102,13 @@ output: 'html' }); } + + function showReplyForm(commentId) { + document.getElementById(`reply-form-${commentId}`).style.display = 'block'; + } + + function hideReplyForm(commentId) { + document.getElementById(`reply-form-${commentId}`).style.display = 'none'; + } </script> {% endblock scripts %}
\ No newline at end of file |
