Skip to content

Instantly share code, notes, and snippets.

@KSXGitHub
Last active October 8, 2016 17:47
Show Gist options
  • Save KSXGitHub/a6de25e304a25724285d7b6ca07073e0 to your computer and use it in GitHub Desktop.
Save KSXGitHub/a6de25e304a25724285d7b6ca07073e0 to your computer and use it in GitHub Desktop.
Simple pug
- const process = require('process')
doctype xml
svg(
xmlns = 'http://www.w3.org/2000/svg'
xlink = 'http://www.w3.org/1999/xlink'
width = 640
height = 640
style = {
background: background
}
)
style
| tspan.key { fill: green; }
| tspan.value { fill: #87F; }
rect(x = 1, y = 1, width = 320, height = 240, stroke = 'red', fill = 'white')
circle(cx = 321, cy = 240, r = 159, stroke = 'blue', fill = '#AAF')
text(
x = 2
y = 320
stroke = 'rgba(255, 0, 0, 1)'
fill = 'rgba(255, 120, 120, 0.5)'
'font-size' = 64
)
| #{getMessage()}
text(
y = 25
stroke = 'transparent'
font-family = 'consolas, monospace'
)
each val, key in process.versions
tspan.key(x = 360, dy = '1.2em') #{key}:
tspan.value(x = 480, dy = 0) #{val}4
text(
x = 15
y = 450
stroke = 'transparent'
font-family = 'sans-serif'
font-size = '2em'
)
| #{galaxy}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment