diff options
author | sudan <sudan@douban.com> | 2016-01-25 15:44:17 +0800 |
---|---|---|
committer | sudan <sudan@douban.com> | 2016-01-25 15:44:17 +0800 |
commit | 0d89e0fce14edee3a3fa7571b5e7792e2bdb2197 (patch) | |
tree | dabedaed6fb92d67220efd33ad8b3585d72e8c32 /templates | |
parent | style (diff) | |
download | stackbin-0d89e0fce14edee3a3fa7571b5e7792e2bdb2197.tar.gz stackbin-0d89e0fce14edee3a3fa7571b5e7792e2bdb2197.tar.bz2 stackbin-0d89e0fce14edee3a3fa7571b5e7792e2bdb2197.zip |
code highlight
Diffstat (limited to 'templates')
-rw-r--r-- | templates/layout.html | 6 | ||||
-rw-r--r-- | templates/show_paste.html | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/templates/layout.html b/templates/layout.html index 106ca8c..348df3e 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -5,10 +5,10 @@ <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="format-detection" content="telephone=no"> <link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}"> -<link rel="stylesheet" media="screen and (max-width: 800px)" -href="{{ url_for('static', filename='small.css') }}" /> +<link rel="stylesheet" media="screen and (max-width: 800px)" href="{{ url_for('static', filename='small.css') }}" /> +<script type=text/javascript src="{{ url_for('static', filename='jquery.js') }}"></script> -{#<script type=text/javascript src="{{ url_for('static', filename='jquery.js') }}"></script> +{# <script type=text/javascript src="{{ url_for('static', filename='pastebin.js') }}"></script> <script type=text/javascript> pastebin.urlRoot = {{ request.url_root|tojson|safe }}; diff --git a/templates/show_paste.html b/templates/show_paste.html index 1c42e99..89ad18e 100644 --- a/templates/show_paste.html +++ b/templates/show_paste.html @@ -29,4 +29,13 @@ {% endif %} </dl> <div class=code><pre>{{ paste.code }}</pre></div> + <link rel="stylesheet" href="//cdn.jsdelivr.net/highlight.js/9.1.0/styles/default.min.css"> + <script src="//cdn.jsdelivr.net/highlight.js/9.1.0/highlight.min.js"></script> + <script> + $(document).ready(function() { + $('pre').each(function(i, block) { + hljs.highlightBlock(block); + }); + }); + </script> {% endblock %} |