2012-10-07 11:01:32 -04:00
|
|
|
#!/bin/bash
|
2013-05-25 23:00:05 -04:00
|
|
|
#
|
|
|
|
# Commit template
|
|
|
|
#
|
|
|
|
# Copyright (C) 2013 Mike Gerwitz
|
|
|
|
#
|
|
|
|
# This file is part of repo2html.
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
# #
|
|
|
|
|
2012-10-07 11:01:32 -04:00
|
|
|
cat <<EOF
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
2013-05-23 19:52:07 -04:00
|
|
|
<meta charset="utf-8" />
|
2012-10-07 11:01:32 -04:00
|
|
|
<title>$subject</title>
|
2013-05-19 17:06:53 -04:00
|
|
|
$( [ -n "$html_external_css" ] \
|
|
|
|
&& printf '<link rel="stylesheet" type="text/css" href="%s" />' \
|
|
|
|
"$html_external_css"
|
|
|
|
)
|
2013-01-30 22:37:33 -05:00
|
|
|
<style type="text/css">
|
2013-03-15 16:31:52 -04:00
|
|
|
sup { font-size: 0.6em; }
|
2013-01-30 22:37:33 -05:00
|
|
|
:target { background-color: #fce94f; }
|
2013-05-17 23:13:03 -04:00
|
|
|
p.ref { margin: 0.25em 0em; }
|
|
|
|
$commit_html_inline_css
|
2013-01-30 22:37:33 -05:00
|
|
|
</style>
|
2013-05-17 23:13:03 -04:00
|
|
|
$commit_html_head
|
2012-10-07 11:01:32 -04:00
|
|
|
</head>
|
2013-05-27 16:52:15 -04:00
|
|
|
<body class="${html_body_class:-commit}">
|
2013-05-17 23:13:03 -04:00
|
|
|
<article>
|
|
|
|
<header>
|
|
|
|
<h1 class="subject">$subject</h1>
|
|
|
|
<h2 class="date">$year-$month-$day</h2>
|
|
|
|
</header>
|
2012-10-07 11:01:32 -04:00
|
|
|
|
2013-05-30 21:25:16 -04:00
|
|
|
<div class="content">
|
|
|
|
$( cat )
|
|
|
|
</div>
|
2012-10-07 11:01:32 -04:00
|
|
|
|
2013-05-17 23:13:03 -04:00
|
|
|
<footer>
|
|
|
|
<p>
|
2013-05-27 16:56:15 -04:00
|
|
|
<a href="$url_root#$dategroup">(Return to index)</a>
|
2013-05-17 23:13:03 -04:00
|
|
|
</p>
|
2012-10-07 11:01:32 -04:00
|
|
|
|
2013-05-17 23:13:03 -04:00
|
|
|
<hr />
|
2013-05-19 17:07:29 -04:00
|
|
|
$( [ -n "$html_footer" ] \
|
|
|
|
&& printf '<div class="pre-copyright">%s</div>' "$html_footer"
|
|
|
|
)
|
2013-05-20 06:35:15 -04:00
|
|
|
$( [ -n "$html_commit_footer" ] \
|
|
|
|
&& printf '<div class="pre-copyright">%s</div>' "$html_commit_footer"
|
2013-05-17 23:13:03 -04:00
|
|
|
)
|
2012-10-07 11:01:32 -04:00
|
|
|
|
2013-05-17 23:13:03 -04:00
|
|
|
<div id="copyright">
|
|
|
|
Copyright © $year $copyright.
|
|
|
|
$license
|
|
|
|
</div>
|
2013-05-30 23:15:01 -04:00
|
|
|
<div class="commit-id">$(
|
|
|
|
if [ -n "$repo_commit_url" ]; then
|
|
|
|
printf '<a href="'"$repo_commit_url"'">%s</a>' "$hash" "$hash"
|
|
|
|
elif [ -n "$repo_url" ]; then
|
|
|
|
printf '<a href="%s">%s</a>' "$repo_url" "$hash"
|
|
|
|
else
|
|
|
|
echo "$hash"
|
|
|
|
fi
|
|
|
|
)</div>
|
2013-05-17 23:13:03 -04:00
|
|
|
</footer>
|
|
|
|
</article>
|
2012-10-07 11:01:32 -04:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
EOF
|