mirror of
https://github.com/JPT580/jpt580.github.io.git
synced 2024-11-27 21:57:46 +01:00
Flatten everything up a bit.
This commit is contained in:
parent
6e076a1285
commit
c174c3a5f2
17
index.html
17
index.html
@ -7,9 +7,20 @@
|
|||||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.8.6/showdown.min.js"></script>
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.8.6/showdown.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Hello World! (for now ...)</h1>
|
<!-- This is the main container for the rendered content. -->
|
||||||
<div id="markdown-content">TODO</div>
|
<div id="markdown-content">Please wait while javascript takes care of rendering the page from markdown ...</div>
|
||||||
<!-- That is all we need, now load the script and get going! -->
|
<!-- That is all we need, now load the script and get going! -->
|
||||||
<script type="text/javascript" src="use-markdown.js"></script>
|
<script type="text/javascript">
|
||||||
|
// Load and render markdown from given URL
|
||||||
|
function loadMdFromUrl(url) {
|
||||||
|
$.get(url, function(data) {
|
||||||
|
var converter = new showdown.Converter();
|
||||||
|
var html = converter.makeHtml(data);
|
||||||
|
$("#markdown-content").html(html);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// Load initial page to display.
|
||||||
|
loadMdFromUrl("content/hello.md");
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
|
|
||||||
function loadMdFromUrl(url) {
|
|
||||||
$.get(url, function(data) {
|
|
||||||
var converter = new showdown.Converter();
|
|
||||||
var html = converter.makeHtml(data);
|
|
||||||
$("#markdown-content").html(html);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Add more, add menu, add ...
|
|
||||||
loadMdFromUrl("content/hello.md");
|
|
Loading…
Reference in New Issue
Block a user