Use pip installed fontawesome and css/webfont loading rather than JS

This commit is contained in:
2021-02-21 02:14:23 +00:00
parent a789184c1c
commit 2044cbdac2
8 changed files with 21 additions and 28 deletions

11
Pipfile
View File

@@ -77,6 +77,7 @@ zipp = "~=3.4.0"
"zope.schema" = "~=6.0.1"
sentry-sdk = "*"
diff-match-patch = "*"
fontawesome-free = "*"
[dev-packages]
selenium = "~=3.141.0"
@@ -85,11 +86,17 @@ coveralls = "*"
django-coverage-plugin = "*"
pytest-cov = "*"
pytest-django = "*"
pytest-xdist = {extras = ["psutil"], version = "*"}
pluggy = "*"
pytest-splinter = "*"
pytest = "*"
pypom = {extras = ["splinter"], version = "*"}
[requires]
python_version = "3.9"
[dev-packages.pytest-xdist]
extras = [ "psutil",]
version = "*"
[dev-packages.pypom]
extras = [ "splinter",]
version = "*"

9
Pipfile.lock generated
View File

@@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "4c50e60e8f16ac2acce7ca974e51ef85088e4822e3c73febe3c17795b883f3ab"
"sha256": "d1245bb2d6b190a05b316c77a27c9b45f7fadbea14217ad308748f90643aa96e"
},
"pipfile-spec": 6,
"requires": {
@@ -266,6 +266,13 @@
"index": "pypi",
"version": "==0.2.0"
},
"fontawesome-free": {
"hashes": [
"sha256:e910e6a9fb98987a66982f80de6673c06255498f6473038c3b139f7962bb6317"
],
"index": "pypi",
"version": "==5.15.2"
},
"gunicorn": {
"hashes": [
"sha256:1904bb2b8a43658807108d59c3f3d56c2b6121a701161de0ddf9ad140073c626",

View File

@@ -72,6 +72,7 @@ INSTALLED_APPS = (
'reversion',
'captcha',
'widget_tweaks',
'fontawesome-free',
)
MIDDLEWARE = (

View File

@@ -47,7 +47,6 @@ function scripts() {
'node_modules/clipboard/dist/clipboard.min.js',
'node_modules/flatpickr/dist/flatpickr.min.js',
'node_modules/@fortawesome/fontawesome-free/js/all.js',
'node_modules/moment/moment.js',
'node_modules/fullcalendar/main.js',
'node_modules/bootstrap-select/dist/js/bootstrap-select.js',

21
package-lock.json generated
View File

@@ -5,12 +5,10 @@
"requires": true,
"packages": {
"": {
"name": "PyRIGS",
"version": "1.0.0",
"license": "Custom",
"dependencies": {
"@forevolve/bootstrap-dark": "^1.0.0-alpha.1075",
"@fortawesome/fontawesome-free": "^5.13.1",
"ajax-bootstrap-select": "^1.4.5",
"autocompleter": "^6.0.3",
"autoprefixer": "^9.8.0",
@@ -48,15 +46,6 @@
"popper.js": "^1.16.1"
}
},
"node_modules/@fortawesome/fontawesome-free": {
"version": "5.15.2",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.2.tgz",
"integrity": "sha512-7l/AX41m609L/EXI9EKH3Vs3v0iA8tKlIOGtw+kgcoanI7p+e4I4GYLqW3UXWiTnjSFymKSmTTPKYrivzbxxqA==",
"hasInstallScript": true,
"engines": {
"node": ">=6"
}
},
"node_modules/@gulp-sourcemaps/identity-map": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz",
@@ -1006,7 +995,6 @@
"dependencies": {
"anymatch": "~3.1.1",
"braces": "~3.0.2",
"fsevents": "~2.3.1",
"glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
@@ -3066,7 +3054,6 @@
"anymatch": "^2.0.0",
"async-each": "^1.0.1",
"braces": "^2.3.2",
"fsevents": "^1.2.7",
"glob-parent": "^3.1.0",
"inherits": "^2.0.3",
"is-binary-path": "^1.0.0",
@@ -4621,9 +4608,6 @@
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz",
"integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=",
"dev": true,
"dependencies": {
"graceful-fs": "^4.1.6"
},
"optionalDependencies": {
"graceful-fs": "^4.1.6"
}
@@ -9299,11 +9283,6 @@
"popper.js": "^1.16.1"
}
},
"@fortawesome/fontawesome-free": {
"version": "5.15.2",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.2.tgz",
"integrity": "sha512-7l/AX41m609L/EXI9EKH3Vs3v0iA8tKlIOGtw+kgcoanI7p+e4I4GYLqW3UXWiTnjSFymKSmTTPKYrivzbxxqA=="
},
"@gulp-sourcemaps/identity-map": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz",

View File

@@ -6,7 +6,6 @@
"license": "Custom",
"dependencies": {
"@forevolve/bootstrap-dark": "^1.0.0-alpha.1075",
"@fortawesome/fontawesome-free": "^5.13.1",
"ajax-bootstrap-select": "^1.4.5",
"autocompleter": "^6.0.3",
"autoprefixer": "^9.8.0",

View File

@@ -19,6 +19,8 @@
<link rel="stylesheet" type="text/css" href="{% static 'css/dark_screen.css' %}" {% if not request.user.dark_theme %}media="(prefers-color-scheme: dark)"{% endif %}>
<link rel="stylesheet" type="text/css" href="{% static 'css/screen.css' %}">
<link href="{% static 'fontawesome_free/css/fontawesome.css' %}" rel="stylesheet" type="text/css">
<link href="{% static 'fontawesome_free/css/solid.css' %}" rel="stylesheet" type="text/css">
{% block css %}
{% endblock %}
@@ -102,7 +104,6 @@ if({{ request.user.dark_theme|lower }} || window.matchMedia('(prefers-color-sche
<script src="{% static 'js/dropdown.js' %}"></script>
<script src="{% static 'js/modal.js' %}"></script>
<script src="{% static 'js/konami.js' %}"></script>
<script src="{% static 'js/all.js' %}"></script> <!---FontAwesome--->
<script>
jQuery(document).ready(function () {
jQuery(document).on('click', '.modal-href', function (e) {

View File

@@ -6,7 +6,7 @@
{% block content %}
<div class="row">
<h1 class="col-sm-12 pb-3">R<small class="text-muted">ig</small> I<small class="text-muted">nformation</small> G<small class="text-muted">athering</small> S<small class="text-muted">ystem</small></h1>
<h4 class="col-sm-12 pb-3">Welcome back {{ user.get_full_name }}, there {%if rig_count == 1 %}is one rig coming up{%else%}are {{ rig_count|apnumber }} rigs coming up.{%endif%}</h4>
<h2 class="col-sm-12 pb-3">Welcome back {{ user.get_full_name }}, there {%if rig_count == 1 %}is one rig coming up{%else%}are {{ rig_count|apnumber }} rigs coming up.{%endif%}</h2>
<div class="col-sm mb-3">
<div class="card">
<h4 class="card-header">Rigboard</h4>