Skip to content

Commit

Permalink
FEATURE: Memos integrate Markdown layout (#40 & #50).
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lejeune committed May 10, 2016
1 parent f3be627 commit 82e2021
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions templates/memo.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ <h1> <img src="../../style/{{type}}.png"/> {{name}} <button type="button" id="ad
</div>
</body>
<script src="../../script/jquery.js"></script>
<script src="https://cdn.rawgit.com/showdownjs/showdown/1.3.0/dist/showdown.min.js"></script>
<script src="../../script/jquery-ui.min.js"></script>
<link rel="stylesheet" href="../../script/jquery-ui.min.css" />
<script>
Expand All @@ -86,7 +87,14 @@ <h1> <img src="../../style/{{type}}.png"/> {{name}} <button type="button" id="ad
case ('diagram'):
$('#add').addClass('diagram');
break;
case ('storyline'):
$('#add').addClass('storyline');
break;
}
var converter = new showdown.Converter({tables: 'true'});
$('.post').html(function(i, text) {
return converter.makeHtml(text.trim());
});
$.ajax({
url: "../../memo_attribute/{{{diary}}}",
type: "GET",
Expand All @@ -98,9 +106,14 @@ <h1> <img src="../../style/{{type}}.png"/> {{name}} <button type="button" id="ad
var id = '#' + r.value['id'];
var ground_href = r.value['id'];
var ground_type = r.value['type'];
if (ground_type == 'diagram') {
switch (ground_type) {
case ('diagram'):
var ground_path = "../../diagram/{{{diary}}}/";
} else {
break;
case ('graph'):
var ground_path = "../../graph/{{{diary}}}/";
break;
default:
var ground_path = '';
}
var ground_label = r.value['name'];
Expand Down

0 comments on commit 82e2021

Please sign in to comment.