diff --git a/doc/manual/source/conf.py b/doc/manual/source/conf.py index 5c7cf4e9d..db947637e 100644 --- a/doc/manual/source/conf.py +++ b/doc/manual/source/conf.py @@ -91,7 +91,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'ns3_sphinx_theme' +html_theme = 'ns3_html_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/doc/models/source/conf.py b/doc/models/source/conf.py index b07d07bcd..e9fa37bc1 100644 --- a/doc/models/source/conf.py +++ b/doc/models/source/conf.py @@ -91,7 +91,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'ns3_sphinx_theme' +html_theme = 'ns3_html_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -99,7 +99,7 @@ html_theme = 'ns3_sphinx_theme' #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = ['../../'] +html_theme_path = ['../..'] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". diff --git a/doc/ns3_html_theme/README.rst b/doc/ns3_html_theme/README.rst new file mode 100644 index 000000000..1b5671f97 --- /dev/null +++ b/doc/ns3_html_theme/README.rst @@ -0,0 +1,85 @@ +.. ns3-theme documentation master file, created by + sphinx-quickstart on Fri Jun 15 12:53:37 2012. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + + +The files in this directory customize the Doxygen and Sphinx +layout and rendering to give a common look. + + +Design +------ + +The basic color scheme is taken from the ns3 homepage, http://www.nsnam.org/ + +Since Sphinx provides more flexible layout and configuration control, +the Doxygen layout and images are used as the basis. + +The top bar design is derived from Doxygen's default when a logo, +project name and description are given in the Doxygen configuration file. +The files ``layout.html`` and ``ns3_doxy_header.html`` should kept in sync. + + +Sphinx Files +------------ + +``layout.html`` (:ref:`static filename `) + Augments the default page layout, including the top bar. + +``theme.conf`` (:ref:`static filename `) + Configuration parameters for ``layout.html`` and ``default.css_t``. + +``static/bc_s.png`` + Angle bracket in Sphinx relbar, taken from the Doxygen html output. + +``static/default.css_t`` (:ref:`static filename `) + Default Sphinx CSS template, copied from the default theme. + +``static/nav_f.png`` + Background image for headings, taken from the Doxygen html output. + +``static/sidebar.js`` (:ref:`static filename `) + Sidebar script, copied from the default theme. + +``static/tab_b.png`` + Background image for the Sphinx relbar, taken from the Doxygen html output. + +.. _sphinx-static-filenames: +.. note:: **Static Filenames** + + Sphinx uses hard-coded file names (and the ``static`` directory name). + The files referenced above can't be renamed. + + +Doxygen Files +------------- + +``ns3_doxy_footer.html`` + Defines the page footer. + +``ns3_doxy_header.html`` + Defines the page header, including the top bar. + +``static/doxygen.css`` + Default Doxygen CSS file, obtained by the ``doxygen -w html ...`` + command. + +Shared Files +------------ + +``README.rst`` + This file, not used by Doxygen or Sphinx. + +``static/bar-top.png`` + Background image for the top bar, resized from the ns-3 homepage. + +``static/favicon.ico`` + Browser location bar favicon, referenced in ``layout.html`` and + ``ns3_doxy_header.html``, taken from the ns-3 homepage. + +``static/ns-3-inverted-notext-small.png`` + Logo used in the top bar, taken from the ns-3 media kit. + +``static/ns3_stylesheet.css`` + Style customizations for both Doxygen and Sphinx. diff --git a/doc/ns3_sphinx_theme/layout.html b/doc/ns3_html_theme/layout.html similarity index 87% rename from doc/ns3_sphinx_theme/layout.html rename to doc/ns3_html_theme/layout.html index 4cbea1501..ef23a05e5 100644 --- a/doc/ns3_sphinx_theme/layout.html +++ b/doc/ns3_html_theme/layout.html @@ -9,6 +9,9 @@ #} {% extends "basic/layout.html" %} +{% set reldelim1 = ' ' %} +{# set reldelim1 = ' @' #} + {%- block extrahead %} @@ -47,11 +50,10 @@ {% endblock %} {% block rootrellink %} -
  • ns-3 »
  • + {{ super() }} {% endblock %} {% if theme_collapsiblesidebar|tobool %} {% set script_files = script_files + ['_static/sidebar.js'] %} {% endif %} - \ No newline at end of file diff --git a/doc/ns3_footer.html b/doc/ns3_html_theme/ns3_doxy_footer.html similarity index 100% rename from doc/ns3_footer.html rename to doc/ns3_html_theme/ns3_doxy_footer.html diff --git a/doc/ns3_header.html b/doc/ns3_html_theme/ns3_doxy_header.html similarity index 100% rename from doc/ns3_header.html rename to doc/ns3_html_theme/ns3_doxy_header.html diff --git a/doc/ns3_sphinx_theme/static/default.css_t b/doc/ns3_html_theme/static/default.css_t similarity index 100% rename from doc/ns3_sphinx_theme/static/default.css_t rename to doc/ns3_html_theme/static/default.css_t diff --git a/doc/doxygen.css b/doc/ns3_html_theme/static/doxygen.css similarity index 100% rename from doc/doxygen.css rename to doc/ns3_html_theme/static/doxygen.css diff --git a/doc/ns3_html_theme/static/ns3_stylesheet.css b/doc/ns3_html_theme/static/ns3_stylesheet.css new file mode 100644 index 000000000..27abebc23 --- /dev/null +++ b/doc/ns3_html_theme/static/ns3_stylesheet.css @@ -0,0 +1,122 @@ +/* ns-3 changes to the default CSS from Doxygen and Sphinx */ + +body, table, div, p, dl { + font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; + font-size: 12px; + color: black; +} + +a { + color: #91A501; + font-weight: bold; +} + +/* Sphinx headings */ +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + background-image: url('nav_f.png'); +} + +/* Doxygen side bar */ +#nav-tree { + font-size: 12px; +} + +#nav-tree a { + font-weight: normal; +} + +/* Sphinx nav links bar (relbar) */ +div.related { + background-image:url('tab_b.png') +} + +div.related h3 { + display: none; +} + +div.related a { + color: #91A501; + font-size: 14px; + font-weight: bold; +} + +div.related li { + background-image: url('bc_s.png'); + background-position: 100% 40%; + background-repeat: no-repeat; + padding-left: 10px; + padding-right: 15px; +} + +div.related li.right { + background-image: none; + padding-left: 0px; + padding-right: 0px; +} + +/* Sphinx side bar */ +div.sphinxsidebar { + font-size: 12px; +} + +div.sphinxsidebar a { + font-weight: normal; +} + + +/* Title bar elements */ + +#titlearea +{ + background-image:url('bar-top.png'); + background-repeat:repeat; + border-bottom: 1px solid #5B5B5B; + color: white; +} + +#projectlogo +{ + text-align: center; + margin: 10px; + vertical-align: middle; + width: 220px; + color: white; +} + +#projecttext +{ + align: left; + padding-left: 2em; + font-color:white; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; + color: white; +} + +#projectnumber +{ + font: 100% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; + color: white; +} + +#projectsection +{ + text-align: right; + font: 24pt Aldo, Tahoma, Arial,sans-serif; + margin: 10px; + margin-right: 10px; + vertical-align: middle; + color: white; +} diff --git a/doc/ns3_sphinx_theme/static/sidebar.js b/doc/ns3_html_theme/static/sidebar.js similarity index 100% rename from doc/ns3_sphinx_theme/static/sidebar.js rename to doc/ns3_html_theme/static/sidebar.js diff --git a/doc/ns3_sphinx_theme/theme.conf b/doc/ns3_html_theme/theme.conf similarity index 95% rename from doc/ns3_sphinx_theme/theme.conf rename to doc/ns3_html_theme/theme.conf index 239119cbe..51668d8d7 100644 --- a/doc/ns3_sphinx_theme/theme.conf +++ b/doc/ns3_html_theme/theme.conf @@ -5,7 +5,7 @@ pygments_style = sphinx [options] favicon = favicon.ico -logo = ns-3-small.png +logo = ns-3-inverted-notext-small.png docstitle = Documentation rightsidebar = false diff --git a/doc/ns3_sphinx_theme/static/ns3_stylesheet.css b/doc/ns3_sphinx_theme/static/ns3_stylesheet.css deleted file mode 100644 index 74a81bd1c..000000000 --- a/doc/ns3_sphinx_theme/static/ns3_stylesheet.css +++ /dev/null @@ -1,74 +0,0 @@ -/* ns-3 changes to the default CSS from Doxygen and Sphinx */ - -body, table, div, p, dl { - font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; - font-size: 12px; - color: black; -} - -a { - color: #91A501; -} - -#nav-tree { - font-size: 12px; -} - -div.related a { - font-size: 14px; - font-weight: bold; -} - -div.sphinxsidebar { - font-size: 12px; -} - -#titlearea -{ - background-image:url('bar-top.png'); - background-repeat:repeat; - border-bottom: 1px solid #5B5B5B; - color: white; -} - -#projectlogo -{ - text-align: center; - margin: 10px; - vertical-align: middle; - width: 220px; - color: white; -} - -#projecttext -{ - align: left; - padding-left: 2em; - font-color:white; -} - -#projectbrief -{ - font: 120% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; - color: white; -} - -#projectnumber -{ - font: 100% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; - color: white; -} - -#projectsection -{ - text-align: right; - font: 24pt Aldo, Tahoma, Arial,sans-serif; - margin: 10px; - margin-right: 10px; - vertical-align: middle; - color: white; -} diff --git a/doc/ns3_stylesheet.css b/doc/ns3_stylesheet.css deleted file mode 100644 index 74a81bd1c..000000000 --- a/doc/ns3_stylesheet.css +++ /dev/null @@ -1,74 +0,0 @@ -/* ns-3 changes to the default CSS from Doxygen and Sphinx */ - -body, table, div, p, dl { - font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; - font-size: 12px; - color: black; -} - -a { - color: #91A501; -} - -#nav-tree { - font-size: 12px; -} - -div.related a { - font-size: 14px; - font-weight: bold; -} - -div.sphinxsidebar { - font-size: 12px; -} - -#titlearea -{ - background-image:url('bar-top.png'); - background-repeat:repeat; - border-bottom: 1px solid #5B5B5B; - color: white; -} - -#projectlogo -{ - text-align: center; - margin: 10px; - vertical-align: middle; - width: 220px; - color: white; -} - -#projecttext -{ - align: left; - padding-left: 2em; - font-color:white; -} - -#projectbrief -{ - font: 120% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; - color: white; -} - -#projectnumber -{ - font: 100% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; - color: white; -} - -#projectsection -{ - text-align: right; - font: 24pt Aldo, Tahoma, Arial,sans-serif; - margin: 10px; - margin-right: 10px; - vertical-align: middle; - color: white; -} diff --git a/doc/tutorial-pt-br/source/conf.py b/doc/tutorial-pt-br/source/conf.py index 5b7fcfe0b..3a901e854 100644 --- a/doc/tutorial-pt-br/source/conf.py +++ b/doc/tutorial-pt-br/source/conf.py @@ -93,7 +93,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'ns3_sphinx_theme' +html_theme = 'ns3_html_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/doc/tutorial/source/conf.py b/doc/tutorial/source/conf.py index 6d62f53e6..06ed8385d 100644 --- a/doc/tutorial/source/conf.py +++ b/doc/tutorial/source/conf.py @@ -91,7 +91,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'ns3_sphinx_theme' +html_theme = 'ns3_html_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the