File tree 4 files changed +19
-5
lines changed
4 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ app.set('views', './views');
9
9
app . set ( 'view engine' , 'pug' ) ;
10
10
11
11
app . get ( '/' , ( req , res ) => {
12
- res . render ( 'index' ) ;
12
+ res . render ( 'index' , { home : true } ) ;
13
13
} ) ;
14
14
15
15
app . get ( / .* / , ( req , res ) => {
Original file line number Diff line number Diff line change 2
2
extends layout.pug
3
3
4
4
block content
5
- h1 rdenn.is
6
- h2 404
5
+ h1 404
7
6
p There is nothing here
Original file line number Diff line number Diff line change 2
2
extends layout.pug
3
3
4
4
block content
5
- h1 rdenn.is
5
+ h1 Welcome!
6
6
p.
7
7
Welcome to my personal website. I'll be putting stuff here in the future.
Original file line number Diff line number Diff line change 1
1
//- layout.pug
2
+ - var showEnv = typeof env === ' string' && env !== ' production'
3
+
4
+ mixin linkOrDiv(anchor, href )
5
+ div&attributes( attributes )
6
+ if anchor
7
+ a( href =href) &attributes( attributes )
8
+ block
9
+ else
10
+ block
11
+
2
12
doctype html
3
13
html( lang ="en" )
4
14
head
5
15
block title
6
16
title rdenn.is
7
17
if title && title .trim && title .trim ()
8
18
| - #{title}
9
- if typeof env === ' string ' && env !== ' production '
19
+ if showEnv
10
20
| : #{env}
11
21
block styles
12
22
block head-scripts
13
23
body
24
+ header
25
+ + linkOrDiv(! home, '/' )( class ='home' )
26
+ | rdenn.is
27
+ if showEnv
28
+ | : #[ span.env #{env}]
14
29
block content
15
30
block body-scripts
You can’t perform that action at this time.
0 commit comments