| 1 |
/* |
| 2 |
* bootstrap-sphinx.css |
| 3 |
* ~~~~~~~~~~~~~~~~~~~~ |
| 4 |
* |
| 5 |
* Sphinx stylesheet -- Bootstrap theme. |
| 6 |
*/ |
| 7 |
|
| 8 |
/* |
| 9 |
* Imports to aggregate everything together. |
| 10 |
*/ |
| 11 |
|
| 12 |
@import url("./basic.css"); |
| 13 |
|
| 14 |
{% if theme_bootstrap_version == "3" %} |
| 15 |
{% set bootstrap_version, bootstrap_additional_css = "3.4.1", "theme" %} |
| 16 |
{% else %} |
| 17 |
{% set bootstrap_version, bootstrap_additional_css = "2.3.2", "responsive" %} |
| 18 |
{% endif %} |
| 19 |
|
| 20 |
{% if theme_bootswatch_theme and theme_bootswatch_theme != "\"\"" %} |
| 21 |
{# BS2 needs "bootstrap-responsive.css". BS3 doesn't. #} |
| 22 |
{% if theme_bootstrap_version == "3" %} |
| 23 |
@import url("{{ './bootswatch-' + bootstrap_version + '/' + theme_bootswatch_theme + '/bootstrap.min.css' }}"); |
| 24 |
{% else %} |
| 25 |
@import url("{{ './bootswatch-' + bootstrap_version + '/' + theme_bootswatch_theme + '/bootstrap.min.css' }}"); |
| 26 |
@import url("{{ './bootstrap-' + bootstrap_version + '/css/bootstrap-' + bootstrap_additional_css + '.min.css' }}"); |
| 27 |
{% endif %} |
| 28 |
{% else %} |
| 29 |
@import url("{{ './bootstrap-' + bootstrap_version + '/css/bootstrap.min.css' }}"); |
| 30 |
@import url("{{ './bootstrap-' + bootstrap_version + '/css/bootstrap-' + bootstrap_additional_css + '.min.css' }}"); |
| 31 |
{% endif %} |
| 32 |
|
| 33 |
/* |
| 34 |
* Styles |
| 35 |
*/ |
| 36 |
|
| 37 |
.navbar-inverse .brand { |
| 38 |
color: #FFF; |
| 39 |
} |
| 40 |
|
| 41 |
/* |
| 42 |
* Reset navbar styles from overrides in: |
| 43 |
* https://bitbucket.org/birkenfeld/sphinx/commits/78d8ebf76b630ab4073a7328af9d91e8123b8d96 |
| 44 |
*/ |
| 45 |
.navbar .container { |
| 46 |
padding-top: 0; |
| 47 |
} |
| 48 |
|
| 49 |
/* |
| 50 |
* Reset the logo image dimensions. Sites like RTD can override with bad |
| 51 |
* results on mobile (mega-huge logo...) |
| 52 |
* |
| 53 |
* https://github.com/ryan-roemer/sphinx-bootstrap-theme/issues/142 |
| 54 |
*/ |
| 55 |
.navbar-brand img { |
| 56 |
width: auto; |
| 57 |
height: 100%; |
| 58 |
} |
| 59 |
|
| 60 |
.page-top { |
| 61 |
top: 0px; |
| 62 |
} |
| 63 |
|
| 64 |
{% if theme_navbar_fixed_top|tobool %} |
| 65 |
|
| 66 |
{% if theme_bootstrap_version == "2" %} |
| 67 |
@media (min-width: 980px) { |
| 68 |
{% endif %} |
| 69 |
|
| 70 |
body { |
| 71 |
{% if theme_bootswatch_theme and theme_bootswatch_theme != "\"\"" %} |
| 72 |
padding-top: 60px; |
| 73 |
{% else %} |
| 74 |
padding-top: 40px; |
| 75 |
{% endif %} |
| 76 |
} |
| 77 |
.page-top { |
| 78 |
{% if theme_bootswatch_theme and theme_bootswatch_theme != "\"\"" %} |
| 79 |
top: 60px; |
| 80 |
{% else %} |
| 81 |
top: 40px; |
| 82 |
{% endif %} |
| 83 |
} |
| 84 |
|
| 85 |
{% if theme_bootstrap_version == "2" %} |
| 86 |
} |
| 87 |
{% endif %} |
| 88 |
|
| 89 |
.navbar-inner { |
| 90 |
padding-left: 12px !important; |
| 91 |
padding-right: 12px !important; |
| 92 |
} |
| 93 |
{% else %} |
| 94 |
{% if theme_bootstrap_version == "2" %} |
| 95 |
@media (min-width: 980px) { |
| 96 |
.navbar .container { |
| 97 |
width: 940px; |
| 98 |
} |
| 99 |
} |
| 100 |
{% endif %} |
| 101 |
{% endif %} |
| 102 |
|
| 103 |
table { |
| 104 |
border: 0; |
| 105 |
} |
| 106 |
|
| 107 |
.highlighttable .code pre { |
| 108 |
font-size: 12px; |
| 109 |
} |
| 110 |
|
| 111 |
.highlighttable .linenos pre { |
| 112 |
word-break: normal; |
| 113 |
font-size: 12px; |
| 114 |
} |
| 115 |
|
| 116 |
div.highlight { |
| 117 |
background: none; |
| 118 |
} |
| 119 |
|
| 120 |
a.headerlink { |
| 121 |
margin-left: 0.25em; |
| 122 |
} |
| 123 |
|
| 124 |
a.footnote-reference { |
| 125 |
vertical-align: super; |
| 126 |
font-size: 75%; |
| 127 |
} |
| 128 |
|
| 129 |
table.footnote td.label { |
| 130 |
color: inherit; |
| 131 |
font-size: 100%; |
| 132 |
display: block; |
| 133 |
line-height: normal; |
| 134 |
background: inherit; |
| 135 |
} |
| 136 |
|
| 137 |
table.footnote { |
| 138 |
width: auto; |
| 139 |
margin-bottom: 0px; |
| 140 |
} |
| 141 |
|
| 142 |
table.field-list { |
| 143 |
width: auto; |
| 144 |
} |
| 145 |
|
| 146 |
.footer { |
| 147 |
width: 100%; |
| 148 |
border-top: 1px solid #ccc; |
| 149 |
padding-top: 10px; |
| 150 |
} |
| 151 |
|
| 152 |
.bs-sidenav form, .bs-sidenav #sourcelink { |
| 153 |
padding: 5px 20px; |
| 154 |
} |
| 155 |
|
| 156 |
{% if theme_bootstrap_version == "3" %} |
| 157 |
|
| 158 |
/* The code below is based on the bootstrap website sidebar */ |
| 159 |
|
| 160 |
.bs-sidenav.affix { |
| 161 |
position: static; |
| 162 |
} |
| 163 |
|
| 164 |
/* First level of nav */ |
| 165 |
.bs-sidenav { |
| 166 |
margin-top: 30px; |
| 167 |
margin-bottom: 30px; |
| 168 |
padding-top: 10px; |
| 169 |
padding-bottom: 10px; |
| 170 |
text-shadow: 0 1px 0 #fff; |
| 171 |
background-color: #f7f5fa; |
| 172 |
border-radius: 5px; |
| 173 |
} |
| 174 |
|
| 175 |
/* All levels of nav */ |
| 176 |
.bs-sidenav .nav > li > a { |
| 177 |
display: block; |
| 178 |
color: #716b7a; |
| 179 |
padding: 5px 20px; |
| 180 |
} |
| 181 |
.bs-sidenav .nav > li > a:hover, |
| 182 |
.bs-sidenav .nav > li > a:focus { |
| 183 |
text-decoration: none; |
| 184 |
background-color: #e5e3e9; |
| 185 |
border-right: 1px solid #dbd8e0; |
| 186 |
} |
| 187 |
.bs-sidenav .nav > .active > a, |
| 188 |
.bs-sidenav .nav > .active:hover > a, |
| 189 |
.bs-sidenav .nav > .active:focus > a { |
| 190 |
font-weight: bold; |
| 191 |
color: #563d7c; |
| 192 |
background-color: transparent; |
| 193 |
border-right: 1px solid #563d7c; |
| 194 |
} |
| 195 |
|
| 196 |
.bs-sidenav .nav .nav > li > a { |
| 197 |
padding-top: 3px; |
| 198 |
padding-bottom: 3px; |
| 199 |
padding-left: 30px; |
| 200 |
font-size: 90%; |
| 201 |
} |
| 202 |
|
| 203 |
.bs-sidenav .nav .nav .nav > li > a { |
| 204 |
padding-top: 3px; |
| 205 |
padding-bottom: 3px; |
| 206 |
padding-left: 40px; |
| 207 |
font-size: 90%; |
| 208 |
} |
| 209 |
|
| 210 |
.bs-sidenav .nav .nav .nav .nav > li > a { |
| 211 |
padding-top: 3px; |
| 212 |
padding-bottom: 3px; |
| 213 |
padding-left: 50px; |
| 214 |
font-size: 90%; |
| 215 |
} |
| 216 |
|
| 217 |
/* Show and affix the side nav when space allows it */ |
| 218 |
@media screen and (min-width: 992px) { |
| 219 |
.bs-sidenav .nav > .active > ul { |
| 220 |
display: block; |
| 221 |
} |
| 222 |
/* Widen the fixed sidenav */ |
| 223 |
.bs-sidenav.affix, |
| 224 |
.bs-sidenav.affix-bottom { |
| 225 |
width: 213px; |
| 226 |
} |
| 227 |
.bs-sidenav.affix { |
| 228 |
position: fixed; /* Undo the static from mobile first approach */ |
| 229 |
} |
| 230 |
.bs-sidenav.affix-bottom { |
| 231 |
position: absolute; /* Undo the static from mobile first approach */ |
| 232 |
} |
| 233 |
.bs-sidenav.affix-bottom .bs-sidenav, |
| 234 |
.bs-sidenav.affix .bs-sidenav { |
| 235 |
margin-top: 0; |
| 236 |
margin-bottom: 0; |
| 237 |
} |
| 238 |
} |
| 239 |
@media screen and (min-width: 1200px) { |
| 240 |
/* Widen the fixed sidenav again */ |
| 241 |
.bs-sidenav.affix-bottom, |
| 242 |
.bs-sidenav.affix { |
| 243 |
width: 263px; |
| 244 |
} |
| 245 |
} |
| 246 |
|
| 247 |
|
| 248 |
{% else %} |
| 249 |
|
| 250 |
.bs-sidenav { |
| 251 |
width: 228px; |
| 252 |
margin: 30px 0 0; |
| 253 |
padding: 10px 0 0 5px; |
| 254 |
} |
| 255 |
|
| 256 |
.bs-sidenav ul{ |
| 257 |
list-style-type: none; |
| 258 |
padding-left: 25px; |
| 259 |
margin-left: 0; /* bootstrap 2 compatability. */ |
| 260 |
} |
| 261 |
|
| 262 |
@media (min-width: 1200px) { |
| 263 |
.bs-sidenav { |
| 264 |
width: 258px; |
| 265 |
} |
| 266 |
} |
| 267 |
|
| 268 |
/* Desktop |
| 269 |
------------------------- */ |
| 270 |
@media (max-width: 980px) { |
| 271 |
.bs-sidenav { |
| 272 |
width: 218px; |
| 273 |
margin-top: 30px; |
| 274 |
margin-right: 0; |
| 275 |
} |
| 276 |
} |
| 277 |
|
| 278 |
/* Tablet to desktop |
| 279 |
------------------------- */ |
| 280 |
@media (min-width: 768px) and (max-width: 979px) { |
| 281 |
.bs-sidenav { |
| 282 |
width: 166px; |
| 283 |
margin-top: 20px; |
| 284 |
} |
| 285 |
} |
| 286 |
|
| 287 |
/* Tablet |
| 288 |
------------------------- */ |
| 289 |
@media (max-width: 767px) { |
| 290 |
.navbar-version { |
| 291 |
padding-left: 5px; |
| 292 |
} |
| 293 |
.bs-sidenav { |
| 294 |
width: auto; |
| 295 |
margin-bottom: 20px; |
| 296 |
} |
| 297 |
.bs-sidenav.affix { |
| 298 |
position: static; |
| 299 |
top: 0; |
| 300 |
} |
| 301 |
} |
| 302 |
{% endif %} |