import CommonHead from '@/components/CommonHead' import Live2D from '@/components/Live2D' import Link from 'next/link' import React from 'react' import BLOG from '@/blog.config' import { useGlobal } from '@/lib/global' /** * 基础布局 采用左右两侧布局,移动端使用顶部导航栏 * @returns {JSX.Element} * @constructor */ const LayoutBase = props => { const { children, meta, customNav, siteInfo } = props const { locale } = useGlobal() const d = new Date() const currentYear = d.getFullYear() const startYear = BLOG.SINCE && BLOG.SINCE !== currentYear && BLOG.SINCE + '-' let links = [ { icon: 'fas fa-search', name: locale.NAV.SEARCH, to: '/search' }, { icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, to: '/archive' }, { icon: 'fas fa-folder', name: locale.COMMON.CATEGORY, to: '/category' }, { icon: 'fas fa-tag', name: locale.COMMON.TAGS, to: '/tag' } ] if (customNav) { links = links.concat(customNav) } return (
) } export default LayoutBase