|
|
|
@ -168,10 +168,91 @@ |
|
|
|
}" /> |
|
|
|
}" /> |
|
|
|
|
|
|
|
|
|
|
|
<twig:Organisms:Comments current="30023:{{ article.pubkey }}:{{ article.slug|e }}"></twig:Organisms:Comments> |
|
|
|
<twig:Organisms:Comments current="30023:{{ article.pubkey }}:{{ article.slug|e }}"></twig:Organisms:Comments> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{# Mobile highlights - shown after comments on narrow screens #} |
|
|
|
|
|
|
|
{% if highlights is defined and highlights|length > 0 %} |
|
|
|
|
|
|
|
<div class="highlights-mobile-section"> |
|
|
|
|
|
|
|
<h3 class="highlights-mobile-heading">Highlights ({{ highlights|length }})</h3> |
|
|
|
|
|
|
|
<div class="highlights-mobile-grid"> |
|
|
|
|
|
|
|
{% for highlight in highlights %} |
|
|
|
|
|
|
|
<div class="highlight-card-compact"> |
|
|
|
|
|
|
|
<div class="highlight-header-compact"> |
|
|
|
|
|
|
|
{% if highlight.pubkey %} |
|
|
|
|
|
|
|
<twig:Molecules:UserFromNpub |
|
|
|
|
|
|
|
ident="{{ highlight.pubkey }}" |
|
|
|
|
|
|
|
:compact="true" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
{% else %} |
|
|
|
|
|
|
|
<span class="text-muted">Anonymous</span> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
<small class="text-muted ms-auto"> |
|
|
|
|
|
|
|
{{ highlight.created_at|date('M j') }} |
|
|
|
|
|
|
|
</small> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="highlight-content-compact"> |
|
|
|
|
|
|
|
{% if highlight.context %} |
|
|
|
|
|
|
|
{% set htmlContext = highlight.context|markdown_to_html %} |
|
|
|
|
|
|
|
{% if highlight.content in highlight.context %} |
|
|
|
|
|
|
|
{% set wrapper = '<mark class="highlight-mark-compact">' ~ highlight.content ~ '</mark>' %} |
|
|
|
|
|
|
|
{% set rendered = htmlContext|replace({ (highlight.content): wrapper }) %} |
|
|
|
|
|
|
|
{{ rendered|raw }} |
|
|
|
|
|
|
|
{% else %} |
|
|
|
|
|
|
|
<div class="context-text-compact">{{ htmlContext|raw }}</div> |
|
|
|
|
|
|
|
<mark class="highlight-mark-compact">{{ highlight.content }}</mark> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
{% else %} |
|
|
|
|
|
|
|
<mark class="highlight-mark-compact">{{ highlight.content }}</mark> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
</article> |
|
|
|
</article> |
|
|
|
{% endblock %} |
|
|
|
{% endblock %} |
|
|
|
|
|
|
|
|
|
|
|
{% block aside %} |
|
|
|
{% block aside %} |
|
|
|
|
|
|
|
{% if highlights is defined and highlights|length > 0 %} |
|
|
|
|
|
|
|
<div class="sidebar-section"> |
|
|
|
|
|
|
|
<h3 class="sidebar-heading">Highlights ({{ highlights|length }})</h3> |
|
|
|
|
|
|
|
<div class="highlights-sidebar"> |
|
|
|
|
|
|
|
{% for highlight in highlights %} |
|
|
|
|
|
|
|
<div class="highlight-card-compact"> |
|
|
|
|
|
|
|
<div class="highlight-header-compact"> |
|
|
|
|
|
|
|
{% if highlight.pubkey %} |
|
|
|
|
|
|
|
<twig:Molecules:UserFromNpub |
|
|
|
|
|
|
|
ident="{{ highlight.pubkey }}" |
|
|
|
|
|
|
|
:compact="true" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
{% else %} |
|
|
|
|
|
|
|
<span class="text-muted">Anonymous</span> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
<small class="text-muted ms-auto"> |
|
|
|
|
|
|
|
{{ highlight.created_at|date('M j') }} |
|
|
|
|
|
|
|
</small> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="highlight-content-compact"> |
|
|
|
|
|
|
|
{% if highlight.context %} |
|
|
|
|
|
|
|
{% set htmlContext = highlight.context|markdown_to_html %} |
|
|
|
|
|
|
|
{% if highlight.content in highlight.context %} |
|
|
|
|
|
|
|
{% set wrapper = '<mark class="highlight-mark-compact">' ~ highlight.content ~ '</mark>' %} |
|
|
|
|
|
|
|
{% set rendered = htmlContext|replace({ (highlight.content): wrapper }) %} |
|
|
|
|
|
|
|
{{ rendered|raw }} |
|
|
|
|
|
|
|
{% else %} |
|
|
|
|
|
|
|
<div class="context-text-compact">{{ htmlContext|raw }}</div> |
|
|
|
|
|
|
|
<mark class="highlight-mark-compact">{{ highlight.content }}</mark> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
{% else %} |
|
|
|
|
|
|
|
<mark class="highlight-mark-compact">{{ highlight.content }}</mark> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
{# <h1>Suggestions</h1>#} |
|
|
|
{# <h1>Suggestions</h1>#} |
|
|
|
{# <twig:Organisms:CardList :list="suggestions" />#} |
|
|
|
{# <twig:Organisms:CardList :list="suggestions" />#} |
|
|
|
{% endblock %} |
|
|
|
{% endblock %} |
|
|
|
|