Skip to content

Commit

Permalink
add view article button for truncated RSS feed containing […] (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bmos committed Mar 19, 2024
1 parent 0225681 commit a36b266
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions _data/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ postedat: $author posted at $time
postedinat: $author posted in $language at $time
showmore: Show More
showless: Show Less
viewfull: Visit Source
join_dsa: Join DSA
atom_feed: Atom Feed
rss_feed: RSS 2.0 Feed
Expand Down
9 changes: 9 additions & 0 deletions _includes/single-post.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,21 @@ <h2>
id="content_{{ post.guid | slugify }}">
{{ post.content }}
</div>
{% if post.content contains ' […]' %}
<a href="{{ post.original_link }}" target="_blank">
<button class="roller-button btn btn-primary mt-3"
id="viewfull_{{ post.guid | slugify }}">
{{ locale.viewfull }}
</button>
</a>
{% else %}
<button class="roller-button btn btn-primary mt-3"
id="button_{{ post.guid | slugify }}"
aria-expanded="false"
onclick="toggleArticleExpand('{{ post.guid | slugify }}', '{{ locale.showmore }}', '{{ locale.showless }}');">
{{ locale.showmore }}
</button>
{% endif %}
</div>
</div>
</div>
Expand Down

0 comments on commit a36b266

Please sign in to comment.