diff options
-rw-r--r-- | router.js | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -29,7 +29,10 @@ function router() { var url = location.hash.slice(2) || 'presentation'; var contentElement = document.getElementById('content'); + contentElement.style.height = contentElement.offsetHeight + 'px'; + contentElement.innerHTML = ''; fetchFile('Pages/' + url + '.md', function(contentMd) { + contentElement.style.height = 'auto'; contentElement.innerHTML = markdown.toHTML(contentMd); }, function() { var notFoundPage = '<h1>Page non trouvée</h1><a href="#">Retour à l\'accueil</a>'; |