Update web/templates/entry_view.html

This commit is contained in:
Joshua Laymon 2025-08-14 19:53:11 +00:00
parent 60017789df
commit 26e186d63a

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>
@ -70,11 +72,38 @@
<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>
{% with s=entry.source|trim %}
{% with sl=s|lower %}
{% if
sl|startswith:"w" or sl|startswith:"wp" or sl|startswith:"ws" or sl|startswith:"g" or
sl|startswith:"yb" or sl|startswith:"kt" or
sl|startswith:"km" or sl|startswith:"mwb" or
sl|startswith:"ap" or sl|startswith:"apf" or sl|startswith:"be" or sl|startswith:"bh" or
sl|startswith:"br" or sl|startswith:"bt" or sl|startswith:"btg" or sl|startswith:"cf" or
sl|startswith:"cl" or sl|startswith:"ct" or sl|startswith:"dp" or sl|startswith:"fg" or
sl|startswith:"fy" or sl|startswith:"gt" or sl|startswith:"hb" or sl|startswith:"im" or
sl|startswith:"ip" or sl|startswith:"it" or sl|startswith:"jv" or sl|startswith:"ka" or
sl|startswith:"kj" or sl|startswith:"kl" or sl|startswith:"lf" or sl|startswith:"lff" or
sl|startswith:"ll" or sl|startswith:"ly" or sl|startswith:"my" or sl|startswith:"od" or
sl|startswith:"pe" or sl|startswith:"po" or sl|startswith:"pt" or sl|startswith:"rr" or
sl|startswith:"rs" or sl|startswith:"sg" or sl|startswith:"sh" or sl|startswith:"si" or
sl|startswith:"td" or sl|startswith:"tp" or sl|startswith:"tr" or sl|startswith:"ts" or
sl|startswith:"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>
@ -120,26 +149,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 %}