]> _ Git - pmi.git/commitdiff
wip #3262 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 11 Dec 2019 18:12:57 +0000 (19:12 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 11 Dec 2019 18:12:57 +0000 (19:12 +0100)
.env.staging
public/images/locale-DE.svg [new file with mode: 0644]
public/images/locale-FR.svg [new file with mode: 0644]
public/images/locale-GB.svg [new file with mode: 0644]
public/images/locale-de.svg [deleted file]
public/images/locale-en.svg [deleted file]
public/images/locale-fr.svg [deleted file]
resources/views/partials/footer-language-switcher.blade.php [new file with mode: 0644]
resources/views/partials/footer.blade.php

index 304200f53c0507665cf8726400116b27326cf5b2..acc4b02c1d059ef92e5297dc45c891813a933c1c 100644 (file)
@@ -57,7 +57,7 @@ ELASTICSEARCH_PASS=
 FEATURE_QUOTE=true
 FEATURE_NEWS=true
 FEATURE_SEARCH=true
-FEATURE_I18N=false
+FEATURE_I18N=true
 FEATURE_TEAM=true
 FEATURE_CLIENTS=true
 FEATURE_PARTNERS=true
diff --git a/public/images/locale-DE.svg b/public/images/locale-DE.svg
new file mode 100644 (file)
index 0000000..4c1f7e8
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="flag-icon-css-de" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
+        y="0px" width="18px" height="13px" viewBox="0 0 18 13" enable-background="new 0 0 18 13" xml:space="preserve">
+<path fill="#FFCE00" d="M0,8.7h18V13H0V8.7z"/>
+<path d="M0,0h18v4.3H0V0z"/>
+<path fill="#DD0000" d="M0,4.3h18v4.3H0V4.3z"/>
+</svg>
diff --git a/public/images/locale-FR.svg b/public/images/locale-FR.svg
new file mode 100644 (file)
index 0000000..fbb7cf5
--- /dev/null
@@ -0,0 +1,5 @@
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="18px" height="13px" viewBox="0 0 18 13">
+    <rect fill="#2180C8" width="6" height="13"/>
+    <rect x="6" fill="#FFFFFF" width="6" height="13"/>
+    <rect x="12" fill="#F65858" width="6" height="13"/>
+</svg>
diff --git a/public/images/locale-GB.svg b/public/images/locale-GB.svg
new file mode 100644 (file)
index 0000000..ccf2dd3
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+        width="18px" height="13px" viewBox="0 0 18 13" enable-background="new 0 0 18 13" xml:space="preserve">
+<path fill="#00247D" d="M-4.2-0.1v13.2h26.5V-0.1H-4.2z"/>
+<path fill="#FFFFFF" d="M-4.2-0.2v1.5L6.1,6.4l-10.3,5.1V13h3L9.1,7.9l10.2,5.2h3v-1.5L12,6.4l10.3-5.1v-1.5h-2.9L9.1,5L-1.2-0.2
+       C-1.2-0.2-4.2-0.2-4.2-0.2z"/>
+<path fill="#CF142B" d="M8.9,6.5h2l11.3,5.7v1L8.9,6.5L8.9,6.5z M20.2-0.2h1.9L8.9,6.4v-1L20.2-0.2L20.2-0.2z M1.3,3.6l-5.6-2.8v-1
+       L8.9,6.4h-2L1.3,3.6z M8.9,6.5v1l-11.3,5.6h-2L8.9,6.5L8.9,6.5z"/>
+<g>
+       <path fill="#FFFFFF" d="M6.8-0.1v4.4H-4.3v4.4H6.8v4.4h4.4V8.7h11V4.3h-11v-4.4L6.8-0.1L6.8-0.1z"/>
+       <path fill="#CF142B" d="M7.6-0.1v5.3H-4.3v2.7H7.6v5.3h2.7V7.8h11.9V5.1H10.3v-5.3C10.3-0.1,7.6-0.1,7.6-0.1z"/>
+</g>
+</svg>
diff --git a/public/images/locale-de.svg b/public/images/locale-de.svg
deleted file mode 100644 (file)
index 4c1f7e8..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
-<svg version="1.1" id="flag-icon-css-de" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
-        y="0px" width="18px" height="13px" viewBox="0 0 18 13" enable-background="new 0 0 18 13" xml:space="preserve">
-<path fill="#FFCE00" d="M0,8.7h18V13H0V8.7z"/>
-<path d="M0,0h18v4.3H0V0z"/>
-<path fill="#DD0000" d="M0,4.3h18v4.3H0V4.3z"/>
-</svg>
diff --git a/public/images/locale-en.svg b/public/images/locale-en.svg
deleted file mode 100644 (file)
index ccf2dd3..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
-        width="18px" height="13px" viewBox="0 0 18 13" enable-background="new 0 0 18 13" xml:space="preserve">
-<path fill="#00247D" d="M-4.2-0.1v13.2h26.5V-0.1H-4.2z"/>
-<path fill="#FFFFFF" d="M-4.2-0.2v1.5L6.1,6.4l-10.3,5.1V13h3L9.1,7.9l10.2,5.2h3v-1.5L12,6.4l10.3-5.1v-1.5h-2.9L9.1,5L-1.2-0.2
-       C-1.2-0.2-4.2-0.2-4.2-0.2z"/>
-<path fill="#CF142B" d="M8.9,6.5h2l11.3,5.7v1L8.9,6.5L8.9,6.5z M20.2-0.2h1.9L8.9,6.4v-1L20.2-0.2L20.2-0.2z M1.3,3.6l-5.6-2.8v-1
-       L8.9,6.4h-2L1.3,3.6z M8.9,6.5v1l-11.3,5.6h-2L8.9,6.5L8.9,6.5z"/>
-<g>
-       <path fill="#FFFFFF" d="M6.8-0.1v4.4H-4.3v4.4H6.8v4.4h4.4V8.7h11V4.3h-11v-4.4L6.8-0.1L6.8-0.1z"/>
-       <path fill="#CF142B" d="M7.6-0.1v5.3H-4.3v2.7H7.6v5.3h2.7V7.8h11.9V5.1H10.3v-5.3C10.3-0.1,7.6-0.1,7.6-0.1z"/>
-</g>
-</svg>
diff --git a/public/images/locale-fr.svg b/public/images/locale-fr.svg
deleted file mode 100644 (file)
index fbb7cf5..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="18px" height="13px" viewBox="0 0 18 13">
-    <rect fill="#2180C8" width="6" height="13"/>
-    <rect x="6" fill="#FFFFFF" width="6" height="13"/>
-    <rect x="12" fill="#F65858" width="6" height="13"/>
-</svg>
diff --git a/resources/views/partials/footer-language-switcher.blade.php b/resources/views/partials/footer-language-switcher.blade.php
new file mode 100644 (file)
index 0000000..6ad56bb
--- /dev/null
@@ -0,0 +1,20 @@
+@if (config('features.i18n') && count($locales['others'])>0)
+    {{-- Language Switcher --}}
+    <div class="footer-locales">
+                <span class="footer-locales-current pr-12">
+                    <img src="{{ asset('images/locale-'.$locales['active_flag'].'.svg') }}"
+                         alt="{{$locales['active_name']}}"
+                         class="footer-locales-flag">{{$locales['active_name']}}
+                </span>
+        <div class="footer-locales-list-wrapper">
+
+            <ul class="footer-locales-list">
+                @foreach($locales['others'] as $code=>$locale)
+                    <li><a href="/en"><img src="{{ asset('images/locale-'.$locale['flag'].'.svg') }}"
+                                           alt="{{$locale['name']}}"
+                                           class="footer-locales-flag">{{$locale['name']}}</a></li>
+                @endforeach
+            </ul>
+        </div>
+    </div>
+@endif
index 13be37014de6d2ff3fdafee072080c1f1667fab9..73301f01cbd2c5a7b1709f30ce4aef19949bff62 100644 (file)
     {{-- Sub-footer --}}
     <div class="bg-navy-dark">
         <content class="footer-end">
-            @if (config('features.i18n'))
-                {{-- Language Switcher --}}
-                <div class="footer-locales">
-                <span class="footer-locales-current pr-12">
-                    <img src="{{ asset('images/locale-fr.svg') }}" alt="Français" class="footer-locales-flag">Français
-                </span>
-                    <div class="footer-locales-list-wrapper">
-                        <ul class="footer-locales-list">
-                            <li><a href="/de"><img src="{{ asset('images/locale-de.svg') }}" alt="Deutsch"
-                                                   class="footer-locales-flag">Deutsch</a></li>
-                            <li><a href="/en"><img src="{{ asset('images/locale-en.svg') }}" alt="English"
-                                                   class="footer-locales-flag">English</a></li>
-                        </ul>
-                    </div>
-                </div>
-            @endif
+            @include('partials.footer-language-switcher')
 
             {{-- Footer Nav Links --}}
             {!!  CubistMenu::get('#footer')->asUl(['class' => 'footer-nav'])!!}