Skip to content

Commit

Permalink
Documentation changes for Github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
vcatalano committed Mar 29, 2014
1 parent b7cd567 commit cc3849a
Show file tree
Hide file tree
Showing 19 changed files with 333 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.DS_Store
docs/_build/
build/
_build/
dist/
*.egg-info/

Expand Down
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext

Expand Down
240 changes: 240 additions & 0 deletions docs/source/_static/bootstrap-sphinx.css_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
/*
* bootstrap-sphinx.css
* ~~~~~~~~~~~~~~~~~~~~
*
* Sphinx stylesheet -- Twitter Bootstrap theme.
*/

.navbar-inverse .brand {
color: #FFF;
}

.page-top {
top: 0px;
}

{% if theme_bootstrap_version == "2" %}
@media (min-width: 980px) {
{% endif %}
{% if theme_navbar_fixed_top == 'true' %}
body {
{% if theme_bootswatch_theme %}
padding-top: 60px;
{% else %}
padding-top: 40px;
{% endif %}
}
.page-top {
{% if theme_bootswatch_theme %}
top: 60px;
{% else %}
top: 40px;
{% endif %}
}
{% if theme_bootstrap_version == "2" %}
}
{% endif %}

.navbar-inner {
padding-left: 12px !important;
padding-right: 12px !important;
}
{% endif %}

table {
border: 0;
}

.highlighttable .code pre {
font-size: 12px;
}

.highlighttable .linenos pre {
word-break: normal;
font-size: 12px;
}

div.highlight {
background: none;
}

a.footnote-reference {
vertical-align: super;
font-size: 75%;
}

table.footnote td.label {
font-size: 100%;
display: block;
line-height: normal;
background: inherit;
}

table.footnote {
width: auto;
margin-bottom: 0px;
}

table.field-list {
width: auto;
}

.footer {
text-align: center;
width: 100%;
border-top: 1px solid #ccc;
padding-top: 10px;
}

.bs-sidenav form, .bs-sidenav #sourcelink {
padding: 5px 20px;
}

{% if theme_bootstrap_version == "3" %}

/* The code below is based on the bootstrap website sidebar */

.bs-sidenav.affix {
position: static;
}

/* First level of nav */
.bs-sidenav {
margin-top: 30px;
margin-bottom: 30px;
padding-top: 10px;
padding-bottom: 10px;
text-shadow: 0 1px 0 #fff;
background-color: #f7f5fa;
border-radius: 5px;
}

/* All levels of nav */
.bs-sidenav .nav > li > a {
display: block;
color: #716b7a;
padding: 5px 20px;
}
.bs-sidenav .nav > li > a:hover,
.bs-sidenav .nav > li > a:focus {
text-decoration: none;
background-color: #e5e3e9;
border-right: 1px solid #dbd8e0;
}
.bs-sidenav .nav > .current > a,
.bs-sidenav .nav > .current:hover > a,
.bs-sidenav .nav > .current:focus > a {
font-weight: bold;
color: #563d7c;
background-color: transparent;
border-right: 1px solid #563d7c;
}

.bs-sidenav .nav .nav > li > a {
padding-top: 3px;
padding-bottom: 3px;
padding-left: 30px;
font-size: 90%;
}

.bs-sidenav .nav .nav .nav > li > a {
padding-top: 3px;
padding-bottom: 3px;
padding-left: 40px;
font-size: 90%;
}

.bs-sidenav .nav .nav .nav .nav > li > a {
padding-top: 3px;
padding-bottom: 3px;
padding-left: 50px;
font-size: 90%;
}

/* Show and affix the side nav when space allows it */
@media screen and (min-width: 992px) {
.bs-sidenav .nav > .active > ul {
display: block;
}
/* Widen the fixed sidenav */
.bs-sidenav.affix,
.bs-sidenav.affix-bottom {
width: 213px;
}
.bs-sidenav.affix {
position: fixed; /* Undo the static from mobile first approach */
top: 80px;
}
.bs-sidenav.affix-bottom {
position: absolute; /* Undo the static from mobile first approach */
}
.bs-sidenav.affix-bottom .bs-sidenav,
.bs-sidenav.affix .bs-sidenav {
margin-top: 0;
margin-bottom: 0;
}
}
@media screen and (min-width: 1200px) {
/* Widen the fixed sidenav again */
.bs-sidenav.affix-bottom,
.bs-sidenav.affix {
width: 263px;
}
}


{% else %}

.bs-sidenav {
width: 228px;
margin: 30px 0 0;
padding: 10px 0 0 5px;
}

.bs-sidenav ul{
list-style-type: none;
padding-left: 25px;
margin-left: 0; /* bootstrap 2 compatability. */
}

@media (min-width: 1200px) {
.bs-sidenav {
width: 258px;
}
}

/* Desktop
------------------------- */
@media (max-width: 980px) {
.bs-sidenav {
width: 218px;
margin-top: 30px;
margin-right: 0;
}
}

/* Tablet to desktop
------------------------- */
@media (min-width: 768px) and (max-width: 979px) {
.bs-sidenav {
width: 166px;
margin-top: 20px;
}
}

/* Tablet
------------------------- */
@media (max-width: 767px) {
.navbar-version {
padding-left: 5px;
}
.bs-sidenav {
width: auto;
margin-bottom: 20px;
}
.bs-sidenav.affix {
position: static;
top: 0;
}
}
{% endif %}
1 change: 1 addition & 0 deletions docs/source/_templates/globaltoc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ toctree(maxdepth=theme_globaltoc_depth|toint, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }}
22 changes: 22 additions & 0 deletions docs/source/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% extends "!layout.html" %}

{# Custom CSS overrides #}
{# set bootswatch_css_custom = ['_static/my-styles.css'] #}

{# Add github banner (from: https://github.com/blog/273-github-ribbons). #}
{% block header %}
{{ super() }}
<a href="https://github.com/vcatalano/py-authorize"
class="visible-desktop hidden-xs"><img
id="gh-banner"
style="position: absolute; top: 50px; right: 0; border: 0;"
src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png"
alt="Fork me on GitHub"></a>
<script>
// Adjust banner height.
$(function () {
var navHeight = $(".navbar .container").css("height");
$("#gh-banner").css("top", navHeight);
});
</script>
{% endblock %}
40 changes: 40 additions & 0 deletions docs/source/_templates/navbar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<div id="navbar" class="{{ theme_navbar_class }} navbar-default {% if theme_navbar_fixed_top == 'true' -%} navbar-fixed-top{%- endif -%}">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{ pathto(master_doc) }}">
{%- block sidebarlogo %}
{%- if logo %}<img src="{{ pathto('_static/' + logo, 1) }}">{%- endif %}
{%- endblock %}
{% if theme_navbar_title -%}{{ theme_navbar_title|e }}{%- else -%}{{ project|e }}{%- endif -%}
</a>
</div>

<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li class="divider-vertical"></li>
{% if theme_navbar_links %}
{%- for link in theme_navbar_links %}
<li><a href="{{ pathto(*link[1:]) }}">{{ link[0] }}</a></li>
{%- endfor %}
{% endif %}
{% if theme_navbar_sidebarrel %}
{% block sidebarrel %}
{% include "relations.html" %}
{% endblock %}
{% endif %}
{% block navbarextra %}
{% endblock %}
</ul>

{% block navbarsearch %}
{% include "navbarsearchbox.html" %}
{% endblock %}
</div>
</div>
</div>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit cc3849a

Please sign in to comment.