Skip to content

Commit

Permalink
Add darkmode of DisqusJS (iissnan#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
ljcbaby authored Nov 30, 2021
1 parent 6067b5f commit 847fc59
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
39 changes: 39 additions & 0 deletions source/css/_common/components/third-party/disqusjs.styl
Original file line number Diff line number Diff line change
@@ -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)
}
}
}
1 change: 1 addition & 0 deletions source/css/_common/components/third-party/index.styl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import 'disqusjs';
@import 'gitalk';
@import 'utterances';
@import 'search';
Expand Down

0 comments on commit 847fc59

Please sign in to comment.