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;
|
s#<a href="\([^"]\+\)\([.;,!]\)">\([^<]\+\).</a>#<a href="\1">\3</a>\2#g;
|
||||||
|
|
||||||
# reference definitions (footnotes)
|
# 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
|
# 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
|
# must not start with a number, otherwise they will be considered to be a
|
||||||
|
|
24
tpl/commit
24
tpl/commit
|
@ -7,27 +7,37 @@ cat <<EOF
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
sup { font-size: 0.6em; }
|
sup { font-size: 0.6em; }
|
||||||
:target { background-color: #fce94f; }
|
:target { background-color: #fce94f; }
|
||||||
|
p.ref { margin: 0.25em 0em; }
|
||||||
|
$commit_html_inline_css
|
||||||
</style>
|
</style>
|
||||||
|
$commit_html_head
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>$subject</h1>
|
<article>
|
||||||
<h2>$year-$month-$day</h2>
|
<header>
|
||||||
|
<h1 class="subject">$subject</h1>
|
||||||
|
<h2 class="date">$year-$month-$day</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
<div id="body">
|
|
||||||
$( cat )
|
$( cat )
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<footer>
|
||||||
<p>
|
<p>
|
||||||
<a href="$path_root#$dategroup">(Return to index)</a>
|
<a href="$path_root#$dategroup">(Return to index)</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<footer>
|
$( [ -n "$commit_html_footer" ] \
|
||||||
|
&& printf '<div class="pre-copyright">%s</div>' "$commit_html_footer"
|
||||||
|
)
|
||||||
|
|
||||||
|
<div id="copyright">
|
||||||
Copyright © $year $copyright.
|
Copyright © $year $copyright.
|
||||||
$license
|
$license
|
||||||
|
</div>
|
||||||
<div>$hash</div>
|
<div class="commit-id">$hash</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
</article>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in New Issue