Add darkmode of DisqusJS (#408)

This commit is contained in:
Ljcbaby 2021-11-30 22:29:39 +08:00 committed by GitHub
parent 6067b5f145
commit 847fc59e3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,39 @@
if (hexo-config('disqusjs.enable') and hexo-config('darkmode')) {
@media (prefers-color-scheme:dark) {
html #dsqjs a {
color: var(--link-color)
}
html #dsqjs a:focus,html #dsqjs a:hover {
color: var(--link-hover-color)
}
html #dsqjs .dsqjs-nav,html #dsqjs footer {
border-color: var(--card-bg-color)
}
html #dsqjs .dsqjs-load-more,html #dsqjs .dsqjs-load-more:hover,html #dsqjs .dsqjs-nav-tab,html #dsqjs .dsqjs-no-comment,html #dsqjs .dsqjs-post-content {
color: var(--text-color)
}
html #dsqjs .dsqjs-order-label {
background-color: #3e4b5e
}
html #dsqjs .dsqjs-order-radio:checked+.dsqjs-order-label {
background-color: var(--content-bg-color)
}
html #dsqjs .dsqjs-tab-active>span:after {
background-color: #2e9fff!important
}
html #dsqjs .dsqjs-footer,html #dsqjs .dsqjs-meta {
color: var(--text-color)
}
html #dsqjs .dsqjs-post-body blockquote {
border-color: var(--content-bg-color)
}
}
}

View File

@ -1,3 +1,4 @@
@import 'disqusjs';
@import 'gitalk';
@import 'utterances';
@import 'search';