This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
IcyNet.eu/views/news/news.pug

40 lines
1.1 KiB
Plaintext
Raw Normal View History

2017-08-29 12:00:36 +00:00
extends ../layout.pug
2017-08-24 10:52:12 +00:00
2018-01-27 11:07:36 +00:00
block append meta
link(rel="alternate", href="/news/atom.xml", title="Icy Network News", type="application/atom+xml")
2017-08-24 10:52:12 +00:00
block title
|Icy Network - News
block body
.document
.content
2017-08-29 12:00:36 +00:00
if user && user.privilege && user.privilege > 0
2017-08-30 12:23:45 +00:00
a.button(style="float: right;" href="/news/compose") New Article
2017-08-29 12:00:36 +00:00
h1 Icy Network News Archive
2017-08-24 10:52:12 +00:00
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
2017-08-24 11:08:27 +00:00
a.button(href="/news/?page=" + (news.page.page - 1)) Previous
2017-08-24 10:52:12 +00:00
- 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
2017-08-24 11:08:27 +00:00
a.button(href="/news/?page=" + (news.page.page + 1)) Next
2017-08-24 10:52:12 +00:00
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