2016-07-23 01:29:20 -04:00
<!doctype html>
2019-10-15 04:40:42 -04:00
< title > CodeMirror: Pug Templating Mode< / title >
2016-07-23 01:29:20 -04: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 >
2019-10-15 04:40:42 -04:00
< script src = "pug.js" > < / script >
< style > . CodeMirror { border-top : 1 px solid black ; border-bottom : 1 px solid black ; } < / style >
2016-07-23 01:29:20 -04:00
< div id = nav >
2019-10-15 04:40:42 -04:00
< a href = "https://codemirror.net" > < h1 > CodeMirror< / h1 > < img id = logo src = "../../doc/logo.png" > < / a >
2016-07-23 01:29:20 -04:00
< 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 >
2019-10-15 04:40:42 -04:00
< li > < a class = active href = "#" > Pug Templating Mode< / a >
2016-07-23 01:29:20 -04:00
< / ul >
< / div >
< article >
2019-10-15 04:40:42 -04:00
< h2 > Pug Templating Mode< / h2 >
2016-07-23 01:29:20 -04:00
< form > < textarea id = "code" name = "code" >
doctype html
html
head
2019-10-15 04:40:42 -04:00
title= "Pug Templating CodeMirror Mode Example"
2016-07-23 01:29:20 -04: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"), {
2019-10-15 04:40:42 -04:00
mode: {name: "pug", alignCDATA: true},
2016-07-23 01:29:20 -04:00
lineNumbers: true
});
< / script >
2019-10-15 04:40:42 -04:00
< h3 > The Pug Templating Mode< / h3 >
2016-07-23 01:29:20 -04: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 >
2019-10-15 04:40:42 -04:00
< p > < strong > MIME type defined:< / strong > < code > text/x-pug< / code > , < code > text/x-jade< / code > .< / p >
2016-07-23 01:29:20 -04:00
< / article >