changeset 83:41a9c64f3fb7

Clean up after moving cooking.rst from tips project. Remove iframe, fix build.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Tue, 23 Aug 2016 22:40:02 +0300
parents 79761f22308d
children 898facea8832
files Makefile index.rst www/rst-multi.css www/rst.css www/rst.tmpl
diffstat 5 files changed, 17 insertions(+), 65 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sat Aug 13 22:32:42 2016 +0300
+++ b/Makefile	Tue Aug 23 22:40:02 2016 +0300
@@ -44,8 +44,7 @@
 
 HTML_DIR := tips-html
 RST_HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES))
-HTML_FILES := $(RST_HTML_FILES) \
-        $(HTML_DIR)/index.html $(HTML_DIR)/iframe.html
+HTML_FILES := $(RST_HTML_FILES)
 
 CHM_FILES := $(addprefix $(HTML_DIR)/,chm.hhp chm.hhc chm.stp)
 
@@ -105,29 +104,9 @@
 $(HTML_DIR)/%.html: %.rst www/rst.css www/rst-multi.css $(HTML_DIR)/rst.tmpl $(MAKEFILE_LIST) | $(HTML_DIR)
 	$(RST2HTML) $(RST_FLAGS) --stylesheet=www/rst.css,www/rst-multi.css --template=$(HTML_DIR)/rst.tmpl $*.rst $@
 
-$(HTML_DIR)/iframe.html: $(RST_FILES) $(MAKEFILE_LIST) | $(HTML_DIR)
-	{ \
-echo '<html><head>'; \
-echo '<meta charset="utf-8">'; \
-echo '<style>'; \
-echo 'a { text-decoration: none; color: hsl(240, 100%, 50%); }'; \
-echo 'a:hover { opacity: .5; }'; \
-echo '</style></head><body>'; \
-echo '<ul style="padding-left: 1em;">'; \
-for f in $(sort $(RST_FILES)); do \
-  n=$${f%.rst}; \
-  printf '<li><a target="_parent" href="%s.html">%s</a></li>\n' $$n $$n; \
-done; \
-echo '</ul>'; \
-echo '</body></html>'; \
-} >$@
-
 $(HTML_DIR)/rst.tmpl: www/rst.tmpl $(MAKEFILE_LIST) | $(HTML_DIR)
 	sed -e "s|{date}|$$(date +%F)|" -e "s|{rev}|$$(hg id -i)|"  <$< >$@
 
-$(HTML_DIR)/index.html: $(HTML_DIR)/README.html $(MAKEFILE_LIST) | $(HTML_DIR)
-	cp $< $@
-
 .PHONY: chm
 chm: html $(CHM_FILES) $(HTML_DIR)/iframe.html
 	cd $(HTML_DIR); for file in *.html; do sed -i '/<\?xml.*\?>/d' $$file; done
@@ -159,7 +138,7 @@
 	{ \
 echo '<?xml version="1.0" encoding="UTF-8"?>'; \
 echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; \
-for f in *.rst iframe; do \
+for f in $(RST_FILES); do \
   echo '<url>'; \
   echo "  <loc>http://$(WWW_SRV_NAME)/$${f%.rst}.html</loc>"; \
   echo '  <changefreq>weekly</changefreq>'; \
--- a/index.rst	Sat Aug 13 22:32:42 2016 +0300
+++ b/index.rst	Tue Aug 23 22:40:02 2016 +0300
@@ -3,11 +3,14 @@
 ==========
  Рецепты.
 ==========
+
+Сборик рецептов от Oleksandr Gavenko.
+
 .. contents::
    :local:
 
-Блинчики.
-=========
+Блинчики
+========
 
  * 7 ложек пшеничной муки (с горкой) для тонких нежных, 9 ложек для прочных
  * 2 куриных яйца
--- a/www/rst-multi.css	Sat Aug 13 22:32:42 2016 +0300
+++ b/www/rst-multi.css	Tue Aug 23 22:40:02 2016 +0300
@@ -1,29 +1,13 @@
-iframe {
-    overflow: hidden;
-}
 .document {
     max-width: 800px;
     margin: .5em auto;
-    padding-left: 190px;
+    padding-left: 10px;
     padding-right: 10px;
     overflow: hidden;
 }
-#sidebar { position: fixed; }
-iframe { border: none; }
-#sidebar, iframe {
-    top: 0;
-    left: 0;
-    width: 180px;
-    height: 100%;
-}
 @media (max-width: 780px) {
     .document {
         margin: 5px 10px 1em 10px;
         padding: 0;
     }
-    #sidebar { position: inherit; }
-    #sidebar, iframe {
-        width: 100%;
-        height: 7em;
-    }
 }
--- a/www/rst.css	Sat Aug 13 22:32:42 2016 +0300
+++ b/www/rst.css	Tue Aug 23 22:40:02 2016 +0300
@@ -3,13 +3,10 @@
     padding: 0px;
 }
 
-.header {
-    font-size: 1.2em;
+footer {
+    font-size: 0.8em;
     text-align: center;
 }
-.header.small {
-    font-size: 0.8em;
-}
 
 div.contents ul {
     max-width: 600px;
@@ -31,13 +28,6 @@
     color: hsl(0, 100%, 25%);
 }
 h1 { text-align: center; }
-div > p:first-child:first-letter,
-h2 + p:first-letter,
-h3 + p:first-letter,
-h4 + p:first-letter,
-h5 + p:first-letter {
-    font-weight: bold;
-}
 
 blockquote {
     margin: 1em 0;
--- a/www/rst.tmpl	Sat Aug 13 22:32:42 2016 +0300
+++ b/www/rst.tmpl	Tue Aug 23 22:40:02 2016 +0300
@@ -7,18 +7,14 @@
 <meta name="generator" content="Docutils %(version)s: http://docutils.sourceforge.net/"/>
 %(stylesheet)s
 %(body_prefix)s
-  <div id="sidebar"><iframe src="iframe.html"></iframe></div>
-  <div class="header container">
-      [ <a class="reference external" href="README.html">About</a>
-      | <a class="reference external" href="README.html#tips-licence">Licence</a>
-      | <a class="reference external" href="http://resume.defun.work/">Contacts</a> ]
-  </div>
-  <div class="header small container">
-      Written by Oleksandr Gavenko (AKA gavenkoa),
-      compiled on <tt class="docutils literal"><span class="pre">{date}</span></tt>
-      from rev <tt class="docutils literal">{rev}</tt>.
-  </div>
 %(body_pre_docinfo)s
 %(docinfo)s
 %(body)s
+  <footer>
+      <p>Рецепты повседневно используются мною.</p>
+      <p>Материал разрешается использовать в любых целях.</p>
+      <p>Автор <a href="http://resume.defun.work/">Oleksandr Gavenko</a>,
+        собрано <tt class="docutils literal"><span class="pre">{date}</span></tt>
+        с ревизии <tt class="docutils literal">{rev}</tt>.</p>
+  </footer>
 %(body_suffix)s