1
0
Fork 0

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
Mike Gerwitz 2013-05-17 23:13:03 -04:00
parent 397d8837a9
commit 67bd586ecd
No known key found for this signature in database
GPG Key ID: F22BB8158EE30EAB
2 changed files with 24 additions and 14 deletions

2
msgfmt
View File

@ -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

View File

@ -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 &copy; $year $copyright. Copyright &copy; $year $copyright.
$license $license
</div>
<div>$hash</div> <div class="commit-id">$hash</div>
</footer> </footer>
</article>
</body> </body>
</html> </html>
EOF EOF