lesson.scss: style tab panels on setup pages (#464)
[rnaseq-cwl-training.git] / assets / css / lesson.scss
1 ---
2 ---
3
4 //----------------------------------------
5 // Colors.
6 //----------------------------------------
7
8 // branding
9 $color-brand:       #2b3990 !default;
10
11 // code boxes
12 $color-error:       #bd2c00 !default;
13 $color-warning:     #cda01d !default;
14 $color-output:      #303030 !default;
15 $color-source:      #360084 !default;
16
17 // blockquotes
18 $color-callout:     #f4fd9c !default;
19 $color-challenge:   #eec275 !default;
20 $color-checklist:   #dfd2a0 !default;
21 $color-discussion:  #eec275 !default;
22 $color-keypoints:   #7ae78e !default;
23 $color-objectives:  #daee84 !default;
24 $color-prereq:      #9cd6dc !default;
25 $color-solution:    #ded4b9 !default;
26 $color-testimonial: #fc8dc1 !default;
27
28 //----------------------------------------
29 // Specialized code blocks.
30 //----------------------------------------
31
32 @mixin cdSetup($color) {
33     color: $color;
34     border: solid 1px $color;
35     border-left: solid 5px $color;
36     margin: 15px 5px 10px 0;
37     border-radius: 4px 0 0 4px;
38 }
39
40 .error   { @include cdSetup($color-error); }
41 .warning { @include cdSetup($color-warning); }
42 .output  { @include cdSetup($color-output); }
43 .source  { @include cdSetup($color-source); }
44
45 .bash, .language-bash     { @include cdSetup($color-source); }
46 .make, .language-make     { @include cdSetup($color-source); }
47 .matlab, .language-matlab { @include cdSetup($color-source); }
48 .python, .language-python { @include cdSetup($color-source); }
49 .r, .language-r           { @include cdSetup($color-source); }
50 .sql, .language-sql       { @include cdSetup($color-source); }
51
52 .error::before,
53 .warning:before,
54 .output::before,
55 .source::before,
56 .bash::before, .language-bash::before,
57 .make::before, .language-make::before,
58 .matlab::before, .language-matlab::before,
59 .python::before, .language-python::before,
60 .r::before, .language-r::before,
61 .sql::before, .language-sql::before {
62     background-color: #f2eff6;
63     display: block;
64     font-weight: bold;
65     padding: 5px 10px;
66 }
67
68 .error::before  { background-color: #ffebe6; content: "Error"; }
69 .warning:before { background-color: #f8f4e8; content:" Warning"; }
70 .output::before { background-color: #efefef; content: "Output"; }
71 .source::before { content: "Code"; }
72 .bash::before, .language-bash::before { content: "Bash"; }
73 .make::before, .language-make::before { content: "Make"; }
74 .matlab::before, .language-matlab::before { content: "Matlab"; }
75 .python::before, .language-python::before { content: "Python"; }
76 .r::before, .language-r::before { content: "R"; }
77 .sql::before, .language-sql::before { content: "SQL"; }
78
79 // Tab panels are used on Setup pages to show instructions for different Operating Systems
80 .tab-pane {
81   border: solid 1px #ddd; // #ddd == @nav-tabs-active-link-hover-border-color
82   border-top: none;
83   padding: 20px 20px 10px 20px;
84   border-radius: 0 0 4px 4px; // 4px == @border-radius-base
85 }
86
87 //----------------------------------------
88 // Specialized blockquote environments for learning objectives, callouts, etc.
89 //----------------------------------------
90
91 $codeblock-padding: 5px !default;
92
93 @mixin bkSetup($color, $glyph) {
94
95   $gradientcolor1: $color;
96   $gradientcolor2: scale-color($color, $lightness: 10%);
97
98   padding: 0 0 $codeblock-padding $codeblock-padding;
99   border: 1px solid;
100   border-color: $color;
101   border-radius: 4px;
102
103   margin: 15px 5px 10px 0;
104
105   h2 {
106     padding-top: $codeblock-padding;
107     padding-bottom: $codeblock-padding;
108     font-size: 20px;
109     background: linear-gradient(to bottom, $gradientcolor1, $gradientcolor2);
110     border-color: $color;
111     margin-top: 0px;
112     margin-left: -$codeblock-padding; // to move back to the left margin of the enclosing blockquote
113   }
114   h2:before {
115     font-family: 'Glyphicons Halflings';
116     content: $glyph;
117     float: left;
118     padding-left: $codeblock-padding;
119     padding-right: $codeblock-padding;
120     display: inline-block;
121     -webkit-font-smoothing: antialiased;
122   }
123
124 }
125
126 .callout{ @include bkSetup($color-callout, "\e146"); }
127 .challenge{ @include bkSetup($color-challenge, "\270f"); }
128 .checklist{ @include bkSetup($color-checklist, "\e067"); }
129 .discussion{ @include bkSetup($color-discussion, "\e123"); }
130 .keypoints{ @include bkSetup($color-keypoints, "\e101"); }
131 .objectives{ @include bkSetup($color-objectives, "\e085"); }
132 .prereq{ @include bkSetup($color-prereq, "\e124"); }
133 .solution{ @include bkSetup($color-solution, "\e105"); }
134 .testimonial{ @include bkSetup($color-testimonial, "\e143"); }
135
136 .callout h3,
137 .challenge h3,
138 .checklist h3,
139 .discussion h3,
140 .keypoints h3,
141 .objectives h3,
142 .prereq h3,
143 .solution h3,
144 .testimonial h3 {
145 font-size: 18px;
146 }
147
148 .challenge    { background-color: #eec27520; }
149 .callout      { background-color: #f4fd9c20; }
150 .challenge    { background-color: #eec27520; }
151 .checklist    { background-color: #dfd2a020; }
152 .discussion   { background-color: #eec27520; }
153 .keypoints    { background-color: #7ae78e20; }
154 .objectives   { background-color: #daee8420; }
155 .prereq       { background-color: #9cd6dc20; }
156 .solution     { background-color: #ded4b94d; }
157 .testimonial  { background-color: #fc8dc120; }
158
159 blockquote p {
160     margin: 5px;
161 }
162 blockquote :not(h2) + p {
163     padding-top: 1em;
164 }
165
166 //----------------------------------------
167 // Override Bootstrap settings.
168 //----------------------------------------
169
170 blockquote { font-size: inherit; }
171
172 code {
173   white-space: nowrap;
174   padding: 2px 5px;
175   color: #006cad;
176   background-color: #e7e7e7;
177 }
178
179 samp { hyphens: none; }
180
181 dt { margin-top: 20px; }
182 dd { margin-left: 2em; }
183
184 article img {
185     display: block;
186     margin: 20px auto;
187     max-width: 100%;
188 }
189
190 article h2 {
191   margin: 48px 0 16px;
192   border-bottom: solid 1px #eaecef;
193   padding-bottom: 0.3em;
194   line-height: 1.25;
195 }
196
197 article h3 { margin: 40px 0 16px; }
198
199 article pre {
200     margin: 0;
201     border: 0;
202 }
203
204 //----------------------------------------
205 // Miscellaneous.
206 //----------------------------------------
207
208 .figures h2 { margin-top: 100px; }
209
210 .maintitle {
211   text-align: center;
212 }
213
214 .footertext {
215   text-align: center;
216 }
217
218 footer .copyright,
219 footer .help-links
220 {
221     font-size: inherit;
222     margin-top: 10px;
223     margin-bottom: 10px;
224     font-weight: 500;
225     line-height: 1.1;
226 }
227
228 img.navbar-logo {
229   height: 40px; // synchronize with height of navbar
230   padding-top: 5px;
231   padding-right: 10px;
232 }
233
234 div.branding {
235   color: $color-brand;
236 }
237
238 ul,
239 ol {
240   padding-left: 2em;
241 }
242
243 span.fold-unfold {
244   margin-left: 1em;
245   opacity: 0.5;
246 }
247
248
249 //----------------------------------------
250 // Life cycle box
251 //----------------------------------------
252
253 div.life-cycle {
254     position: -webkit-sticky; /* Safari */
255     position: sticky;
256     top: 0;
257     z-index: 100;
258     font-size: 1.2em;
259     text-align: center;
260     margin-bottom: -1px;
261     border-radius: 0;
262 }
263
264 .pre-alpha {
265     color: #a94442;
266     background: #f2dede;
267 }
268
269 .alpha {
270     color: #8a6d3b;
271     background: #fcf8e3;
272 }
273
274 .beta {
275     color: #31708f;
276     background: #d9edf7;
277 }
278
279
280 //----------------------------------------
281 // keyboard key style, from StackExchange.
282 //----------------------------------------
283
284 kbd {
285     display: inline-block;
286     margin: 0 .1em;
287     padding: .1em .6em;
288     font-family: Arial,"Helvetica Neue",Helvetica,sans-serif;
289     font-size: 11px;
290     line-height: 1.4;
291     color: #242729;
292     text-shadow: 0 1px 0 #FFF;
293     background-color: #e1e3e5;
294     border: 1px solid #adb3b9;
295     border-radius: 3px;
296     box-shadow: 0 1px 0 rgba(12,13,14,0.2), 0 0 0 2px #FFF inset;
297     white-space: nowrap;
298     font-style: normal;
299 }