Skip to content

Commit

Permalink
Merge pull request #94 from KasukabeDefenceForce/update_temp
Browse files Browse the repository at this point in the history
Make author id optional parameter on news page
  • Loading branch information
KasukabeDefenceForce authored Oct 14, 2024
2 parents be92b26 + 595f096 commit eec225b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions templates/news_page_no_twitter.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,26 @@
<div class="container py-lg-5 py-md-4 py-2">
<div class="blog-posthny-info mx-auto" style="max-width:800px">
{% set project_info = content %}
{% set author_id = project_info['author_id'] %}
{% set author_info = member_data[author_id] %}
{% set author_name = author_info['full_name'] %}
{% if project_info['author_id'] %}
{% set author_id = project_info['author_id'] %}
{% set author_info = member_data[author_id] %}
{% set author_name = author_info['full_name'] %}
{% else %}
{% set author_name = "" %}
{%endif%}
<div class="style-title position-relative">
<h3 class="title-style mb-sm-3 mb-2">{{ project_info.title }}</h3>
</div>
<div class="single-post-image mb-4">
<ul class="blog-author-date mt-3 d-flex align-items-center mb-4">
{% if project_info['author_id'] %}
<li class="circle avatar"><img
src="../members/{{ author_id}}/{{ author_info.image_path }}"
class="img-fluid" alt=""></li>
<li>Article by <a
href="../members/{{ author_id }}/{{ author_id }}.html"
target="_blank">{{ author_name }}</a></li>
{% endif %}
<li>{{ project_info["date"].strftime('%d') }}{% if project_info["date"].day % 10 == 1 and project_info["date"].day != 11 %}st{% elif project_info["date"].day % 10 == 2 and project_info["date"].day != 12 %}nd{% elif project_info["date"].day % 10 == 3 and project_info["date"].day != 13 %}rd{% else %}th{% endif %} {{ project_info["date"].strftime('%b, %Y') }}</li>
</ul>
{#
Expand Down

0 comments on commit eec225b

Please sign in to comment.