Added commit_html_* references to commit template, along with classes to support additional styling
This allows for simple configuration of the commit template. The intended use is to either use a configuation script to export these values, or set a custom template path and have the commit template set the values before exec'ing or otherwise running the default script. The template also now makes use of HTML5 tags, such as <article>.master
parent
397d8837a9
commit
67bd586ecd
2
msgfmt
2
msgfmt
|
@ -91,7 +91,7 @@ awk -vid="$id" -vurl_root="$url_root" -vcref_errlog="$cref_errlog" '
|
|||
s#<a href="\([^"]\+\)\([.;,!]\)">\([^<]\+\).</a>#<a href="\1">\3</a>\2#g;
|
||||
|
||||
# reference definitions (footnotes)
|
||||
s#\n\[\([0-9]\+\)\]#</p><p id="ref-\1">&#g;
|
||||
s#\n\[\([0-9]\+\)\]#</p><p id="ref-\1" class="ref">&#g;
|
||||
|
||||
# references in text (note that references that enclose text as a hyperlink
|
||||
# must not start with a number, otherwise they will be considered to be a
|
||||
|
|
36
tpl/commit
36
tpl/commit
|
@ -7,27 +7,37 @@ cat <<EOF
|
|||
<style type="text/css">
|
||||
sup { font-size: 0.6em; }
|
||||
:target { background-color: #fce94f; }
|
||||
p.ref { margin: 0.25em 0em; }
|
||||
$commit_html_inline_css
|
||||
</style>
|
||||
$commit_html_head
|
||||
</head>
|
||||
<body>
|
||||
<h1>$subject</h1>
|
||||
<h2>$year-$month-$day</h2>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="subject">$subject</h1>
|
||||
<h2 class="date">$year-$month-$day</h2>
|
||||
</header>
|
||||
|
||||
<div id="body">
|
||||
$( cat )
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<a href="$path_root#$dategroup">(Return to index)</a>
|
||||
</p>
|
||||
<footer>
|
||||
<p>
|
||||
<a href="$path_root#$dategroup">(Return to index)</a>
|
||||
</p>
|
||||
|
||||
<hr />
|
||||
<footer>
|
||||
Copyright © $year $copyright.
|
||||
$license
|
||||
<hr />
|
||||
$( [ -n "$commit_html_footer" ] \
|
||||
&& printf '<div class="pre-copyright">%s</div>' "$commit_html_footer"
|
||||
)
|
||||
|
||||
<div>$hash</div>
|
||||
</footer>
|
||||
<div id="copyright">
|
||||
Copyright © $year $copyright.
|
||||
$license
|
||||
</div>
|
||||
<div class="commit-id">$hash</div>
|
||||
</footer>
|
||||
</article>
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
|
|
Loading…
Reference in New Issue