l-min-components 1.0.558 → 1.0.562
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "l-min-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.562",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"src/assets",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"react-lottie": "^1.2.4",
|
|
43
43
|
"react-mic": "^12.4.6",
|
|
44
44
|
"react-modal": "^3.16.1",
|
|
45
|
-
"react-player": "^2.
|
|
45
|
+
"react-player": "^2.15.1",
|
|
46
46
|
"react-router-dom": "^6.8.2",
|
|
47
47
|
"react-toastify": "^9.1.3",
|
|
48
48
|
"react-tooltip": "^5.10.1",
|
|
@@ -222,6 +222,21 @@ const HeaderComponent = (props) => {
|
|
|
222
222
|
}
|
|
223
223
|
}, []);
|
|
224
224
|
|
|
225
|
+
|
|
226
|
+
// Determine home page for active style purpose
|
|
227
|
+
const isHomePage = () => window.location.pathname === '/';
|
|
228
|
+
|
|
229
|
+
// Determine the label based on the current path
|
|
230
|
+
const getNavLinkLabel = () => {
|
|
231
|
+
const path = window.location.pathname;
|
|
232
|
+
if (path.includes("fun")) return "Fun";
|
|
233
|
+
if (path.includes("community")) return "Community";
|
|
234
|
+
if (path.includes("duet")) return "Duet";
|
|
235
|
+
if (path.includes("speech")) return "Speech";
|
|
236
|
+
if (path.includes("dictionary")) return "Dictionary";
|
|
237
|
+
return "Learning";
|
|
238
|
+
};
|
|
239
|
+
|
|
225
240
|
return (
|
|
226
241
|
<Navbar>
|
|
227
242
|
<img src={logo} alt="Learngual logo" />
|
|
@@ -232,15 +247,8 @@ const HeaderComponent = (props) => {
|
|
|
232
247
|
}}
|
|
233
248
|
>
|
|
234
249
|
<li>
|
|
235
|
-
<a className={
|
|
236
|
-
<BookIcon />{
|
|
237
|
-
{(window.location.pathname.includes("fun") && "Fun") ||
|
|
238
|
-
(window.location.pathname.includes("community") && "Community") ||
|
|
239
|
-
(window.location.pathname.includes("duet") && "Duet") ||
|
|
240
|
-
(window.location.pathname.includes("speech") && "Speech") ||
|
|
241
|
-
(window.location.pathname.includes("dictionary") &&
|
|
242
|
-
"Dictionary") ||
|
|
243
|
-
"Learning"}
|
|
250
|
+
<a className={isHomePage() ? 'active' : ''}>
|
|
251
|
+
<BookIcon /> {getNavLinkLabel()}
|
|
244
252
|
</a>
|
|
245
253
|
</li>
|
|
246
254
|
{/* <li>
|
|
@@ -259,6 +267,7 @@ const HeaderComponent = (props) => {
|
|
|
259
267
|
window.location.href =
|
|
260
268
|
"https://developer-staging-01.learngual.com/settings/";
|
|
261
269
|
}}
|
|
270
|
+
className={window.location.pathname.includes("settings") ? 'active' : ''}
|
|
262
271
|
style={{ cursor: "pointer" }}
|
|
263
272
|
>
|
|
264
273
|
<SettingIcon /> Settings
|
|
@@ -82,6 +82,7 @@ export const Nav = styled.ul`
|
|
|
82
82
|
@media screen and (max-width: 1530px) {
|
|
83
83
|
width: 40%;
|
|
84
84
|
}
|
|
85
|
+
|
|
85
86
|
& li {
|
|
86
87
|
display: flex;
|
|
87
88
|
align-items: center;
|
|
@@ -93,51 +94,117 @@ export const Nav = styled.ul`
|
|
|
93
94
|
margin-left: 35px;
|
|
94
95
|
}
|
|
95
96
|
|
|
96
|
-
& a.active {
|
|
97
|
-
color: rgba(0, 194, 194, 1) !important;
|
|
98
|
-
font-size: 21px;
|
|
99
|
-
font-weight: 600;
|
|
100
|
-
& svg path {
|
|
101
|
-
stroke: rgba(0, 194, 194, 1);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
97
|
& a {
|
|
106
98
|
text-decoration: none;
|
|
107
99
|
display: flex;
|
|
108
100
|
align-items: center;
|
|
109
101
|
color: #4a4d4d;
|
|
110
102
|
font-size: 15px;
|
|
111
|
-
font-style: normal;
|
|
112
103
|
font-weight: 600;
|
|
113
|
-
line-height: normal;
|
|
114
104
|
position: relative;
|
|
115
105
|
|
|
116
|
-
&:hover
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
106
|
+
&:hover,
|
|
107
|
+
&.active {
|
|
108
|
+
color: rgba(0, 194, 194, 1);
|
|
109
|
+
font-weight: 600;
|
|
110
|
+
&::after {
|
|
111
|
+
content: "";
|
|
112
|
+
position: absolute;
|
|
113
|
+
left: 0;
|
|
114
|
+
bottom: -9px;
|
|
115
|
+
width: 40px;
|
|
116
|
+
height: 4px;
|
|
117
|
+
background-color: rgba(0, 194, 194, 1);
|
|
118
|
+
transition: width 0.3s ease-in-out;
|
|
119
|
+
}
|
|
125
120
|
}
|
|
126
121
|
|
|
127
122
|
& svg {
|
|
128
123
|
margin-right: 12px;
|
|
129
124
|
}
|
|
130
125
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
// border-bottom: 2px solid rgba(0, 194, 194, 1);
|
|
134
|
-
& svg path {
|
|
135
|
-
stroke: rgba(0, 194, 194, 1);
|
|
136
|
-
}
|
|
126
|
+
& svg path {
|
|
127
|
+
stroke: ${({ isActive }) => (isActive ? 'rgba(0, 194, 194, 1)' : 'currentcolor')};
|
|
137
128
|
}
|
|
138
129
|
}
|
|
139
130
|
`;
|
|
140
131
|
|
|
132
|
+
// export const Nav = styled.ul`
|
|
133
|
+
// display: flex;
|
|
134
|
+
// list-style: none;
|
|
135
|
+
// align-items: center;
|
|
136
|
+
// margin: 0 10px;
|
|
137
|
+
// padding: 0 5px;
|
|
138
|
+
// width: 57%;
|
|
139
|
+
// @media screen and (max-width: 1530px) {
|
|
140
|
+
// width: 40%;
|
|
141
|
+
// }
|
|
142
|
+
// & li {
|
|
143
|
+
// display: flex;
|
|
144
|
+
// align-items: center;
|
|
145
|
+
// margin: 0 10px;
|
|
146
|
+
// }
|
|
147
|
+
|
|
148
|
+
// & li:nth-of-type(1) {
|
|
149
|
+
// margin-right: 75px;
|
|
150
|
+
// margin-left: 35px;
|
|
151
|
+
// }
|
|
152
|
+
|
|
153
|
+
// & a.active {
|
|
154
|
+
// color: rgba(0, 194, 194, 1) !important;
|
|
155
|
+
// font-size: 21px;
|
|
156
|
+
// font-weight: 600;
|
|
157
|
+
// & svg path {
|
|
158
|
+
// stroke: rgba(0, 194, 194, 1);
|
|
159
|
+
// }
|
|
160
|
+
// }
|
|
161
|
+
// /* & a.active:after {
|
|
162
|
+
// content: "";
|
|
163
|
+
// position: absolute;
|
|
164
|
+
// left: 0;
|
|
165
|
+
// bottom: -9px;
|
|
166
|
+
// width: 40px;
|
|
167
|
+
// height: 4px;
|
|
168
|
+
// background-color: rgba(0, 194, 194, 1);
|
|
169
|
+
// transition: width 0.3s ease-in-out;
|
|
170
|
+
// } */
|
|
171
|
+
|
|
172
|
+
// & a {
|
|
173
|
+
// text-decoration: none;
|
|
174
|
+
// display: flex;
|
|
175
|
+
// align-items: center;
|
|
176
|
+
// color: #4a4d4d;
|
|
177
|
+
// font-size: 15px;
|
|
178
|
+
// font-style: normal;
|
|
179
|
+
// font-weight: 600;
|
|
180
|
+
// line-height: normal;
|
|
181
|
+
// position: relative;
|
|
182
|
+
|
|
183
|
+
// &:hover:after {
|
|
184
|
+
// content: "";
|
|
185
|
+
// position: absolute;
|
|
186
|
+
// left: 0;
|
|
187
|
+
// bottom: -9px;
|
|
188
|
+
// width: 40px;
|
|
189
|
+
// height: 4px;
|
|
190
|
+
// background-color: rgba(0, 194, 194, 1);
|
|
191
|
+
// transition: width 0.3s ease-in-out;
|
|
192
|
+
// }
|
|
193
|
+
|
|
194
|
+
// & svg {
|
|
195
|
+
// margin-right: 12px;
|
|
196
|
+
// }
|
|
197
|
+
|
|
198
|
+
// &:hover {
|
|
199
|
+
// color: rgba(0, 194, 194, 1);
|
|
200
|
+
// // border-bottom: 2px solid rgba(0, 194, 194, 1);
|
|
201
|
+
// & svg path {
|
|
202
|
+
// stroke: rgba(0, 194, 194, 1);
|
|
203
|
+
// }
|
|
204
|
+
// }
|
|
205
|
+
// }
|
|
206
|
+
// `;
|
|
207
|
+
|
|
141
208
|
export const SearchInputGroup = styled.div`
|
|
142
209
|
background-color: transparent;
|
|
143
210
|
border-radius: 60px;
|
|
@@ -99,12 +99,7 @@ const LanguageDropdown = ({ languageDropdown, setLanguageDropdown }) => {
|
|
|
99
99
|
|
|
100
100
|
{!isSearch && (
|
|
101
101
|
<>
|
|
102
|
-
|
|
103
|
-
className="language_dropdown_item"
|
|
104
|
-
onClick={() => setLanguageDropdown()}
|
|
105
|
-
>
|
|
106
|
-
<img src={usFlag} alt="" /> <span>English</span>
|
|
107
|
-
</p>
|
|
102
|
+
|
|
108
103
|
<p
|
|
109
104
|
className="language_dropdown_item"
|
|
110
105
|
onClick={() => setLanguageDropdown()}
|