diff --git a/packages/nuxt-typo3-theme/package.json b/packages/nuxt-typo3-theme/package.json index 8ebec26..8cd069e 100644 --- a/packages/nuxt-typo3-theme/package.json +++ b/packages/nuxt-typo3-theme/package.json @@ -25,7 +25,6 @@ "body-scroll-lock": "^3.1.5", "nuxt-typo3-ce": "^0.0.2", "sanitize.css": "^12.0.1", - "svg-country-flags": "^1.2.10", "vue-mq": "^1.0.1", "vue-svgicon": "^3.2.9" }, diff --git a/packages/nuxt-typo3-theme/src/components/UiNavigation/UiNavigationLanguage/UiNavigationLanguage.vue b/packages/nuxt-typo3-theme/src/components/UiNavigation/UiNavigationLanguage/UiNavigationLanguage.vue index 2cc7b1d..33c58c6 100644 --- a/packages/nuxt-typo3-theme/src/components/UiNavigation/UiNavigationLanguage/UiNavigationLanguage.vue +++ b/packages/nuxt-typo3-theme/src/components/UiNavigation/UiNavigationLanguage/UiNavigationLanguage.vue @@ -5,19 +5,9 @@ v-on="$listeners" > @@ -41,12 +31,6 @@ export default defineComponent({ links: { type: Array as PropType, required: true - }, - preset: { - type: Object as PropType>, - default: () => ({ - en: require(`svg-country-flags/svg/gb.svg`) - }) } }, computed: { @@ -67,20 +51,6 @@ export default defineComponent({ return [current] || this.links } - }, - methods: { - getFlagImage (twoLetterIsoCode: string): string | undefined { - try { - if ( - Object.prototype.hasOwnProperty.call(this.preset, twoLetterIsoCode) - ) { - return this.preset[twoLetterIsoCode] - } - return require(`assets/flags/${twoLetterIsoCode}.svg`) - } catch { - return undefined - } - } } }) @@ -102,20 +72,12 @@ export default defineComponent({ } .flag { - height: var(--space-4); + text-transform: uppercase; margin-right: var(--space-3); @include media-query($ui-navbar-break-on) { margin-right: 0; } - - &--label { - display: none; - - @include media-query($ui-navbar-break-on) { - display: initial; - } - } } .ui-navigation-list { diff --git a/packages/nuxt-typo3-theme/src/nuxt/module.ts b/packages/nuxt-typo3-theme/src/nuxt/module.ts index e2e4b67..ea35e66 100644 --- a/packages/nuxt-typo3-theme/src/nuxt/module.ts +++ b/packages/nuxt-typo3-theme/src/nuxt/module.ts @@ -9,8 +9,7 @@ const defaults: TYPO3ThemeOptions = { css: true, googleFonts: true, layouts: true, - overrideLocalComponents: false, - flags: true + overrideLocalComponents: false } const NuxtTypo3Theme: Module = async function (options: TYPO3ThemeOptions) { @@ -27,17 +26,6 @@ const NuxtTypo3Theme: Module = async function (options: TYPO3ThemeOptions) { this.nuxt.options.css.push('nuxt-typo3-theme/src/styles/core.scss') } - if (this.nuxt?.options?.typo3?.i18n?.locales) { - this.nuxt.options.typo3.i18n.locales.forEach((locale: string) => { - try { - fs.copy( - require.resolve(`svg-country-flags/svg/${locale}.svg`), - `assets/flags/${locale}.svg` - ) - } catch (err: unknown) {} - }) - } - if (options.googleFonts && !modulesList.includes('@nuxtjs/google-fonts')) { this.addModule([ '@nuxtjs/google-fonts', diff --git a/packages/nuxt-typo3-theme/src/nuxt/module.types.ts b/packages/nuxt-typo3-theme/src/nuxt/module.types.ts index 035a26a..783518a 100644 --- a/packages/nuxt-typo3-theme/src/nuxt/module.types.ts +++ b/packages/nuxt-typo3-theme/src/nuxt/module.types.ts @@ -9,8 +9,6 @@ interface TYPO3ThemeOptions { layouts?: boolean | string[] /** use global components to override locals in specific scope */ overrideLocalComponents?: boolean | string[] - /** copy flags from svg-country-flags */ - flags?: boolean } export { TYPO3ThemeOptions } diff --git a/yarn.lock b/yarn.lock index 6c689e1..c524ef1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22485,11 +22485,6 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -svg-country-flags@^1.2.10: - version "1.2.10" - resolved "https://registry.yarnpkg.com/svg-country-flags/-/svg-country-flags-1.2.10.tgz#b1b94e9f08f065d7b3d0ff9ab359898edd4dd3b0" - integrity sha512-xrqwo0TYf/h2cfPvGpjdSuSguUbri4vNNizBnwzoZnX0xGo3O5nGJMlbYEp7NOYcnPGBm6LE2axqDWSB847bLw== - svg-tags@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764"