1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
// Global CSS rules for all screen size
#sidebar {
font-family: map-get($font-families, 'sidebar');
height: 100%;
position: fixed;
top: 0;
background: map-get($sidebar, background);
overflow: auto;
z-index: map-get($z-indexes, l-sidebar);
// Sidebar animation
// Transition style (push)
transition: transform .25s ease-in-out;
-webkit-transition: -webkit-transform .25s ease-in-out;
// Improve smoothing of the font by adding subpixel in Safari
@include prefix(font-smoothing, antialiased, 'webkit');
.sidebar-container {
overflow: auto;
}
// Author information
.sidebar-profile {
color: map-get($sidebar, color);
text-align: center;
padding-top: 18px;
margin-bottom: 15px;
.sidebar-profile-picture {
display: block;
margin: 0 auto;
}
.sidebar-profile-name {
font-size: 1.1em;
color: map-get($sidebar, color);
}
}
// Sidebar's buttons
ul.sidebar-buttons {
padding: 0;
margin: 0 0 20px 0;
li.sidebar-button {
display: block;
width: 100%;
// Height of a link in the menu
height: 45px;
line-height: 45px;
.sidebar-button-link {
color: map-get($sidebar, color);
display: block;
height: 100%;
&:hover,
&:active {
text-decoration: none;
color: lighten(map-get($sidebar, color), 35);
}
}
}
&:first-child {
margin-top: 5px;
}
}
}
// Define sidebar behavior configured in `_config.yml` for small screen
// On `$small-and-down` (small screen): It hide by default the sidebar
// and with javascript located in `source/_js/_sidebar.js`, it will animate the swipe of the sidebar
@media #{$small-and-down} {
#sidebar {
&[data-behavior="1"],
&[data-behavior="2"],
&[data-behavior="4"],
&[data-behavior="5"] {
left: -#{map-get($sidebar, lg-screen-width)};
@include sidebar-lg;
}
&[data-behavior="3"],
&[data-behavior="6"] {
left: -#{map-get($sidebar, md-screen-width)};
@include sidebar-md;
}
}
}
// Define sidebar behavior configured in `_config.yml` for medium screen
@media #{$medium-only} {
#sidebar {
&[data-behavior="1"],
&[data-behavior="2"],
&[data-behavior="3"] {
@include sidebar-md;
}
&[data-behavior="4"],
&[data-behavior="5"] {
left: -#{map-get($sidebar, lg-screen-width)};
@include sidebar-lg;
}
&[data-behavior="6"] {
left: -#{map-get($sidebar, md-screen-width)};
@include sidebar-md;
}
}
}
// Define sidebar behavior configured in `_config.yml` for large screen
@media #{$large-only} {
#sidebar {
&[data-behavior="1"],
&[data-behavior="2"] {
@include sidebar-lg;
}
&[data-behavior="3"] {
@include sidebar-md;
}
&[data-behavior="4"],
&[data-behavior="5"] {
left: -#{map-get($sidebar, lg-screen-width)};
@include sidebar-lg;
}
&[data-behavior="6"] {
left: -#{map-get($sidebar, md-screen-width)};
@include sidebar-md;
}
}
}
@media #{$xlarge-and-up} {
#sidebar {
&[data-behavior="1"] {
@include sidebar-xlg;
}
&[data-behavior="2"] {
@include sidebar-lg;
}
&[data-behavior="3"] {
@include sidebar-md;
}
&[data-behavior="4"] {
left: -#{map-get($sidebar, xlg-screen-width)};
@include sidebar-xlg;
}
&[data-behavior="5"] {
left: -#{map-get($sidebar, lg-screen-width)};
@include sidebar-lg;
}
&[data-behavior="6"] {
left: -#{map-get($sidebar, md-screen-width)};
@include sidebar-md;
}
// hide bio in sidebar when small sidebar is enabled
&[data-behavior="2"],
&[data-behavior="3"],
&[data-behavior="5"],
&[data-behavior="6"] {
.sidebar-profile-bio {
display: none;
}
}
}
}
// display author bio only on extra large screen
@media #{$large-and-down} {
#sidebar .sidebar-profile-bio {
display: none;
}
}
// Hide sidebar in print layout
@media print {
#sidebar {
display: none;
}
}
|