diff --git a/gulpfile.js b/gulpfile.js index 8885349..fb4a00c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -8,6 +8,16 @@ gulp.task('copy-uikit-js', () => { .pipe(gulp.dest('public/js')); }); +gulp.task('copy-fontawesome', () => { + return gulp.src([ + 'node_modules/@fortawesome/fontawesome-free/js/fontawesome.min.js', + 'node_modules/@fortawesome/fontawesome-free/js/solid.min.js' + ]) + .pipe(gulp.dest('public/js')); +}); + +gulp.task('copy-js', gulp.series('copy-uikit-js', 'copy-fontawesome')); + gulp.task('minify-js', () => { return gulp.src('public/js/*.js') .pipe(minify({ @@ -45,12 +55,12 @@ gulp.task('copy-files', () => { }); gulp.task('default', gulp.parallel( - gulp.series('copy-uikit-js', 'minify-js'), + gulp.series('copy-js', 'minify-js'), gulp.series('less', 'minify-css'), gulp.series('copy-uikit-icons', 'img'), 'copy-files' )); gulp.task('dev', gulp.parallel( - 'copy-uikit-js', 'less', 'copy-uikit-icons' + 'copy-js', 'less', 'copy-uikit-icons' )); diff --git a/package.json b/package.json index 98f01b4..39bdcb5 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "uglify": "gulp" }, "dependencies": { + "@fortawesome/fontawesome-free": "^5.14.0", "uikit": "^3.5.4" } } diff --git a/public/js/fontawesome.min.js b/public/js/fontawesome.min.js deleted file mode 100644 index c61a2fc..0000000 --- a/public/js/fontawesome.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/*! - * Font Awesome Free 5.12.1 by @fontawesome - https://fontawesome.com - * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) - */ -!function(){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var n=0;n>>0;n--;)e[n]=t[n];return e}function Ct(t){return t.classList?At(t.classList):(t.getAttribute("class")||"").split(" ").filter(function(t){return t})}function Ot(t,e){var n,a=e.split("-"),r=a[0],i=a.slice(1).join("-");return r!==t||""===i||(n=i,~F.indexOf(n))?null:i}function St(t){return"".concat(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function Pt(n){return Object.keys(n||{}).reduce(function(t,e){return t+"".concat(e,": ").concat(n[e],";")},"")}function Nt(t){return t.size!==yt.size||t.x!==yt.x||t.y!==yt.y||t.rotate!==yt.rotate||t.flipX||t.flipY}function Mt(t){var e=t.transform,n=t.containerWidth,a=t.iconWidth,r={transform:"translate(".concat(n/2," 256)")},i="translate(".concat(32*e.x,", ").concat(32*e.y,") "),o="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),c="rotate(".concat(e.rotate," 0 0)");return{outer:r,inner:{transform:"".concat(i," ").concat(o," ").concat(c)},path:{transform:"translate(".concat(a/2*-1," -256)")}}}var zt={x:0,y:0,width:"100%",height:"100%"};function Et(t){var e=!(1").concat(o.map(Zt).join(""),"")}var $t=function(){};function te(t){return"string"==typeof(t.getAttribute?t.getAttribute(G):null)}var ee={replace:function(t){var e=t[0],n=t[1].map(function(t){return Zt(t)}).join("\n");if(e.parentNode&&e.outerHTML)e.outerHTML=n+(J.keepOriginalSource&&"svg"!==e.tagName.toLowerCase()?"\x3c!-- ".concat(e.outerHTML," --\x3e"):"");else if(e.parentNode){var a=document.createElement("span");e.parentNode.replaceChild(a,e),a.outerHTML=n}},nest:function(t){var e=t[0],n=t[1];if(~Ct(e).indexOf(J.replacementClass))return ee.replace(t);var a=new RegExp("".concat(J.familyPrefix,"-.*"));delete n[0].attributes.style,delete n[0].attributes.id;var r=n[0].attributes.class.split(" ").reduce(function(t,e){return e===J.replacementClass||e.match(a)?t.toSvg.push(e):t.toNode.push(e),t},{toNode:[],toSvg:[]});n[0].attributes.class=r.toSvg.join(" ");var i=n.map(function(t){return Zt(t)}).join("\n");e.setAttribute("class",r.toNode.join(" ")),e.setAttribute(G,""),e.innerHTML=i}};function ne(t){t()}function ae(n,t){var a="function"==typeof t?t:$t;if(0===n.length)a();else{var e=ne;J.mutateApproach===P&&(e=g.requestAnimationFrame||ne),e(function(){var t=!0===J.autoReplaceSvg?ee.replace:ee[J.autoReplaceSvg]||ee.replace,e=Yt.begin("mutate");n.map(t),e(),a()})}}var re=!1;function ie(){re=!1}var oe=null;function ce(t){if(l&&J.observeMutations){var r=t.treeCallback,i=t.nodeCallback,o=t.pseudoElementsCallback,e=t.observeMutationsRoot,n=void 0===e?v:e;oe=new l(function(t){re||At(t).forEach(function(t){if("childList"===t.type&&0