added highlight.js support

This commit is contained in:
Matthew Scragg 2013-10-08 14:47:49 -05:00
parent d30c9d71a6
commit 9d3751f241
11 changed files with 204 additions and 38 deletions

View file

@ -10,6 +10,7 @@
<link href="/static/css/bootstrap/spacelab.css" rel="stylesheet">
<link href="/static/css/font-awesome.min.css" rel="stylesheet">
<link href="/static/js/highlight/styles/github.css" rel="stylesheet">
<link href="/static/css/style.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
@ -106,6 +107,7 @@
<script src="/static/js/showdown/showdown.js"></script>
<script src="/static/js/html-sanitizer-minified.js"></script>
<script src="/static/js/showdown/wmd.js"></script>
<script src="/static/js/highlight/highlight.pack.js"></script>
<script>
/*
marked.setOptions({
@ -118,6 +120,11 @@
langPrefix: 'lang-'
});
*/
hljs.initHighlightingOnLoad();
// Markdown Renderer
MDR = {
doc: null,
callback: WMD,

View file

@ -65,22 +65,4 @@
<div id="preview"></div>
</div>
<!--
<form role="form" method="post">
<div class="form-group">
<label for="name"></label>
<input type="text" class="form-control" id="page" name="name" placeholder="Name" value="{{- name -}}" />
</div>
<div class="form-group">
<label for="content"></label>
<div id="epiceditor"></div>
<textarea name="content" id="content" class="form-control" placeholder="Content" style="display:none;">{{- content -}}</textarea>
</div>
<input type="submit" class="btn btn-primary" value="Save" />
</form>
-->
{% endblock %}

View file

@ -9,7 +9,7 @@
{% block body %}
<div id="page-content" style="display:none">
{{ page.data|safe }}
{{ page.data }}
</div>
{% endblock %}