Created
August 25, 2013 17:42
-
-
Save ttscoff/6335218 to your computer and use it in GitHub Desktop.
Barebones nvALT template with [[linking]] built-in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>{%title%}</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style type="text/css"> | |
{%style%} | |
</style> | |
</head> | |
<body> | |
<div id="wrapper"> | |
<header> | |
<h1 class="doctitle">{%title%}</h1> | |
</header> | |
<div id="contentdiv"> | |
{%content%} | |
</div> | |
</div> <!-- end of #container --> | |
<script> | |
window.onload = function(e){ | |
var container = document.getElementById("wrapper"); | |
container.innerHTML = container.innerHTML.replace(/\[\[(.*?)\]\]/g,"<a href='nvalt://find/$1'>$1</a>"); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment