Use fontawesome CSS rather than JS
This commit is contained in:
parent
02b02d3ac1
commit
829e6d395d
6 changed files with 20 additions and 68 deletions
|
@ -10,6 +10,7 @@
|
||||||
<link rel="icon" type="image/png" href='{{ (resources.Get "/img/logo-transparent.png" | fingerprint).RelPermalink }}'/>
|
<link rel="icon" type="image/png" href='{{ (resources.Get "/img/logo-transparent.png" | fingerprint).RelPermalink }}'/>
|
||||||
|
|
||||||
{{ partial "style.html" "scss/style.scss" }}
|
{{ partial "style.html" "scss/style.scss" }}
|
||||||
|
{{ partial "style.html" "css/font-awesome.min.css" }}
|
||||||
|
|
||||||
<title>{{ partial "title-item.html" . }}{{ .Site.Title }}</title>
|
<title>{{ partial "title-item.html" . }}{{ .Site.Title }}</title>
|
||||||
|
|
||||||
|
|
62
package-lock.json
generated
62
package-lock.json
generated
|
@ -4,42 +4,10 @@
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome": {
|
"@fortawesome/fontawesome-free": {
|
||||||
"version": "1.1.8",
|
"version": "5.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome/-/fontawesome-1.1.8.tgz",
|
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.5.0.tgz",
|
||||||
"integrity": "sha512-c0/MtkPVT0fmiFcCyYoPjkG9PkMOvfrZw2+0BaJ+Rh6UEcK1AR/LaRgrHHjUkbAbs9LXxQJhFS8CJ4uSnK2+JA==",
|
"integrity": "sha512-p4lu0jfj5QN013ddArh99r3OXZ/fp9rbovs62LfaO70OMBsAXxtNd0lAq/97fitrscR0fqfd+/a5KNcp6Sh/0A=="
|
||||||
"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"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"JSONStream": {
|
"JSONStream": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
|
@ -447,7 +415,7 @@
|
||||||
},
|
},
|
||||||
"browserify-aes": {
|
"browserify-aes": {
|
||||||
"version": "1.2.0",
|
"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==",
|
"integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -492,7 +460,7 @@
|
||||||
},
|
},
|
||||||
"browserify-rsa": {
|
"browserify-rsa": {
|
||||||
"version": "4.0.1",
|
"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=",
|
"integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -722,7 +690,7 @@
|
||||||
},
|
},
|
||||||
"create-hash": {
|
"create-hash": {
|
||||||
"version": "1.2.0",
|
"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==",
|
"integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -735,7 +703,7 @@
|
||||||
},
|
},
|
||||||
"create-hmac": {
|
"create-hmac": {
|
||||||
"version": "1.1.7",
|
"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==",
|
"integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -914,7 +882,7 @@
|
||||||
},
|
},
|
||||||
"diffie-hellman": {
|
"diffie-hellman": {
|
||||||
"version": "5.0.3",
|
"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==",
|
"integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -1515,7 +1483,7 @@
|
||||||
},
|
},
|
||||||
"htmlescape": {
|
"htmlescape": {
|
||||||
"version": "1.1.1",
|
"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=",
|
"integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
@ -2135,7 +2103,7 @@
|
||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.0",
|
"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=",
|
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
@ -2357,7 +2325,7 @@
|
||||||
},
|
},
|
||||||
"parse-asn1": {
|
"parse-asn1": {
|
||||||
"version": "5.1.1",
|
"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==",
|
"integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -2741,7 +2709,7 @@
|
||||||
},
|
},
|
||||||
"sha.js": {
|
"sha.js": {
|
||||||
"version": "2.4.11",
|
"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==",
|
"integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -2751,7 +2719,7 @@
|
||||||
},
|
},
|
||||||
"shasum": {
|
"shasum": {
|
||||||
"version": "1.0.2",
|
"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=",
|
"integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -2867,7 +2835,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"readable-stream": {
|
"readable-stream": {
|
||||||
"version": "2.3.6",
|
"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==",
|
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
|
@ -14,10 +14,7 @@
|
||||||
"yaml-lint": "1.2.4"
|
"yaml-lint": "1.2.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome": "1.1.8",
|
"@fortawesome/fontawesome-free": "5.5.0",
|
||||||
"@fortawesome/fontawesome-free-brands": "5.0.13",
|
|
||||||
"@fortawesome/fontawesome-free-regular": "5.0.13",
|
|
||||||
"@fortawesome/fontawesome-free-solid": "5.0.13",
|
|
||||||
"bootstrap": "4.1.3",
|
"bootstrap": "4.1.3",
|
||||||
"clipboard": "2.0.4",
|
"clipboard": "2.0.4",
|
||||||
"jquery": "3.3.1",
|
"jquery": "3.3.1",
|
||||||
|
|
|
@ -7,10 +7,12 @@ source ./scripts/common.sh
|
||||||
rm -rf $OUTPUT_DIR
|
rm -rf $OUTPUT_DIR
|
||||||
rm -rf $STATIC_BUILD
|
rm -rf $STATIC_BUILD
|
||||||
rm -rf $BASEDIR/resources
|
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 $BASEDIR/node_modules/lightgallery/dist/fonts $STATIC_BUILD
|
||||||
cp -r $STATIC_SRC/img $STATIC_BUILD/img
|
cp -r $STATIC_SRC/img $STATIC_BUILD/img
|
||||||
cp -r $BASEDIR/node_modules/lightgallery/dist/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/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
|
cp $BASEDIR/node_modules/lightgallery/dist/js/lightgallery.js $STATIC_BUILD/js/lightgallery.js
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
|
@ -1,7 +1,5 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('./fa');
|
|
||||||
|
|
||||||
var Clipboard = require('clipboard');
|
var Clipboard = require('clipboard');
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue