Skip to content

Commit

Permalink
feat: [WIP] add provisional ICP 备案 & 公安备案 info to footer
Browse files Browse the repository at this point in the history
  • Loading branch information
xen0n committed Oct 21, 2023
1 parent 72e86e3 commit ccbe5b8
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/theme/Footer/Copyright/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,50 @@
import React from 'react'
import Copyright from '@theme-original/Footer/Copyright'

import styles from './styles.module.css'

function ICPBeianLink(
{
province,
recordNumber,
subRecordNumber,
}: {
province: string,
recordNumber: number,
subRecordNumber: number,
},
): JSX.Element {
return (
<a href="https://beian.miit.gov.cn" target="_blank">{province}ICP备{recordNumber}号-{subRecordNumber}</a>
)
}

function MPSBeianLink(
{
province,
recordNumber,
}: {
province: string,
recordNumber: number,
},
): JSX.Element {
const queryLinkURL = `http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=${recordNumber}`
return (
<>
<img src="/img/mps-beian-logo.webp" height="28" className={styles.mpsLogo} />
<a href={queryLinkURL} target="_blank">{province}公网安备{recordNumber}</a>
</>
)
}

export default function CopyrightWrapper(props: any): JSX.Element {
return (
<>
<Copyright {...props} />
<ul className={styles.footer__beian}>
<li><ICPBeianLink province="苏" recordNumber={17027553} subRecordNumber={2} /></li>
<li><MPSBeianLink province="沪" recordNumber={11223344001122} /></li>
</ul>
</>
)
}
10 changes: 10 additions & 0 deletions src/theme/Footer/Copyright/styles.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* 备案信息 */
.footer__beian li {
list-style: none;
display: inline;
}

.mpsLogo {
margin: 0 0.5rem;
vertical-align: text-bottom;
}

0 comments on commit ccbe5b8

Please sign in to comment.