diy-template-components 0.2.40 → 0.2.41
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/build/index.es.js +71 -48
- package/build/index.es.js.map +1 -1
- package/build/index.js +71 -48
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -109,9 +109,11 @@ const useSectionStyles$a = createUseStyles(theme => ({
|
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
imageAnchor: {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
pointerEvents: 'auto',
|
|
113
|
+
cursor: 'default',
|
|
114
|
+
position: 'relative',
|
|
115
|
+
height: '55px',
|
|
116
|
+
width: 'inherit'
|
|
115
117
|
},
|
|
116
118
|
optionsContainer: {
|
|
117
119
|
display: 'flex',
|
|
@@ -152,7 +154,20 @@ const useSectionStyles$a = createUseStyles(theme => ({
|
|
|
152
154
|
},
|
|
153
155
|
imageDiv: {
|
|
154
156
|
display: 'flex',
|
|
155
|
-
|
|
157
|
+
position: 'relative',
|
|
158
|
+
maxHeight: '55px',
|
|
159
|
+
alignItems: 'center',
|
|
160
|
+
width: '25%'
|
|
161
|
+
},
|
|
162
|
+
imageDivImageMobile: {},
|
|
163
|
+
imageAnchorMobile: {
|
|
164
|
+
pointerEvents: 'auto',
|
|
165
|
+
cursor: 'default',
|
|
166
|
+
width: '100%',
|
|
167
|
+
maxWidth: '80px',
|
|
168
|
+
cursor: 'default',
|
|
169
|
+
height: '46px',
|
|
170
|
+
position: 'relative'
|
|
156
171
|
},
|
|
157
172
|
appNameClass: {
|
|
158
173
|
fontStyle: 'normal',
|
|
@@ -165,6 +180,7 @@ const useSectionStyles$a = createUseStyles(theme => ({
|
|
|
165
180
|
mobileContent: {
|
|
166
181
|
display: 'flex',
|
|
167
182
|
alignItems: 'center',
|
|
183
|
+
width: "100%",
|
|
168
184
|
'& img': {
|
|
169
185
|
marginRight: '8px',
|
|
170
186
|
maxWidth: '80px',
|
|
@@ -207,7 +223,8 @@ const useSectionStyles$a = createUseStyles(theme => ({
|
|
|
207
223
|
padding: '8px',
|
|
208
224
|
display: 'flex',
|
|
209
225
|
alignItems: 'center',
|
|
210
|
-
justifyContent: 'center'
|
|
226
|
+
justifyContent: 'center',
|
|
227
|
+
width: "10%"
|
|
211
228
|
},
|
|
212
229
|
'@media screen and (max-width: 767px)': {
|
|
213
230
|
optionsContainer: {
|
|
@@ -1098,6 +1115,42 @@ function OptionList({
|
|
|
1098
1115
|
}) : null));
|
|
1099
1116
|
}
|
|
1100
1117
|
|
|
1118
|
+
const NextImageRenderer = ({
|
|
1119
|
+
src,
|
|
1120
|
+
...props
|
|
1121
|
+
}) => {
|
|
1122
|
+
const {
|
|
1123
|
+
isCustomWebsite
|
|
1124
|
+
} = React.useContext(PageContext);
|
|
1125
|
+
const imageLoader = ({
|
|
1126
|
+
src,
|
|
1127
|
+
quality,
|
|
1128
|
+
width
|
|
1129
|
+
}) => {
|
|
1130
|
+
return `${process.env.NEXT_PUBLIC_ENV_ASSET_PREFIX}/_next/image?url=${src}&q=${quality || 75}&w=${width}`;
|
|
1131
|
+
};
|
|
1132
|
+
let {
|
|
1133
|
+
refSetter,
|
|
1134
|
+
className
|
|
1135
|
+
} = props;
|
|
1136
|
+
if (isCustomWebsite) {
|
|
1137
|
+
const NextImage = require('next/image').default;
|
|
1138
|
+
return /*#__PURE__*/React__default["default"].createElement(NextImage, _extends({
|
|
1139
|
+
loader: imageLoader,
|
|
1140
|
+
src: src,
|
|
1141
|
+
layout: 'fill',
|
|
1142
|
+
ref: refSetter,
|
|
1143
|
+
className: className
|
|
1144
|
+
}, props));
|
|
1145
|
+
} else {
|
|
1146
|
+
return /*#__PURE__*/React__default["default"].createElement("img", {
|
|
1147
|
+
ref: refSetter,
|
|
1148
|
+
className: className,
|
|
1149
|
+
src: src
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
};
|
|
1153
|
+
|
|
1101
1154
|
function DesktopHeader({
|
|
1102
1155
|
header,
|
|
1103
1156
|
navData,
|
|
@@ -1147,9 +1200,12 @@ function DesktopHeader({
|
|
|
1147
1200
|
pointerEvents: isLandingPage ? 'none' : 'auto',
|
|
1148
1201
|
cursor: isLandingPage ? 'not-allowed' : 'default'
|
|
1149
1202
|
}
|
|
1150
|
-
}, /*#__PURE__*/React__default["default"].createElement("
|
|
1151
|
-
|
|
1152
|
-
}
|
|
1203
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1204
|
+
className: classes?.imageDivImage
|
|
1205
|
+
}, /*#__PURE__*/React__default["default"].createElement(NextImageRenderer, {
|
|
1206
|
+
src: header?.websiteLogo,
|
|
1207
|
+
className: classes.imageDivImageNext
|
|
1208
|
+
}))) : null, isTutorWebsite && header?.appName ? /*#__PURE__*/React__default["default"].createElement("a", {
|
|
1153
1209
|
href: logoUrl
|
|
1154
1210
|
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
1155
1211
|
className: classes.appNameClass
|
|
@@ -1309,14 +1365,17 @@ function MobileHeader({
|
|
|
1309
1365
|
width: '24px'
|
|
1310
1366
|
})), header?.websiteLogo ? /*#__PURE__*/React__default["default"].createElement("a", {
|
|
1311
1367
|
href: logoUrl,
|
|
1312
|
-
className: classes.
|
|
1368
|
+
className: classes.imageAnchorMobile,
|
|
1313
1369
|
style: {
|
|
1314
1370
|
pointerEvents: isLandingPage ? 'none' : 'auto',
|
|
1315
1371
|
cursor: isLandingPage ? 'not-allowed' : 'default'
|
|
1316
1372
|
}
|
|
1317
|
-
}, /*#__PURE__*/React__default["default"].createElement("
|
|
1318
|
-
|
|
1319
|
-
}
|
|
1373
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1374
|
+
className: classes?.imageDivImageMobile
|
|
1375
|
+
}, /*#__PURE__*/React__default["default"].createElement(NextImageRenderer, {
|
|
1376
|
+
src: header?.websiteLogo,
|
|
1377
|
+
className: classes.imageDivImageNext
|
|
1378
|
+
}))) : null, isTutorWebsite && header?.appName ? /*#__PURE__*/React__default["default"].createElement("p", {
|
|
1320
1379
|
className: classes.mobileAppNameClass
|
|
1321
1380
|
}, " ", header?.appName) : null), downloadLink), sideMenu ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1322
1381
|
className: classes.mobileMenu
|
|
@@ -1529,42 +1588,6 @@ const useSectionStyles$9 = createUseStyles(theme => ({
|
|
|
1529
1588
|
}
|
|
1530
1589
|
}));
|
|
1531
1590
|
|
|
1532
|
-
const NextImageRenderer = ({
|
|
1533
|
-
src,
|
|
1534
|
-
...props
|
|
1535
|
-
}) => {
|
|
1536
|
-
const {
|
|
1537
|
-
isCustomWebsite
|
|
1538
|
-
} = React.useContext(PageContext);
|
|
1539
|
-
const imageLoader = ({
|
|
1540
|
-
src,
|
|
1541
|
-
quality,
|
|
1542
|
-
width
|
|
1543
|
-
}) => {
|
|
1544
|
-
return `${process.env.NEXT_PUBLIC_ENV_ASSET_PREFIX}/_next/image?url=${src}&q=${quality || 75}&w=${width}`;
|
|
1545
|
-
};
|
|
1546
|
-
let {
|
|
1547
|
-
refSetter,
|
|
1548
|
-
className
|
|
1549
|
-
} = props;
|
|
1550
|
-
if (isCustomWebsite) {
|
|
1551
|
-
const NextImage = require('next/image').default;
|
|
1552
|
-
return /*#__PURE__*/React__default["default"].createElement(NextImage, _extends({
|
|
1553
|
-
loader: imageLoader,
|
|
1554
|
-
src: src,
|
|
1555
|
-
layout: 'fill',
|
|
1556
|
-
ref: refSetter,
|
|
1557
|
-
className: className
|
|
1558
|
-
}, props));
|
|
1559
|
-
} else {
|
|
1560
|
-
return /*#__PURE__*/React__default["default"].createElement("img", {
|
|
1561
|
-
ref: refSetter,
|
|
1562
|
-
className: className,
|
|
1563
|
-
src: src
|
|
1564
|
-
});
|
|
1565
|
-
}
|
|
1566
|
-
};
|
|
1567
|
-
|
|
1568
1591
|
function Footer({
|
|
1569
1592
|
data
|
|
1570
1593
|
}) {
|