Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Get rid of base and figure out relative path to root of notes tree.

  • Loading branch information...
commit e20046b4584168fa6e35f5656aafafc1ead191bd 1 parent 2d93894
@drdrang authored
Showing with 11 additions and 4 deletions.
  1. +8 −0 buildPage.py
  2. +3 −4 header.tmpl
View
8 buildPage.py
@@ -28,6 +28,14 @@
# Initialize the dictionary of dynamic information.
info = {}
+# Dictionary entry with relative path to notes root. We allow only one
+# level of subdirectory, so the root can be at most one level up from
+# the file we're working on.
+if os.path.split(mdFile)[0] == '':
+ info['root'] = ''
+else:
+ info['root'] = '../'
+
# Dictionary entry with long modification date of the Markdown file.
mdModTime = time.localtime(os.path.getmtime(mdFile))
info['modldate'] = time.strftime('%B %e, %Y', mdModTime)
View
7 header.tmpl
@@ -3,12 +3,11 @@
<html>
<head>
<title>$projname ($projnumber)</title>
- <base href="$base" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link rel="stylesheet" type="text/css" media="all" href="notes.css" />
- <link rel="stylesheet" type="text/css" media="print" href="notes-print.css" />
+ <link rel="stylesheet" type="text/css" media="all" href="${root}notes.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="styleLineNumbers.js"></script>
+ <script type="text/javascript" src="${root}styleLineNumbers.js"></script>
<script type="text/javascript" src="notesList.js"></script>
</head>
<body onload="styleLN()">
Please sign in to comment.
Something went wrong with that request. Please try again.