37 lines
1003 B
Plaintext
37 lines
1003 B
Plaintext
extends ../layout.pug
|
|
|
|
block title
|
|
|Icy Network - News
|
|
|
|
block body
|
|
.document
|
|
.content
|
|
if user && user.privilege && user.privilege > 0
|
|
a.button(style="float: right;" href="/news/writer") New Article
|
|
h1 Icy Network News Archive
|
|
if news.error
|
|
span.error There are no articles to show.
|
|
else
|
|
if news.page
|
|
span.pagenum
|
|
|Page #{news.page.page} of #{news.page.pages}
|
|
.pgn
|
|
if news.page.page > 1
|
|
a.button(href="/news/?page=" + (news.page.page - 1)) Previous
|
|
- var n = 0
|
|
while n < news.page.pages
|
|
a.button(href="/news/?page=" + (n + 1))= n + 1
|
|
- n++
|
|
if news.page.pages > news.page.page
|
|
a.button(href="/news/?page=" + (news.page.page + 1)) Next
|
|
each val in news.articles
|
|
.article
|
|
a.title(href="/news/" + val.id + "-" + val.slug)= val.title
|
|
.author Published by
|
|
span #{val.author.display_name}
|
|
|at
|
|
.timestamp #{new Date(val.created_at)}
|
|
.content!= val.content
|
|
hr
|
|
|