initial news page
This commit is contained in:
parent
b1166803b0
commit
b8f46203a5
4 changed files with 61 additions and 0 deletions
|
|
@ -14,3 +14,4 @@
|
|||
@import 'pages/home';
|
||||
@import 'pages/downloads';
|
||||
@import 'pages/download';
|
||||
@import 'pages/news';
|
||||
|
|
|
|||
15
assets/sass/pages/_news.scss
Normal file
15
assets/sass/pages/_news.scss
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
.post-list {
|
||||
margin-left: 0;
|
||||
list-style: none;
|
||||
|
||||
> li {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
line-height: 24px;
|
||||
a {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
news.html
Normal file
45
news.html
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
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>
|
||||
|
||||
{% include paginator.html %}
|
||||
|
||||
</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>
|
||||
Loading…
Reference in a new issue