Beautify things

This commit is contained in:
Anatoliy Chakkaev 2013-03-26 23:34:01 +04:00
parent 58e2349575
commit 5e24bd960f
2 changed files with 10 additions and 8 deletions

View File

@ -28,7 +28,7 @@ docs/man/%.3: docs/%.md scripts/doc.sh
docs/html/%.3.html: docs/%.md scripts/doc.sh docs/footer.html docs/html/%.3.html: docs/%.md scripts/doc.sh docs/footer.html
scripts/doc.sh $< $@ scripts/doc.sh $< $@
docs/html/index.html: docs/jugglingdb.md scripts/doc.sh docs/html/index.html: docs/jugglingdb.md scripts/doc.sh docs/footer.html
scripts/doc.sh $< $@ scripts/doc.sh $< $@
man: $(MAN_DOCS) man: $(MAN_DOCS)

View File

@ -1,15 +1,17 @@
<script> <script>
var filename = location.href.match(/([^\/]+)?\.3.html(#.*?)?$/)[1]; var filename = location.href.match(/([^\/]+)?\.3.html(#.*?)?$/);
var div = document.createElement('div'); if (filename) {
div.innerHTML = 'Found a typo? ' + var div = document.createElement('div');
linkTo('View', 'blob') + ' and ' + div.innerHTML = 'Found a typo? ' +
linkTo('edit', 'edit') + ' this file online at GitHub.'; linkTo('View', 'blob') + ' and ' +
linkTo('edit', 'edit') + ' this file online at GitHub.';
document.getElementById('man').appendChild(div); document.getElementById('man').appendChild(div);
}
function linkTo(text, dir) { function linkTo(text, dir) {
return '<a href="https://github.com/1602/jugglingdb/' + return '<a href="https://github.com/1602/jugglingdb/' +
dir + '/master/docs/' + filename + '.md">' + text + '</a>'; dir + '/master/docs/' + filename[1] + '.md">' + text + '</a>';
} }
addLink('h3', '&para;'); addLink('h3', '&para;');