Update web/templates/entry_view.html

This commit is contained in:
Joshua Laymon 2025-08-14 19:56:17 +00:00
parent 1c5406e2d8
commit edf761eb11

View File

@ -15,10 +15,12 @@
</div>
<div class="rt-right">
<form method="get" action="{% url 'nav_prev' %}" class="inline">
<!-- send current zero-based index (position-1); view will subtract 1 -->
<input type="hidden" name="i" value="{{ position|add:'-1' }}">
<button class="btn btn-lg" {% if position <= 1 %}disabled{% endif %}> Prev</button>
</form>
<form method="get" action="{% url 'nav_next' %}" class="inline">
<!-- send current zero-based index (position-1); view will add 1 -->
<input type="hidden" name="i" value="{{ position|add:'-1' }}">
<button class="btn btn-lg btn-primary" {% if position >= count %}disabled{% endif %}>Next </button>
</form>
@ -65,19 +67,62 @@
</div>
<!-- Meta (smaller) -->
<div class="meta-grid">
<div class="meta-item">
<div class="meta-label">Source</div>
<div class="meta-value">
{% if entry.source %}
<a class="chip chip-link"
href="https://wol.jw.org/en/wol/l/r1/lp-e?q={{ entry.source|urlencode }}"
target="_blank" rel="noopener noreferrer">
{{ entry.source }}
</a>
{% else %}—{% endif %}
</div>
</div>
<div class="meta-item">
<div class="meta-label">Source</div>
<div class="meta-value">
{% if entry.source %}
{% with s=entry.source %}
{% with sl=s|lower %}
{# Treat as JW pub if sl begins with one of these short prefixes #}
{% if
sl|slice:":2" == "wp" or
sl|slice:":2" == "ws" or
sl|slice:":2" == "yb" or
sl|slice:":2" == "km" or
sl|slice:":3" == "mwb" or
sl|slice:":1" == "w" or # Watchtower (generic)
sl|slice:":1" == "g" or # Awake!
sl|slice:":2" == "ap" or sl|slice:":3" == "apf" or
sl|slice:":2" == "be" or sl|slice:":2" == "bh" or
sl|slice:":2" == "br" or sl|slice:":2" == "bt" or
sl|slice:":3" == "btg" or sl|slice:":2" == "cf" or
sl|slice:":2" == "cl" or sl|slice:":2" == "ct" or
sl|slice:":2" == "dp" or sl|slice:":2" == "fg" or
sl|slice:":2" == "fy" or sl|slice:":2" == "gt" or
sl|slice:":2" == "hb" or sl|slice:":2" == "im" or
sl|slice:":2" == "ip" or sl|slice:":2" == "it" or
sl|slice:":2" == "jv" or sl|slice:":2" == "ka" or
sl|slice:":2" == "kj" or sl|slice:":2" == "kl" or
sl|slice:":2" == "lf" or sl|slice:":3" == "lff" or
sl|slice:":2" == "ll" or sl|slice:":2" == "ly" or
sl|slice:":2" == "my" or sl|slice:":2" == "od" or
sl|slice:":2" == "pe" or sl|slice:":2" == "po" or
sl|slice:":2" == "pt" or sl|slice:":2" == "rr" or
sl|slice:":2" == "rs" or sl|slice:":2" == "sg" or
sl|slice:":2" == "sh" or sl|slice:":2" == "si" or
sl|slice:":2" == "td" or sl|slice:":2" == "tp" or
sl|slice:":2" == "tr" or sl|slice:":2" == "ts" or
sl|slice:":2" == "un"
%}
<a class="chip chip-link"
href="https://wol.jw.org/en/wol/l/r1/lp-e?q={{ s|urlencode }}"
target="_blank" rel="noopener noreferrer">
{{ s }}
</a>
{% else %}
<a class="chip chip-link"
href="https://www.google.com/search?q={{ s|urlencode }}"
target="_blank" rel="noopener noreferrer">
{{ s }}
</a>
{% endif %}
{% endwith %}
{% endwith %}
{% else %}—{% endif %}
</div>
</div>
<div class="meta-item">
<div class="meta-label">Scripture</div>
@ -120,26 +165,26 @@
</div>
<style>
.subject-pills {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin: 0 0 10px;
.subject-pills{
display:flex;
flex-wrap:wrap;
gap:10px;
margin:0 0 10px;
}
.chip-subject {
font-weight: 700;
font-size: 16px;
padding: 8px 14px;
border-radius: 999px;
background: #eef5fc;
border: 1px solid #d7e6f7;
color: #0f172a;
text-decoration: none;
text-transform: capitalize;
.chip-subject{
font-weight:700;
font-size:16px;
padding:8px 14px;
border-radius:999px;
background:#eef5fc;
border:1px solid #d7e6f7;
color:#0f172a;
text-decoration:none;
text-transform: capitalize; /* Capitalize each word */
}
.chip-subject:hover {
background: #e2effc;
border-color: #c9def5;
.chip-subject:hover{
background:#e2effc;
border-color:#c9def5;
}
</style>
{% endblock %}