Skip to content

Commit c5ac2e0

Browse files
committed
scss: Import from gems
This will help keeping the styleheets updated, and allows us some flexibility in customizing SCSS further
1 parent 007590a commit c5ac2e0

5 files changed

Lines changed: 100 additions & 14 deletions

File tree

site/Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ group :jekyll_plugins do
1717
gem 'jekyll-github-metadata', '~> 2.16'
1818
end
1919

20+
gem 'json'
21+
gem "bootswatch", github: "thomaspark/bootswatch", branch: "v5"
22+
gem "bootstrap", "~> 5.3.2"
23+
2024
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
2125
# and associated library.
2226
platforms :mingw, :x64_mingw, :mswin, :jruby do

site/Gemfile.lock

Lines changed: 77 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,39 @@
1+
GIT
2+
remote: https://github.com/thomaspark/bootswatch.git
3+
revision: 36b93e93619a7c23654b80f053adc5aaf81b1c6a
4+
branch: v5
5+
specs:
6+
bootswatch (5.3.2)
7+
18
GEM
29
remote: https://rubygems.org/
310
specs:
411
addressable (2.8.6)
512
public_suffix (>= 2.0.2, < 6.0)
6-
base64 (0.2.0)
13+
autoprefixer-rails (10.4.16.0)
14+
execjs (~> 2)
15+
bootstrap (5.3.2)
16+
autoprefixer-rails (>= 9.1.0)
17+
popper_js (>= 2.11.8, < 3)
718
colorator (1.1.0)
8-
concurrent-ruby (1.2.2)
19+
concurrent-ruby (1.2.3)
920
em-websocket (0.5.3)
1021
eventmachine (>= 0.12.9)
1122
http_parser.rb (~> 0)
1223
eventmachine (1.2.7)
13-
faraday (2.8.1)
14-
base64
15-
faraday-net_http (>= 2.0, < 3.1)
16-
ruby2_keywords (>= 0.0.4)
17-
faraday-net_http (3.0.2)
24+
execjs (2.9.1)
25+
faraday (2.9.0)
26+
faraday-net_http (>= 2.0, < 3.2)
27+
faraday-net_http (3.1.0)
28+
net-http
1829
ffi (1.16.3)
1930
forwardable-extended (2.6.0)
20-
google-protobuf (3.25.1-x86_64-linux)
31+
google-protobuf (3.25.2)
32+
google-protobuf (3.25.2-aarch64-linux)
33+
google-protobuf (3.25.2-arm64-darwin)
34+
google-protobuf (3.25.2-x86-linux)
35+
google-protobuf (3.25.2-x86_64-darwin)
36+
google-protobuf (3.25.2-x86_64-linux)
2137
http_parser.rb (0.8.0)
2238
i18n (1.14.1)
2339
concurrent-ruby (~> 1.0)
@@ -44,6 +60,7 @@ GEM
4460
sass-embedded (~> 1.54)
4561
jekyll-watch (2.2.1)
4662
listen (~> 3.0)
63+
json (2.7.1)
4764
kramdown (2.4.0)
4865
rexml
4966
kramdown-parser-gfm (1.1.0)
@@ -53,40 +70,87 @@ GEM
5370
rb-fsevent (~> 0.10, >= 0.10.3)
5471
rb-inotify (~> 0.9, >= 0.9.10)
5572
mercenary (0.4.0)
73+
net-http (0.4.1)
74+
uri
5675
octokit (6.1.1)
5776
faraday (>= 1, < 3)
5877
sawyer (~> 0.9)
5978
pathutil (0.16.2)
6079
forwardable-extended (~> 2.6)
80+
popper_js (2.11.8)
6181
public_suffix (5.0.4)
6282
rb-fsevent (0.11.2)
6383
rb-inotify (0.10.1)
6484
ffi (~> 1.0)
6585
rexml (3.2.6)
6686
rouge (4.2.0)
67-
ruby2_keywords (0.0.5)
6887
safe_yaml (1.0.5)
69-
sass-embedded (1.69.6-x86_64-linux-gnu)
70-
google-protobuf (~> 3.25)
88+
sass-embedded (1.69.5-aarch64-linux-android)
89+
google-protobuf (~> 3.23)
90+
sass-embedded (1.69.5-aarch64-linux-gnu)
91+
google-protobuf (~> 3.23)
92+
sass-embedded (1.69.5-aarch64-linux-musl)
93+
google-protobuf (~> 3.23)
94+
sass-embedded (1.69.5-arm-linux-androideabi)
95+
google-protobuf (~> 3.23)
96+
sass-embedded (1.69.5-arm-linux-gnueabihf)
97+
google-protobuf (~> 3.23)
98+
sass-embedded (1.69.5-arm-linux-musleabihf)
99+
google-protobuf (~> 3.23)
100+
sass-embedded (1.69.5-arm64-darwin)
101+
google-protobuf (~> 3.23)
102+
sass-embedded (1.69.5-x86-linux-android)
103+
google-protobuf (~> 3.23)
104+
sass-embedded (1.69.5-x86-linux-gnu)
105+
google-protobuf (~> 3.23)
106+
sass-embedded (1.69.5-x86-linux-musl)
107+
google-protobuf (~> 3.23)
108+
sass-embedded (1.69.5-x86_64-darwin)
109+
google-protobuf (~> 3.23)
110+
sass-embedded (1.69.5-x86_64-linux-android)
111+
google-protobuf (~> 3.23)
112+
sass-embedded (1.69.5-x86_64-linux-gnu)
113+
google-protobuf (~> 3.23)
114+
sass-embedded (1.69.5-x86_64-linux-musl)
115+
google-protobuf (~> 3.23)
71116
sawyer (0.9.2)
72117
addressable (>= 2.3.5)
73118
faraday (>= 0.17.3, < 3)
74119
terminal-table (3.0.2)
75120
unicode-display_width (>= 1.1.1, < 3)
76121
unicode-display_width (2.5.0)
122+
uri (0.13.0)
77123
webrick (1.8.1)
78124

79125
PLATFORMS
80-
x86_64-linux
126+
aarch64-linux
127+
aarch64-linux-android
128+
aarch64-linux-gnu
129+
aarch64-linux-musl
130+
arm-linux-androideabi
131+
arm-linux-gnueabihf
132+
arm-linux-musleabihf
133+
arm64-darwin
134+
x86-linux
135+
x86-linux-android
136+
x86-linux-gnu
137+
x86-linux-musl
138+
x86_64-darwin
139+
x86_64-linux-android
140+
x86_64-linux-gnu
141+
x86_64-linux-musl
81142

82143
DEPENDENCIES
144+
bootstrap (~> 5.3.2)
145+
bootswatch!
83146
http_parser.rb (~> 0.6.0)
84147
jekyll (~> 4.3)
85148
jekyll-github-metadata (~> 2.16)
149+
json
86150
tzinfo (>= 1, < 3)
87151
tzinfo-data
88152
wdm (~> 0.1.1)
89153
webrick (~> 1.8)
90154

91155
BUNDLED WITH
92-
2.4.21
156+
2.5.4

site/_includes/styles.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<link href="https://cdn.jsdelivr.net/npm/bootswatch@5.3.2/dist/darkly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
21
<link rel="stylesheet" href="{% asset /css/rougehl.css %}">
32
<link rel="stylesheet" href="{% scssasset /css/site.scss %}">
43
<link rel="stylesheet" href="{% asset /css/fix-fouc.css %}">

site/_plugins/inject-scss-gems.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
require 'rubygems'
2+
require 'bootstrap'
3+
4+
Jekyll::Hooks.register :site, :after_init do |site|
5+
# Ensure 'load_paths' is initialized
6+
site.config["sass"]["load_paths"] = [] if site.config["sass"]["load_paths"].nil?
7+
8+
# Add Bootstrap stylesheets path
9+
site.config["sass"]["load_paths"] << Bootstrap.stylesheets_path
10+
11+
# Add Bootswatch stylesheets path
12+
Gem.loaded_specs["bootswatch"].load_paths.each do |path|
13+
site.config["sass"]["load_paths"] << path
14+
end
15+
end

site/assets/css/site.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
# only Main files contain this front matter, not partials.
44
---
55

6+
@import "darkly/variables";
7+
@import "_bootstrap";
8+
@import "darkly/bootswatch";
9+
610
@import "markdown-mixins";
711
@import "anchor-blink";
812

0 commit comments

Comments
 (0)