mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-02 23:16:51 +00:00
4.0 仿Youtube界面样式
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
import BLOG from '@/blog.config'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
/**
|
||||
* 评论插件
|
||||
* @param issueTerm
|
||||
* @param layout
|
||||
* @returns {JSX.Element}
|
||||
* @constructor
|
||||
*/
|
||||
const Utterances = ({ issueTerm, layout }) => {
|
||||
useEffect(() => {
|
||||
const theme =
|
||||
BLOG.appearance === 'auto'
|
||||
? 'preferred-color-scheme'
|
||||
: BLOG.appearance === 'light'
|
||||
? 'github-light'
|
||||
: 'github-dark'
|
||||
? 'github-light'
|
||||
: 'github-dark'
|
||||
const script = document.createElement('script')
|
||||
const anchor = document.getElementById('comments')
|
||||
script.setAttribute('src', 'https://utteranc.es/client.js')
|
||||
|
||||
Reference in New Issue
Block a user