Compiled temapltes.

Benchmark cleanup
This commit is contained in:
2026-01-22 11:10:47 +05:30
parent 714db30a8c
commit 654b45ee10
31 changed files with 2168 additions and 1251 deletions

View File

@@ -0,0 +1,15 @@
doctype html
html
head
title #{title}
link(rel="stylesheet" href="/style.css")
body
header
h1 #{title}
if authenticated
span.user Welcome back!
main
p This page is rendered using a compiled template.
p Compiled templates are 3x faster than Pug.js!
footer
p © 2024 Pugz Demo

View File

@@ -0,0 +1,15 @@
doctype html
html
head
title hello
body
p some thing
| ballah
| ballah
+btn("click me ", "secondary")
br
a(href='//google.com' target="_blank") Google 1
br
a(class='button' href='//google.com' target="_blank") Google 2
br
a(class='button', href='//google.com' target="_blank") Google 3

View File

@@ -0,0 +1,7 @@
html
head
block head
script(src='/vendor/jquery.js')
script(src='/vendor/caustic.js')
body
block content

View File

@@ -0,0 +1,10 @@
html
head
title My Site - #{title}
block scripts
script(src='/jquery.js')
body
block content
block foot
#footer
p some footer content

View File

@@ -0,0 +1,5 @@
mixin btn(text, type="primary")
button(class="btn btn-" + type)= text
mixin btn-link(href, text)
a.btn.btn-link(href=href)= text

View File

@@ -0,0 +1,11 @@
mixin card(title)
.card
.card-header
h3= title
.card-body
block
mixin card-simple(title, body)
.card
h3= title
p= body

View File

@@ -0,0 +1,15 @@
extends layout.pug
block scripts
script(src='/jquery.js')
script(src='/pets.js')
block content
h1= title
p Welcome to the pets page!
ul
li Cat
li Dog
ul
each val in items
li= val

View File

@@ -0,0 +1,5 @@
extends layout
append head
script(src='/vendor/three.js')
script(src='/game.js')

View File

@@ -0,0 +1,11 @@
extends layout-2.pug
block append head
script(src='/vendor/three.js')
script(src='/game.js')
block content
p
| cheks manually the head section
br
| hello there

View File

@@ -0,0 +1,9 @@
extends sub-layout.pug
block content
.sidebar
block sidebar
p nothing
.primary
block primary
p nothing

View File

@@ -0,0 +1 @@
p= petName

View File

@@ -0,0 +1,9 @@
extends layout.pug
block content
.sidebar
block sidebar
p nothing
.primary
block primary
p nothing

View File

@@ -0,0 +1,11 @@
doctype html
html
head
title Users
body
h1 User List
ul.user-list
each user in users
li.user
strong= user.name
span.email= user.email