From 8d612570c86b68b54e4b2350a840ff984860f11c Mon Sep 17 00:00:00 2001 From: miloyip Date: Mon, 7 Jul 2014 19:15:10 +0800 Subject: [PATCH] Revise doxygen style Imitate readthedocs --- build/Doxyfile | 20 ++-- doc/dom.md | 2 +- doc/encoding.md | 2 +- doc/faq.md | 2 +- doc/features.md | 2 +- doc/internals.md | 2 +- doc/misc/DoxygenLayout.xml | 194 +++++++++++++++++++++++++++++++++++++ doc/misc/doxygenextra.css | 84 +++++++++++++++- doc/misc/footer.html | 9 ++ doc/misc/header.html | 28 ++++++ doc/performance.md | 2 +- doc/sax.md | 2 +- doc/stream.md | 2 +- doc/tutorial.md | 2 +- 14 files changed, 337 insertions(+), 16 deletions(-) create mode 100644 doc/misc/DoxygenLayout.xml create mode 100644 doc/misc/footer.html create mode 100644 doc/misc/header.html diff --git a/build/Doxyfile b/build/Doxyfile index 59f5f60..a050304 100644 --- a/build/Doxyfile +++ b/build/Doxyfile @@ -766,7 +766,15 @@ WARN_LOGFILE = INPUT = ./include/ \ ./readme.md \ - ./doc/ + ./doc/features.md \ + ./doc/tutorial.md \ + ./doc/stream.md \ + ./doc/encoding.md \ + ./doc/dom.md \ + ./doc/sax.md \ + ./doc/performance.md \ + ./doc/internals.md \ + ./doc/faq.md # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -1027,7 +1035,7 @@ CLANG_OPTIONS = # classes, structs, unions or interfaces. # The default value is: YES. -ALPHABETICAL_INDEX = YES +ALPHABETICAL_INDEX = BI # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in # which the alphabetical index list will be split. @@ -1086,7 +1094,7 @@ HTML_FILE_EXTENSION = .html # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_HEADER = +HTML_HEADER = ./doc/misc/header.html # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard @@ -1096,7 +1104,7 @@ HTML_HEADER = # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = +HTML_FOOTER = ./doc/misc/footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of @@ -1387,7 +1395,7 @@ ECLIPSE_DOC_ID = org.doxygen.Project # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -DISABLE_INDEX = NO +DISABLE_INDEX = YES # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag @@ -1404,7 +1412,7 @@ DISABLE_INDEX = NO # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -GENERATE_TREEVIEW = NO +GENERATE_TREEVIEW = YES # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. diff --git a/doc/dom.md b/doc/dom.md index 9cbc13b..1195b7a 100644 --- a/doc/dom.md +++ b/doc/dom.md @@ -1,4 +1,4 @@ -# RapidJSON DOM +# DOM Document Object Model(DOM) is a in-memory representation of JSON for query and manipulation. The basic usage of DOM is described in [Tutorial](tutorial.md). This section will describe some details and more advanced usages. diff --git a/doc/encoding.md b/doc/encoding.md index 8e6af13..0f04787 100644 --- a/doc/encoding.md +++ b/doc/encoding.md @@ -1,4 +1,4 @@ -# RapidJSON Encoding +# Encoding ## Unicode diff --git a/doc/faq.md b/doc/faq.md index 8476472..46eb967 100644 --- a/doc/faq.md +++ b/doc/faq.md @@ -1,4 +1,4 @@ -# RapidJSON FAQ +# FAQ ## General diff --git a/doc/features.md b/doc/features.md index 3cc6309..e73df88 100644 --- a/doc/features.md +++ b/doc/features.md @@ -1,4 +1,4 @@ -# RapidJSON Features +# Features ## General diff --git a/doc/internals.md b/doc/internals.md index 2573369..356bbb9 100644 --- a/doc/internals.md +++ b/doc/internals.md @@ -1,4 +1,4 @@ -# RapidJSON Internals +# Internals This section records some design and implementation details. diff --git a/doc/misc/DoxygenLayout.xml b/doc/misc/DoxygenLayout.xml new file mode 100644 index 0000000..b7c9586 --- /dev/null +++ b/doc/misc/DoxygenLayout.xml @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/misc/doxygenextra.css b/doc/misc/doxygenextra.css index fa01774..48b02f5 100644 --- a/doc/misc/doxygenextra.css +++ b/doc/misc/doxygenextra.css @@ -17,7 +17,11 @@ body, table, div, p, dl { font-style: normal; font-variant: normal; font-weight: normal; - line-height: 25.5px; + line-height: 25.5px; +} + +body { + background-color: #eee; } div.header { @@ -67,6 +71,12 @@ pre.fragment { line-height: 19px; } +#doc-content { + background-color: #fff; + width: 918px; + height: auto !important; +} + div.contents { width: 858px; margin: 30px; @@ -114,3 +124,75 @@ div.fragment { margin: 0px 0px 13px 0px; padding: 2px; } + +/* side bar and search */ + +#side-nav +{ + padding: 10px 0px 20px 20px; + border-top: 60px solid #2980b9; + background-color: #343131; + /*height: 100% !important;*/ + position: fixed +} + +#nav-tree +{ + background-color: transparent; + background-image: none; + height: 100% !important; +} + +#nav-tree .label +{ + font-family: Helvetica, arial, freesans, clean, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol'; + line-height: 25.5px; + font-size: 15px; +} + +#nav-tree +{ + color: #b3b3b3; +} + +#nav-tree .selected { + background-image: none; +} + +#nav-tree a +{ + color: #b3b3b3; +} + +#MSearchBox +{ + margin: 20px; + right: auto; + position: fixed; + width: 220px; +} + +#MSearchField +{ + width: 161px; +} + +#MSearchResultsWindow +{ + left: 45px !important; +} + +#nav-sync +{ + display: none; +} + +.ui-resizable .ui-resizable-handle +{ + width: 0px; +} + +#nav-path +{ + display: none; +} diff --git a/doc/misc/footer.html b/doc/misc/footer.html new file mode 100644 index 0000000..0984145 --- /dev/null +++ b/doc/misc/footer.html @@ -0,0 +1,9 @@ + + + + + diff --git a/doc/misc/header.html b/doc/misc/header.html new file mode 100644 index 0000000..51ab127 --- /dev/null +++ b/doc/misc/header.html @@ -0,0 +1,28 @@ + + + + + + + +$projectname: $title +$title + + + +$treeview +$search +$mathjax + +$extrastylesheet + + +
+ + + + + +
$searchbox
+ + diff --git a/doc/performance.md b/doc/performance.md index c9c9ae4..67eea11 100644 --- a/doc/performance.md +++ b/doc/performance.md @@ -1,4 +1,4 @@ -# RapidJSON Performance +# Performance The old performance article for RapidJSON 0.1 is provided [here](https://code.google.com/p/rapidjson/wiki/Performance). diff --git a/doc/sax.md b/doc/sax.md index b4a663a..6442b6b 100644 --- a/doc/sax.md +++ b/doc/sax.md @@ -1,4 +1,4 @@ -# RapidJSON SAX +# SAX ## Reader diff --git a/doc/stream.md b/doc/stream.md index 84d58bc..46d404c 100644 --- a/doc/stream.md +++ b/doc/stream.md @@ -1,4 +1,4 @@ -# RapidJSON Stream +# Stream In RapidJSON, `rapidjson::Stream` is a concept for reading/writing JSON. Here we first show how to use streams provided. And then see how to create a custom streams. diff --git a/doc/tutorial.md b/doc/tutorial.md index 721e747..b58c097 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -1,4 +1,4 @@ -# RapidJSON Tutorial +# Tutorial This tutorial introduces the basics of the Document Object Model(DOM) API.