From 666c2451abfb465104f9537f6b9e3fef18b6fe3e Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 6 Sep 2013 10:34:44 +0530 Subject: [PATCH] [docs] bold h4s --- core/doctype/documentation_tool/docs.css | 4 ++++ .../documentation_tool/documentation_tool.py | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/core/doctype/documentation_tool/docs.css b/core/doctype/documentation_tool/docs.css index 7f31737a94..add040b063 100644 --- a/core/doctype/documentation_tool/docs.css +++ b/core/doctype/documentation_tool/docs.css @@ -13,6 +13,10 @@ h1, h2, h3, h4, .navbar { font-family: "Open Sans", Sans-Serif; } +h1, h2, h3, h4, h5 { + font-weight: bold; +} + img { max-width: 100%; } diff --git a/core/doctype/documentation_tool/documentation_tool.py b/core/doctype/documentation_tool/documentation_tool.py index 8a932a4789..b052672ced 100644 --- a/core/doctype/documentation_tool/documentation_tool.py +++ b/core/doctype/documentation_tool/documentation_tool.py @@ -6,7 +6,7 @@ from __future__ import unicode_literals import webnotes -import inspect, os, json, datetime +import inspect, os, json, datetime, shutil from jinja2 import Environment, FileSystemLoader from webnotes.modules import get_doc_path, get_module_path, scrub from webnotes.utils import get_path, get_base_path @@ -356,11 +356,14 @@ def update_readme(mydocs, module, doctype=None, name=None): mydocs["_intro"] = readmefile.read() mydocs["_modified"] = get_timestamp(readme_path) -def prepare_docs(): +def prepare_docs(force=False): os.chdir(get_path("public")) if not os.path.exists("docs"): os.mkdir("docs") - + + if force: + shutil.rmtree("docs/css") + if not os.path.exists("docs/css"): os.mkdir("docs/css") os.mkdir("docs/css/font") @@ -380,12 +383,18 @@ def prepare_docs(): os.system("cp ../lib/core/doctype/documentation_tool/docs.css docs/css") + if force: + shutil.rmtree("docs/js") + if not os.path.exists("docs/js"): os.mkdir("docs/js") os.system("cp ../lib/public/js/lib/bootstrap.min.js docs/js") os.system("cp ../lib/public/js/lib/jquery/jquery.min.js docs/js") os.system("cp ../lib/public/js/lib/prism.js docs/js") + if force: + os.remove("docs/img/splash.svg") + if not os.path.exists("docs/img/splash.svg"): if not os.path.exists("docs/img"): os.mkdir("docs/img")