This file contains 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 | |
html(lang="ja") | |
head | |
meta(charset="utf-8") | |
title Pugレッスン | |
body | |
h1 Pug始めました | |
main.main | |
p Pugでhtml作ったよ |
This file contains 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
ul | |
li: a(href="#") List01 | |
li: a(href="#") List02 | |
li: a(href="#") List03 |
This file contains 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
#id-name DivタグにIDを振る | |
.class-name DivタグにClassをつける |
This file contains 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
ul | |
- for (var i = 0; i <= 3; i++) { | |
.item | |
li List0#{i} | |
- } |
This file contains 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
- var url = "//www.example.com/"; | |
a(href=url) トップページ | |
a(href=url + "contact/") お問い合わせ |
This file contains 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
- var title = { home: "トップページ" } | |
if title.home | |
h2 #{title.home} | |
else | |
h2 title.lower |
This file contains 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
/* css */ | |
.list-family ol{ | |
list-style: none; | |
counter-reset: cnt; | |
padding-left: 0; | |
} | |
.list-family ol li{ | |
margin-bottom: 8px; | |
} | |
.list-family ol li::before{ |
This file contains 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
/* css */ | |
.numbering { | |
margin: 0; | |
counter-reset: number; | |
} | |
.numbering h2::before { | |
counter-increment: number; | |
content: counter(number); | |
padding-right: 5px; | |
} |
This file contains 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
- var author = ['ゆうさん', 'ゆきぱんだ', 'Tantan', 'かみーゆ', 'しゃーまん'] | |
ul | |
each item, index in author | |
li #{index + item} |
This file contains 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
//- ごちゃ混ぜ | |
p こんにちは。<br>フロントエンドエンジニアの <strong>かみーゆ</strong> です。 | |
//- =でコンテンツを渡す | |
p= 'こんにちは。フロントエンドエンジニアのかみーゆです。' | |
//- エスケープ | |
p= '段落は<p>タグで囲みます' | |
//- エスケープしたくない |
OlderNewer