Browse Source

#7 Fix interpolations in pug

dev
Kim Grytøyr 2 years ago
parent
commit
4611431b50
Signed by: kim GPG Key ID: 759EF8C94E0B45B7
  1. 8
      src/views/header.pug
  2. 6
      src/views/image.pug
  3. 2
      src/views/layout.pug
  4. 2
      src/views/text.pug

8
src/views/header.pug

@ -4,13 +4,13 @@ if paste.encrypted === false
h1.heading #{paste.id}
p.metadata
| pasted #[span(title="#{fullTimestamp}") #{postedAt}] by #{paste.submitter}.
| pasted #[span(title=`${fullTimestamp}`) #{postedAt}] by #{paste.submitter}.
if expiresAt
if paste.archive
| will be archived #[span(title="#{fullExpiresAtTimestamp}") #{expiresAt}]
| will be archived #[span(title="${fullExpiresAtTimestamp}") #{expiresAt}]
if !paste.archive
| expires #[span(title="#{fullExpiresAtTimestamp}") #{expiresAt}]
| #[br.only-mobile] #[span.not-mobile |] #[a(href="#{rawUrl}") view raw]
| expires #[span(title=`${fullExpiresAtTimestamp}`) #{expiresAt}]
| #[br.only-mobile] #[span.not-mobile |] #[a(href=`${rawUrl}`) view raw]
if paste.contentType == "text/plain"
| | #[a#toggleWrapping(href="#") toggle wrapping]
| | #[a#toggleMarkdown(href="#") toggle markdown]

6
src/views/image.pug

@ -6,7 +6,7 @@ block head
script(src='/javascripts/decrypt.js')
if paste.vault
script.
window.vault = '#{paste.vault}';
window.vault = `${paste.vault}`;
block content
#content
include header.pug
@ -14,12 +14,12 @@ block content
if paste.encrypted === true
div#data #{data}
p.
#[a(href="#{rawUrl}") #[img#image.pasted(src="")]]
#[a(href=`${rawUrl}`) #[img#image.pasted(src="")]]
p#decrypting Decrypting paste..
if paste.encrypted === false
p.
#[a(href="#{rawUrl}") #[img#image.pasted(src="#{data}")]]
#[a(href=`${rawUrl}`) #[img#image.pasted(src=`${data}`)]]
include footer.pug

2
src/views/layout.pug

@ -2,7 +2,7 @@ doctype html
html
head
title npaste
meta(name="generator", content="npaste #{version}")
meta(name="generator", content=`npaste ${version}`)
meta(name="robots" content="noindex,nofollow")
meta(name='viewport', content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1')
link(rel='stylesheet', href='/stylesheets/style.css')

2
src/views/text.pug

@ -11,7 +11,7 @@ block head
link(rel='stylesheet', href='/stylesheets/line-numbers.css')
if paste.vault
script.
window.vault = '#{paste.vault}';
window.vault = `${paste.vault}`;
block content
#content
include header.pug

Loading…
Cancel
Save