Bladeren bron

Change npm package 'flag-icon-css' to 'flag-icons'

Andreas Deininger 7 maanden geleden
bovenliggende
commit
f032986c23

+ 1 - 1
data/toha/styles.yml

@@ -1,6 +1,6 @@
 flags:
   styles:
-    - flag-icon-css/css/flag-icons
+    - flag-icons/css/flag-icons
 
 videoplayer:
   services:

+ 1 - 1
exampleSite/hugo.yaml

@@ -22,7 +22,7 @@ module:
   mounts:
   - source: static/files
     target: static/files
-  - source: ./node_modules/flag-icon-css/flags
+  - source: ./node_modules/flag-icons/flags
     target: static/flags
   - source: ./node_modules/@fontsource/mulish/files
     target: static/files

+ 7 - 7
exampleSite/package-lock.json

@@ -21,7 +21,7 @@
         "eslint-plugin-promise": "^6.1.1",
         "feather-icons": "^4.29.1",
         "filterizr": "^2.2.4",
-        "flag-icon-css": "^4.1.7",
+        "flag-icons": "^7.2.3",
         "fuse.js": "^6.6.2",
         "highlight.js": "^11.6.0",
         "imagesloaded": "^5.0.0",
@@ -2033,12 +2033,12 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/flag-icon-css": {
-      "version": "4.1.7",
-      "resolved": "https://registry.npmjs.org/flag-icon-css/-/flag-icon-css-4.1.7.tgz",
-      "integrity": "sha512-AFjSU+fv98XbU0vnTQ32vcLj89UEr1MhwDFcooQv14qWJCjg9fGZzfh9BVyDhAhIOZW/pGmJmq38RqpgPaeybQ==",
-      "deprecated": "The project has been renamed to flag-icons",
-      "dev": true
+    "node_modules/flag-icons": {
+      "version": "7.2.3",
+      "resolved": "https://registry.npmjs.org/flag-icons/-/flag-icons-7.2.3.tgz",
+      "integrity": "sha512-X2gUdteNuqdNqob2KKTJTS+ZCvyWeLCtDz9Ty8uJP17Y4o82Y+U/Vd4JNrdwTAjagYsRznOn9DZ+E/Q52qbmqg==",
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/flat-cache": {
       "version": "3.2.0",

+ 2 - 2
exampleSite/package.json

@@ -15,7 +15,7 @@
       "eslint-plugin-promise": "github.com/hugo-toha/toha/v4",
       "feather-icons": "github.com/hugo-toha/toha/v4",
       "filterizr": "github.com/hugo-toha/toha/v4",
-      "flag-icon-css": "github.com/hugo-toha/toha/v4",
+      "flag-icons": "github.com/hugo-toha/toha/v4",
       "fuse.js": "github.com/hugo-toha/toha/v4",
       "highlight.js": "github.com/hugo-toha/toha/v4",
       "imagesloaded": "github.com/hugo-toha/toha/v4",
@@ -45,7 +45,7 @@
     "eslint-plugin-promise": "^6.1.1",
     "feather-icons": "^4.29.1",
     "filterizr": "^2.2.4",
-    "flag-icon-css": "^4.1.7",
+    "flag-icons": "^7.2.3",
     "fuse.js": "^6.6.2",
     "highlight.js": "^11.6.0",
     "imagesloaded": "^5.0.0",

+ 1 - 1
hugo.yaml

@@ -17,7 +17,7 @@ module:
     target: i18n
   - source: archetypes
     target: archetypes
-  - source: ../../node_modules/flag-icon-css/flags
+  - source: ../../node_modules/flag-icons/flags
     target: static/flags
   - source: ../../node_modules/@fontsource/mulish/files
     target: static/files

+ 2 - 2
layouts/partials/navigators/lang-selector.html

@@ -6,7 +6,7 @@
     <a class="nav-link dropdown-toggle" href="#" id="languageSelector" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
         {{ if ne site.Params.features.flags.enable false }}
             {{ $countryCode := partial "helpers/country-code.html" . }}
-            <span class="flag-icon flag-icon-{{$countryCode}}"></span>
+            <span class="fi fi-{{$countryCode}}"></span>
         {{ end }}
         {{ site.Language.LanguageName }}
     </a>
@@ -15,7 +15,7 @@
         <a class="dropdown-item nav-link languages-item" href="{{ path.Join "/" (cond (eq .Language.Lang $.Sites.Default.Language.Lang) "" .Language.Lang) $pageURL }}">
             {{ if ne site.Params.features.flags.enable false }}
                 {{ $countryCode := partial "helpers/country-code.html" . }}
-                <span class="flag-icon flag-icon-{{$countryCode}}"></span>
+                <span class="fi fi-{{$countryCode}}"></span>
             {{ end }}
             {{ .Language.LanguageName }}
         </a>

File diff suppressed because it is too large
+ 280 - 275
package-lock.json


+ 1 - 1
package.hugo.json

@@ -33,7 +33,7 @@
     "@fortawesome/fontawesome-free": "^6.6.0",
     "bootstrap": "^5.3.3",
     "filterizr": "^2.2.4",
-    "flag-icon-css": "^4.1.7",
+    "flag-icons": "^7.2.3",
     "fuse.js": "^6.6.2",
     "highlight.js": "^11.6.0",
     "imagesloaded": "^5.0.0",

+ 2 - 2
package.json

@@ -19,7 +19,7 @@
       "eslint-plugin-promise": "project",
       "feather-icons": "project",
       "filterizr": "project",
-      "flag-icon-css": "project",
+      "flag-icons": "project",
       "fuse.js": "project",
       "highlight.js": "project",
       "imagesloaded": "project",
@@ -50,7 +50,7 @@
     "eslint-plugin-promise": "^6.1.1",
     "feather-icons": "^4.29.1",
     "filterizr": "^2.2.4",
-    "flag-icon-css": "^4.1.7",
+    "flag-icons": "^7.2.3",
     "fuse.js": "^6.6.2",
     "highlight.js": "^11.6.0",
     "imagesloaded": "^5.0.0",

Some files were not shown because too many files changed in this diff