Update web/templates/entry_view.html
This commit is contained in:
parent
1c5406e2d8
commit
edf761eb11
@ -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,16 +67,59 @@
|
||||
</div>
|
||||
|
||||
<!-- Meta (smaller) -->
|
||||
<div class="meta-grid">
|
||||
<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={{ entry.source|urlencode }}"
|
||||
href="https://wol.jw.org/en/wol/l/r1/lp-e?q={{ s|urlencode }}"
|
||||
target="_blank" rel="noopener noreferrer">
|
||||
{{ entry.source }}
|
||||
{{ 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>
|
||||
@ -135,7 +180,7 @@
|
||||
border:1px solid #d7e6f7;
|
||||
color:#0f172a;
|
||||
text-decoration:none;
|
||||
text-transform: capitalize;
|
||||
text-transform: capitalize; /* Capitalize each word */
|
||||
}
|
||||
.chip-subject:hover{
|
||||
background:#e2effc;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user