summaryrefslogtreecommitdiffstats
path: root/doc/global/qt-html-templates-offline-simple.qdocconf
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@digia.com>2015-08-31 12:13:01 +0200
committerTopi Reiniƶ <topi.reinio@digia.com>2015-10-19 08:22:19 +0000
commit06d90c14b4571184c4ae67067ead9292c94ac026 (patch)
tree4040e9d34ce57c3749f4dc8f6f146d242e2b043a /doc/global/qt-html-templates-offline-simple.qdocconf
parentafcc26619f642baee9a09151dc8dae5ef2cb9e2e (diff)
Doc: A simplified style for rendering docs with QTextBrowser
Add a new documentation template, with simplified CSS rules that work better when using QTextBrowser as a backend for Qt Assistant or Qt Creator Help. Select this new template by default for offline documentation builds, but keep the old offline template as part of the template files; use JavaScript to switch to the 'standard' CSS when the generated files are viewed with a web browser. Task-number: QTBUG-48322 Change-Id: Ib197896200bb482935f6e9f3a38976133a1e804d Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Diffstat (limited to 'doc/global/qt-html-templates-offline-simple.qdocconf')
-rw-r--r--doc/global/qt-html-templates-offline-simple.qdocconf40
1 files changed, 40 insertions, 0 deletions
diff --git a/doc/global/qt-html-templates-offline-simple.qdocconf b/doc/global/qt-html-templates-offline-simple.qdocconf
new file mode 100644
index 0000000000..b19bdd513f
--- /dev/null
+++ b/doc/global/qt-html-templates-offline-simple.qdocconf
@@ -0,0 +1,40 @@
+#include standard set of HTML header and footer.
+include(html-config.qdocconf)
+include(html-header-offline.qdocconf)
+include(html-footer.qdocconf)
+
+# Uncomment if navigation bar is not wanted
+#HTML.nonavigationbar = "true"
+
+# Specify a custom CSS file used by this template
+HTML.stylesheets += template/style/offline-simple.css
+qhp.extraFiles += style/offline-simple.css
+
+# override the header styles
+HTML.headerstyles = \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline-simple.css\" />\n" \
+ " <script type=\"text/javascript\">\n" \
+ " window.onload = function(){document.getElementsByTagName(\"link\").item(0).setAttribute(\"href\", \"style/offline.css\");};\n" \
+ " </script>\n"
+
+HTML.postheader = \
+ "<body>\n" \
+ "<div class=\"header\" id=\"qtdocheader\">\n"\
+ " <div class=\"main\">\n" \
+ " <div class=\"main-rounded\">\n" \
+ " <div class=\"navigationbar\">\n" \
+ " <table><tr>\n"
+
+HTML.postpostheader = \
+ " </tr></table>\n"\
+ " </div>\n" \
+ " </div>\n" \
+ "<div class=\"content\">\n" \
+ "<div class=\"line\">\n" \
+ "<div class=\"content mainContent\">\n"
+
+# Add some padding around code snippets, as we cannot
+# currectly style them for QTextBrowser using only CSS.
+codeindent = 2
+codeprefix = "\n\n"
+codesuffix = "\n\n"