diff --git a/_shared_assets/themes/owncloud_release/README.rst b/_shared_assets/themes/owncloud_release/README.rst deleted file mode 100644 index b43a04c14..000000000 --- a/_shared_assets/themes/owncloud_release/README.rst +++ /dev/null @@ -1,89 +0,0 @@ -======================== - Sphinx Bootstrap Theme -======================== - -This repository integrates the Twitter Bootstrap_ CSS / JavaScript framework -as a Sphinx_ theme_. A live demo_ is available to preview the theme. - -.. _Bootstrap: http://twitter.github.com/bootstrap/ -.. _Sphinx: http://sphinx.pocoo.org/ -.. _theme: http://sphinx.pocoo.org/theming.html -.. _demo: http://ryan-roemer.github.com/sphinx-bootstrap-theme - - -Installation -============ -To install the theme, download the theme directory and update your -configuration - -1. Create a "_themes" directory in your project source root. -2. Get the "bootstrap" themes either as raw files or as a zipfile from - the repository. - - a. Most current way is to just clone this repo or download the full - repo source and move the "bootstrap" directory to "_themes". - b. Alternatively, there are some prepackaged theme zip files (containing - only the theme files), which can be read directly by Sphinx. See the - repo downloads_ page for available packages. Then download - "bootstrap.zip":: - - $ cd /path/to/_themes - $ wget https://github.com/downloads/ryan-roemer/sphinx-bootstrap-theme/bootstrap.zip - - In addition to the "current" release, the GitHub zipfiles have either git - hash releases (for development builds) or tags for official tagged - releases. E.g.:: - - bootstrap.zip - bootstrap-v0.0.2.zip - bootstrap-f51d73491e9bae68eb1b1c57059d9e0ece03d125.zip - -3. Edit your configuration file to point to the bootstrap theme:: - - # Activate the theme. - sys.path.append(os.path.abspath('_themes')) - html_theme_path = ['_themes'] - html_theme = 'bootstrap' - - # (Optional) Use a shorter name to conserve nav. bar space. - html_short_title = "Demo" - - # (Optional) Logo. Should be exactly 32x32 px to fit the nav. bar. - # Path should be relative to the html_static_path setting (e.g., - # "_static") in source. - html_logo = "my_logo.png" - -.. _downloads: https://github.com/ryan-roemer/sphinx-bootstrap-theme/downloads - -Theme Notes -=========== -Sphinx ------- -The theme places the global TOC, local TOC, navigation (prev, next) and -source links all in the top Bootstrap navigation bar, along with the Sphinx -search bar on the left side. - -The global (site-wide) table of contents is the "Site" navigation dropdown, -which is a multi-level deep rendering of the ``toctree`` for the entire site. -The local (page-level) table of contents is the "Page" navigation dropdown, -which is a multi-level rendering of the current page's ``toc``. - -Generally speaking, this is a quick and dirty hack to get the basic theme -going, so there are likely some oversights and lurking issues. Help and -bug filings for the project are most welcome. - - -Bootstrap ---------- -The theme uses Twitter Bootstrap v2.0. You can override any static JS/CSS files -by dropping different versions in your Sphinx "_static" directory. - - -Licenses -======== -Sphinx Bootstrap Theme is licensed under the MIT_ license. - -Twitter Bootstrap is licensed under the Apache_ license. - -.. _MIT: https://github.com/ryan-roemer/sphinx-bootstrap-theme/blob/master/LICENSE.txt -.. _Apache: https://github.com/twitter/bootstrap/blob/master/LICENSE diff --git a/_shared_assets/themes/owncloud_release/globaltoc.html b/_shared_assets/themes/owncloud_release/globaltoc.html index cb9f38fb6..d5df46c60 100644 --- a/_shared_assets/themes/owncloud_release/globaltoc.html +++ b/_shared_assets/themes/owncloud_release/globaltoc.html @@ -1,4 +1,10 @@ - diff --git a/_shared_assets/themes/owncloud_release/layout.html b/_shared_assets/themes/owncloud_release/layout.html index 9025e92d9..acbec5584 100644 --- a/_shared_assets/themes/owncloud_release/layout.html +++ b/_shared_assets/themes/owncloud_release/layout.html @@ -1,122 +1,119 @@ {% extends "basic/layout.html" %} -{% set script_files = script_files + ['_static/bootstrap.js'] %} -{% set css_files = [ '_static/style.css', '_static/bootstrap-sphinx.css'] + css_files %} -{# Sidebar: Rework into our Boostrap nav section. #} +{% set theme_css_files = []%} +{% if theme_bootstrap_version == "3" %} + {% set bootstrap_version, bootstrap_additional_css, navbar_version = "3.1.0", "theme", "" %} + {% set bs_span_prefix = "col-md-" %} +{% else %} + {% set bootstrap_version, bootstrap_additional_css, navbar_version = "2.3.2", "responsive", "-2" %} + {% set bs_span_prefix = "span" %} +{% endif %} + +{% if theme_bootswatch_theme %} + {# BS2 needs "bootstrap-responsive.css". BS3 doesn't. #} + {% if theme_bootstrap_version == "3" %} + {% set theme_css_files = theme_css_files + [ + '_static/bootswatch-' + bootstrap_version + '/' + theme_bootswatch_theme + '/bootstrap.min.css', + '_static/bootstrap-sphinx.css' + ] + %} + {% else %} + {% set theme_css_files = theme_css_files + [ + '_static/bootswatch-' + bootstrap_version + '/' + theme_bootswatch_theme + '/bootstrap.min.css', + '_static/bootstrap-' + bootstrap_version + '/css/bootstrap-' + bootstrap_additional_css + '.min.css', + '_static/bootstrap-sphinx.css' + ] + %} + {% endif %} +{% else %} + {% set theme_css_files = theme_css_files + ['_static/main.min.css', '_static/styles.css'] + %} +{% endif %} + +{% if not bootswatch_css_custom %} + {% set bootswatch_css_custom = [] %} +{% endif %} +{% set css_files = css_files + theme_css_files + bootswatch_css_custom %} + +{% set script_files = script_files + [ + '_static/js/jquery-1.11.0.min.js', + '_static/js/jquery-fix.js', + '_static/bootstrap-' + bootstrap_version + '/js/bootstrap.min.js', + '_static/bootstrap-sphinx.js' + ] +%} + +{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and sidebars %} + +{%- set bs_content_width = render_sidebar and "9" or "12"%} + +{%- block doctype -%} + +{%- endblock %} + +{# Sidebar: Rework into our Bootstrap nav section. #} {% macro navBar() %} - {# - - - #} {% endmacro %} +{% if theme_bootstrap_version == "3" %} + {%- macro bsidebar() %} + {%- if render_sidebar %} +
+ +
+ {%- endif %} + {%- endmacro %} +{% else %} + {%- macro bsidebar() %} + {%- if render_sidebar %} +
+ +
+ {%- endif %} + {%- endmacro %} +{% endif %} + {%- block extrahead %} - + + + + + {% endblock %} -{% block header %}{{ navBar() }}{% endblock %} - {# Silence the sidebar's, relbar's #} -{% block sidebar1 %}{% endblock %} -{% block sidebar2 %}{% endblock %} +{% block header %}{% endblock %} {% block relbar1 %}{% endblock %} {% block relbar2 %}{% endblock %} +{% block sidebarsourcelink %}{% endblock %} {%- block content %} -
-
-