Rob Colbert
5 months ago
9 changed files with 126 additions and 6 deletions
@ -0,0 +1,7 @@ |
|||
form(method="GET", action="/newsroom/search").uk-form.uk-margin-small |
|||
div(uk-grid).uk-grid-small |
|||
.uk-width-expand |
|||
input(id="search", name="q", type="text", placeholder="Enter search", value= query.q || undefined).uk-input |
|||
.uk-width-auto |
|||
button(type="submit").uk-button.dtp-button-secondary.uk-border-rounded |
|||
i.fas.fa-search |
@ -0,0 +1,48 @@ |
|||
extends ../layouts/main |
|||
block content |
|||
|
|||
include ../components/pagination-bar |
|||
|
|||
section.uk-section.uk-section-secondary |
|||
.uk-container |
|||
|
|||
.some-kinda-header.uk-margin-medium |
|||
div(uk-grid) |
|||
.uk-width-expand |
|||
h1.uk-article-title.uk-margin-remove #{site.name} Newsroom Search |
|||
.uk-width-auto |
|||
a(href="/newsroom", uk-tooltip={ title: 'Return to Newsroom' }) |
|||
i.fas.fa-newspaper |
|||
include components/search-form |
|||
.uk-text-bold #{formatCount(newsroom.totalFeedEntryCount)} articles matching #[code= query.q] at #{site.name}. |
|||
|
|||
section.uk-section.uk-section-default |
|||
.uk-container |
|||
|
|||
article.uk-article |
|||
.uk-margin |
|||
if Array.isArray(newsroom.entries) && (newsroom.entries.length > 0) |
|||
ul.uk-list.uk-list-divider |
|||
each entry in newsroom.entries |
|||
li(data-entry-id= entry._id) |
|||
.uk-text-large.uk-text-bold.uk-margin-small |
|||
a(href= entry.link, target="shing_reader")= entry.title |
|||
.uk-margin-small= entry.description |
|||
div(uk-grid).uk-text-small |
|||
.uk-width-auto |
|||
span.uk-text-muted date: |
|||
span.uk-margin-small-left #{moment(entry.published).format('MMM DD, YYYY')} |
|||
.uk-width-auto |
|||
span.uk-text-muted time: |
|||
span.uk-margin-small-left #{moment(entry.published).format('h:mm a')} |
|||
.uk-width-expand |
|||
span.uk-text-muted source: |
|||
span.uk-margin-small-left #[a(href= entry.feed.link, target="_blank")= entry.feed.title] |
|||
.uk-width-auto |
|||
span.uk-text-muted score: |
|||
span.uk-margin-small-left #{numeral(entry.score).format('0,0.00')} |
|||
else |
|||
div There are no matching feed entries. |
|||
|
|||
.uk-margin |
|||
+renderPaginationBar(`/newsroom/search`, newsroom.totalFeedEntryCount, `&q=${query.q}`) |
Loading…
Reference in new issue