circuitpython-org/news.html
2019-03-08 18:23:50 -08:00

43 lines
943 B
HTML

---
layout: default
---
<div class="home">
<ul class="post-list">
{% for post in site.posts %}
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h2>
<article class="post-content">
{{ post.excerpt }}
</article>
</li>
{% endfor %}
</ul>
</div>
<script type='text/javascript'>
window.onload = function () {
try {
var headers = document.querySelectorAll('article h2');
headers.forEach(function (hdr) {
var title = hdr.closest('li').querySelector('.post-link');
console.log(title.innerText);
console.log(hdr.innerText);
if (hdr.innerText === title.innerText) {
console.log('here');
hdr.remove();
}
});
} catch (ex) {
// ignore
}
}
</script>