1
0
Fork 0
repo2html/tpl/index

43 lines
1.0 KiB
Plaintext
Raw Normal View History

#!/bin/bash
cat <<EOH
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="alternate" title="RSS Feed"
href="rss.xml" type="application/rss+xml" />
$( [ -n "$html_external_css" ] \
&& printf '<link rel="stylesheet" type="text/css" href="%s" />' \
"$html_external_css"
)
<title>$title</title>
</head>
<body>
<header>
<h1 class="title">$title</h1>
<h2 class="desc">$desc</h2>
</header>
2013-05-25 11:10:14 -04:00
$html_pre_index
EOH
# generate index and populate statistical vars
do-index
cat <<EOF
<footer>
<div id="rss"><a href="rss.xml">RSS</a></div>
<hr />
$( [ -n "$html_footer" ] \
&& printf '<div class="pre-copyright">%s</div>' "$html_footer"
)
$( [ -n "$html_index_footer" ] \
&& printf '<div class="pre-copyright">%s</div>' "$html_index_footer"
)
<div>Copyright &copy; $yearrange $copyright</div>
<div>Last Updated: $( ./tsdate "$lastts" '%F %H:%M:%S' )</div>
<div class="commit-id">$lasthash</div>
</footer>
</body>
</html>
EOF