2015-05-04 07:53:29 +00:00
<!doctype html>
2016-10-10 13:15:29 +00:00
< title > CodeMirror: Pug Templating Mode< / title >
2015-05-04 07:53:29 +00:00
< meta charset = "utf-8" / >
< link rel = stylesheet href = "../../doc/docs.css" >
< link rel = "stylesheet" href = "../../lib/codemirror.css" >
< script src = "../../lib/codemirror.js" > < / script >
< script src = "../javascript/javascript.js" > < / script >
< script src = "../css/css.js" > < / script >
< script src = "../xml/xml.js" > < / script >
< script src = "../htmlmixed/htmlmixed.js" > < / script >
2016-10-10 13:15:29 +00:00
< script src = "pug.js" > < / script >
2015-05-04 07:53:29 +00:00
< style type = "text/css" > . CodeMirror { border-top : 1 px solid black ; border-bottom : 1 px solid black ; } < / style >
< div id = nav >
< a href = "http://codemirror.net" > < h1 > CodeMirror< / h1 > < img id = logo src = "../../doc/logo.png" > < / a >
< ul >
< li > < a href = "../../index.html" > Home< / a >
< li > < a href = "../../doc/manual.html" > Manual< / a >
< li > < a href = "https://github.com/codemirror/codemirror" > Code< / a >
< / ul >
< ul >
< li > < a href = "../index.html" > Language modes< / a >
2016-10-10 13:15:29 +00:00
< li > < a class = active href = "#" > Pug Templating Mode< / a >
2015-05-04 07:53:29 +00:00
< / ul >
< / div >
< article >
2016-10-10 13:15:29 +00:00
< h2 > Pug Templating Mode< / h2 >
2015-05-04 07:53:29 +00:00
< form > < textarea id = "code" name = "code" >
doctype html
html
head
2016-10-10 13:15:29 +00:00
title= "Pug Templating CodeMirror Mode Example"
2015-05-04 07:53:29 +00:00
link(rel='stylesheet', href='/css/bootstrap.min.css')
link(rel='stylesheet', href='/css/index.css')
script(type='text/javascript', src='/js/jquery-1.9.1.min.js')
script(type='text/javascript', src='/js/bootstrap.min.js')
body
div.header
h1 Welcome to this Example
div.spots
if locals.spots
each spot in spots
div.spot.well
div
if spot.logo
img.img-rounded.logo(src=spot.logo)
else
img.img-rounded.logo(src="img/placeholder.png")
h3
a(href=spot.hash) ##{spot.hash}
if spot.title
span.title #{spot.title}
if spot.desc
div #{spot.desc}
else
h3 There are no spots currently available.
< / textarea > < / form >
< script >
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
2016-10-10 13:15:29 +00:00
mode: {name: "pug", alignCDATA: true},
2015-05-04 07:53:29 +00:00
lineNumbers: true
});
< / script >
2016-10-10 13:15:29 +00:00
< h3 > The Pug Templating Mode< / h3 >
2015-05-04 07:53:29 +00:00
< p > Created by Forbes Lindesay. Managed as part of a Brackets extension at < a href = "https://github.com/ForbesLindesay/jade-brackets" > https://github.com/ForbesLindesay/jade-brackets< / a > .< / p >
2016-10-10 13:15:29 +00:00
< p > < strong > MIME type defined:< / strong > < code > text/x-pug< / code > , < code > text/x-jade< / code > .< / p >
2015-05-04 07:53:29 +00:00
< / article >