mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-29 15:10:06 +00:00
hexo:封装统计卡
This commit is contained in:
@@ -45,9 +45,9 @@ const LayoutBase = (props) => {
|
|||||||
|
|
||||||
{headerSlot}
|
{headerSlot}
|
||||||
|
|
||||||
<main id='wrapper' className='flex w-full justify-center py-8 min-h-screen'>
|
<main id='wrapper' className='w-full justify-center py-8 min-h-screen'>
|
||||||
|
|
||||||
<div id='container-inner' className='pt-14 w-full mx-auto flex justify-between space-x-4 max-w-7xl'>
|
<div id='container-inner' className='pt-14 w-full mx-auto lg:flex justify-between space-x-4 max-w-7xl'>
|
||||||
<div className='flex-grow w-full'>{children}</div>
|
<div className='flex-grow w-full'>{children}</div>
|
||||||
<SideRight {...props}/>
|
<SideRight {...props}/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
30
themes/hexo/components/AnalyticsCard.js
Normal file
30
themes/hexo/components/AnalyticsCard.js
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
import Card from './Card'
|
||||||
|
|
||||||
|
export function AnalyticsCard (props) {
|
||||||
|
const { postCount } = props
|
||||||
|
return <Card>
|
||||||
|
<div className='ml-2 mb-3 font-sans'>
|
||||||
|
<i className='fas fa-chart-area' /> 统计
|
||||||
|
</div>
|
||||||
|
<div className='text-xs font-sans font-light justify-center mx-7'>
|
||||||
|
<div className='inline'>
|
||||||
|
<div className='flex justify-between'>
|
||||||
|
<div>文章数:</div>
|
||||||
|
<div>{postCount}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className='hidden busuanzi_container_page_pv ml-2'>
|
||||||
|
<div className='flex justify-between'>
|
||||||
|
<div>访问量:</div>
|
||||||
|
<div className='busuanzi_value_page_pv' />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className='hidden busuanzi_container_site_uv ml-2'>
|
||||||
|
<div className='flex justify-between'>
|
||||||
|
<div>访客数:</div>
|
||||||
|
<div className='busuanzi_value_site_uv' />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Card>
|
||||||
|
}
|
||||||
@@ -4,11 +4,11 @@ import LatestPostsGroup from './LatestPostsGroup'
|
|||||||
import TagGroups from './TagGroups'
|
import TagGroups from './TagGroups'
|
||||||
import Catalog from './Catalog'
|
import Catalog from './Catalog'
|
||||||
import { InfoCard } from './InfoCard'
|
import { InfoCard } from './InfoCard'
|
||||||
|
import { AnalyticsCard } from './AnalyticsCard'
|
||||||
|
|
||||||
export default function SideRight (props) {
|
export default function SideRight (props) {
|
||||||
const {
|
const {
|
||||||
post,
|
post,
|
||||||
postCount,
|
|
||||||
currentCategory,
|
currentCategory,
|
||||||
categories,
|
categories,
|
||||||
latestPosts,
|
latestPosts,
|
||||||
@@ -19,33 +19,9 @@ export default function SideRight (props) {
|
|||||||
} = props
|
} = props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'w-80 space-y-4 hidden lg:block'}>
|
<div className={'w-80 space-y-4'}>
|
||||||
<InfoCard {...props}/>
|
<InfoCard {...props}/>
|
||||||
<Card>
|
<AnalyticsCard {...props}/>
|
||||||
<div className='ml-2 mb-3 font-sans'>
|
|
||||||
<i className='fas fa-chart-area' /> 统计
|
|
||||||
</div>
|
|
||||||
<div className='text-xs font-sans font-light justify-center mx-7'>
|
|
||||||
<div className='inline'>
|
|
||||||
<div className='flex justify-between'>
|
|
||||||
<div>文章数:</div>
|
|
||||||
<div>{postCount}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className='hidden busuanzi_container_page_pv ml-2'>
|
|
||||||
<div className='flex justify-between'>
|
|
||||||
<div>访问量:</div>
|
|
||||||
<div className='busuanzi_value_page_pv' />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className='hidden busuanzi_container_site_uv ml-2'>
|
|
||||||
<div className='flex justify-between'>
|
|
||||||
<div>访客数:</div>
|
|
||||||
<div className='busuanzi_value_site_uv' />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
{showCategory && (
|
{showCategory && (
|
||||||
<Card>
|
<Card>
|
||||||
@@ -68,7 +44,7 @@ export default function SideRight (props) {
|
|||||||
</Card>}
|
</Card>}
|
||||||
|
|
||||||
{post && post.toc && (
|
{post && post.toc && (
|
||||||
<Card className='sticky top-12'>
|
<Card className='sticky top-20'>
|
||||||
<Catalog toc={post.toc} />
|
<Catalog toc={post.toc} />
|
||||||
</Card>
|
</Card>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user