-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPUG.pug
63 lines (42 loc) · 918 Bytes
/
PUG.pug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//- Pug - HTML preprocessor - by Beumsk
//- Basic HTML
doctype html
html
head
title
link(rel="stylesheet" href="CSSS.css")
body
header
main
footer
script(src="JSS.js")
//- Variables
- var string = "Hello"
h1 #{string} World
- var superString = string + " World"
h1= superString
//- Iterations
each value in ["one", "two", "three"]
p= value
while x < 10
p= x
x++
//- Conditionals
if false
h1 This is false !
else if true
h1 This is true !
else
h1 This is bleh !
//- Mixin
mixin image(url, caption)
figure
img(src=url, alt=caption)
figcaption= caption
+image("https://media.giphy.com/media/2NKQ8MmushHi0/giphy.gif", "a sailing pug")
//- Includes
include anotherPugFile.pug
include otherFileTypeAsPlainText.css
include otherFileTypeAsPlainText.js
//- https://codepen.io/mimoduo/post/pug-js-cheat-sheet
//- https://pugjs.org/api/getting-started.html