Skip to content
Permalink
Browse files

refactor: convert CSS to SCSS

  Remove Bootstrap from Header and assets.toml
  Remove Bootstrap JS CDN version in footer and assets.toml
  Add latest Bootstrap v4 SASS files locally
  Include Bootstrap JS locally
  Convert Academic's CSS to SASS (mainly SASS variables + Go templating)
  Convert Academic's theming system to integrate with SASS
  Parse SASS in header using Hugo and convert to CSS
  Minify and md5 fingerprint bundled CSS
  Fix Slider widget (reuses .wg-hero but animation and `clear` removed)
  Add Bootstrap files to repo so that Node is not required

See #680
  • Loading branch information...
gcushen committed Apr 24, 2019
1 parent 35563bb commit 92200d6327858d5520114664e2aeafd6dcf1f7f1
Showing with 7,977 additions and 104 deletions.
  1. +3 βˆ’0 .gitignore
  2. +19 βˆ’0 assets/js/academic.js
  3. +7 βˆ’0 assets/js/vendor/bootstrap.min.js
  4. +84 βˆ’72 layouts/partials/css/academic.css β†’ assets/sass/academic.scss
  5. +2 βˆ’0 assets/sass/bootstrap_variables.scss
  6. +36 βˆ’0 assets/sass/main.scss
  7. +51 βˆ’0 assets/sass/vendor/bootstrap/_alert.scss
  8. +54 βˆ’0 assets/sass/vendor/bootstrap/_badge.scss
  9. +41 βˆ’0 assets/sass/vendor/bootstrap/_breadcrumb.scss
  10. +163 βˆ’0 assets/sass/vendor/bootstrap/_button-group.scss
  11. +137 βˆ’0 assets/sass/vendor/bootstrap/_buttons.scss
  12. +289 βˆ’0 assets/sass/vendor/bootstrap/_card.scss
  13. +197 βˆ’0 assets/sass/vendor/bootstrap/_carousel.scss
  14. +41 βˆ’0 assets/sass/vendor/bootstrap/_close.scss
  15. +48 βˆ’0 assets/sass/vendor/bootstrap/_code.scss
  16. +507 βˆ’0 assets/sass/vendor/bootstrap/_custom-forms.scss
  17. +191 βˆ’0 assets/sass/vendor/bootstrap/_dropdown.scss
  18. +330 βˆ’0 assets/sass/vendor/bootstrap/_forms.scss
  19. +86 βˆ’0 assets/sass/vendor/bootstrap/_functions.scss
  20. +52 βˆ’0 assets/sass/vendor/bootstrap/_grid.scss
  21. +42 βˆ’0 assets/sass/vendor/bootstrap/_images.scss
  22. +193 βˆ’0 assets/sass/vendor/bootstrap/_input-group.scss
  23. +17 βˆ’0 assets/sass/vendor/bootstrap/_jumbotron.scss
  24. +149 βˆ’0 assets/sass/vendor/bootstrap/_list-group.scss
  25. +8 βˆ’0 assets/sass/vendor/bootstrap/_media.scss
  26. +47 βˆ’0 assets/sass/vendor/bootstrap/_mixins.scss
  27. +229 βˆ’0 assets/sass/vendor/bootstrap/_modal.scss
  28. +120 βˆ’0 assets/sass/vendor/bootstrap/_nav.scss
  29. +294 βˆ’0 assets/sass/vendor/bootstrap/_navbar.scss
  30. +73 βˆ’0 assets/sass/vendor/bootstrap/_pagination.scss
  31. +171 βˆ’0 assets/sass/vendor/bootstrap/_popover.scss
  32. +141 βˆ’0 assets/sass/vendor/bootstrap/_print.scss
  33. +43 βˆ’0 assets/sass/vendor/bootstrap/_progress.scss
  34. +483 βˆ’0 assets/sass/vendor/bootstrap/_reboot.scss
  35. +19 βˆ’0 assets/sass/vendor/bootstrap/_root.scss
  36. +55 βˆ’0 assets/sass/vendor/bootstrap/_spinners.scss
  37. +185 βˆ’0 assets/sass/vendor/bootstrap/_tables.scss
  38. +44 βˆ’0 assets/sass/vendor/bootstrap/_toasts.scss
  39. +115 βˆ’0 assets/sass/vendor/bootstrap/_tooltip.scss
  40. +20 βˆ’0 assets/sass/vendor/bootstrap/_transitions.scss
  41. +125 βˆ’0 assets/sass/vendor/bootstrap/_type.scss
  42. +17 βˆ’0 assets/sass/vendor/bootstrap/_utilities.scss
  43. +1,123 βˆ’0 assets/sass/vendor/bootstrap/_variables.scss
  44. +29 βˆ’0 assets/sass/vendor/bootstrap/bootstrap-grid.scss
  45. +12 βˆ’0 assets/sass/vendor/bootstrap/bootstrap-reboot.scss
  46. +44 βˆ’0 assets/sass/vendor/bootstrap/bootstrap.scss
  47. +13 βˆ’0 assets/sass/vendor/bootstrap/mixins/_alert.scss
  48. +21 βˆ’0 assets/sass/vendor/bootstrap/mixins/_background-variant.scss
  49. +17 βˆ’0 assets/sass/vendor/bootstrap/mixins/_badge.scss
  50. +63 βˆ’0 assets/sass/vendor/bootstrap/mixins/_border-radius.scss
  51. +20 βˆ’0 assets/sass/vendor/bootstrap/mixins/_box-shadow.scss
  52. +123 βˆ’0 assets/sass/vendor/bootstrap/mixins/_breakpoints.scss
  53. +107 βˆ’0 assets/sass/vendor/bootstrap/mixins/_buttons.scss
  54. +62 βˆ’0 assets/sass/vendor/bootstrap/mixins/_caret.scss
  55. +7 βˆ’0 assets/sass/vendor/bootstrap/mixins/_clearfix.scss
  56. +10 βˆ’0 assets/sass/vendor/bootstrap/mixins/_deprecate.scss
  57. +14 βˆ’0 assets/sass/vendor/bootstrap/mixins/_float.scss
  58. +192 βˆ’0 assets/sass/vendor/bootstrap/mixins/_forms.scss
  59. +45 βˆ’0 assets/sass/vendor/bootstrap/mixins/_gradients.scss
  60. +66 βˆ’0 assets/sass/vendor/bootstrap/mixins/_grid-framework.scss
  61. +51 βˆ’0 assets/sass/vendor/bootstrap/mixins/_grid.scss
  62. +37 βˆ’0 assets/sass/vendor/bootstrap/mixins/_hover.scss
  63. +36 βˆ’0 assets/sass/vendor/bootstrap/mixins/_image.scss
  64. +21 βˆ’0 assets/sass/vendor/bootstrap/mixins/_list-group.scss
  65. +7 βˆ’0 assets/sass/vendor/bootstrap/mixins/_lists.scss
  66. +10 βˆ’0 assets/sass/vendor/bootstrap/mixins/_nav-divider.scss
  67. +22 βˆ’0 assets/sass/vendor/bootstrap/mixins/_pagination.scss
  68. +17 βˆ’0 assets/sass/vendor/bootstrap/mixins/_reset-text.scss
  69. +6 βˆ’0 assets/sass/vendor/bootstrap/mixins/_resize.scss
  70. +33 βˆ’0 assets/sass/vendor/bootstrap/mixins/_screen-reader.scss
  71. +7 βˆ’0 assets/sass/vendor/bootstrap/mixins/_size.scss
  72. +39 βˆ’0 assets/sass/vendor/bootstrap/mixins/_table-row.scss
  73. +16 βˆ’0 assets/sass/vendor/bootstrap/mixins/_text-emphasis.scss
  74. +11 βˆ’0 assets/sass/vendor/bootstrap/mixins/_text-hide.scss
  75. +8 βˆ’0 assets/sass/vendor/bootstrap/mixins/_text-truncate.scss
  76. +16 βˆ’0 assets/sass/vendor/bootstrap/mixins/_transition.scss
  77. +8 βˆ’0 assets/sass/vendor/bootstrap/mixins/_visibility.scss
  78. +8 βˆ’0 assets/sass/vendor/bootstrap/utilities/_align.scss
  79. +19 βˆ’0 assets/sass/vendor/bootstrap/utilities/_background.scss
  80. +75 βˆ’0 assets/sass/vendor/bootstrap/utilities/_borders.scss
  81. +3 βˆ’0 assets/sass/vendor/bootstrap/utilities/_clearfix.scss
  82. +26 βˆ’0 assets/sass/vendor/bootstrap/utilities/_display.scss
  83. +39 βˆ’0 assets/sass/vendor/bootstrap/utilities/_embed.scss
  84. +51 βˆ’0 assets/sass/vendor/bootstrap/utilities/_flex.scss
  85. +11 βˆ’0 assets/sass/vendor/bootstrap/utilities/_float.scss
  86. +5 βˆ’0 assets/sass/vendor/bootstrap/utilities/_overflow.scss
  87. +32 βˆ’0 assets/sass/vendor/bootstrap/utilities/_position.scss
  88. +11 βˆ’0 assets/sass/vendor/bootstrap/utilities/_screenreaders.scss
  89. +6 βˆ’0 assets/sass/vendor/bootstrap/utilities/_shadows.scss
  90. +20 βˆ’0 assets/sass/vendor/bootstrap/utilities/_sizing.scss
  91. +73 βˆ’0 assets/sass/vendor/bootstrap/utilities/_spacing.scss
  92. +19 βˆ’0 assets/sass/vendor/bootstrap/utilities/_stretched-link.scss
  93. +72 βˆ’0 assets/sass/vendor/bootstrap/utilities/_text.scss
  94. +13 βˆ’0 assets/sass/vendor/bootstrap/utilities/_visibility.scss
  95. +204 βˆ’0 assets/sass/vendor/bootstrap/vendor/_rfs.scss
  96. +0 βˆ’8 data/assets.toml
  97. +1 βˆ’1 exampleSite/config/_default/config.toml
  98. +0 βˆ’4 exampleSite/content/home/slider.md
  99. +0 βˆ’9 layouts/index.css
  100. +5 βˆ’6 layouts/partials/footer.html
  101. +5 βˆ’2 layouts/partials/header.html
  102. +2 βˆ’2 layouts/partials/widgets/slider.html
  103. +13 βˆ’0 package-lock.json
  104. +23 βˆ’0 package.json
@@ -5,3 +5,6 @@ resources/

# Jupyter
.ipynb_checkpoints/

# Node
node_modules/
@@ -328,6 +328,22 @@
}
}

/* ---------------------------------------------------------------------------
* Normalize Bootstrap Carousel Slide Heights.
* --------------------------------------------------------------------------- */

function normalizeCarouselSlideHeights() {
$('.carousel').each(function(){
// Get carousel slides.
let items = $('.carousel-item', this);
// Reset all slide heights.
items.css('min-height', 0);
// Normalize all slide heights.
let maxHeight = Math.max.apply(null, items.map(function(){return $(this).outerHeight()}).get());
items.css('min-height', maxHeight + 'px');
})
}

/* ---------------------------------------------------------------------------
* On document ready.
* --------------------------------------------------------------------------- */
@@ -509,4 +525,7 @@

});

// Normalize Bootstrap carousel slide heights.
$(window).on('load resize orientationchange', normalizeCarouselSlideHeights);

})(jQuery);

Large diffs are not rendered by default.

0 comments on commit 92200d6

Please sign in to comment.
You can’t perform that action at this time.