chore(frontend): splice PROJECT_DIR into icon import sass
This commit is contained in:
parent
d2c8522ffe
commit
88367a9219
1
.gitignore
vendored
1
.gitignore
vendored
@ -37,6 +37,7 @@ uniworx.nix
|
|||||||
.kateproject
|
.kateproject
|
||||||
src/Handler/Assist.bak
|
src/Handler/Assist.bak
|
||||||
src/Handler/Course.SnapCustom.hs
|
src/Handler/Course.SnapCustom.hs
|
||||||
|
frontend/src/env.sass
|
||||||
*.orig
|
*.orig
|
||||||
/instance
|
/instance
|
||||||
.stack-work-*
|
.stack-work-*
|
||||||
|
|||||||
8
Makefile
8
Makefile
@ -65,7 +65,7 @@ help:
|
|||||||
# HELP: stop all running containers and remove all compilation results in the directory (but leave images including dependencies unharmed)
|
# HELP: stop all running containers and remove all compilation results in the directory (but leave images including dependencies unharmed)
|
||||||
clean:
|
clean:
|
||||||
rm -rf develop
|
rm -rf develop
|
||||||
-rm -rf node_modules .npm .cache assets/icons assets/favicons static well-known config/manifest.json
|
-rm -rf node_modules .npm .cache assets/icons assets/favicons static well-known config/manifest.json frontend/src/env.sass
|
||||||
-rm -rf .stack-work .stack-work.lock
|
-rm -rf .stack-work .stack-work.lock
|
||||||
-rm -rf bin .Dockerfile develop
|
-rm -rf bin .Dockerfile develop
|
||||||
-$(CONTAINER_COMMAND) container prune --force
|
-$(CONTAINER_COMMAND) container prune --force
|
||||||
@ -293,7 +293,7 @@ uniworx.cabal:
|
|||||||
stack exec -- hpack --force
|
stack exec -- hpack --force
|
||||||
|
|
||||||
# HELP(compile-frontend): compile frontend assets
|
# HELP(compile-frontend): compile frontend assets
|
||||||
--compile-frontend: node_modules assets esbuild.config.mjs
|
--compile-frontend: node_modules assets esbuild.config.mjs frontend/src/env.sass
|
||||||
npm run build
|
npm run build
|
||||||
--start-frontend: --compile-frontend;
|
--start-frontend: --compile-frontend;
|
||||||
--dependencies-frontend: node_modules assets static well-known;
|
--dependencies-frontend: node_modules assets static well-known;
|
||||||
@ -308,7 +308,9 @@ assets/icons: node_modules assets/icons-src/fontawesome.json
|
|||||||
./utils/renamer.pl node_modules/@fortawesome/fontawesome-free/svgs/solid assets/icons-src/fontawesome.json assets/icons/fradrive
|
./utils/renamer.pl node_modules/@fortawesome/fontawesome-free/svgs/solid assets/icons-src/fontawesome.json assets/icons/fradrive
|
||||||
./utils/renamer.pl node_modules/@fortawesome/fontawesome-free/svgs/regular assets/icons-src/fontawesome.json assets/icons/fradrive
|
./utils/renamer.pl node_modules/@fortawesome/fontawesome-free/svgs/regular assets/icons-src/fontawesome.json assets/icons/fradrive
|
||||||
-cp assets/icons-src/*.svg assets/icons/fradrive
|
-cp assets/icons-src/*.svg assets/icons/fradrive
|
||||||
static: node_modules assets esbuild.config.mjs
|
frontend/src/env.sass:
|
||||||
|
echo "\$$path: '$${PROJECT_DIR}'" > frontend/src/env.sass
|
||||||
|
static: node_modules assets esbuild.config.mjs frontend/src/env.sass
|
||||||
npm run build
|
npm run build
|
||||||
well-known: static;
|
well-known: static;
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
// SPDX-FileCopyrightText: 2024 David Mosbach <david.mosbach@uniworx.de>, Sarah Vaupel <sarah.vaupel@uniworx.de>
|
// SPDX-FileCopyrightText: 2024-2025 David Mosbach <david.mosbach@uniworx.de>, Sarah Vaupel <sarah.vaupel@uniworx.de>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
// SPDX-License-Identifier: LicenseRef-Fraport-Corporate-Design
|
// SPDX-License-Identifier: LicenseRef-Fraport-Corporate-Design
|
||||||
|
|
||||||
|
@import 'env';
|
||||||
|
|
||||||
$ico-width: 30px;
|
$ico-width: 30px;
|
||||||
|
|
||||||
@ -102,7 +103,7 @@ $icons: new,
|
|||||||
|
|
||||||
@each $name in $icons {
|
@each $name in $icons {
|
||||||
.ico-#{$name} {
|
.ico-#{$name} {
|
||||||
background-image: url('/mnt/fradrive/assets/icons/fradrive/#{$name}.svg');
|
background-image: url('#{$path}/assets/icons/fradrive/#{$name}.svg');
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user