diff --git a/components/LocaleSwitch.vue b/components/LocaleSwitch.vue
index 74e1a2d3b..707cfd53a 100644
--- a/components/LocaleSwitch.vue
+++ b/components/LocaleSwitch.vue
@@ -21,26 +21,24 @@
name="angle-down"
/>
-
-
-
+
@@ -65,12 +63,24 @@ export default {
computed: {
current() {
return find(this.locales, { code: this.$i18n.locale() })
+ },
+ routes() {
+ let routes = this.locales.map(locale => {
+ return {
+ name: locale.name,
+ path: locale.code
+ }
+ })
+ return routes
}
},
methods: {
- changeLanguage(locale) {
+ changeLanguage(locale, toggleMenu) {
this.$i18n.set(locale)
- this.$refs.menu.toggleMenu()
+ toggleMenu()
+ },
+ isExact(locale) {
+ return locale === this.$i18n.locale()
}
}
}
@@ -82,32 +92,15 @@ export default {
display: flex;
align-items: center;
height: 100%;
+ padding: $space-xx-small;
}
-ul.locale-menu-popover {
- list-style: none;
- padding: 0;
- margin: 0;
+nav.locale-menu-popover {
+ margin-left: -$space-small !important;
+ margin-right: -$space-small !important;
- li {
- a {
- opacity: 0.8;
-
- display: block;
- padding: 0.3rem 0;
-
- img {
- margin-right: 8px;
- }
-
- &:hover {
- opacity: 1;
- }
- &.active {
- opacity: 1;
- font-weight: bold;
- }
- }
+ a {
+ padding: $space-x-small $space-small;
}
}
diff --git a/layouts/default.vue b/layouts/default.vue
index 045bfb357..5756e1fa2 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -15,7 +15,6 @@
@@ -36,7 +35,6 @@
size="42"
/>
@@ -145,10 +143,7 @@ export default {