From cc0ce6f00d69031477823b3f36f3c7cc71cb5ed1 Mon Sep 17 00:00:00 2001 From: "richard.m.tew@gmail.com" Date: Tue, 9 Jun 2015 11:29:37 +1200 Subject: [PATCH] Various cleanup and fixes to get the ebooks to generate cleanly. --- gensite.py | 3 +++ templates/ebook/base.html | 15 ++++++--------- templates/ebook/css/style-ebook.css | 7 +++---- templates/issue/base.html | 2 +- templates/issue/toc.html | 12 +++++++++++- templates/website/base.html | 12 ++++++------ templates/website/css/style.css | 22 ---------------------- 7 files changed, 30 insertions(+), 43 deletions(-) diff --git a/gensite.py b/gensite.py index ffb5e7b..24dd571 100644 --- a/gensite.py +++ b/gensite.py @@ -139,6 +139,7 @@ def init_template_data(tp): tp.key = None tp.full_url = tp.page_permanent_id.replace("website/", "http://"+ setting_domain_name +"/") tp.target_is_online = (setting_generation_target & FLAG_ONLINE) == FLAG_ONLINE + tp.target_is_website = (setting_generation_target & TARGET_WEBSITE) == TARGET_WEBSITE tp.sections = TemplateParameters() @@ -600,6 +601,8 @@ if __name__ == "__main__": generate_website() elif (setting_generation_target & TARGET_EBOOK) == TARGET_EBOOK: generate_issues(issue_data) + # --disable-font-rescaling --margin-bottom=72 --margin-top=72 --margin-left=72 --margin-right=72 --chapter=/ --page-breaks-before=/ --chapter-mark=rule + # C:\RMT\VCS\GIT\Web\imaginary-realities>"c:\Program Files (x86)\Calibre2\ebook-convert.exe" ebooks\volume-07\issue-02\index.html issue.epub --disable-font-rescaling --margin-bottom=72 --margin-top=72 --margin-left=72 --margin-right=72 --chapter=/ --page-breaks-before=/ --chapter-mark=rule --output-profile=default --input-profile=default --preserve-cover-aspect-ratio --pretty-print if not setting_finalise: print "WARNING: Results are not finalised, published result should be finalised." diff --git a/templates/ebook/base.html b/templates/ebook/base.html index 5739083..359339e 100644 --- a/templates/ebook/base.html +++ b/templates/ebook/base.html @@ -1,16 +1,13 @@ - - + - - + + - - - - + + + {% block extra_head_content %}{% endblock%} - {{tp.website_title_text}} - {% block page_title %}{% endblock %} diff --git a/templates/ebook/css/style-ebook.css b/templates/ebook/css/style-ebook.css index bab6d4b..ddae1e6 100644 --- a/templates/ebook/css/style-ebook.css +++ b/templates/ebook/css/style-ebook.css @@ -4,7 +4,6 @@ body { background-color: white; } -div.text-read-issue { - visibility: hidden; -} - +.row-link { + height: inherit; +} \ No newline at end of file diff --git a/templates/issue/base.html b/templates/issue/base.html index 7c56f63..307079d 100644 --- a/templates/issue/base.html +++ b/templates/issue/base.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% block extra_head_content %} - + {% endblock%} {% block header_subtitle %}
Volume {{tp.volume_number}}, Issue {{tp.issue_number}}
{% endblock %} {% block page_menu %} diff --git a/templates/issue/toc.html b/templates/issue/toc.html index 4e63fc2..0413045 100644 --- a/templates/issue/toc.html +++ b/templates/issue/toc.html @@ -3,6 +3,7 @@ Main SiteContribute An Article {% endblock %} {% block page_content %} +{% if tp.target_is_website %}
{{tp.logo_text}} @@ -15,9 +16,11 @@

-
+{% endif %} +
+{% if tp.target_is_website %}
@@ -39,6 +42,13 @@ +{% else %} +
    +{% for article in tp.issue.articles %} +
  1. {{article.title}}
  2. +{% endfor %} +
+{% endif %} {% endblock %} diff --git a/templates/website/base.html b/templates/website/base.html index 55bd295..9158754 100644 --- a/templates/website/base.html +++ b/templates/website/base.html @@ -2,13 +2,13 @@ - - + + - - - - + + + + {% block extra_head_content %}{% endblock%} diff --git a/templates/website/css/style.css b/templates/website/css/style.css index a6cc320..603d695 100644 --- a/templates/website/css/style.css +++ b/templates/website/css/style.css @@ -406,28 +406,6 @@ footer .section a:hover { padding: 0 10px 0 10px; } -.main { - /* set a min-height and a z-index to be sure that the main element completely covers the lateral menu */ - z-index: 800; - /* Force Hardware Acceleration in WebKit */ - -webkit-transform: translateZ(0); - -webkit-backface-visibility: hidden; - -webkit-transition-property: -webkit-transform; - -moz-transition-property: -moz-transform; - transition-property: transform; - -webkit-transition-duration: 0.4s; - -moz-transition-duration: 0.4s; - transition-duration: 0.4s; -} -.main.lateral-menu-is-open { - /* translate to show the lateral menu - all content needs to be put in the .cd-main-content to translate*/ - -webkit-transform: translateX(-260px); - -moz-transform: translateX(-260px); - -ms-transform: translateX(-260px); - -o-transform: translateX(-260px); - transform: translateX(-260px); -} - .rcaptionblock { display: inline; float: right;