imba-localization 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/localization.imba +18 -18
- package/package.json +1 -1
package/localization.imba
CHANGED
|
@@ -61,7 +61,7 @@ tag language-selector
|
|
|
61
61
|
|
|
62
62
|
def onselect key
|
|
63
63
|
#dropdown = false
|
|
64
|
-
state.active = key
|
|
64
|
+
state.active = key
|
|
65
65
|
|
|
66
66
|
def icon country
|
|
67
67
|
return icons.replace('##',country)
|
|
@@ -74,27 +74,27 @@ tag language-selector
|
|
|
74
74
|
|
|
75
75
|
css
|
|
76
76
|
$ease: 0.5s
|
|
77
|
-
.
|
|
78
|
-
|
|
79
|
-
.
|
|
80
|
-
.
|
|
81
|
-
.
|
|
82
|
-
|
|
77
|
+
.container rd:8px px:15px py:8px cursor:pointer bgc:light-dark(#000000/10, #FFFFFF/20) fw:500 fs:13px ead:$ease bd:1px solid transparent
|
|
78
|
+
@.active bgc:light-dark(#000000/20, #FFFFFF/30) bd:1px solid transparent
|
|
79
|
+
.flag mr:10px rd:50% w:20px h:20px bd:1px solid transparent
|
|
80
|
+
.name mr:10px bd:1px solid transparent
|
|
81
|
+
.arrow w:16px h:16px fill:light-dark(#000000,#FFFFFF) ml:auto scale-y:-1 bd:1px solid transparent
|
|
82
|
+
@.active scale-y:1 bd:1px solid transparent
|
|
83
83
|
.menu t:100% l:50% x:-50% zi:999 backdrop-filter:blur(20px) mt:2px rd:8px rd:8px py:5px bgc:light-dark(#000000/5, #FFFFFF/10) fw:500 fs:13px ead:$ease bd:1px solid transparent
|
|
84
|
-
.
|
|
85
|
-
.
|
|
86
|
-
.
|
|
84
|
+
.item d:hflex ai:center px:10px py:5px rd:8px cursor:pointer bg@hover:light-dark(#000000/10, #FFFFFF/20) m:5px bd:1px solid transparent
|
|
85
|
+
.icon h:20px w:20px mr:10px rd:50% bd:1px solid transparent
|
|
86
|
+
.text fs:13px bd:1px solid transparent
|
|
87
87
|
|
|
88
|
-
<self
|
|
89
|
-
<div.
|
|
90
|
-
<img.
|
|
91
|
-
<div.
|
|
92
|
-
<svg.
|
|
88
|
+
<self [pos:rel] @mouseenter=(#dropdown = true) @mouseleave=mouseleave>
|
|
89
|
+
<div.container [pos:rel d:hcc] .active=#dropdown>
|
|
90
|
+
<img.flag src=icon(state[state.active].$.flag)>
|
|
91
|
+
<div.name> state.$.name
|
|
92
|
+
<svg.arrow [ead:$ease] .active=#dropdown viewBox="0 0 256 256">
|
|
93
93
|
<{arrow}>
|
|
94
94
|
|
|
95
95
|
if #dropdown
|
|
96
96
|
<div$menu.menu [pos:abs w:100% > max-content o@off:0] ease>
|
|
97
97
|
for own key, value of state.languages
|
|
98
|
-
<div.
|
|
99
|
-
<img.
|
|
100
|
-
<span.
|
|
98
|
+
<div.item @click=onselect(key) [d:none]=(key == state.active)>
|
|
99
|
+
<img.icon src=icon(value.$.flag)>
|
|
100
|
+
<span.text> value.$.name
|