Skip to content
Browse files

All links are now relative or generated dynamically by JavaScript.

  • Loading branch information...
1 parent e20046b commit 04fb411a2234f1ed625bfe2930453db5b2c748b2 @drdrang committed May 28, 2010
Showing with 17 additions and 13 deletions.
  1. +2 −2 buildNotesList.py
  2. +1 −1 buildPage.py
  3. +7 −4 footer.tmpl
  4. +7 −5 header.tmpl
  5. +0 −1 project.info
View
4 buildNotesList.py
@@ -28,7 +28,7 @@ def nameList(dir):
count += len(w) + 1
title = ' '.join(twords) + "…"
f.close()
- fileLI.append('<li><a href="%s.html">%s</a></li>' % (os.path.join(d, fn),title))
+ fileLI.append('<li><a href="\' + root + \'%s.html">%s</a></li>' % (os.path.join(d, fn),title))
return fileLI
# Find all the directories that have md files.
@@ -52,6 +52,6 @@ def nameList(dir):
# print linkList
linkList += ['</ul>', '</li>']
-print '''function showNotesList(){
+print '''function showNotesList(root){
document.write('%s')
}''' % ''.join(linkList)
View
2 buildPage.py
@@ -66,7 +66,7 @@
projInfo.close()
-# Dictionary entry with absolute path to project info file (for editing).
+# Dictionary entry with path to project info file (for editing).
info['infopath'] = os.path.abspath('project.info')
# Convert the contacts into a series of HTML list items.
View
11 footer.tmpl
@@ -1,10 +1,13 @@
<hr />
<p class="info">
- Source: <a href="txmt://open?url=file://$mdpath">$mdpath</a><br />
- Last modified: $modldate at $modtime<br />
- <!-- This page built: $buildtime -->
+ Source:
+ <script type="text/javascript">
+ document.write('<a href="txmt://open?url=' + document.URL.replace(/html$/, 'md') + '">' + document.URL.replace(/html$/, 'md') + '</a></li>\n')
+ </script><br />
+ Last modified: $modldate at $modtime<br />
+ <!-- This page built: $buildtime -->
</p>
</div> <!-- note -->
</div> <!-- container -->
</body>
-</html>
+</html>
View
12 header.tmpl
@@ -8,7 +8,7 @@
<link rel="stylesheet" type="text/css" media="print" href="${root}notes-print.css" />
<!-- <script type="text/javascript" src="$jsmathpath"></script> -->
<script type="text/javascript" src="${root}styleLineNumbers.js"></script>
- <script type="text/javascript" src="notesList.js"></script>
+ <script type="text/javascript" src="${root}notesList.js"></script>
</head>
<body onload="styleLN()">
<div id="container">
@@ -19,7 +19,7 @@
<div id="sidebar">
<h1>Project notes:</h1>
<ul>
- <script type="text/javascript">showNotesList()</script>
+ <script type="text/javascript">showNotesList('$root')</script>
</ul>
<hr />
<h1>Contacts:</h1>
@@ -29,15 +29,17 @@
<hr />
<h1>Source:</h1>
<ul>
- <li><a href="txmt://open?url=file://$mdpath">Edit in TextMate</a></li>
+ <li><script type="text/javascript">
+ document.write('<a href="txmt://open?url=' + document.URL.replace(/html$/, 'md') + '">Edit in TextMate</a></li>\n')
+ </script>
<li>Last modified<br />
&nbsp;$modldate<br />
&nbsp;at $modtime</li>
</ul>
- <hr />
+ <!-- <hr />
<ul>
<li><a href="txmt://open?url=file://$infopath">Edit project info</a></li>
- </ul>
+ </ul> -->
</div> <!-- sidebar -->
<div id="note">
View
1 project.info
@@ -1,4 +1,3 @@
-base = file:///Users/mark/notes/
jsmathpath = file:///Users/mark/Library/JavaScript/jsMath/easy/load.js
projname = Project Name
projnumber = 9999

0 comments on commit 04fb411

Please sign in to comment.
Something went wrong with that request. Please try again.