Skip to content

Commit

Permalink
Use javascript instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Blendify committed Mar 16, 2017
1 parent f928c33 commit 630b50f
Show file tree
Hide file tree
Showing 7 changed files with 6,264 additions and 6 deletions.
8 changes: 8 additions & 0 deletions js/theme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
var jQuery = (typeof(window) != 'undefined') ? window.jQuery : require('jquery');

// Get the width of the sidebar and content
function ThemeWidth () {
var SidebarWidth = document.querySelector('.wy-nav-side').clientWidth
var ContentWidth = document.querySelector('.wy-nav-content').clientWidth

var MediaQuery = SidebarWidth + ContentWidth + "px"
}

// Sphinx theme nav state
function ThemeNav () {

Expand Down
2 changes: 1 addition & 1 deletion sass/_theme_layout.sass
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ footer
height: 100%
overflow: hidden

@media screen and (min-width:calc(#{$nav-sidebar-width} + #{$nav-content-width}))
@media screen and (min-width: eval('MediaQuery'))
.wy-nav-content-wrap
background: rgba(0,0,0,.05)
.wy-nav-content
Expand Down
221 changes: 220 additions & 1 deletion sphinx_rtd_theme/static/css/badge_only.css_t
Original file line number Diff line number Diff line change
@@ -1,2 +1,221 @@
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff") format("woff"),url("../fonts/fontawesome-webfont.ttf") format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:0.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:{{ theme_sidebarwidth }};color:#fcfcfc;background:#1f1d1d;border-top:solid 10px #343131;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:{{ theme_sidebarwidth }}}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
@charset "UTF-8";
.fa:before {
-webkit-font-smoothing: antialiased;
}

.clearfix {
*zoom: 1;
}
.clearfix:before, .clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both;
}

@font-face {
font-family: FontAwesome;
font-weight: normal;
font-style: normal;
src: url("../fonts/fontawesome-webfont.eot");
src: url("../fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/fontawesome-webfont.woff") format("woff"), url("../fonts/fontawesome-webfont.ttf") format("truetype"), url("../fonts/fontawesome-webfont.svg#FontAwesome") format("svg");
}
.fa:before {
display: inline-block;
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
line-height: 1;
text-decoration: inherit;
}

a .fa {
display: inline-block;
text-decoration: inherit;
}

li .fa {
display: inline-block;
}
li .fa-large:before,
li .fa-large:before {
/* 1.5 increased font size for fa-large * 1.25 width */
width: 1.875em;
}

ul.fas {
list-style-type: none;
margin-left: 2em;
text-indent: -0.8em;
}
ul.fas li .fa {
width: 0.8em;
}
ul.fas li .fa-large:before,
ul.fas li .fa-large:before {
/* 1.5 increased font size for fa-large * 1.25 width */
vertical-align: baseline;
}

.fa-book:before {
content: "";
}

.icon-book:before {
content: "";
}

.fa-caret-down:before {
content: "";
}

.icon-caret-down:before {
content: "";
}

.fa-caret-up:before {
content: "";
}

.icon-caret-up:before {
content: "";
}

.fa-caret-left:before {
content: "";
}

.icon-caret-left:before {
content: "";
}

.fa-caret-right:before {
content: "";
}

.icon-caret-right:before {
content: "";
}

.rst-versions {
position: fixed;
bottom: 0;
left: 0;
width: {{ theme_sidebarwidth }};
color: #fcfcfc;
background: #1f1d1d;
border-top: solid 10px #343131;
font-family: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif;
z-index: 400;
}
.rst-versions a {
color: #2980B9;
text-decoration: none;
}
.rst-versions .rst-badge-small {
display: none;
}
.rst-versions .rst-current-version {
padding: 12px;
background-color: #272525;
display: block;
text-align: right;
font-size: 90%;
cursor: pointer;
color: #27AE60;
*zoom: 1;
}
.rst-versions .rst-current-version:before, .rst-versions .rst-current-version:after {
display: table;
content: "";
}
.rst-versions .rst-current-version:after {
clear: both;
}
.rst-versions .rst-current-version .fa {
color: #fcfcfc;
}
.rst-versions .rst-current-version .fa-book {
float: left;
}
.rst-versions .rst-current-version .icon-book {
float: left;
}
.rst-versions .rst-current-version.rst-out-of-date {
background-color: #E74C3C;
color: #fff;
}
.rst-versions .rst-current-version.rst-active-old-version {
background-color: #F1C40F;
color: #000;
}
.rst-versions.shift-up .rst-other-versions {
display: block;
}
.rst-versions .rst-other-versions {
font-size: 90%;
padding: 12px;
color: gray;
display: none;
}
.rst-versions .rst-other-versions hr {
display: block;
height: 1px;
border: 0;
margin: 20px 0;
padding: 0;
border-top: solid 1px #413d3d;
}
.rst-versions .rst-other-versions dd {
display: inline-block;
margin: 0;
}
.rst-versions .rst-other-versions dd a {
display: inline-block;
padding: 6px;
color: #fcfcfc;
}
.rst-versions.rst-badge {
width: auto;
bottom: 20px;
right: 20px;
left: auto;
border: none;
max-width: {{ theme_sidebarwidth }};
}
.rst-versions.rst-badge .icon-book {
float: none;
}
.rst-versions.rst-badge .fa-book {
float: none;
}
.rst-versions.rst-badge.shift-up .rst-current-version {
text-align: right;
}
.rst-versions.rst-badge.shift-up .rst-current-version .fa-book {
float: left;
}
.rst-versions.rst-badge.shift-up .rst-current-version .icon-book {
float: left;
}
.rst-versions.rst-badge .rst-current-version {
width: auto;
height: 30px;
line-height: 30px;
padding: 0 6px;
display: block;
text-align: center;
}

@media screen and (max-width: 768px) {
.rst-versions {
width: 85%;
display: none;
}
.rst-versions.shift {
display: block;
}
}

/*# sourceMappingURL=badge_only.css_t.map */
2 changes: 1 addition & 1 deletion sphinx_rtd_theme/static/css/badge_only.css_t.map
Original file line number Diff line number Diff line change
@@ -1,6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,WAAW,EAAE,IAAI;EACjB,OAAO,EAAE,KAAuB;EAChC,OAAO,EAAE,KAAK;EACd,UAAU,EAAE,MAAM;;;AGhDpB,oCAAsB;EHmDxB,aAAa;IACX,KAAK,EAAE,GAAG;IACV,OAAO,EAAE,IAAI;;EACb,mBAAO;IACL,OAAO,EAAE,KAAK",
"sources": ["../../../bower_components/wyrm/sass/wyrm_core/_mixin.sass","../../../bower_components/bourbon/dist/css3/_font-face.scss","../../../sass/_theme_badge_fa.sass","../../../sass/_theme_badge.sass","../../../sass/_theme_variables.sass","../../../bower_components/wyrm/sass/wyrm_core/_wy_variables.sass","../../../bower_components/neat/app/assets/stylesheets/grid/_media.scss"],
"names": [],
"file": "badge_only.css_t"
Expand Down
Loading

0 comments on commit 630b50f

Please sign in to comment.