@easyx.ai/dumi-theme-easyxai
Version:
@easyx.ai/dumi-theme-easyxai 是为 dumi2 打造的一款文档站主题包,提供了更加美观、易用的研发与阅读体验
53 lines • 2.02 kB
JavaScript
import { Divider } from 'antd';
import { useResponsive } from 'antd-style';
import { Center, Flexbox } from 'react-layout-kit';
import Foot from "../../components/Footer";
import { githubSel, useSiteStore } from "../../store";
import { getColumns } from "./columns";
import { useStyles } from "./style";
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
var Footer = function Footer() {
var _useSiteStore = useSiteStore(function (s) {
return s.siteData;
}),
themeConfig = _useSiteStore.themeConfig,
pkg = _useSiteStore.pkg;
var githubUrl = useSiteStore(githubSel);
var _useStyles = useStyles(),
styles = _useStyles.styles,
theme = _useStyles.theme;
var _useResponsive = useResponsive(),
mobile = _useResponsive.mobile;
if (!themeConfig.footer) return null;
var footer = themeConfig.footerConfig;
var columns = footer !== null && footer !== void 0 && footer.columns ? footer.columns : getColumns({
github: githubUrl || pkg.homepage
});
var bottomFooter = (footer === null || footer === void 0 ? void 0 : footer.bottom) || themeConfig.footer;
var copyright = (footer === null || footer === void 0 ? void 0 : footer.copyright) || "Copyright \xA9 2022-".concat(new Date().getFullYear());
return /*#__PURE__*/_jsx(Foot, {
theme: (footer === null || footer === void 0 ? void 0 : footer.theme) || theme.appearance,
columns: columns,
bottom: mobile ? /*#__PURE__*/_jsxs(Center, {
className: styles.container,
children: [copyright, /*#__PURE__*/_jsx(Flexbox, {
align: 'center',
horizontal: true,
dangerouslySetInnerHTML: {
__html: bottomFooter
}
})]
}) : /*#__PURE__*/_jsxs(Center, {
horizontal: true,
children: [copyright, /*#__PURE__*/_jsx(Divider, {
type: 'vertical'
}), /*#__PURE__*/_jsx("span", {
dangerouslySetInnerHTML: {
__html: bottomFooter
}
})]
})
});
};
export default Footer;