aboutsummaryrefslogtreecommitdiff
path: root/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'script.js')
-rw-r--r--script.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/script.js b/script.js
index 5ce7040..d3aeb65 100644
--- a/script.js
+++ b/script.js
@@ -25,9 +25,11 @@
function router() {
var url = location.hash.slice(2) || 'presentation';
var contentElement = document.getElementById('content');
- fetchFile('Pages/' + url + '.html', function(contentData) {
- fetchFile('Pages/contact.html', function(contactData) {
- contentElement.innerHTML = contentData + contactData;
+ fetchFile('Pages/' + url + '.md', function(contentMd) {
+ fetchFile('Pages/contact.md', function(contactMd) {
+ var contentHtml = markdown.toHTML(contentMd);
+ var contactHtml = '<div class=contact>' + markdown.toHTML(contactMd) + '</div>';
+ contentElement.innerHTML = contentHtml + contactHtml;
});
});
}