Skip to content

Commit

Permalink
All links are now relative or generated dynamically by JavaScript.
Browse files Browse the repository at this point in the history
  • Loading branch information
drdrang committed May 29, 2010
1 parent e20046b commit 04fb411
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions buildNotesList.py
Expand Up @@ -28,7 +28,7 @@ def nameList(dir):
count += len(w) + 1 count += len(w) + 1
title = ' '.join(twords) + "…" title = ' '.join(twords) + "…"
f.close() 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 return fileLI


# Find all the directories that have md files. # Find all the directories that have md files.
Expand All @@ -52,6 +52,6 @@ def nameList(dir):
# print linkList # print linkList
linkList += ['</ul>', '</li>'] linkList += ['</ul>', '</li>']


print '''function showNotesList(){ print '''function showNotesList(root){
document.write('%s') document.write('%s')
}''' % ''.join(linkList) }''' % ''.join(linkList)
2 changes: 1 addition & 1 deletion buildPage.py
Expand Up @@ -66,7 +66,7 @@


projInfo.close() 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') info['infopath'] = os.path.abspath('project.info')


# Convert the contacts into a series of HTML list items. # Convert the contacts into a series of HTML list items.
Expand Down
11 changes: 7 additions & 4 deletions footer.tmpl
@@ -1,10 +1,13 @@
<hr /> <hr />
<p class="info"> <p class="info">
Source: <a href="txmt://open?url=file://$mdpath">$mdpath</a><br /> Source:
Last modified: $modldate at $modtime<br /> <script type="text/javascript">
<!-- This page built: $buildtime --> 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> </p>
</div> <!-- note --> </div> <!-- note -->
</div> <!-- container --> </div> <!-- container -->
</body> </body>
</html> </html>
12 changes: 7 additions & 5 deletions header.tmpl
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" type="text/css" media="print" href="${root}notes-print.css" /> <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="$jsmathpath"></script> -->
<script type="text/javascript" src="${root}styleLineNumbers.js"></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> </head>
<body onload="styleLN()"> <body onload="styleLN()">
<div id="container"> <div id="container">
Expand All @@ -19,7 +19,7 @@
<div id="sidebar"> <div id="sidebar">
<h1>Project notes:</h1> <h1>Project notes:</h1>
<ul> <ul>
<script type="text/javascript">showNotesList()</script> <script type="text/javascript">showNotesList('$root')</script>
</ul> </ul>
<hr /> <hr />
<h1>Contacts:</h1> <h1>Contacts:</h1>
Expand All @@ -29,15 +29,17 @@
<hr /> <hr />
<h1>Source:</h1> <h1>Source:</h1>
<ul> <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 /> <li>Last modified<br />
&nbsp;$modldate<br /> &nbsp;$modldate<br />
&nbsp;at $modtime</li> &nbsp;at $modtime</li>
</ul> </ul>
<hr /> <!-- <hr />
<ul> <ul>
<li><a href="txmt://open?url=file://$infopath">Edit project info</a></li> <li><a href="txmt://open?url=file://$infopath">Edit project info</a></li>
</ul> </ul> -->
</div> <!-- sidebar --> </div> <!-- sidebar -->


<div id="note"> <div id="note">
1 change: 0 additions & 1 deletion project.info
@@ -1,4 +1,3 @@
base = file:///Users/mark/notes/
jsmathpath = file:///Users/mark/Library/JavaScript/jsMath/easy/load.js jsmathpath = file:///Users/mark/Library/JavaScript/jsMath/easy/load.js
projname = Project Name projname = Project Name
projnumber = 9999 projnumber = 9999
Expand Down

0 comments on commit 04fb411

Please sign in to comment.