linkkf 로직수정중
This commit is contained in:
@@ -1,30 +1,32 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
{% filter markdown %}
|
||||
{{ data }}
|
||||
{% endfilter %}
|
||||
<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js?autorun=true&lang=css&lang=python&skin=sunburst"></script>
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
img{
|
||||
<script src="{{ url_for('static', filename='js/showdown_2.1.0.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/showdown-prettify.js') }}"></script>
|
||||
<link href="{{ url_for('static', filename='css/showdown.css') }}" rel="stylesheet">
|
||||
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="md_div" data-url="{{ arg }}"></div>
|
||||
<div id="content_div" data-url="{{ arg }}"></div>
|
||||
|
||||
<meta id="text" data-text="{{data}}">
|
||||
<div id="text_div"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
//$('#main_container').attr('class', 'container-fluid');
|
||||
});
|
||||
$(document).ready(function(){
|
||||
var converter = new showdown.Converter({extensions: ['prettify']});
|
||||
converter.setOption('tables', true);
|
||||
converter.setOption('strikethrough', true);
|
||||
converter.setOption('ghCodeBlocks',true);
|
||||
|
||||
text = $('#text').data('text');
|
||||
if (window.location.href.endsWith('.yaml')) {
|
||||
text = "```" + text + "```";
|
||||
}
|
||||
html = converter.makeHtml(text);
|
||||
$('#text_div').html(html);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user