Skip to content

Commit

Permalink
Update jekyll and uswds deps
Browse files Browse the repository at this point in the history
  • Loading branch information
apburnes authored and bengerman13 committed Apr 12, 2022
1 parent a6e387f commit 70a0a76
Show file tree
Hide file tree
Showing 24 changed files with 1,208 additions and 1,378 deletions.
2 changes: 0 additions & 2 deletions .ruby-version

This file was deleted.

18 changes: 7 additions & 11 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@ source "https://rubygems.org"
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.9"

# See https://github.com/envygeeks/jekyll-assets/issues/622
gem "sprockets", "~> 3.7"
gem "jekyll", "~> 4.0"
gem "execjs", "2.7.0" # https://github.com/rails/execjs/issues/99
gem "autoprefixer-rails"

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem "jekyll-feed", "~> 0.15"
gem 'jekyll-redirect-from'
gem 'jekyll-paginate-v2', "2.0"
gem 'jekyll-paginate-v2', "3.0.0"
gem 'jekyll-sitemap'
gem 'jekyll-seo-tag'
gem "jekyll-assets", "~> 3.0", group: :jekyll_plugins
gem 'jekyll-assets', git: "https://github.com/envygeeks/jekyll-assets"
gem "jekyll-last-modified-at"
end

Expand All @@ -33,8 +32,5 @@ gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem "wdm", "~> 0.1.0" if Gem.win_platform?

gem "html-proofer", "~> 3.10"
gem "kramdown-parser-gfm"

gem "nokogiri", ">= 1.13.2"

gem "addressable", ">= 2.8.0"
gem "addressable", ">= 2.8.0"
153 changes: 81 additions & 72 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,146 +1,155 @@
GIT
remote: https://github.com/envygeeks/jekyll-assets
revision: 056d2c88719ef3b1f90967a606dd1441581dd832
specs:
jekyll-assets (4.0.0.alpha)
activesupport (>= 5, < 7)
execjs (~> 2.7)
extras (~> 0.2)
fastimage (~> 2.0, >= 1.8)
jekyll (>= 3.5, < 5.0)
jekyll-sanity (~> 1.2)
liquid-tag-parser (>= 1, < 3)
nokogiri (~> 1.10)
pathutil (~> 0.16)
sassc (>= 1.11, < 3.0)
sprockets (~> 4.0.beta7)

GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.4.3)
activesupport (6.1.5)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
autoprefixer-rails (10.4.2.0)
execjs (~> 2)
colorator (1.1.0)
concurrent-ruby (1.1.7)
em-websocket (0.5.1)
concurrent-ruby (1.1.10)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
ethon (0.12.0)
ffi (>= 1.3.0)
http_parser.rb (~> 0)
ethon (0.15.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
execjs (2.7.0)
extras (0.3.0)
forwardable-extended (~> 2.5)
fastimage (2.1.7)
ffi (1.13.1)
fastimage (2.2.6)
ffi (1.15.5)
forwardable-extended (2.6.0)
html-proofer (3.15.1)
html-proofer (3.19.3)
addressable (~> 2.3)
mercenary (~> 0.3)
nokogumbo (~> 2.0)
nokogiri (~> 1.12)
parallel (~> 1.3)
rainbow (~> 3.0)
typhoeus (~> 1.3)
yell (~> 2.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
http_parser.rb (0.8.0)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
jekyll (3.9.0)
jekyll (4.2.2)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
i18n (~> 1.0)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (>= 1.17, < 3)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3.3)
mercenary (~> 0.4.0)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
rouge (~> 3.0)
safe_yaml (~> 1.0)
jekyll-assets (3.0.12)
activesupport (~> 5.0)
execjs (~> 2.7)
extras (~> 0.2)
fastimage (~> 2.0, >= 1.8)
jekyll (>= 3.5, < 4.0)
jekyll-sanity (~> 1.2)
liquid-tag-parser (~> 1.0)
nokogiri (~> 1.8)
pathutil (~> 0.16)
sprockets (>= 3.3, < 4.1.beta)
jekyll-feed (0.13.0)
terminal-table (~> 2.0)
jekyll-feed (0.16.0)
jekyll (>= 3.7, < 5.0)
jekyll-last-modified-at (1.3.0)
jekyll (>= 3.7, < 5.0)
posix-spawn (~> 0.3.9)
jekyll-paginate-v2 (2.0.0)
jekyll (~> 3.0)
jekyll-paginate-v2 (3.0.0)
jekyll (>= 3.0, < 5.0)
jekyll-redirect-from (0.16.0)
jekyll (>= 3.3, < 5.0)
jekyll-sanity (1.2.0)
jekyll (~> 3.1)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.6.1)
jekyll (>= 3.3, < 5.0)
jekyll-sanity (1.6.0)
jekyll (>= 3.1, < 5.0)
pathutil (~> 0.16)
jekyll-sass-converter (2.2.0)
sassc (> 2.0.1, < 3.0)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.3.1)
kramdown (2.3.2)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
liquid-tag-parser (1.9.0)
liquid-tag-parser (2.0.2)
extras (~> 0.3)
liquid (>= 3.0, < 5.0)
listen (3.2.1)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mercenary (0.4.0)
mini_portile2 (2.8.0)
minitest (5.14.1)
nokogiri (1.13.3)
minitest (5.15.0)
nokogiri (1.13.4)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogumbo (2.0.2)
nokogiri (~> 1.8, >= 1.8.4)
parallel (1.19.1)
parallel (1.22.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
posix-spawn (0.3.15)
public_suffix (4.0.6)
public_suffix (4.0.7)
racc (1.6.0)
rack (2.2.3)
rainbow (3.0.0)
rb-fsevent (0.10.4)
rainbow (3.1.1)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (3.21.0)
rouge (3.28.0)
safe_yaml (1.0.5)
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)
sprockets (3.7.2)
sassc (2.4.0)
ffi (~> 1.9)
sprockets (4.0.3)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
thread_safe (0.3.6)
typhoeus (1.3.1)
terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.7)
thread_safe (~> 0.1)
yell (2.2.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-display_width (1.8.0)
yell (2.2.2)
zeitwerk (2.5.4)

PLATFORMS
ruby

DEPENDENCIES
addressable (>= 2.8.0)
autoprefixer-rails
execjs (= 2.7.0)
html-proofer (~> 3.10)
jekyll (~> 3.9)
jekyll-assets (~> 3.0)
jekyll-feed (~> 0.6)
jekyll (~> 4.0)
jekyll-assets!
jekyll-feed (~> 0.15)
jekyll-last-modified-at
jekyll-paginate-v2 (= 2.0)
jekyll-paginate-v2 (= 3.0.0)
jekyll-redirect-from
jekyll-seo-tag
jekyll-sitemap
kramdown-parser-gfm
nokogiri (>= 1.13.2)
sprockets (~> 3.7)
tzinfo-data

RUBY VERSION
Expand Down
7 changes: 7 additions & 0 deletions _assets/css/overrides/_add-background-svg.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Override USWDS mixin to use jekyll-assets asset_url()

@mixin add-background-svg($image-name, $image-path: $theme-image-path) {
background-image: asset_url('#{$image-path}/#{$image-name}.svg'),
linear-gradient(transparent, transparent);
background-repeat: no-repeat;
}
4 changes: 4 additions & 0 deletions _assets/css/overrides/_all.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@import 'add-background-svg';
@import 'font-face';
@import 'hero';
@import 'icon';
13 changes: 13 additions & 0 deletions _assets/css/overrides/_font-face.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Override USWDS mixin to use jekyll-assets asset_url()

@mixin at-font-face($display-name, $file-path, $font-weight, $font-style) {
@font-face {
font-family: $display-name;
font-style: unquote($font-style);
font-weight: $font-weight;
font-display: fallback;
src: asset_url("'#{$file-path}.woff2'") format('woff2'),
asset_url("'#{$file-path}.woff'") format('woff'),
asset_url("'#{$file-path}.ttf'") format('truetype');
}
}
5 changes: 5 additions & 0 deletions _assets/css/overrides/_hero.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Override USWDS mixin to use jekyll-assets asset_url()

.usa-hero {
background-image: $theme-hero-image !important;
}
81 changes: 81 additions & 0 deletions _assets/css/overrides/_icon.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// Override USWDS mixin to use jekyll-assets asset_url()

@mixin add-color-icon($icon-object, $contrast-bg: 'default') {
$filename-base: map-get($icon-object, 'name');
$svg-height: map-get($icon-object, 'svg-height');
$svg-width: map-get($icon-object, 'svg-width');
$aspect: divide($svg-width, $svg-height);
$height: if(
unitless(map-get($icon-object, 'height')),
units(map-get($icon-object, 'height')),
map-get($icon-object, 'height')
);
$width: $height * $aspect;
$container-height: if(
map-has-key($icon-object, 'container-height'),
units(map-get($icon-object, 'container-height')),
null
);
$container-width: if(
map-has-key($icon-object, 'container-width'),
units(map-get($icon-object, 'container-width')),
null
);
$color: if(
map-has-key($icon-object, 'color'),
map-get($icon-object, 'color'),
'ink'
);
$color-variant: if(
map-has-key($icon-object, 'color-variant'),
map-get($icon-object, 'color-variant'),
'white'
);
$color-hover: if(
map-has-key($icon-object, 'color-hover'),
map-get($icon-object, 'color-hover'),
null
);
$rotate: if(
map-has-key($icon-object, 'rotate'),
map-get($icon-object, 'rotate'),
null
);
$path: if(
map-has-key($icon-object, 'path'),
map-get($icon-object, 'path'),
$theme-image-path
);
$ie11-variant: get-color-token-from-bg($contrast-bg, 'white', 'black');
$filename-ie11: if(
$ie11-variant == 'white',
'usa-icons-bg/#{$filename-base}--white.svg',
'usa-icons/#{$filename-base}.svg'
);

$mask-props: asset_url('#{$path}/usa-icons/#{$filename-base}.svg') no-repeat
center / contain;
$image-props: asset_url('#{$path}/#{$filename-ie11}') no-repeat center /
contain;

// Default background shorthand for browsers that don't support mask or supports.
background: $image-props;
display: inline-block;
height: if($container-height, $container-height, $height);
width: if($container-width, $container-width, $width);
@if $rotate {
transform: rotate($rotate);
}

// Mask supported styles
@supports (mask: url('')) {
background: none;
background-color: if($color == currentColor, $color, color($color));
mask: $mask-props;
@if $color-hover {
&:hover {
background-color: color($color-hover);
}
}
}
}
Loading

0 comments on commit 70a0a76

Please sign in to comment.