Skip to content

Commit 22c080b

Browse files
committed
Replace CSS files with properly-structured Sass
Uses real variables for screen size and is now logically broken down into sections.
1 parent ff9e541 commit 22c080b

11 files changed

Lines changed: 327 additions & 293 deletions

_includes/head.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@
77
<link rel="alternate" type="application/atom+xml" href="/news/atom.xml" title="Atom feed">
88
<link rel="icon" href="/favicon.ico" />
99

10+
<!-- Bootstrap styles -->
1011
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
1112
<link rel="stylesheet" href="/stylesheets/bootstrap.css">
12-
<link rel="stylesheet" href="/stylesheets/bootstrap-extensions.css">
13-
<!-- Nav infrastructure and misc utils (search, user cards, embeds, CC license) -->
14-
<link rel="stylesheet" href="/stylesheets/infrastructure-utils.css" />
13+
14+
<!-- Custom styles -->
15+
<link rel="stylesheet" href="/stylesheets/site-structure.css">
16+
<link rel="stylesheet" href="/stylesheets/search.css">
17+
<link rel="stylesheet" href="/stylesheets/landing-content.css">
18+
<link rel="stylesheet" href="/stylesheets/page-content.css">
19+
<link rel="stylesheet" href="/stylesheets/user-cards.css">
20+
<link rel="stylesheet" href="/stylesheets/tabs.css">
1521

1622
<!-- Python code highlighting -->
1723
<link rel="stylesheet" href="/stylesheets/pygments/monokai.css" />

_sass/_custom-variables.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Variable overrides
2+
$brand-primary: #da5e25;
3+
$brand-danger: #ef2d19;
4+
$link-color: #ff9b1a;
5+
$navbar-default-link-hover-color: $link-color;
6+
$code-color: #cccccc;
7+
$code-bg: #111111;
8+
$pre-bg: #111111;
9+
$pre-color: #cccccc;
10+
$pre-border-color: transparent;
11+
$icon-font-path: "/fonts/bootstrap/";
12+
13+
@import "variables";

maintainer-notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Bootstrap, Bootswatch, and styling
77
---
88
- Build on Twitter Bootstrap
99
- Styling based on Bootswatch's "Darkly" theme
10-
- Custom modifications to defaults from Bootstrap and Bootswatch are stored in `/stylesheets/bootstrap.scss`
10+
- Custom modifications to defaults from Bootstrap and Bootswatch are stored in `/_sass/_custom-variables.scss` and `/stylesheets/bootstrap.scss`
1111
- Jekyll builds Bootstrap, Bootswatchm and custom modifications manually on every build. We don't use a pre-build release CSS file.
1212
- Bootstrap and Bootswatch files are spread across 3 different directories. In all cases, the files are unmodified from the versions found in official releases.
1313
- `/_sass/`

stylesheets/bootstrap.scss

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
11
---
22
---
33

4-
// Variable overrides
5-
$brand-primary: #da5e25;
6-
$brand-danger: #ef2d19;
7-
$link-color: #ff9b1a;
8-
$navbar-default-link-hover-color: $link-color;
9-
$code-color: #cccccc;
10-
$code-bg: #111111;
11-
$pre-bg: #111111;
12-
$pre-color: #cccccc;
13-
$pre-border-color: transparent;
14-
$icon-font-path: "/fonts/bootstrap/";
15-
164
// Bootstrap + bootswatch imports
17-
@import "variables";
5+
@import "custom-variables";
186
@import "bootstrap/bootstrap";
197
@import "bootswatch";
208

stylesheets/infrastructure-utils.css

Lines changed: 0 additions & 191 deletions
This file was deleted.

stylesheets/landing-content.scss

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
---
3+
4+
@import "custom-variables";
5+
6+
// Jumbotron title size
7+
.jumbotron h1 {
8+
font-size: 54px;
9+
}
10+
11+
// Featurette flow margin
12+
.featurette-divider {
13+
margin: 80px 0;
14+
}
15+
16+
// Featurette headings
17+
.featurette-heading {
18+
font-weight: 300;
19+
line-height: 1;
20+
letter-spacing: -1px;
21+
}
22+
23+
// Background for "projects" featurette
24+
.projects-featurette {
25+
background-image: url('../images/project-showcase-small.jpg');
26+
background-position-y: center;
27+
background-repeat: repeat-x;
28+
background-size: cover;
29+
margin-top: 80px;
30+
margin-bottom: 80px;
31+
}
32+
33+
// Spacing and coloring for content in front of "projects" image
34+
.projects-featurette-content {
35+
padding-top: 80px;
36+
padding-bottom: 80px;
37+
color: #fafafa;
38+
}
39+
40+
// Featurette scaling on smaller displays
41+
@media all and (min-width: $screen-sm-min) {
42+
.featurette-heading {
43+
font-size: 50px;
44+
}
45+
}
46+
47+
// Horizontal flow of featurette content on larger displays
48+
@media all and (max-width: $screen-md-max) {
49+
.featurette {
50+
text-align: center;
51+
}
52+
}

stylesheets/page-content.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
---
3+
4+
.language-icon {
5+
height: 25px;
6+
}

stylesheets/search.scss

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
---
3+
4+
@import "custom-variables";
5+
6+
#search-input {
7+
width: 130px;
8+
}
9+
10+
#search-dropdown {
11+
width: 320px;
12+
max-height: 500px;
13+
height: 500px;
14+
overflow-y: scroll;
15+
display: none;
16+
}
17+
18+
#search-dropdown h2 {
19+
margin: 0;
20+
}
21+
22+
.search-results-container {
23+
padding-top: 15px;
24+
margin-right: 20px;
25+
margin-bottom: 20px;
26+
margin-left: 20px;
27+
}
28+
29+
.search-result {
30+
display: none;
31+
32+
h4 {
33+
font-size: large;
34+
margin-bottom: 0;
35+
}
36+
}
37+
38+
.search-result > div:empty {
39+
display: none;
40+
}
41+
42+
.no-results-note {
43+
display: none;
44+
margin-top: 10px;
45+
}
46+
47+
.no-results-note:only-child {
48+
display: block;
49+
}
50+
51+
@media all and (max-width: $screen-md-max) {
52+
#search-li {
53+
display: none;
54+
}
55+
56+
#search-container {
57+
display: none;
58+
}
59+
}

0 commit comments

Comments
 (0)