Commit 94bfc925 authored by David Haynes's avatar David Haynes 🙆
Browse files

Drop support for webfonts -> SVG framework

- yay!
parent 429e7542
Pipeline #2562 passed with stages
in 1 minute and 52 seconds
This diff is collapsed.
......@@ -16,16 +16,10 @@ const minify = require('gulp-minify');
const src = './src'
const dest = './build'
const all_js = ['./node_modules/jquery/dist/jquery.min.js',
'./node_modules/bootstrap/dist/js/bootstrap.bundle.min.js',
src + '/js/*.js'];
// Move fonts to build/fonts
gulp.task('fonts', () => {
let fa = gulp.src('./node_modules/@fortawesome/fontawesome-free-webfonts/webfonts/*')
.pipe(gulp.dest(dest + '/fonts/'))
return merge(fa).pipe(connect.reload())
});
'./node_modules/bootstrap/dist/js/bootstrap.bundle.min.js',
'./node_modules/@fortawesome/fontawesome-free/js/all.js',
src + '/js/*.js'
];
// Move html to build/html
gulp.task('html', () => gulp.src(src + '/html/*.html')
......@@ -43,7 +37,9 @@ gulp.task('img', () => gulp.src(src + '/img/*')
// Build masonstrap.min.js
gulp.task('js', () => gulp.src(all_js)
.pipe(concat('masonstrap.js'))
.pipe(minify({ext: ".min.js"}))
.pipe(minify({
ext: ".min.js"
}))
.pipe(gulp.dest(dest + '/js/'))
);
......@@ -56,7 +52,9 @@ gulp.task('sass', () => gulp.src(src + '/scss/*.scss')
.pipe(sourcemaps.write())
.pipe(gulp.dest(dest + '/css/'))
.pipe(uglifycss())
.pipe(rename({extname: ".min.css"}))
.pipe(rename({
extname: ".min.css"
}))
.pipe(gulp.dest(dest + '/css/'))
);
......@@ -78,7 +76,7 @@ gulp.task('http', () => {
});
// Run all tasks
gulp.task('build', ['sass', 'html', 'img', 'js', 'fonts']);
gulp.task('build', ['sass', 'html', 'img', 'js']);
// By default, run all tasks and then rebuild on changes
gulp.task('default', ['http', 'build', 'watch']);
// Custom functions
// Get a key from the primary-palette map
@function get-primary-palette($key) {
@if map-has-key($primary-palette, $key) {
@return map-get($primary-palette, $key);
}
@warn "Unknown `#{$key}` in $primary-palette.";
@return null;
}
......@@ -15,7 +13,6 @@
@if map-has-key($universal-palette, $key) {
@return map-get($universal-palette, $key);
}
@warn "Unknown `#{$key}` in $universal-palette.";
@return null;
}
......@@ -25,7 +22,6 @@
@if map-has-key($neutral-palette, $key) {
@return map-get($neutral-palette, $key);
}
@warn "Unknown `#{$key}` in $neutral-palette.";
@return null;
}
// Things that originate from Bootstrap that we overwrite
// Legacy legend behavior
legend {
@extend legend;
......@@ -10,12 +9,12 @@ legend {
}
// Ensure btn-outline colors remain the same even if there is no href
@each $color, $value in $theme-colors {
@each $color,
$value in $theme-colors {
a.btn-outline-#{$color}:not([href]) {
color: $value;
color: $value;
}
a.btn-outline-#{$color}:not([href]):hover {
color: $white;
color: $white;
}
}
\ No newline at end of file
}
// Custom classes and styling
.accent-btn-outline {
@include button-outline-variant(theme-color('accent'), $gray-900);
}
......@@ -19,4 +18,4 @@ body {
bottom: 0;
width: 100%;
height: 60px;
}
\ No newline at end of file
}
// Masonstrap 4.0 Variables
// Global External Packages Settings -------------------------------------------
$fa-font-path: "../fonts";
// Global Bootstrap Options Overrides ------------------------------------------
$enable-shadows: true;
$enable-gradients: true;
// Mason Branding Colors -------------------------------------------------------
$primary-palette: (
mason-green: #006633,
mason-gold: #FFCC33
);
$universal-palette: (
dark-turqiose: #00909E,
medium-slate-blue: #425195,
cardinal-red: #AC1D37,
bright-green: #81902B,
dark-goldenrod: #9D7F00,
tangerine: #F7941E
);
$neutral-palette: (
light-gray: #D1D3D5,
exploratory-gray: #A9A0AD,
observatory-gray: #87908F,
light-taupe-tile: #CCC288,
foundation-stone: #A39382,
statue-bronze: #A39382,
mason-tan: #E4E6D7,
southside-glass: #a0c9c1,
school-of-art-stone: #D8D8C1
);
$primary-palette: ( mason-green: #006633, mason-gold: #FFCC33);
$universal-palette: ( dark-turqiose: #00909E, medium-slate-blue: #425195, cardinal-red: #AC1D37, bright-green: #81902B, dark-goldenrod: #9D7F00, tangerine: #F7941E);
$neutral-palette: ( light-gray: #D1D3D5, exploratory-gray: #A9A0AD, observatory-gray: #87908F, light-taupe-tile: #CCC288, foundation-stone: #A39382, statue-bronze: #A39382, mason-tan: #E4E6D7, southside-glass: #a0c9c1, school-of-art-stone: #D8D8C1);
// Bootstrap Color Overrides ---------------------------------------------------
$theme-colors: (
primary: get-primary-palette('mason-green'),
accent: get-primary-palette('mason-gold'),
);
$theme-colors: ( primary: get-primary-palette('mason-green'), accent: get-primary-palette('mason-gold'), );
/*!
* Masonstrap 4.0
* Masonstrap 4.1.1
*
* author: Mason SRCT (https://srct.gmu.edu)
* source code: (https://git.gmu.edu/srct/masonstrap)
* license: MIT (https://git.gmu.edu/srct/masonstrap/raw/master/LICENSE)
*/
// Masonstrap custom functions
@import "_functions";
// Load in variable overwrites
@import '_variables';
// Load in FA 5
@import '../../node_modules/@fortawesome/fontawesome-free-webfonts/scss/fontawesome.scss';
@import '../../node_modules/@fortawesome/fontawesome-free-webfonts/scss/fa-brands.scss';
@import '../../node_modules/@fortawesome/fontawesome-free-webfonts/scss/fa-regular.scss';
@import '../../node_modules/@fortawesome/fontawesome-free-webfonts/scss/fa-solid.scss';
// Load in bootstrap 4
@import '../../node_modules/bootstrap/scss/bootstrap';
// Masonstrap custom mixins
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment