Browse Source

#7 Fix interpolations in pug

dev
Kim Grytøyr 6 months ago
parent
commit
4611431b50
Signed by: Kim Grytøyr <kim@grytoyr.io> GPG Key ID: 759EF8C94E0B45B7
4 changed files with 9 additions and 9 deletions
  1. 4
    4
      src/views/header.pug
  2. 3
    3
      src/views/image.pug
  3. 1
    1
      src/views/layout.pug
  4. 1
    1
      src/views/text.pug

+ 4
- 4
src/views/header.pug View File

@@ -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]

+ 3
- 3
src/views/image.pug View File

@@ -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

+ 1
- 1
src/views/layout.pug View File

@@ -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')

+ 1
- 1
src/views/text.pug View File

@@ -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