Skip to content

Commit

Permalink
Fix github-pages issues when converting sass
Browse files Browse the repository at this point in the history
  • Loading branch information
thiago-miller committed Aug 28, 2023
1 parent b675b2a commit 2bd0172
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 62 deletions.
47 changes: 29 additions & 18 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
# frozen_string_literal: true

source "https://rubygems.org"


# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", "~> 228", group: :jekyll_plugins

# If you have any plugins, put them here!
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
group :jekyll_plugins do
gem 'jekyll-feed'
gem 'jekyll-sitemap'
gem 'jekyll-paginate'
gem 'jekyll-seo-tag'
gem 'jekyll-archives'
gem 'tzinfo-data'
gem 'tzinfo'
end
gem "jekyll-feed"
gem "jekyll-sitemap"
gem "jekyll-paginate"
gem "jekyll-seo-tag"
gem "jekyll-archives"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1", "< 3"
gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
# do not have a Java counterpart.
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

# To use retry middleware with Faraday v2.0+
gem "faraday-retry"

# Fix 'cannot load such file -- webrick (LoadError)'
gem "webrick"
10 changes: 5 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ social:

# Plugins
plugins:
- jekyll-paginate
- jekyll-sitemap
- jekyll-feed
- jekyll-seo-tag
- jekyll-archives
- jekyll-paginate
- jekyll-sitemap
- jekyll-feed
- jekyll-seo-tag
- jekyll-archives
10 changes: 5 additions & 5 deletions _sass/bootstrap/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}

.card-subtitle {
margin-top: - calc($card-spacer-y / 2);
margin-top: -($card-spacer-y / 2);
margin-bottom: 0;
}

Expand Down Expand Up @@ -98,15 +98,15 @@
//

.card-header-tabs {
margin-right: - calc($card-spacer-x / 2);
margin-right: -($card-spacer-x / 2);
margin-bottom: -$card-spacer-y;
margin-left: - calc($card-spacer-x / 2);
margin-left: -($card-spacer-x / 2);
border-bottom: 0;
}

.card-header-pills {
margin-right: - calc($card-spacer-x / 2);
margin-left: - calc($card-spacer-x / 2);
margin-right: -($card-spacer-x / 2);
margin-left: -($card-spacer-x / 2);
}

// Card image
Expand Down
4 changes: 2 additions & 2 deletions _sass/bootstrap/_carousel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@

.carousel-caption {
position: absolute;
right: calc((100% - #{$carousel-caption-width}) / 2);
right: ((100% - $carousel-caption-width) / 2);
bottom: 20px;
left: calc((100% - #{$carousel-caption-width}) / 2);
left: ((100% - $carousel-caption-width) / 2);
z-index: 10;
padding-top: 20px;
padding-bottom: 20px;
Expand Down
4 changes: 2 additions & 2 deletions _sass/bootstrap/_custom-forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
// Background-color and (when enabled) gradient
&::before {
position: absolute;
top: calc((#{$line-height-base - $custom-control-indicator-size}) / 2);
top: (($line-height-base - $custom-control-indicator-size) / 2);
left: 0;
display: block;
width: $custom-control-indicator-size;
Expand All @@ -77,7 +77,7 @@
// Foreground (icon)
&::after {
position: absolute;
top: calc((#{$line-height-base - $custom-control-indicator-size}) / 2);
top: (($line-height-base - $custom-control-indicator-size) / 2);
left: 0;
display: block;
width: $custom-control-indicator-size;
Expand Down
2 changes: 1 addition & 1 deletion _sass/bootstrap/_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
$g: green($color);
$b: blue($color);

$yiq: calc((($r * 299) + ($g * 587) + ($b * 114)) / 1000);
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;

@if ($yiq >= $yiq-contrasted-threshold) {
@return $yiq-text-dark;
Expand Down
2 changes: 1 addition & 1 deletion _sass/bootstrap/_images.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}

.figure-img {
margin-bottom: calc($spacer / 2);
margin-bottom: ($spacer / 2);
line-height: 1;
}

Expand Down
2 changes: 1 addition & 1 deletion _sass/bootstrap/_jumbotron.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.jumbotron {
padding: $jumbotron-padding calc($jumbotron-padding / 2);
padding: $jumbotron-padding ($jumbotron-padding / 2);
margin-bottom: $jumbotron-padding;
background-color: $jumbotron-bg;
@include border-radius($border-radius-lg);
Expand Down
10 changes: 5 additions & 5 deletions _sass/bootstrap/_popover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

.arrow::before,
.arrow::after {
border-width: $popover-arrow-height calc($popover-arrow-width / 2) 0;
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
}

.arrow::before {
Expand All @@ -70,7 +70,7 @@

.arrow::before,
.arrow::after {
border-width: calc($popover-arrow-width / 2) $popover-arrow-height calc($popover-arrow-width / 2) 0;
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
}

.arrow::before {
Expand All @@ -93,7 +93,7 @@

.arrow::before,
.arrow::after {
border-width: 0 calc($popover-arrow-width / 2) $popover-arrow-height calc($popover-arrow-width / 2);
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
}

.arrow::before {
Expand All @@ -113,7 +113,7 @@
left: 50%;
display: block;
width: $popover-arrow-width;
margin-left: calc($popover-arrow-width / -2);
margin-left: ($popover-arrow-width / -2);
content: "";
border-bottom: $popover-border-width solid $popover-header-bg;
}
Expand All @@ -131,7 +131,7 @@

.arrow::before,
.arrow::after {
border-width: calc($popover-arrow-width / 2) 0 calc($popover-arrow-width / 2) $popover-arrow-height;
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
}

.arrow::before {
Expand Down
8 changes: 4 additions & 4 deletions _sass/bootstrap/_tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

&::before {
top: 0;
border-width: $tooltip-arrow-height calc($tooltip-arrow-width / 2) 0;
border-width: $tooltip-arrow-height ($tooltip-arrow-width / 2) 0;
border-top-color: $tooltip-arrow-color;
}
}
Expand All @@ -53,7 +53,7 @@

&::before {
right: 0;
border-width: calc($tooltip-arrow-width / 2) $tooltip-arrow-height calc($tooltip-arrow-width / 2) 0;
border-width: ($tooltip-arrow-width / 2) $tooltip-arrow-height ($tooltip-arrow-width / 2) 0;
border-right-color: $tooltip-arrow-color;
}
}
Expand All @@ -67,7 +67,7 @@

&::before {
bottom: 0;
border-width: 0 calc($tooltip-arrow-width / 2) $tooltip-arrow-height;
border-width: 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
border-bottom-color: $tooltip-arrow-color;
}
}
Expand All @@ -83,7 +83,7 @@

&::before {
left: 0;
border-width: calc($tooltip-arrow-width / 2) 0 calc($tooltip-arrow-width / 2) $tooltip-arrow-height;
border-width: ($tooltip-arrow-width / 2) 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
border-left-color: $tooltip-arrow-color;
}
}
Expand Down
8 changes: 4 additions & 4 deletions _sass/bootstrap/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ $h4-font-size: $font-size-base * 1.5 !default;
$h5-font-size: $font-size-base * 1.25 !default;
$h6-font-size: $font-size-base !default;

$headings-margin-bottom: calc($spacer / 2) !default;
$headings-margin-bottom: ($spacer / 2) !default;
$headings-font-family: inherit !default;
$headings-font-weight: 500 !default;
$headings-line-height: 1.2 !default;
Expand Down Expand Up @@ -587,7 +587,7 @@ $nav-pills-link-active-bg: $component-active-bg !default;

// Navbar

$navbar-padding-y: calc($spacer / 2) !default;
$navbar-padding-y: ($spacer / 2) !default;
$navbar-padding-x: $spacer !default;

$navbar-nav-link-padding-x: .5rem !default;
Expand All @@ -596,7 +596,7 @@ $navbar-brand-font-size: $font-size-lg !default;
// Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link
$nav-link-height: ($font-size-base * $line-height-base + $nav-link-padding-y * 2) !default;
$navbar-brand-height: $navbar-brand-font-size * $line-height-base !default;
$navbar-brand-padding-y: calc(($nav-link-height - $navbar-brand-height) / 2) !default;
$navbar-brand-padding-y: ($nav-link-height - $navbar-brand-height) / 2 !default;

$navbar-toggler-padding-y: .25rem !default;
$navbar-toggler-padding-x: .75rem !default;
Expand Down Expand Up @@ -666,7 +666,7 @@ $card-bg: $white !default;

$card-img-overlay-padding: 1.25rem !default;

$card-group-margin: calc($grid-gutter-width / 2) !default;
$card-group-margin: ($grid-gutter-width / 2) !default;
$card-deck-margin: $card-group-margin !default;

$card-columns-count: 3 !default;
Expand Down
4 changes: 2 additions & 2 deletions _sass/bootstrap/mixins/_grid-framework.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
position: relative;
width: 100%;
min-height: 1px; // Prevent columns from collapsing when empty
padding-right: calc($gutter / 2);
padding-left: calc($gutter / 2);
padding-right: ($gutter / 2);
padding-left: ($gutter / 2);
}

@each $breakpoint in map-keys($breakpoints) {
Expand Down
14 changes: 7 additions & 7 deletions _sass/bootstrap/mixins/_grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

@mixin make-container() {
width: 100%;
padding-right: calc($grid-gutter-width / 2);
padding-left: calc($grid-gutter-width / 2);
padding-right: ($grid-gutter-width / 2);
padding-left: ($grid-gutter-width / 2);
margin-right: auto;
margin-left: auto;
}
Expand All @@ -23,8 +23,8 @@
@mixin make-row() {
display: flex;
flex-wrap: wrap;
margin-right: calc($grid-gutter-width / -2);
margin-left: calc($grid-gutter-width / -2);
margin-right: ($grid-gutter-width / -2);
margin-left: ($grid-gutter-width / -2);
}

@mixin make-col-ready() {
Expand All @@ -39,14 +39,14 @@
}

@mixin make-col($size, $columns: $grid-columns) {
flex: 0 0 percentage(calc($size / $columns));
flex: 0 0 percentage($size / $columns);
// Add a `max-width` to ensure content within each column does not blow out
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
// do not appear to require this.
max-width: percentage(calc($size / $columns));
max-width: percentage($size / $columns);
}

@mixin make-col-offset($size, $columns: $grid-columns) {
$num: calc($size / $columns);
$num: $size / $columns;
margin-left: if($num == 0, 0, percentage($num));
}
2 changes: 1 addition & 1 deletion _sass/bootstrap/mixins/_nav-divider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@mixin nav-divider($color: #e5e5e5) {
height: 0;
margin: calc($spacer / 2) 0;
margin: ($spacer / 2) 0;
overflow: hidden;
border-top: 1px solid $color;
}
8 changes: 4 additions & 4 deletions _sass/bootstrap/utilities/_embed.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@

.embed-responsive-21by9 {
&::before {
padding-top: percentage(calc(9 / 21));
padding-top: percentage(9 / 21);
}
}

.embed-responsive-16by9 {
&::before {
padding-top: percentage(calc(9 / 16));
padding-top: percentage(9 / 16);
}
}

.embed-responsive-4by3 {
&::before {
padding-top: percentage(calc(3 / 4));
padding-top: percentage(3 / 4);
}
}

.embed-responsive-1by1 {
&::before {
padding-top: percentage(calc(1 / 1));
padding-top: percentage(1 / 1);
}
}

0 comments on commit 2bd0172

Please sign in to comment.