nvis-fe-cms-libs 2.1.6 → 2.1.7
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.
|
@@ -968,108 +968,57 @@ const PartnerCard_2 = ({ partner, idx, t, getLogoUrl, isDarkMode }) => {
|
|
|
968
968
|
return () => itemRef.current && observer.unobserve(itemRef.current);
|
|
969
969
|
}, []);
|
|
970
970
|
const logoSrc = getLogoUrl(partner.logoUrl);
|
|
971
|
-
const cardContent = /* @__PURE__ */ jsxRuntimeExports.
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
{
|
|
1007
|
-
className: "w-full rounded-lg overflow-hidden bg-surface flex items-center justify-center p-4",
|
|
1008
|
-
style: {
|
|
1009
|
-
height: "75%",
|
|
1010
|
-
borderWidth: "1px",
|
|
1011
|
-
borderStyle: "solid",
|
|
1012
|
-
borderColor: isHovered ? "var(--brand-primary)" : "var(--border-color)",
|
|
1013
|
-
backgroundColor: isHovered ? "var(--bg-body)" : "var(--bg-surface)",
|
|
1014
|
-
transition: "all 0.3s ease"
|
|
1015
|
-
},
|
|
1016
|
-
children: logoSrc ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1017
|
-
"img",
|
|
1018
|
-
{
|
|
1019
|
-
src: logoSrc,
|
|
1020
|
-
alt: partner.name,
|
|
1021
|
-
className: "max-w-full max-h-full object-contain",
|
|
1022
|
-
style: {
|
|
1023
|
-
filter: isHovered ? "grayscale(0) opacity(1)" : isDarkMode ? "grayscale(0.3) opacity(0.8)" : "grayscale(0.2) opacity(0.9)",
|
|
1024
|
-
transform: isHovered ? "scale(1.05)" : "scale(1)",
|
|
1025
|
-
transition: "all 0.3s ease"
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full h-full bg-gradient-brand flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-white font-bold text-center text-small px-1", children: partner.name }) })
|
|
1029
|
-
}
|
|
1030
|
-
),
|
|
1031
|
-
partner.websiteUrl && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1032
|
-
"div",
|
|
1033
|
-
{
|
|
1034
|
-
className: "card-link justify-center",
|
|
1035
|
-
style: {
|
|
1036
|
-
opacity: isHovered ? 1 : 0,
|
|
1037
|
-
transform: isHovered ? "translateY(0)" : "translateY(4px)",
|
|
1038
|
-
transition: "all 0.3s ease"
|
|
1039
|
-
},
|
|
1040
|
-
children: [
|
|
1041
|
-
t("partners.viewDetails") || "Xem chi tiết",
|
|
1042
|
-
" →"
|
|
1043
|
-
]
|
|
1044
|
-
}
|
|
1045
|
-
)
|
|
1046
|
-
] });
|
|
1047
|
-
const baseClasses = `card items-center justify-center transition-all duration-700 ease-out overflow-hidden ${visible ? "opacity-100 scale-100" : "opacity-0 scale-75"}`;
|
|
971
|
+
const cardContent = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: {
|
|
972
|
+
display: "flex",
|
|
973
|
+
flexDirection: "column",
|
|
974
|
+
alignItems: "center",
|
|
975
|
+
justifyContent: "center",
|
|
976
|
+
flex: 1
|
|
977
|
+
}, children: logoSrc ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: {
|
|
978
|
+
width: "100%",
|
|
979
|
+
height: "100px",
|
|
980
|
+
display: "flex",
|
|
981
|
+
alignItems: "center",
|
|
982
|
+
justifyContent: "center"
|
|
983
|
+
}, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
984
|
+
"img",
|
|
985
|
+
{
|
|
986
|
+
src: logoSrc,
|
|
987
|
+
alt: partner.name || t("partners.logoAlt") || "Partner logo",
|
|
988
|
+
style: {
|
|
989
|
+
maxWidth: "100%",
|
|
990
|
+
maxHeight: "100%",
|
|
991
|
+
objectFit: "contain",
|
|
992
|
+
transform: isHovered ? "scale(1.05)" : "scale(1)",
|
|
993
|
+
transition: "transform 300ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
994
|
+
},
|
|
995
|
+
loading: "lazy"
|
|
996
|
+
}
|
|
997
|
+
) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-surface", style: {
|
|
998
|
+
width: "5rem",
|
|
999
|
+
height: "5rem",
|
|
1000
|
+
borderRadius: "9999px",
|
|
1001
|
+
display: "flex",
|
|
1002
|
+
alignItems: "center",
|
|
1003
|
+
justifyContent: "center"
|
|
1004
|
+
}, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontSize: "1.875rem" }, children: "🤝" }) }) });
|
|
1005
|
+
const baseClasses = `card transition-all duration-700 ease-out ${visible ? "opacity-100 scale-100" : "opacity-0 scale-75"}`;
|
|
1048
1006
|
const dynamicStyles = {
|
|
1049
|
-
transitionDelay: `${idx * 150}ms
|
|
1007
|
+
transitionDelay: `${idx * 150}ms`,
|
|
1008
|
+
textDecoration: "none",
|
|
1009
|
+
overflow: "hidden",
|
|
1010
|
+
minHeight: "280px",
|
|
1011
|
+
padding: "1.5rem",
|
|
1012
|
+
display: "flex",
|
|
1013
|
+
flexDirection: "column"
|
|
1050
1014
|
};
|
|
1051
|
-
if (partner.websiteUrl) {
|
|
1052
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1053
|
-
"a",
|
|
1054
|
-
{
|
|
1055
|
-
ref: itemRef,
|
|
1056
|
-
href: partner.websiteUrl,
|
|
1057
|
-
target: "_blank",
|
|
1058
|
-
rel: "noopener noreferrer",
|
|
1059
|
-
className: `${baseClasses} cursor-pointer`,
|
|
1060
|
-
style: __spreadProps(__spreadValues({}, dynamicStyles), {
|
|
1061
|
-
textDecoration: "none"
|
|
1062
|
-
}),
|
|
1063
|
-
onMouseEnter: () => setIsHovered(true),
|
|
1064
|
-
onMouseLeave: () => setIsHovered(false),
|
|
1065
|
-
children: cardContent
|
|
1066
|
-
}
|
|
1067
|
-
);
|
|
1068
|
-
}
|
|
1069
1015
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1070
|
-
"
|
|
1016
|
+
"a",
|
|
1071
1017
|
{
|
|
1072
1018
|
ref: itemRef,
|
|
1019
|
+
href: partner.websiteUrl || "#",
|
|
1020
|
+
target: partner.websiteUrl ? "_blank" : "_self",
|
|
1021
|
+
rel: partner.websiteUrl ? "noopener noreferrer" : "",
|
|
1073
1022
|
className: baseClasses,
|
|
1074
1023
|
style: dynamicStyles,
|
|
1075
1024
|
onMouseEnter: () => setIsHovered(true),
|