Skip to content

Commit

Permalink
Reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
anst-foto committed Oct 14, 2022
1 parent 33a8671 commit 4833bcc
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 58 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
root = true

[*]
charset = utf-8
indent_style = tab
indent_size = 4
tab_width = 4
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

[*.{js,css,less,svg}]
indent_style = space
indent_size = 2

[*.{jade,pug}]
indent_style = space
indent_size = 2
tab_width = 2
33 changes: 1 addition & 32 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,32 +1 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Pug demo</title></head>
<body>
<header><h1>Pug demo</h1></header>
<hr>
<main>
<section class="card online">
<header class="card-header"><h4>1</h4></header>
<div class="card-body"><p>Users User 1</p></div>
<footer class="card-footer"><p>user1@users.u</p></footer>
</section>
<section class="card offline">
<header class="card-header"><h4>2</h4></header>
<div class="card-body"><p>Users User 2</p></div>
<footer class="card-footer"><p>user2@users.u</p></footer>
</section>
<section class="card online">
<header class="card-header"><h4>3</h4></header>
<div class="card-body"><p>Users User 3</p></div>
<footer class="card-footer"><p>user3@users.u</p></footer>
</section>
<section class="card online">
<header class="card-header"><h4>4</h4></header>
<div class="card-body"><p>Users User 4</p></div>
<footer class="card-footer"><p>user4@users.u</p></footer>
</section>
</main>
</body>
</html>
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Pug demo</title></head><body><header><h1>Pug demo</h1></header><hr><main><section class="card online"><header class="card-header"><h4>1</h4></header><div class="card-body"><p>Users User 1</p></div><footer class="card-footer"><p>user1@users.u</p></footer></section><section class="card offline"><header class="card-header"><h4>2</h4></header><div class="card-body"><p>Users User 2</p></div><footer class="card-footer"><p>user2@users.u</p></footer></section><section class="card online"><header class="card-header"><h4>3</h4></header><div class="card-body"><p>Users User 3</p></div><footer class="card-footer"><p>user3@users.u</p></footer></section><section class="card online"><header class="card-header"><h4>4</h4></header><div class="card-body"><p>Users User 4</p></div><footer class="card-footer"><p>user4@users.u</p></footer></section></main></body></html>
46 changes: 23 additions & 23 deletions index.pug
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
-
var users = [
var users = [
{id: 1, first_name: 'User 1', last_name: 'Users', email: "user1@users.u", online: true},
{id: 2, first_name: 'User 2', last_name: 'Users', email: "user2@users.u", online: false},
{id: 3, first_name: 'User 3', last_name: 'Users', email: "user3@users.u", online: true},
{id: 4, first_name: 'User 4', last_name: 'Users', email: "user4@users.u", online: true}
]
]
mixin card(user)
header.card-header
h4= user.id
div.card-body
p= `${user.last_name} ${user.first_name}`
footer.card-footer
p= user.email
header.card-header
h4= user.id
div.card-body
p= `${user.last_name} ${user.first_name}`
footer.card-footer
p= user.email

doctype html
html(lang="en")
head
meta(charset="UTF-8")
title Pug demo
body
header
h1 Pug demo
hr
main
each user in users
if user.online
section.card.online
+card(user)
else
section.card.offline
+card(user)
head
meta(charset="UTF-8")
title Pug demo
body
header
h1 Pug demo
hr
main
each user in users
if user.online
section.card.online
+card(user)
else
section.card.offline
+card(user)
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dependencies": {
"pug": "^3.0.2"
}
"dependencies": {
"pug": "^3.0.2"
}
}

0 comments on commit 4833bcc

Please sign in to comment.