Replace fontawesome-pro with fontawesome-free for public use

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-01-18 18:53:42 +01:00
parent ac6a74204a
commit 26a1419f61
Signed by: luzifer
SSH key fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E
8 changed files with 24 additions and 18 deletions

6
.dockerignore Normal file
View file

@ -0,0 +1,6 @@
accounting
node_modules
pkg/frontend/assets/app.*
pkg/frontend/assets/*.ttf
pkg/frontend/assets/*.woff2
test.db

2
.npmrc
View file

@ -1,2 +0,0 @@
@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=${FONTAWESOME_NPM_AUTH_TOKEN}

View file

@ -2,9 +2,10 @@ PORT := 5000
default: build
build: export CGO_ENABLED=0
build: frontend
go build \
-ldflags "-X main.version=$(shell git describe --tags --always || echo dev)" \
-ldflags "-s -w -X main.version=$(shell git describe --tags --always || echo dev)" \
-mod=readonly \
-trimpath
@ -14,7 +15,7 @@ frontend: node_modules
node ci/build.mjs
node_modules:
vault2env --key secret/jenkins/fontawesome -- npm ci --include=dev
npm ci --include=dev
run: frontend
envrun -- go run . --listen=:$(PORT)
go run . --listen=:$(PORT)

View file

@ -32,12 +32,12 @@ In short: Maybe. Longer version: This software started as a system to do **my**
## How to run it?
For local testing just clone the repo, ensure you got a fairly new `nodejs` (including NPM) and `go` toolchain installed, adjust `node_modules` and `run` targets in the `Makefile` and
For local testing just clone the repo, ensure you got a fairly new `nodejs` (including NPM) and `go` toolchain installed and
```console
# make run FONTAWESOME_NPM_AUTH_TOKEN=your-fa-pro-token
# make run
```
then go to http://localhost:5000/ and try it.
To really host it, `make build` it (you need to find a way to get your FA Pro Token into the build and most likely you will need to edit the `node_modules` target in the `Makefile`), put it on your server and let it run. (It's a binary so probably use systemd to run it and an nginx as proxy in front of it doing auth-stuff…)
To really host it, `make build` it, put it on your server and let it run. (It's a binary so probably use systemd to run it and an nginx as proxy in front of it doing auth-stuff…)

View file

@ -43,7 +43,7 @@
</li>
<li class="mb-1 fw-semibold">
<div class="d-flex align-items-center">
<i class="fas fa-fw fa-coin me-1" /> Tracking
<i class="fas fa-fw fa-coins me-1" /> Tracking
<span :class="{'ms-auto': true, 'text-danger': trackingSum < 0}">
{{ formatNumber(trackingSum) }}
</span>

View file

@ -4,10 +4,10 @@ $web-font-path: '';
@import "../node_modules/bootstrap/dist/css/bootstrap.css";
@import "lato";
$fa-font-path: "../node_modules/@fortawesome/fontawesome-pro/webfonts";
@import "../node_modules/@fortawesome/fontawesome-pro/scss/fontawesome.scss";
@import "../node_modules/@fortawesome/fontawesome-pro/scss/solid.scss";
@import "../node_modules/@fortawesome/fontawesome-pro/scss/brands.scss";
$fa-font-path: "../node_modules/@fortawesome/fontawesome-free/webfonts";
@import "../node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss";
@import "../node_modules/@fortawesome/fontawesome-free/scss/solid.scss";
@import "../node_modules/@fortawesome/fontawesome-free/scss/brands.scss";
.minimized-column {
width: 0.1%;

9
package-lock.json generated
View file

@ -6,7 +6,7 @@
"": {
"name": "accounting",
"dependencies": {
"@fortawesome/fontawesome-pro": "^6.4.2",
"@fortawesome/fontawesome-free": "^6.4.2",
"bootstrap": "^5.3.2",
"vue": "^3.4.14",
"vue-router": "^4.2.5"
@ -819,10 +819,11 @@
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/@fortawesome/fontawesome-pro": {
"node_modules/@fortawesome/fontawesome-free": {
"version": "6.5.1",
"resolved": "https://npm.fontawesome.com/@fortawesome/fontawesome-pro/-/6.5.1/fontawesome-pro-6.5.1.tgz",
"integrity": "sha512-XLi5HOQ3XLNtM9UhrCyT5jEj0RHkx5GfzKDmUPpVTea4C/Ekj5plOYVAp9dUWgH+NWo3IrVpwhsnhIFh/FZPgA==",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.5.1.tgz",
"integrity": "sha512-CNy5vSwN3fsUStPRLX7fUYojyuzoEMSXPl7zSLJ8TgtRfjv24LOnOWKT2zYwaHZCJGkdyRnTmstR0P+Ah503Gw==",
"hasInstallScript": true,
"engines": {
"node": ">=6"
}

View file

@ -10,7 +10,7 @@
"name": "accounting",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-pro": "^6.4.2",
"@fortawesome/fontawesome-free": "^6.4.2",
"bootstrap": "^5.3.2",
"vue": "^3.4.14",
"vue-router": "^4.2.5"