From edf3dc50aad464b31e4b1f2a1a3980ca023b9588 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sun, 10 May 2020 15:09:05 +0200 Subject: viewer: code simplification;fontawesome import --- viewer/src/plugins/fontawesome-icons.ts | 35 +++++++++++++++++++++++++++++++++ viewer/src/plugins/fontawesome.ts | 34 ++------------------------------ 2 files changed, 37 insertions(+), 32 deletions(-) create mode 100644 viewer/src/plugins/fontawesome-icons.ts (limited to 'viewer/src/plugins') diff --git a/viewer/src/plugins/fontawesome-icons.ts b/viewer/src/plugins/fontawesome-icons.ts new file mode 100644 index 0000000..2f45f2c --- /dev/null +++ b/viewer/src/plugins/fontawesome-icons.ts @@ -0,0 +1,35 @@ +/* ldgallery - A static generator which turns a collection of tagged +-- pictures into a searchable web gallery. +-- +-- Copyright (C) 2019-2020 Guillaume FOUET +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Affero General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Affero General Public License for more details. +-- +-- You should have received a copy of the GNU Affero General Public License +-- along with this program. If not, see . +*/ + +export { + faFolder, + faFolderOpen, + faEraser, + faSearch, + faPlus, + faMinus, + faImage, + faHome, + faArrowLeft, + faLevelUpAlt, + faAngleRight, + faAngleDoubleLeft, + faFile, + faFileDownload, +} from "@fortawesome/free-solid-svg-icons"; diff --git a/viewer/src/plugins/fontawesome.ts b/viewer/src/plugins/fontawesome.ts index 886d680..25ddd99 100644 --- a/viewer/src/plugins/fontawesome.ts +++ b/viewer/src/plugins/fontawesome.ts @@ -21,39 +21,9 @@ import Vue from "vue"; import { library, config } from "@fortawesome/fontawesome-svg-core"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; -import { - faFolder, - faFolderOpen, - faEraser, - faSearch, - faPlus, - faMinus, - faImage, - faHome, - faArrowLeft, - faLevelUpAlt, - faAngleRight, - faAngleDoubleLeft, - faFile, - faFileDownload, -} from "@fortawesome/free-solid-svg-icons"; +import * as faIcons from "./fontawesome-icons"; -library.add( - faFolder, - faFolderOpen, - faEraser, - faSearch, - faPlus, - faMinus, - faImage, - faHome, - faArrowLeft, - faLevelUpAlt, - faAngleRight, - faAngleDoubleLeft, - faFile, - faFileDownload, -); +library.add(faIcons); config.autoAddCss = false; import "@fortawesome/fontawesome-svg-core/styles.css"; -- cgit v1.2.3