sol2/sass/_theme_layout.sass

382 lines
9.8 KiB
Sass
Raw Normal View History

2013-10-18 03:56:14 +08:00
.wy-affix
position: fixed
top: $gutter
.wy-menu
a:hover
text-decoration: none
.wy-menu-horiz
+clearfix
ul, li
display: inline-block
li:hover
background: rgba(255,255,255,.1)
li
&.divide-left
border-left: solid 1px hsl(0, 0%, 25%)
&.divide-right
border-right: solid 1px hsl(0, 0%, 25%)
a
height: $base-font-size * 2
display: inline-block
line-height: $base-font-size * 2
padding: 0 $base-font-size
.wy-menu-vertical
header, p.caption
2013-10-18 03:56:14 +08:00
height: $base-font-size * 2
display: inline-block
line-height: $base-font-size * 2
padding: 0 $gutter
margin-bottom: 0
2013-10-18 03:56:14 +08:00
display: block
font-weight: bold
text-transform: uppercase
font-size: 80%
2015-07-26 02:01:18 +08:00
color: $menu-color
2013-10-18 03:56:14 +08:00
white-space: nowrap
ul
margin-bottom: 0
li
&.divide-top
border-top: solid 1px hsl(0, 0%, 25%)
&.divide-bottom
border-bottom: solid 1px hsl(0, 0%, 25%)
&.current
2015-07-26 02:01:18 +08:00
background: darken($menu-vertical-background-color, 10%)
2013-10-18 03:56:14 +08:00
a
2015-07-26 02:01:18 +08:00
color: $menu-link-medium
border-right: solid 1px darken($menu-vertical-background-color, 20%)
padding: $gutter / 4 $gutter * 1.5
2013-10-18 03:56:14 +08:00
&:hover
2015-07-26 02:01:18 +08:00
background: darken($menu-vertical-background-color, 15%)
code
border: none
background: inherit
color: inherit
padding-left: 0
padding-right: 0
// Expand links
span.toctree-expand
display: block
float: left
margin-left: -1.2em
@extend .fa
@extend .fa-plus-square-o
font-size: .8em
line-height: 1.6em
2015-07-26 02:01:18 +08:00
color: darken($menu-link-medium, 20%)
2013-11-07 04:44:22 +08:00
// On state for the first level
2013-10-18 03:56:14 +08:00
li.on a, li.current > a
2015-07-26 02:01:18 +08:00
color: $menu-link-color
padding: $gutter / 4 $gutter
2013-10-18 03:56:14 +08:00
font-weight: bold
position: relative
2015-07-26 02:01:18 +08:00
background: $menu-vertical-background-color
2013-10-18 03:56:14 +08:00
border: none
2015-07-26 02:01:18 +08:00
border-bottom: solid 1px darken($menu-vertical-background-color, 20%)
border-top: solid 1px darken($menu-vertical-background-color, 20%)
2013-10-18 03:56:14 +08:00
padding-left: $gutter -4px
+font-smooth
&:hover
2015-07-26 02:01:18 +08:00
background: $menu-vertical-background-color
span.toctree-expand
2015-07-26 02:01:18 +08:00
color: $menu-link-medium
span.toctree-expand
@extend .fa
@extend .fa-minus-square-o
display: block
font-size: .8em
line-height: 1.6em
2015-07-26 02:01:18 +08:00
color: darken($menu-link-medium, 30%)
2013-11-07 04:44:22 +08:00
// This is the on state for pages beyond second level
li.toctree-l1.current li.toctree-l2, li.toctree-l2.current li.toctree-l3
> ul
display: none
&.current > ul
display: block
li.toctree-l2
&.current
> a
2015-07-26 02:01:18 +08:00
background: darken($menu-vertical-background-color, 20%)
padding: $gutter / 4 $gutter * 1.5
li.toctree-l3 > a
display: block
2015-07-26 02:01:18 +08:00
background: darken($menu-vertical-background-color, 20%)
padding: $gutter / 4 $gutter * 2.5
a:hover span.toctree-expand
2015-07-26 02:01:18 +08:00
color: $menu-link-medium
span.toctree-expand
2015-07-26 02:01:18 +08:00
color: darken($menu-vertical-background-color, 35%)
li.toctree-l3
font-size: .9em
&.current
> a
2015-07-26 02:01:18 +08:00
background: darken($menu-vertical-background-color, 25%)
padding: $gutter / 4 $gutter * 2.5
li.toctree-l4 > a
display: block
2015-07-26 02:01:18 +08:00
background: darken($menu-vertical-background-color, 25%)
padding: $gutter / 4 $gutter * 3.5
border-top: none
border-bottom: none
a:hover span.toctree-expand
2015-07-26 02:01:18 +08:00
color: $menu-link-medium
span.toctree-expand
2015-07-26 02:01:18 +08:00
color: darken($menu-vertical-background-color, 40%)
li.toctree-l4
font-size: .9em
2013-10-18 03:56:14 +08:00
li.current ul
display: block
li ul
margin-bottom: 0
display: none
2013-11-09 01:04:25 +08:00
.local-toc
li ul
display: block
2013-10-18 03:56:14 +08:00
li ul li a
margin-bottom: 0
2015-07-26 02:01:18 +08:00
color: $menu-link-light
2013-10-18 03:56:14 +08:00
font-weight: normal
a
display: inline-block
line-height: 18px
padding: $gutter / 4 $gutter
display: block
position: relative
font-size: 90%
2015-07-26 02:01:18 +08:00
color: $menu-link-light
2013-10-18 03:56:14 +08:00
&:hover
background-color: lighten($menu-background-color, 10%)
cursor: pointer
span.toctree-expand
2015-07-26 02:01:18 +08:00
color: $menu-link-light
2013-10-18 03:56:14 +08:00
&:active
background-color: $menu-logo-color
cursor: pointer
2015-07-26 02:01:18 +08:00
color: $menu-link-active
span.toctree-expand
2015-07-26 02:01:18 +08:00
color: $menu-link-active
2013-10-18 03:56:14 +08:00
.wy-side-nav-search
z-index: $z-index-popover
2015-07-26 02:01:18 +08:00
background-color: $nav-search-background-color
2013-10-18 03:56:14 +08:00
text-align: center
padding: $gutter / 2
display: block
2015-07-26 02:01:18 +08:00
color: $nav-search-color
2013-10-18 03:56:14 +08:00
margin-bottom: $gutter / 2
input[type=text]
width: 100%
border-radius: 50px
padding: 6px 12px
border-color: darken($link-color, 5%)
img
display: block
margin: auto auto $gutter / 2 auto
height: 45px
width: 45px
background-color: $menu-logo-color
padding: 5px
border-radius: 100%
2013-10-22 06:52:35 +08:00
> a, .wy-dropdown > a
2015-07-26 02:01:18 +08:00
color: $nav-search-color
2013-10-18 03:56:14 +08:00
font-size: 100%
font-weight: bold
display: inline-block
padding: $base-line-height / 6 $base-line-height / 4
margin-bottom: $gutter / 2
+font-smooth
&:hover
background: rgba(255,255,255,.1)
img.logo
display: block // display on its own line all the time
margin: 0 auto
height: auto // undo badge styling above
width: auto
border-radius: 0
max-width: 100% // shrink on mobile, if appropriate
background: rgba(0,0,0,0) // make hover background of parent show up properly
2013-12-08 21:18:43 +08:00
&.icon
img.logo
margin-top: 0.85em // space it away from the title text
> div.version
margin-top: -1 * ($gutter / 4)
margin-bottom: $gutter / 2
font-weight: normal
color: rgba(255,255,255,.3)
2013-10-18 03:56:14 +08:00
.wy-nav .wy-menu-vertical
header
color: $link-color
a
color: $text-light
&:hover
background-color: $link-color
color: $white
[data-menu-wrap]
+transition(all .2s ease-in)
position: absolute
opacity: 1
width: 100%
opacity: 0
&.move-center
left: 0
right: auto
opacity: 1
&.move-left
right: auto
left: -100%
opacity: 0
&.move-right
right: -100%
left: auto
opacity: 0
.wy-body-for-nav
background: left repeat-y $section-background-color
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxOERBMTRGRDBFMUUxMUUzODUwMkJCOThDMEVFNURFMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxOERBMTRGRTBFMUUxMUUzODUwMkJCOThDMEVFNURFMCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjE4REExNEZCMEUxRTExRTM4NTAyQkI5OEMwRUU1REUwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjE4REExNEZDMEUxRTExRTM4NTAyQkI5OEMwRUU1REUwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+EwrlwAAAAA5JREFUeNpiMDU0BAgwAAE2AJgB9BnaAAAAAElFTkSuQmCC)
background-size: $nav-desktop-width 1px
.wy-grid-for-nav
position: absolute
width: 100%
height: 100%
.wy-nav-side
position: fixed
2013-10-18 03:56:14 +08:00
top: 0
bottom: 0
2013-10-18 03:56:14 +08:00
left: 0
padding-bottom: 2em
2013-10-18 03:56:14 +08:00
width: $nav-desktop-width
overflow-x: hidden
overflow-y: scroll
2013-10-18 03:56:14 +08:00
min-height: 100%
2015-07-26 02:01:18 +08:00
background: $nav-background-color
2013-10-18 03:56:14 +08:00
z-index: $z-index-popover
.wy-nav-top
display: none
background: $link-color
color: $white
padding: $gutter / 4 $gutter / 2
position: relative
line-height: 50px
text-align: center
font-size: 100%
+clearfix
a
color: $white
font-weight: bold
+font-smooth
img
margin-right: $base-line-height / 2
height: 45px
width: 45px
background-color: $menu-logo-color
padding: 5px
border-radius: 100%
i
font-size: 30px
float: left
cursor: pointer
.wy-nav-content-wrap
margin-left: $nav-desktop-width
background: $section-background-color
min-height: 100%
.wy-nav-content
padding: $gutter $gutter * 2
height: 100%
2013-10-22 07:28:09 +08:00
max-width: 800px
margin: auto
2013-10-18 03:56:14 +08:00
.wy-body-mask
position: fixed
width: 100%
height: 100%
background: rgba(0,0,0,.2)
display: none
z-index: $z-index-modal - 1
&.on
display: block
2013-10-27 07:38:18 +08:00
footer
2015-07-26 02:01:18 +08:00
color: $footer-color
p
margin-bottom: $base-line-height / 2
span.commit code
padding: 0px
font-family: $code-font-family
font-size: 1em
background: none
border: none
2015-07-26 02:01:18 +08:00
color: $footer-color
.rst-footer-buttons
+clearfix
#search-results
.search li
margin-bottom: $base-line-height
border-bottom: solid 1px $table_border_color
padding-bottom: $base-line-height
.search li:first-child
border-top: solid 1px $table_border_color
padding-top: $base-line-height
.search li a
font-size: 120%
margin-bottom: $base-line-height / 2
display: inline-block
.context
color: $text-medium
font-size: 90%
2013-10-18 03:56:14 +08:00
+media($tablet)
.wy-body-for-nav
background: $section-background-color
.wy-nav-top
display: block
.wy-nav-side
@if $nav-desktop-position == left
left: -$nav-desktop-width
@else
right: -$nav-desktop-width
&.shift
width: 85%
left: 0
.wy-nav-content-wrap
margin-left: 0
.wy-nav-content
padding: $gutter
&.shift
position: fixed
min-width: 100%
left: 85%
top: 0
height: 100%
overflow: hidden
+media($desktop-wider)
.wy-nav-content-wrap
background: rgba(0,0,0,.05)
.wy-nav-content
margin: 0
background: $section-background-color
2013-10-18 03:56:14 +08:00
2013-10-24 01:07:19 +08:00
@media print
.rst-versions, footer, .wy-nav-side
2013-10-24 01:07:19 +08:00
display: none
.wy-nav-content-wrap
margin-left: 0