本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.4KB

  1. <!doctype html>
  2. <title>CodeMirror: Pug Templating Mode</title>
  3. <meta charset="utf-8"/>
  4. <link rel=stylesheet href="../../doc/docs.css">
  5. <link rel="stylesheet" href="../../lib/codemirror.css">
  6. <script src="../../lib/codemirror.js"></script>
  7. <script src="../javascript/javascript.js"></script>
  8. <script src="../css/css.js"></script>
  9. <script src="../xml/xml.js"></script>
  10. <script src="../htmlmixed/htmlmixed.js"></script>
  11. <script src="pug.js"></script>
  12. <style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
  13. <div id=nav>
  14. <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
  15. <ul>
  16. <li><a href="../../index.html">Home</a>
  17. <li><a href="../../doc/manual.html">Manual</a>
  18. <li><a href="https://github.com/codemirror/codemirror">Code</a>
  19. </ul>
  20. <ul>
  21. <li><a href="../index.html">Language modes</a>
  22. <li><a class=active href="#">Pug Templating Mode</a>
  23. </ul>
  24. </div>
  25. <article>
  26. <h2>Pug Templating Mode</h2>
  27. <form><textarea id="code" name="code">
  28. doctype html
  29. html
  30. head
  31. title= "Pug Templating CodeMirror Mode Example"
  32. link(rel='stylesheet', href='/css/bootstrap.min.css')
  33. link(rel='stylesheet', href='/css/index.css')
  34. script(type='text/javascript', src='/js/jquery-1.9.1.min.js')
  35. script(type='text/javascript', src='/js/bootstrap.min.js')
  36. body
  37. div.header
  38. h1 Welcome to this Example
  39. div.spots
  40. if locals.spots
  41. each spot in spots
  42. div.spot.well
  43. div
  44. if spot.logo
  45. img.img-rounded.logo(src=spot.logo)
  46. else
  47. img.img-rounded.logo(src="img/placeholder.png")
  48. h3
  49. a(href=spot.hash) ##{spot.hash}
  50. if spot.title
  51. span.title #{spot.title}
  52. if spot.desc
  53. div #{spot.desc}
  54. else
  55. h3 There are no spots currently available.
  56. </textarea></form>
  57. <script>
  58. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  59. mode: {name: "pug", alignCDATA: true},
  60. lineNumbers: true
  61. });
  62. </script>
  63. <h3>The Pug Templating Mode</h3>
  64. <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>
  65. <p><strong>MIME type defined:</strong> <code>text/x-pug</code>, <code>text/x-jade</code>.</p>
  66. </article>
上海开阖软件有限公司 沪ICP备12045867号-1