-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add ICP 备案 & provisional 公安备案 info to footer
公安备案 link is hidden at first, to allow quick merging of this PR once the ICP 备案 number is officially approved. A follow-up PR will take care of finalizing and exposing the other bits.
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |