Browse Source
- more completeness on blog post and view - refactored sidebar to a site component - created Gab TV service sidebar middlewarepull/1/head
10 changed files with 115 additions and 81 deletions
@ -0,0 +1,41 @@ |
|||||
|
mixin renderSidebarEpisode(episode) |
||||
|
.uk-card.uk-card-secondary.uk-card-small.uk-card-hover |
||||
|
|
||||
|
.uk-card-media-top |
||||
|
a(href= episode.url, target="_blank", title="Watch on Gab TV") |
||||
|
img(src=episode.image).responsive |
||||
|
|
||||
|
.uk-card-body |
||||
|
.uk-card-title.uk-margin-remove.uk-text-truncate |
||||
|
a(href= episode.url, target="_blank", title= `Watch "${episode.title}" on Gab TV`)= episode.title |
||||
|
.uk-text-small Posted: #{moment(episode.date_modified).format("MMM DD YYYY HH:MM a")} |
||||
|
|
||||
|
mixin renderPageSidebar ( ) |
||||
|
//- Gab TV 3 Most Recent Episodes |
||||
|
.uk-margin |
||||
|
.dtp-border-bottom |
||||
|
h3.uk-heading-bullet |
||||
|
a(href= gabTvChannel.home_page_url, target= "_blank", title= `${gabTvChannel.title} on Gab`).uk-link-reset Gab TV |
||||
|
ul.uk-list |
||||
|
each episode in gabTvChannel.items.slice(0, 3) |
||||
|
li |
||||
|
+renderSidebarEpisode(episode) |
||||
|
|
||||
|
//- Newsletter Signup |
||||
|
//- TODO Add sticky |
||||
|
.uk-margin |
||||
|
.dtp-border-bottom.uk-margin |
||||
|
h3.uk-heading-bullet Mailing List |
||||
|
|
||||
|
form(method="post", action="/newsletter", onsubmit="return dtp.app.submitForm(event, 'Subscribe to newsletter');").uk-form |
||||
|
.uk-card.uk-card-secondary.uk-card-small |
||||
|
|
||||
|
.uk-card-body |
||||
|
p Join the #{site.name} FREE newsletter to get show updates in your inbox. |
||||
|
|
||||
|
.uk-margin |
||||
|
label(for="email").uk-form-label.sr-only Email Address |
||||
|
input(id="email", name="email", type="email", placeholder="[email protected]").uk-input |
||||
|
|
||||
|
.uk-card-footer |
||||
|
button(type="submit").uk-button.uk-button-primary Sign Up |
@ -1,17 +1,7 @@ |
|||||
extends layouts/main |
extends layouts/main |
||||
block content |
block content |
||||
|
|
||||
mixin renderSidebarEpisode(episode) |
|
||||
.uk-card.uk-card-secondary.uk-card-small.uk-card-hover |
|
||||
|
|
||||
.uk-card-media-top |
include components/page-sidebar |
||||
a(href= episode.url, target="_blank", title="Watch on Gab TV") |
|
||||
img(src=episode.image).responsive |
|
||||
|
|
||||
.uk-card-body |
|
||||
.uk-card-title.uk-margin-remove.uk-text-truncate |
|
||||
a(href= episode.url, target="_blank", title= `Watch "${episode.title}" on Gab TV`)= episode.title |
|
||||
.uk-text-small Posted: #{moment(episode.date_modified).format("MMM DD YYYY HH:MM a")} |
|
||||
|
|
||||
.uk-padding |
.uk-padding |
||||
.uk-container |
.uk-container |
||||
@ -58,32 +48,4 @@ block content |
|||||
|
|
||||
//- Sidebar |
//- Sidebar |
||||
div(class="uk-width-1-1 uk-width-1-3@m") |
div(class="uk-width-1-1 uk-width-1-3@m") |
||||
//- Gab TV 3 Most Recent Episodes |
+renderPageSidebar() |
||||
.uk-margin |
|
||||
.dtp-border-bottom |
|
||||
h3.uk-heading-bullet |
|
||||
a(href= gabTvChannel.home_page_url, target= "_blank", title= `${gabTvChannel.title} on Gab`).uk-link-reset Gab TV |
|
||||
ul.uk-list |
|
||||
each episode in gabTvChannel.items.slice(0, 3) |
|
||||
li |
|
||||
+renderSidebarEpisode(episode) |
|
||||
//- Newsletter Signup |
|
||||
//- TODO Add sticky |
|
||||
.uk-margin |
|
||||
.dtp-border-bottom.uk-margin |
|
||||
h3.uk-heading-bullet Mailing List |
|
||||
|
|
||||
form(method="post", action="/newsletter", onsubmit="return dtp.app.submitForm(event, 'Subscribe to newsletter');").uk-form |
|
||||
.uk-card.uk-card-secondary.uk-card-small |
|
||||
|
|
||||
.uk-card-body |
|
||||
p Join the #{site.name} FREE newsletter to get show updates in your inbox. |
|
||||
|
|
||||
.uk-margin |
|
||||
label(for="email").uk-form-label.sr-only Email Address |
|
||||
input(id="email", name="email", type="email", placeholder="[email protected]").uk-input |
|
||||
|
|
||||
.uk-card-footer |
|
||||
button(type="submit").uk-button.uk-button-primary Sign Up |
|
||||
|
|
||||
|
|
@ -1,18 +1,25 @@ |
|||||
extends ../layouts/main |
extends ../layouts/main |
||||
block content |
block content |
||||
|
|
||||
|
include ../components/page-sidebar |
||||
|
|
||||
section.uk-section.uk-section-default |
section.uk-section.uk-section-default |
||||
.uk-container |
.uk-container |
||||
article(dtp-post-id= post._id) |
div(uk-grid) |
||||
.uk-margin |
.uk-width-2-3 |
||||
div(uk-grid) |
article(dtp-post-id= post._id) |
||||
.uk-width-expand |
.uk-margin |
||||
h1.article-title= post.title |
div(uk-grid) |
||||
if user && user.flags.isAdmin |
.uk-width-expand |
||||
.uk-width-auto |
h1.article-title= post.title |
||||
a(href=`/admin/post/${post._id}`).uk-button.dtp-button-text EDIT |
if user && user.flags.isAdmin |
||||
.uk-text-lead= post.summary |
.uk-width-auto |
||||
.uk-margin |
a(href=`/admin/post/${post._id}`).uk-button.dtp-button-text EDIT |
||||
.uk-article-meta= moment(post.created).format('MMM DD, YYYY [at] hh:mm a') |
.uk-text-lead= post.summary |
||||
.uk-margin |
.uk-margin |
||||
!= post.content |
.uk-article-meta= moment(post.created).format('MMM DD, YYYY [at] hh:mm a') |
||||
|
.uk-margin |
||||
|
!= post.content |
||||
|
|
||||
|
.uk-width-1-3 |
||||
|
+renderPageSidebar() |
Loading…
Reference in new issue