diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index d54fe58..0b32a64 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -10,6 +10,7 @@ {{ partial "style.html" "scss/style.scss" }} + {{ partial "style.html" "css/font-awesome.min.css" }} {{ partial "title-item.html" . }}{{ .Site.Title }} diff --git a/package-lock.json b/package-lock.json index efa11e1..519217f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,42 +4,10 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "@fortawesome/fontawesome": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome/-/fontawesome-1.1.8.tgz", - "integrity": "sha512-c0/MtkPVT0fmiFcCyYoPjkG9PkMOvfrZw2+0BaJ+Rh6UEcK1AR/LaRgrHHjUkbAbs9LXxQJhFS8CJ4uSnK2+JA==", - "requires": { - "@fortawesome/fontawesome-common-types": "^0.1.7" - } - }, - "@fortawesome/fontawesome-common-types": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.1.7.tgz", - "integrity": "sha512-ego8jRVSHfq/iq4KRZJKQeUAdi3ZjGNrqw4oPN3fNdvTBnLCSntwVCnc37bsAJP9UB8MhrTfPnZYxkv2vpS4pg==" - }, - "@fortawesome/fontawesome-free-brands": { - "version": "5.0.13", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free-brands/-/fontawesome-free-brands-5.0.13.tgz", - "integrity": "sha512-xC/sEPpfcJPvUbud2GyscLCLQlE2DVBYaTHVwuyVGliYBdYejSEYMINU8FN5A0xhO68yCbpCfMlBv6Gqby+jww==", - "requires": { - "@fortawesome/fontawesome-common-types": "^0.1.7" - } - }, - "@fortawesome/fontawesome-free-regular": { - "version": "5.0.13", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free-regular/-/fontawesome-free-regular-5.0.13.tgz", - "integrity": "sha512-36lz9Idww1L4QaaTcv7GZiOeIP9emJFDUsedvRovI10kmwyd6rN0PKkIjnq0FB4foLhX4Rou8vnbCCmjtqiLug==", - "requires": { - "@fortawesome/fontawesome-common-types": "^0.1.7" - } - }, - "@fortawesome/fontawesome-free-solid": { - "version": "5.0.13", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free-solid/-/fontawesome-free-solid-5.0.13.tgz", - "integrity": "sha512-b+krVnqkdDt52Yfev0x0ZZgtxBQsLw00Zfa3uaVWIDzpNZVtrEXuxldUSUaN/ihgGhSNi8VpvDAdNPVgCKOSxw==", - "requires": { - "@fortawesome/fontawesome-common-types": "^0.1.7" - } + "@fortawesome/fontawesome-free": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.5.0.tgz", + "integrity": "sha512-p4lu0jfj5QN013ddArh99r3OXZ/fp9rbovs62LfaO70OMBsAXxtNd0lAq/97fitrscR0fqfd+/a5KNcp6Sh/0A==" }, "JSONStream": { "version": "1.3.5", @@ -447,7 +415,7 @@ }, "browserify-aes": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { @@ -492,7 +460,7 @@ }, "browserify-rsa": { "version": "4.0.1", - "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { @@ -722,7 +690,7 @@ }, "create-hash": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { @@ -735,7 +703,7 @@ }, "create-hmac": { "version": "1.1.7", - "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { @@ -914,7 +882,7 @@ }, "diffie-hellman": { "version": "5.0.3", - "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { @@ -1515,7 +1483,7 @@ }, "htmlescape": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", "dev": true }, @@ -2135,7 +2103,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -2357,7 +2325,7 @@ }, "parse-asn1": { "version": "5.1.1", - "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", "dev": true, "requires": { @@ -2741,7 +2709,7 @@ }, "sha.js": { "version": "2.4.11", - "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { @@ -2751,7 +2719,7 @@ }, "shasum": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", "dev": true, "requires": { @@ -2867,7 +2835,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { diff --git a/package.json b/package.json index dbcd6b0..797617b 100644 --- a/package.json +++ b/package.json @@ -14,10 +14,7 @@ "yaml-lint": "1.2.4" }, "dependencies": { - "@fortawesome/fontawesome": "1.1.8", - "@fortawesome/fontawesome-free-brands": "5.0.13", - "@fortawesome/fontawesome-free-regular": "5.0.13", - "@fortawesome/fontawesome-free-solid": "5.0.13", + "@fortawesome/fontawesome-free": "5.5.0", "bootstrap": "4.1.3", "clipboard": "2.0.4", "jquery": "3.3.1", diff --git a/scripts/build.sh b/scripts/build.sh index c02cf4e..6605274 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -7,10 +7,12 @@ source ./scripts/common.sh rm -rf $OUTPUT_DIR rm -rf $STATIC_BUILD rm -rf $BASEDIR/resources -mkdir -p $STATIC_BUILD/js +mkdir -p $STATIC_BUILD/js $STATIC_BUILD/css cp -r $BASEDIR/node_modules/lightgallery/dist/fonts $STATIC_BUILD cp -r $STATIC_SRC/img $STATIC_BUILD/img cp -r $BASEDIR/node_modules/lightgallery/dist/img/* $STATIC_BUILD/img +cp -r $BASEDIR/node_modules/@fortawesome/fontawesome-free/css/all.min.css $STATIC_BUILD/css/font-awesome.min.css +cp -r $BASEDIR/node_modules/@fortawesome/fontawesome-free/webfonts $STATIC_BUILD cp $BASEDIR/node_modules/jquery/dist/jquery.min.js $STATIC_BUILD/js/jquery.min.js cp $BASEDIR/node_modules/lightgallery/dist/js/lightgallery.js $STATIC_BUILD/js/lightgallery.js diff --git a/static/src/js/fa.js b/static/src/js/fa.js deleted file mode 100644 index ca20012..0000000 --- a/static/src/js/fa.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var fontawesome = require('@fortawesome/fontawesome'); -var solid = require('@fortawesome/fontawesome-free-solid'); -var regular = require('@fortawesome/fontawesome-free-regular'); -var brands = require('@fortawesome/fontawesome-free-brands'); - -try { - fontawesome.library.add(solid); - fontawesome.library.add(regular); - fontawesome.library.add(brands); -} catch (e) { - // Sometimes loading icons raises an exception, even when there's no invalid icons on the screen -} diff --git a/static/src/js/index.js b/static/src/js/index.js index aff9522..1a3519d 100644 --- a/static/src/js/index.js +++ b/static/src/js/index.js @@ -1,7 +1,5 @@ 'use strict'; -require('./fa'); - var Clipboard = require('clipboard');