This commit is contained in:
Akbar Rahman 2021-08-21 02:29:00 +01:00
parent 65e36de48c
commit 7e85e2a1fa
5 changed files with 21 additions and 13 deletions

View File

@ -193,10 +193,10 @@ def main(args):
html = re.sub(r'\$title\$', title, TEXT_ARTICLE_TEMPLATE_HEAD) html = re.sub(r'\$title\$', title, TEXT_ARTICLE_TEMPLATE_HEAD)
html = re.sub(r'\$h1title\$', title, html) html = re.sub(r'\$h1title\$', title, html)
html = re.sub(r'\$raw\$', os.path.basename(filename), html) html = re.sub(r'\$raw\$', os.path.basename(filename), html)
html = html.replace('$filehistory$', filehistory)
with open(filename) as fp: with open(filename) as fp:
html += fp.read() html += fp.read()
html += TEXT_ARTICLE_TEMPLATE_FOOT html += TEXT_ARTICLE_TEMPLATE_FOOT
html = html.replace(r'$filehistory$', filehistory)
with open(output_filename, 'w+') as fp: with open(output_filename, 'w+') as fp:
fp.write(html) fp.write(html)

View File

@ -95,3 +95,8 @@ blockquote * {
.matchHighlight { .matchHighlight {
background-color: #86c1b9; background-color: #86c1b9;
} }
#header > * {
margin: 0;
padding: 0
}

View File

@ -9,18 +9,19 @@
</head> </head>
<body> <body>
<div id="header">
<p style="font-size: 0.7em"> tags: <p style="font-size: 0.7em"> tags:
$for(tags)$ $for(tags)$
<a href="/.tags/$tags$.html">$tags$</a>$sep$, <a href="/.tags/$tags$.html">$tags$</a>$sep$,
$endfor$ $endfor$
</p> </p>
$body$ <p class="smallText" id="footer"> written by $author$, generated by <a href="https://git.alv.cx/alvierahman90/notes2web">notes2web</a></p>
<details> <details id="commitLog">
<summary> <summary class="smallText">
Commit log (file history) Commit log (file history)
</summary> </summary>
<pre>$filehistory$</pre> <pre>$filehistory$</pre>
</details> </details>
<div>
<p style="font-size: 0.7em;"> page generated by <a href="https://github.com/alvierahman90/notes2web">notes2web</a></p> $body$
</body> </body>

View File

@ -1,9 +1,2 @@
</pre> </pre>
<details>
<summary>
Commit log (file history)
</summary>
<pre>$filehistory$</pre>
</details>
<p style="font-size: 0.7em;"> page generated by <a href="https://github.com/alvierahman90/notes2web">notes2web</a></p>
</body> </body>

View File

@ -7,6 +7,15 @@
</head> </head>
<body> <body>
<div id="header">
<p class="smallText" id="footer"> page generated by <a href="https://git.alv.cx/alvierahman90/notes2web">notes2web</a></p>
<details>
<summary class="smallText">
Commit log (file history)
</summary>
<pre>$filehistory$</pre>
</details>
</div>
<h1>$title$</h1> <h1>$title$</h1>
<p> This file was not rendered by notes2web because it is a plaintext file, not a markdown <p> This file was not rendered by notes2web because it is a plaintext file, not a markdown
file. file.