Skip to content

Commit

Permalink
style: fix 'disqus' button style
Browse files Browse the repository at this point in the history
  • Loading branch information
xianmin committed Nov 15, 2024
1 parent 535a636 commit b966d7f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 37 deletions.
23 changes: 11 additions & 12 deletions assets/sass/_partial/_post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
display: grid;
grid-template-rows: auto 1fr;
grid-template-columns: 10.5rem minmax(0, 1fr) 10.5rem;
grid-template-areas: "toc content sidebar";
grid-template-areas: 'toc content sidebar';

@include style-to-mobile() {
grid-template-columns: minmax(0, 1fr);
grid-template-areas: "content" "toc" "sidebar";
grid-template-areas: 'content' 'toc' 'sidebar';
}

.sidebar {
Expand All @@ -28,17 +28,16 @@
@include style-to-mobile() {
margin-top: 1rem;
}

}

.post {
max-width: $article-max-width;
margin: 0 auto;
@import "_post/header";
@import "_post/content";
@import "_post/copyright";
@import "_post/reward";
@import "_post/footer";
@import '_post/header';
@import '_post/content';
@import '_post/copyright';
@import '_post/reward';
@import '_post/footer';
}

.comment {
Expand All @@ -47,9 +46,9 @@
max-width: $article-max-width;
}

.disqus-comment {
margin: 0 5em 3em;
@import "_post/disqus";
#load_disqus_container {
display: flex;
justify-content: center;
}

@import "_toc";
@import '_toc';
19 changes: 0 additions & 19 deletions assets/sass/_partial/_post/_disqus.scss

This file was deleted.

13 changes: 7 additions & 6 deletions layouts/partials/comments/disqus.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div class="disqus-comment comment">
<div class="disqus-button" id="load_disqus" onclick="load_disqus()">
{{ i18n "loadDisqus" }}
<div class="comment">
<div id="load_disqus_container">
<button class="disqus-button" onclick="load_disqus()">
{{ i18n "loadDisqus" }}
</button>
</div>
<div id="disqus_thread"></div>
<script type="text/javascript">
Expand All @@ -17,11 +19,10 @@
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);

$('#load_disqus').remove();
document.getElementById('load_disqus_container').style.display = 'none';
};
</script>
<noscript
>Please enable JavaScript to view the
<noscript>Please enable JavaScript to view the
<a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>
</noscript>
<!-- <a href="http://disqus.com/" class="dsq-brlink" target="_blank">comments powered by <span class="logo-disqus">Disqus</span></a> -->
Expand Down

0 comments on commit b966d7f

Please sign in to comment.