Created
December 9, 2022 06:05
-
-
Save rg3915/d362549b60770385e7b236b521739393 to your computer and use it in GitHub Desktop.
pug example pug to html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- https://www.sitepoint.com/a-beginners-guide-to-pug/--> | |
<html lang="en"> | |
<head> | |
<title>Pug Example</title> | |
</head> | |
<body> | |
<h1>Lorem Ipsum</h1> | |
<div class="container"> | |
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> | |
</div> | |
</body> | |
<ul> | |
<li><a href="/">Home</a></li> | |
<li><a href="/page-1">Page 1</a></li> | |
<li><a href="/page-2">Page 2</a></li> | |
</ul> | |
<input class="search" type="text" name="search" placeholder="Enter a search term..."> | |
<p>Hi jim</p> | |
<ul> | |
<li>Angela</li> | |
<li>Jim</li> | |
<li>Nilson</li> | |
<li>Simone</li> | |
</ul> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doctype html | |
// https://www.sitepoint.com/a-beginners-guide-to-pug/ | |
html(lang='en') | |
head | |
title Pug Example | |
body | |
h1 Lorem Ipsum | |
div.container | |
p Lorem ipsum dolor sit amet, consectetur adipisicing elit. | |
ul | |
li | |
a(href='/') Home | |
li | |
a(href='/page-1') Page 1 | |
li | |
a(href='/page-2') Page 2 | |
input.search( | |
type='text' | |
name='search' | |
placeholder='Enter a search term...' | |
) | |
- const name = "jim" | |
p Hi #{name} | |
- const employees = ['Angela', 'Jim', 'Nilson', 'Simone'] | |
ul | |
each employee in employees | |
li= employee |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment