Skip to content

Commit 07d670b

Browse files
committed
Switch to Bootstrap SASS
1 parent 7c177ee commit 07d670b

File tree

88 files changed

+8740
-156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+8740
-156
lines changed

_includes/footer.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
<p><a href="#">Back to top</a></p>
44
</footer> <!--/.blog-footer -->
55

6-
<script src="//cdn.jsdelivr.net/jquery/1.11.3/jquery.min.js"></script>
7-
<script src="//cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js"></script>
6+
<script src="{{ '/js/jquery.min.js' | prepend: site.baseurl }}"></script>
7+
<script src="{{ '/js/bootstrap.min.js' | prepend: site.baseurl }}"></script>

_includes/head.html

+1-7
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
77
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
88

9-
<link href='//fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
10-
11-
<link rel="stylesheet" href="//cdn.jsdelivr.net/bootstrap/3.3.6/css/bootstrap.min.css">
12-
<link rel="stylesheet" href="//cdn.jsdelivr.net/bootstrap/3.3.6/css/bootstrap-theme.min.css">
13-
<link rel="stylesheet" href="{{ '/css/main.css' | prepend: site.baseurl }}">
14-
<link rel="stylesheet" href="{{ '/css/highlight.css' | prepend: site.baseurl }}">
15-
169
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
10+
<link rel="stylesheet" href="{{ '/css/application.css' | prepend: site.baseurl }}">
1711
</head>

_layouts/page.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
layout: default
33
---
44
<article class="blog-post">
5-
<h2 class="blog-post-title">{{ page.title }} </h2>
5+
<h2 class="blog-post-title">{{ page.title }}</h2>
66
{{ content }}
77
</article> <!--/.blog-post -->

_layouts/post.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: default
33
---
44
<article class="blog-post">
5-
<h2 class="blog-post-title">{{ page.title }} </h2>
5+
<h2 class="blog-post-title">{{ page.title }}</h2>
66
<!-- <p class="blog-post-meta">{{ page.date | date: "%d.%m.%Y" }}</p> -->
77
{{ content }}
88
</article> <!--/.blog-post -->

_sass/_bootstrap-compass.scss

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@function twbs-font-path($path) {
2+
@return font-url($path, true);
3+
}
4+
5+
@function twbs-image-path($path) {
6+
@return image-url($path, true);
7+
}
8+
9+
$bootstrap-sass-asset-helper: true;

_sass/_bootstrap-mincer.scss

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Mincer asset helper functions
2+
//
3+
// This must be imported into a .css.ejs.scss file.
4+
// Then, <% %>-interpolations will be parsed as strings by Sass, and evaluated by EJS after Sass compilation.
5+
6+
7+
@function twbs-font-path($path) {
8+
// do something like following
9+
// from "path/to/font.ext#suffix" to "<%- asset_path(path/to/font.ext)) + #suffix %>"
10+
// from "path/to/font.ext?#suffix" to "<%- asset_path(path/to/font.ext)) + ?#suffix %>"
11+
// or from "path/to/font.ext" just "<%- asset_path(path/to/font.ext)) %>"
12+
@return "<%- asset_path("#{$path}".replace(/[#?].*$/, '')) + "#{$path}".replace(/(^[^#?]*)([#?]?.*$)/, '$2') %>";
13+
}
14+
15+
@function twbs-image-path($file) {
16+
@return "<%- asset_path("#{$file}") %>";
17+
}
18+
19+
$bootstrap-sass-asset-helper: true;

_sass/_bootstrap-sprockets.scss

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@function twbs-font-path($path) {
2+
@return font-path($path);
3+
}
4+
5+
@function twbs-image-path($path) {
6+
@return image-path($path);
7+
}
8+
9+
$bootstrap-sass-asset-helper: true;

_sass/_bootstrap.scss

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*!
2+
* Bootstrap v3.3.6 (http://getbootstrap.com)
3+
* Copyright 2011-2015 Twitter, Inc.
4+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5+
*/
6+
7+
// Core variables and mixins
8+
@import "bootstrap/variables";
9+
@import "bootstrap/mixins";
10+
11+
// Reset and dependencies
12+
@import "bootstrap/normalize";
13+
@import "bootstrap/print";
14+
@import "bootstrap/glyphicons";
15+
16+
// Core CSS
17+
@import "bootstrap/scaffolding";
18+
@import "bootstrap/type";
19+
@import "bootstrap/code";
20+
@import "bootstrap/grid";
21+
@import "bootstrap/tables";
22+
@import "bootstrap/forms";
23+
@import "bootstrap/buttons";
24+
25+
// Components
26+
@import "bootstrap/component-animations";
27+
@import "bootstrap/dropdowns";
28+
@import "bootstrap/button-groups";
29+
@import "bootstrap/input-groups";
30+
@import "bootstrap/navs";
31+
@import "bootstrap/navbar";
32+
@import "bootstrap/breadcrumbs";
33+
@import "bootstrap/pagination";
34+
@import "bootstrap/pager";
35+
@import "bootstrap/labels";
36+
@import "bootstrap/badges";
37+
@import "bootstrap/jumbotron";
38+
@import "bootstrap/thumbnails";
39+
@import "bootstrap/alerts";
40+
@import "bootstrap/progress-bars";
41+
@import "bootstrap/media";
42+
@import "bootstrap/list-group";
43+
@import "bootstrap/panels";
44+
@import "bootstrap/responsive-embed";
45+
@import "bootstrap/wells";
46+
@import "bootstrap/close";
47+
48+
// Components w/ JavaScript
49+
@import "bootstrap/modals";
50+
@import "bootstrap/tooltip";
51+
@import "bootstrap/popovers";
52+
@import "bootstrap/carousel";
53+
54+
// Utility classes
55+
@import "bootstrap/utilities";
56+
@import "bootstrap/responsive-utilities";
File renamed without changes.

_sass/bootstrap/_alerts.scss

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
//
2+
// Alerts
3+
// --------------------------------------------------
4+
5+
6+
// Base styles
7+
// -------------------------
8+
9+
.alert {
10+
padding: $alert-padding;
11+
margin-bottom: $line-height-computed;
12+
border: 1px solid transparent;
13+
border-radius: $alert-border-radius;
14+
15+
// Headings for larger alerts
16+
h4 {
17+
margin-top: 0;
18+
// Specified for the h4 to prevent conflicts of changing $headings-color
19+
color: inherit;
20+
}
21+
22+
// Provide class for links that match alerts
23+
.alert-link {
24+
font-weight: $alert-link-font-weight;
25+
}
26+
27+
// Improve alignment and spacing of inner content
28+
> p,
29+
> ul {
30+
margin-bottom: 0;
31+
}
32+
33+
> p + p {
34+
margin-top: 5px;
35+
}
36+
}
37+
38+
// Dismissible alerts
39+
//
40+
// Expand the right padding and account for the close button's positioning.
41+
42+
.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.
43+
.alert-dismissible {
44+
padding-right: ($alert-padding + 20);
45+
46+
// Adjust close link position
47+
.close {
48+
position: relative;
49+
top: -2px;
50+
right: -21px;
51+
color: inherit;
52+
}
53+
}
54+
55+
// Alternate styles
56+
//
57+
// Generate contextual modifier classes for colorizing the alert.
58+
59+
.alert-success {
60+
@include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);
61+
}
62+
63+
.alert-info {
64+
@include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);
65+
}
66+
67+
.alert-warning {
68+
@include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text);
69+
}
70+
71+
.alert-danger {
72+
@include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);
73+
}

_sass/bootstrap/_badges.scss

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
//
2+
// Badges
3+
// --------------------------------------------------
4+
5+
6+
// Base class
7+
.badge {
8+
display: inline-block;
9+
min-width: 10px;
10+
padding: 3px 7px;
11+
font-size: $font-size-small;
12+
font-weight: $badge-font-weight;
13+
color: $badge-color;
14+
line-height: $badge-line-height;
15+
vertical-align: middle;
16+
white-space: nowrap;
17+
text-align: center;
18+
background-color: $badge-bg;
19+
border-radius: $badge-border-radius;
20+
21+
// Empty badges collapse automatically (not available in IE8)
22+
&:empty {
23+
display: none;
24+
}
25+
26+
// Quick fix for badges in buttons
27+
.btn & {
28+
position: relative;
29+
top: -1px;
30+
}
31+
32+
.btn-xs &,
33+
.btn-group-xs > .btn & {
34+
top: 0;
35+
padding: 1px 5px;
36+
}
37+
38+
// [converter] extracted a& to a.badge
39+
40+
// Account for badges in navs
41+
.list-group-item.active > &,
42+
.nav-pills > .active > a > & {
43+
color: $badge-active-color;
44+
background-color: $badge-active-bg;
45+
}
46+
47+
.list-group-item > & {
48+
float: right;
49+
}
50+
51+
.list-group-item > & + & {
52+
margin-right: 5px;
53+
}
54+
55+
.nav-pills > li > a > & {
56+
margin-left: 3px;
57+
}
58+
}
59+
60+
// Hover state, but only for links
61+
a.badge {
62+
&:hover,
63+
&:focus {
64+
color: $badge-link-hover-color;
65+
text-decoration: none;
66+
cursor: pointer;
67+
}
68+
}

_sass/bootstrap/_breadcrumbs.scss

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
//
2+
// Breadcrumbs
3+
// --------------------------------------------------
4+
5+
6+
.breadcrumb {
7+
padding: $breadcrumb-padding-vertical $breadcrumb-padding-horizontal;
8+
margin-bottom: $line-height-computed;
9+
list-style: none;
10+
background-color: $breadcrumb-bg;
11+
border-radius: $border-radius-base;
12+
13+
> li {
14+
display: inline-block;
15+
16+
+ li:before {
17+
// [converter] Workaround for https://github.com/sass/libsass/issues/1115
18+
$nbsp: "\00a0";
19+
content: "#{$breadcrumb-separator}#{$nbsp}"; // Unicode space added since inline-block means non-collapsing white-space
20+
padding: 0 5px;
21+
color: $breadcrumb-color;
22+
}
23+
}
24+
25+
> .active {
26+
color: $breadcrumb-active-color;
27+
}
28+
}

0 commit comments

Comments
 (0)