# HG changeset patch # User Oleksandr Gavenko # Date 1456139526 -7200 # Node ID 0260f8ffef356b0f1d6094fd3ccf2ce42cc45c86 # Parent f4b078cbff2007806ff90e7213156f0b776a26a2 Generate single HTML build. diff -r f4b078cbff20 -r 0260f8ffef35 Makefile --- a/Makefile Mon Feb 22 13:02:27 2016 +0200 +++ b/Makefile Mon Feb 22 13:12:06 2016 +0200 @@ -98,8 +98,8 @@ .PHONY: html html: $(HTML_FILES) -$(HTML_DIR)/%.html: %.rst HEADER.rst rst.css rst.tmpl $(MAKEFILE_LIST) | $(HTML_DIR) - $(RST2HTML) $(RST_FLAGS) --stylesheet=rst.css --template=rst.tmpl $*.rst $@ +$(HTML_DIR)/%.html: %.rst HEADER.rst rst.css rst-multi.css rst.tmpl $(MAKEFILE_LIST) | $(HTML_DIR) + $(RST2HTML) $(RST_FLAGS) --stylesheet=rst.css,rst-multi.css --template=rst.tmpl $*.rst $@ $(HTML_DIR)/iframe.html: $(RST_FILES) $(MAKEFILE_LIST) | $(HTML_DIR) { \ @@ -120,10 +120,6 @@ HEADER.rst: $(MAKEFILE_LIST) { \ -echo '.. raw:: html'; \ -echo; \ -echo ' '; \ -echo; \ echo '.. _About: README.html'; \ echo '.. _`Contacts`: http://resume.defun.work/'; \ echo '.. _`Oleksandr Gavenko`: http://resume.defun.work/'; \ @@ -160,6 +156,20 @@ $(HTML_DIR)/chm.hhc: chm-hhc.sh $(MAKEFILE_LIST) | $(HTML_DIR) ./chm-hhc.sh >$@ +.PHONY: single-html +single-html: $(HTML_DIR)/single.html + +$(HTML_DIR)/single.html: $(HTML_DIR)/single.rest rst.css rst-single.css $(RST_FILES) + $(RST2HTML) $(RST_FLAGS) --stylesheet=rst.css,rst-single.css $(HTML_DIR)/single.rest $@ + +$(HTML_DIR)/single.rest: $(RST_FILES) $(MAKEFILE_LIST) + { \ +echo ".. contents::"; \ +echo " :local:"; \ +echo; \ +for f in *.rst; do echo ".. include:: ../$$f"; done; \ +} >$@ + ################################################################ # Init targets. diff -r f4b078cbff20 -r 0260f8ffef35 rst-multi.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rst-multi.css Mon Feb 22 13:12:06 2016 +0200 @@ -0,0 +1,29 @@ +iframe { + overflow: hidden; +} +.document { + max-width: 800px; + margin: .5em auto; + padding-left: 210px; + padding-right: 10px; + overflow: hidden; +} +#sidebar { position: fixed; } +iframe { border: none; } +#sidebar, iframe { + top: 0; + left: 0; + width: 200px; + height: 100%; +} +@media (max-width: 780px) { + .document { + margin: 5px 10px 1em 10px; + padding: 0; + } + #sidebar { position: inherit; } + #sidebar, iframe { + width: 100%; + height: 7em; + } +} diff -r f4b078cbff20 -r 0260f8ffef35 rst-single.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rst-single.css Mon Feb 22 13:12:06 2016 +0200 @@ -0,0 +1,10 @@ +.document { + max-width: 800px; + margin: .5em auto; +} +@media (max-width: 780px) { + .document { + margin: 5px 10px 1em 10px; + padding: 0; + } +} diff -r f4b078cbff20 -r 0260f8ffef35 rst.css --- a/rst.css Mon Feb 22 13:02:27 2016 +0200 +++ b/rst.css Mon Feb 22 13:12:06 2016 +0200 @@ -2,35 +2,6 @@ margin: 0px; padding: 0px; } -iframe { - overflow: hidden; -} -.document { - max-width: 800px; - margin: .5em auto; - padding-left: 210px; - padding-right: 10px; - overflow: hidden; -} -#sidebar { position: fixed; } -iframe { border: none; } -#sidebar, iframe { - top: 0; - left: 0; - width: 200px; - height: 100%; -} -@media (max-width: 780px) { - .document { - margin: 5px 10px 1em 10px; - padding: 0; - } - #sidebar { position: inherit; } - #sidebar, iframe { - width: 100%; - height: 7em; - } -} .header { font-size: 1.2em; diff -r f4b078cbff20 -r 0260f8ffef35 rst.tmpl --- a/rst.tmpl Mon Feb 22 13:02:27 2016 +0200 +++ b/rst.tmpl Mon Feb 22 13:12:06 2016 +0200 @@ -5,6 +5,7 @@ %(head)s %(stylesheet)s %(body_prefix)s + %(body_pre_docinfo)s %(docinfo)s %(body)s