diff --git a/Gemfile b/Gemfile index 788c7a91..ebedacbd 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,6 @@ gem 'kramdown' gem 'mime-types' gem 'nokogiri' gem 'rouge' -gem 'sass' gem 'systemu' group :test do @@ -20,6 +19,7 @@ group :development do end group :nanoc do + gem 'nanoc-dart-sass' gem 'nanoc-live' end diff --git a/Gemfile.lock b/Gemfile.lock index 2ab481c8..83bc1307 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,6 +27,7 @@ GEM http_parser.rb (~> 0) eventmachine (1.2.7) ffi (1.14.2) + google-protobuf (3.21.12) http_parser.rb (0.8.0) immutable-ruby (0.2.0) concurrent-ruby (~> 1.1) @@ -80,6 +81,9 @@ GEM slow_enumerator_tools (~> 1.0) tty-platform (~> 0.2) zeitwerk (~> 2.1) + nanoc-dart-sass (1.0.3) + nanoc-core (~> 4.12) + sass-embedded (~> 1.56) nanoc-deploying (1.0.2) nanoc-checking (~> 1.0) nanoc-cli (~> 4.11, >= 4.11.15) @@ -120,11 +124,9 @@ GEM strscan (>= 3.0.9) rouge (4.2.1) ruby-progressbar (1.13.0) - sass (3.7.4) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) + sass-embedded (1.58.0) + google-protobuf (~> 3.21) + rake (>= 10.0.0) set (1.1.0) slow_enumerator_tools (1.1.0) sorted_set (1.0.3) @@ -152,12 +154,12 @@ DEPENDENCIES minitest minitest-reporters nanoc (~> 4.12) + nanoc-dart-sass nanoc-live nokogiri puma (~> 6.4) rake rouge - sass systemu BUNDLED WITH diff --git a/Rules b/Rules index 4d1901cd..b102aa25 100644 --- a/Rules +++ b/Rules @@ -17,11 +17,11 @@ postprocess do create_search_index end -compile '/assets/css/*/' do - if item.identifier =~ %r{/_[^/]+/$} +compile '/assets/css/**/*' do + if item.identifier.to_s =~ %r{/_\w+\.scss$} # don't compile partials else - filter :sass, :syntax => :scss, :style => :compressed + filter :dart_sass, :syntax => :scss, :style => :compressed filter :relativize_paths, type: :css end end @@ -57,15 +57,15 @@ compile '*' do end -route '/assets/css/*/' do - if item.identifier =~ %r{/_[^/]+/$} +route '/assets/css/**/*' do + if item.identifier.to_s =~ %r{/_\w+\.scss$} # don't route partials else item.identifier.chop + '.css' end end -route '/assets/*/' do +route '/assets/**/*' do item.identifier.to_s.chop + '.' + item[:extension] end diff --git a/content/assets/css/_application.scss b/content/assets/css/_application.scss index 409870b8..37eb392b 100644 --- a/content/assets/css/_application.scss +++ b/content/assets/css/_application.scss @@ -1,6 +1,11 @@ // // Application Template // -------------------------------------------------- +@mixin font-awesome($unicode) { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: $unicode; +} .table { width: 100%; diff --git a/content/assets/css/_mixins.scss b/content/assets/css/_mixins.scss deleted file mode 100644 index ea1d2982..00000000 --- a/content/assets/css/_mixins.scss +++ /dev/null @@ -1,9 +0,0 @@ -// -// Mixins -// -------------------------------------------------- - -@mixin font-awesome($unicode) { - font-family: "Font Awesome 5 Free"; - font-weight: 900; - content: $unicode; -} diff --git a/content/assets/css/_typography.scss b/content/assets/css/_typography.scss index eb11c78c..54200c07 100644 --- a/content/assets/css/_typography.scss +++ b/content/assets/css/_typography.scss @@ -40,7 +40,7 @@ h3 { margin: 0; padding: 12px 0 8px 0; i { - margin-right: $base-unit/4; + margin-right: calc($base-unit / 4); } } @@ -50,7 +50,7 @@ h5 { } p, pre, table { - margin: 0 0 $base-unit/1.5 0; + margin: 0 0 calc($base-unit / 1.5) 0; } a { diff --git a/content/assets/css/style.scss b/content/assets/css/style.scss index 564f2dec..e62b0a0f 100644 --- a/content/assets/css/style.scss +++ b/content/assets/css/style.scss @@ -7,7 +7,6 @@ @import "../../dist/highlightjs/styles/github.css"; @import "variables"; @import "colorscheme"; -@import "mixins"; @import "typography"; @import "syntax"; @import "template";