Skip to content

Commit

Permalink
Updating styles, Bootstrap, and jQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdowling committed Mar 15, 2014
1 parent 6ec1371 commit 4016163
Show file tree
Hide file tree
Showing 6 changed files with 2,034 additions and 143 deletions.
82 changes: 0 additions & 82 deletions guzzle_sphinx_theme/__init__.py
Expand Up @@ -73,85 +73,3 @@ def depart_table(self, node):
"""
self.compact_p = self.context.pop()
self.body.append('</table>\n')


class GuzzleStyle(Style):
background_color = "#f7f7f7"
default_style = ""

styles = {
# No corresponding class for the following:
#Text: "", # class: ''
Whitespace: "underline #f8f8f8", # class: 'w'
Error: "#a40000 border:#ef2929", # class: 'err'
Other: "#000000", # class 'x'

Comment: "italic #8f5902", # class: 'c'
Comment.Preproc: "noitalic", # class: 'cp'

Keyword: "bold #004461", # class: 'k'
Keyword.Constant: "bold #004461", # class: 'kc'
Keyword.Declaration: "bold #004461", # class: 'kd'
Keyword.Namespace: "bold #004461", # class: 'kn'
Keyword.Pseudo: "bold #004461", # class: 'kp'
Keyword.Reserved: "bold #004461", # class: 'kr'
Keyword.Type: "bold #004461", # class: 'kt'

Operator: "#582800", # class: 'o'
Operator.Word: "bold #004461", # class: 'ow' - like keywords

Punctuation: "bold #000000", # class: 'p'

# because special names such as Name.Class, Name.Function, etc.
# are not recognized as such later in the parsing, we choose them
# to look the same as ordinary variables.
Name: "#000000", # class: 'n'
Name.Attribute: "#006EC4", # class: 'na' - to be revised
Name.Builtin: "#004461", # class: 'nb'
Name.Builtin.Pseudo: "#3465a4", # class: 'bp'
Name.Class: "#000000", # class: 'nc' - to be revised
Name.Constant: "#000000", # class: 'no' - to be revised
Name.Decorator: "#888", # class: 'nd' - to be revised
Name.Entity: "#ce5c00", # class: 'ni'
Name.Exception: "bold #cc0000", # class: 'ne'
Name.Function: "#000000", # class: 'nf'
Name.Property: "#000000", # class: 'py'
Name.Label: "#f57900", # class: 'nl'
Name.Namespace: "#000000", # class: 'nn' - to be revised
Name.Other: "#000000", # class: 'nx'
Name.Tag: "bold #004461", # class: 'nt' - like a keyword
Name.Variable: "#000000", # class: 'nv' - to be revised
Name.Variable.Class: "#000000", # class: 'vc' - to be revised
Name.Variable.Global: "#000000", # class: 'vg' - to be revised
Name.Variable.Instance: "#000000", # class: 'vi' - to be revised

Number: "#990000", # class: 'm'

Literal: "#000000", # class: 'l'
Literal.Date: "#000000", # class: 'ld'

String: "#4e9a06", # class: 's'
String.Backtick: "#4e9a06", # class: 'sb'
String.Char: "#4e9a06", # class: 'sc'
String.Doc: "italic #8f5902", # class: 'sd' - like a comment
String.Double: "#4e9a06", # class: 's2'
String.Escape: "#4e9a06", # class: 'se'
String.Heredoc: "#4e9a06", # class: 'sh'
String.Interpol: "#4e9a06", # class: 'si'
String.Other: "#4e9a06", # class: 'sx'
String.Regex: "#4e9a06", # class: 'sr'
String.Single: "#4e9a06", # class: 's1'
String.Symbol: "#4e9a06", # class: 'ss'

Generic: "#000000", # class: 'g'
Generic.Deleted: "#a40000", # class: 'gd'
Generic.Emph: "italic #000000", # class: 'ge'
Generic.Error: "#ef2929", # class: 'gr'
Generic.Heading: "bold #000080", # class: 'gh'
Generic.Inserted: "#00A000", # class: 'gi'
Generic.Output: "#888", # class: 'go'
Generic.Prompt: "#745334", # class: 'gp'
Generic.Strong: "bold #000000", # class: 'gs'
Generic.Subheading: "bold #800080", # class: 'gu'
Generic.Traceback: "bold #a40000", # class: 'gt'
}
6 changes: 3 additions & 3 deletions guzzle_sphinx_theme/guzzle_sphinx_theme/layout.html
Expand Up @@ -2,11 +2,10 @@

{# Do this so that bootstrap is included before the main css file #}
{%- block htmltitle %}
{% set script_files = script_files + ["_static/myscript.js"] %}
<link rel="stylesheet" type="text/css" href="{{ pathto('_static/css/bootstrap.min.css', 1) }}" />
<link rel="stylesheet" type="text/css" href="{{ pathto('_static/css/bootstrap-theme.min.css', 1) }}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="{{ pathto('_static/js/jquery-1.9.1.min.js', 1)}}"></script>
<script type="text/javascript" src="{{ pathto('_static/js/bootstrap.min.js', 1)}}"></script>
{{ super() }}
{%- endblock %}

Expand Down Expand Up @@ -139,12 +138,13 @@

{%- block footer %}

<script type="text/javascript" src="{{ pathto('_static/js/bootstrap.js', 1)}}"></script>
{%- block footer_wrapper %}
<div class="footer container">
&copy; Copyright {{ copyright }}. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
</div>
{%- endblock %}

{%- block ga %}
{%- if theme_google_analytics_account %}
<script type="text/javascript">
Expand Down
133 changes: 78 additions & 55 deletions guzzle_sphinx_theme/guzzle_sphinx_theme/static/guzzle.css_t
Expand Up @@ -18,6 +18,7 @@ div.clearer {
}

.container-wrapper { padding: 0 15px; }
.container-fluid { max-width: 1440px; }

div.document {
margin: 0 auto;
Expand Down Expand Up @@ -137,6 +138,11 @@ a.internal em {
font-style: normal;
}

dl dd {
margin-left: 30px;
margin: 3px 0 10px 30px;
}

/* Sphinx sidebar
-------------------------------------------------- */

Expand Down Expand Up @@ -489,8 +495,10 @@ p.topic-title {
.admonition {
margin: 20px 0;
padding: 20px;
border-left: 3px solid #eee;
background-color: #fafafa;
border-width: 0 0 0 3px;
border-color: #eee;
border-style: solid;
}

.admonition dt {
Expand All @@ -502,30 +510,33 @@ p.topic-title {
}

.admonition-title {
margin: 0px 0 5px 0px;
margin: 0px 0 5px;
padding: 0;
font-weight: normal;
display: inline;
font-size: 22px;
font-size: 18px;
line-height: 1.1;
}

.admonition.danger,
.admonition.error { background-color: #fdf7f7; border-color: #d9534f; }
.admonition.danger .admonition-title,
.admonition.error .admonition-title { color: #d9534f; }

.admonition.important,
.admonition.warning,
.admonition.attention,
.admonition.caution { background-color: #fcf8f2; border-color: #f0ad4e; }
.admonition.important .admonition-title,
.admonition.warning .admonition-title,
.admonition.attention .admonition-title,
.admonition.caution .admonition-title { color: #f0ad4e; }

.admonition.note,
.admonition.hint,
.admonition.tip { background-color: #fdf7f7; border-color: #d9534f; }
.admonition.tip { background-color: #f4f8fa; border-color: #5bc0de; }
.admonition.note .admonition-title,
.admonition.hint .admonition-title,
.admonition.tip .admonition-title { color: #d9534f; }
.admonition.tip .admonition-title { color: #5bc0de; }

div.body p.centered {
text-align: center;
Expand All @@ -550,12 +561,6 @@ div.admonition p.last {
margin-bottom: 0;
}

div.note {
background-color: #f8f8f8;
border: 1px solid #ccc;
border-radius: 3px;
}

/* -- other body styles ----------------------------------------------------- */

ol.arabic {
Expand Down Expand Up @@ -769,46 +774,64 @@ span.eqno {
}
}

/* API style overrides */

.api-container .api-method h3 {
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
background-color: #428bca;
color: #fff;
padding: 7px 7px 7px 8px !important;
margin-bottom: 0 !important;
border-bottom: none;
border: none !important;
border-radius: 5px 5px 0 0;
}

.api-container .api-method-signature {
font-family: monospace;
font-size: 15px;
padding: 6px;
margin-top: 0;
border-radius: 0 0 5px 5px;
}

.api-container .api-method-params h4 ~ *,
.api-container .api-method-returns h4 ~ * {
margin-left: 24px;
}

.api-container dl.method { height: 0; width: 0; overflow: hidden; border: none; position: absolute; }
#api-tree ul { list-style-type: none; }
#api-tree ul li { padding: 2px; }
#api-tree .api-tree-bd { display: none; }

div.body .api-method-params h5 {
display: block;
padding: 6px;
margin: 25px 0;
line-height: 1.428571429;
word-break: break-all;
word-wrap: break-word;
color: #333;
background-color: #f5f5f5;
border-left: 3px solid #ccc;
font-family: monospace;
}
.hll { background-color: #ffffcc }
.c { color: #999988; font-style: italic } /* Comment */
.err { color: #a61717; background-color: #e3d2d2 } /* Error */
.k { color: #000000; font-weight: bold } /* Keyword */
.o { color: #000000; font-weight: bold } /* Operator */
.cm { color: #999988; font-style: italic } /* Comment.Multiline */
.cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */
.c1 { color: #999988; font-style: italic } /* Comment.Single */
.cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.ge { color: #000000; font-style: italic } /* Generic.Emph */
.gr { color: #aa0000 } /* Generic.Error */
.gh { color: #999999 } /* Generic.Heading */
.gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.go { color: #888888 } /* Generic.Output */
.gp { color: #555555 } /* Generic.Prompt */
.gs { font-weight: bold } /* Generic.Strong */
.gu { color: #aaaaaa } /* Generic.Subheading */
.gt { color: #aa0000 } /* Generic.Traceback */
.kc { color: #000000; font-weight: bold } /* Keyword.Constant */
.kd { color: #000000; font-weight: bold } /* Keyword.Declaration */
.kn { color: #000000; font-weight: bold } /* Keyword.Namespace */
.kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */
.kr { color: #000000; font-weight: bold } /* Keyword.Reserved */
.kt { color: #445588; font-weight: bold } /* Keyword.Type */
.m { color: #009999 } /* Literal.Number */
.s { color: #d01040 } /* Literal.String */
.na { color: #008080 } /* Name.Attribute */
.nb { color: #0086B3 } /* Name.Builtin */
.nc { color: #445588; font-weight: bold } /* Name.Class */
.no { color: #008080 } /* Name.Constant */
.nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */
.ni { color: #800080 } /* Name.Entity */
.ne { color: #990000; font-weight: bold } /* Name.Exception */
.nf { color: #990000; font-weight: bold } /* Name.Function */
.nl { color: #990000; font-weight: bold } /* Name.Label */
.nn { color: #555555 } /* Name.Namespace */
.nt { color: #000080 } /* Name.Tag */
.nv { color: #008080 } /* Name.Variable */
.ow { color: #000000; font-weight: bold } /* Operator.Word */
.w { color: #bbbbbb } /* Text.Whitespace */
.mf { color: #009999 } /* Literal.Number.Float */
.mh { color: #009999 } /* Literal.Number.Hex */
.mi { color: #009999 } /* Literal.Number.Integer */
.mo { color: #009999 } /* Literal.Number.Oct */
.sb { color: #d01040 } /* Literal.String.Backtick */
.sc { color: #d01040 } /* Literal.String.Char */
.sd { color: #d01040 } /* Literal.String.Doc */
.s2 { color: #d01040 } /* Literal.String.Double */
.se { color: #d01040 } /* Literal.String.Escape */
.sh { color: #d01040 } /* Literal.String.Heredoc */
.si { color: #d01040 } /* Literal.String.Interpol */
.sx { color: #d01040 } /* Literal.String.Other */
.sr { color: #009926 } /* Literal.String.Regex */
.s1 { color: #d01040 } /* Literal.String.Single */
.ss { color: #990073 } /* Literal.String.Symbol */
.bp { color: #999999 } /* Name.Builtin.Pseudo */
.vc { color: #008080 } /* Name.Variable.Class */
.vg { color: #008080 } /* Name.Variable.Global */
.vi { color: #008080 } /* Name.Variable.Instance */
.il { color: #009999 } /* Literal.Number.Integer.Long */

0 comments on commit 4016163

Please sign in to comment.