summaryrefslogtreecommitdiff
path: root/_includes/news.html
diff options
context:
space:
mode:
Diffstat (limited to '_includes/news.html')
-rw-r--r--_includes/news.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/_includes/news.html b/_includes/news.html
new file mode 100644
index 0000000..e1fc80b
--- /dev/null
+++ b/_includes/news.html
@@ -0,0 +1,24 @@
+<div class="news">
+ <h2>news</h2>
+ {% if site.news %}
+ <div class="table-responsive">
+ <table class="table table-sm table-borderless">
+ {% assign news = site.news | reverse %}
+ {% for item in news limit: site.news_limit %}
+ <tr>
+ <th scope="row">{{ item.date | date: "%b %-d, %Y" }}</th>
+ <td>
+ {% if item.inline %}
+ {{ item.content | remove: '<p>' | remove: '</p>' | emojify }}
+ {% else %}
+ <a class="news-title" href="{{ item.url | relative_url }}">{{ item.title }}</a>
+ {% endif %}
+ </td>
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
+ {% else %}
+ <p>No news so far...</p>
+ {% endif %}
+</div>