Skip to content

Commit

Permalink
Improve styles of Gitalk & Gitment (theme-next#568)
Browse files Browse the repository at this point in the history
gitalk.css -> gitalk.min.css
  • Loading branch information
stevenjoezhang authored Jan 6, 2019
1 parent 056b169 commit d560d3a
Show file tree
Hide file tree
Showing 22 changed files with 37 additions and 50 deletions.
4 changes: 2 additions & 2 deletions layout/_macro/post.swig
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
</div>
{% endif %}
<!--/noindex-->
{% elif post.excerpt %}
{% elif post.excerpt %}
{{ post.excerpt }}
<!--noindex-->
{% if theme.read_more_btn %}
Expand Down Expand Up @@ -342,7 +342,7 @@
{% endif %}
{% else %}
{{ post.content }}
{% endif %}
{% endif %}
</div>

{% if theme.related_posts.enable and (theme.related_posts.display_in_home or not is_index) %}
Expand Down
2 changes: 1 addition & 1 deletion layout/_partials/comments.swig
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</div>

{% elif theme.gitalk.enable %}
<div id="gitalk-container">
<div class="comments" id="gitalk-container">
</div>

{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion layout/_partials/share/baidushare.swig
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
}
}
</script>
{% elseif theme.baidushare.type === "slide" %}
{% elif theme.baidushare.type === "slide" %}
<script>
window._bd_share_config = {
"common": {
Expand Down
11 changes: 1 addition & 10 deletions layout/_scripts/schemes/gemini.swig
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
{%
set scripts = [
'src/affix.js',
'src/schemes/pisces.js'
]
%}

{% for script in scripts %}
<script src="{{ url_for(theme.js) }}/{{ script }}?v={{ version }}"></script>
{% endfor %}
{% include 'pisces.swig' %}
2 changes: 1 addition & 1 deletion layout/_third-party/analytics/analytics-with-widget.swig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% include 'busuanzi-counter.swig' %}
{% include 'tencent-mta.swig' %}
{% include 'tencent-analytics.swig' %}
{% include 'cnzz-analytics.swig' %}
{% include 'cnzz-analytics.swig' %}
2 changes: 1 addition & 1 deletion layout/_third-party/analytics/tencent-mta.swig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var _mtac = {};
(function() {
var mta = document.createElement("script");
mta.src = "https://pingjs.qq.com/h5/stats.js?v2.0.4";
mta.src = "https://pingjs.qq.com/h5/stats.js";
mta.setAttribute("name", "MTAH5");
mta.setAttribute("sid", "{{theme.tencent_mta}}");
var s = document.getElementsByTagName("script")[0];
Expand Down
4 changes: 2 additions & 2 deletions layout/_third-party/comments/gitalk.swig
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% set gitalk_js_url = '//cdn.jsdelivr.net/npm/gitalk@1.4.0/dist/gitalk.min.js' %}
{% set gitalk_js_url = '//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js' %}
{% if theme.vendors.gitalk_js %}
{% set gitalk_js_url = theme.vendors.gitalk_js %}
{% endif %}
<script src="{{ gitalk_js_url }}"></script>

{% set gitalk_css_url = '//cdn.jsdelivr.net/npm/gitalk@1.4.0/dist/gitalk.css' %}
{% set gitalk_css_url = '//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.css' %}
{% if theme.vendors.gitalk_css %}
{% set gitalk_css_url = theme.vendors.gitalk_css %}
{% endif %}
Expand Down
17 changes: 11 additions & 6 deletions layout/_third-party/comments/gitment.swig
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@
{% endif %}
<!-- END LOCAL -->

<style>
#gitment-container a {
border-bottom: none;
}
{% if theme.gitment.cleanly %}
<style>
a.gitment-editor-footer-tip { display: none; }
.gitment-container.gitment-footer-container { display: none; }
</style>
a.gitment-editor-footer-tip, .gitment-container.gitment-footer-container {
display: none;
}
{% endif %}
</style>

<script>
function renderGitment() {
Expand All @@ -24,7 +28,7 @@
owner: '{{ theme.gitment.github_user }}',
repo: '{{ theme.gitment.github_repo }}',
{% if theme.gitment.mint %}
lang: '{{ theme.gitment.language }}' || navigator.language || navigator.systemLanguage || navigator.userLanguage,
lang: '{{ theme.gitment.language }}' || navigator.language || navigator.systemLanguage || navigator.userLanguage,
{% endif %}
oauth: {
{% if theme.gitment.mint and theme.gitment.redirect_protocol %}
Expand All @@ -36,7 +40,8 @@
client_secret: '{{ theme.gitment.client_secret }}',
{% endif %}
client_id: '{{ theme.gitment.client_id }}'
}});
}
});
gitment.render('gitment-container');
}

Expand Down
8 changes: 4 additions & 4 deletions source/css/_common/components/footer/footer.styl
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
.footer-inner { text-align: center; }

@keyframes iconAnimate {
0%,100%{transform:scale(1);}
10%,30%{transform:scale(0.9);}
20%,40%,60%,80%{transform:scale(1.1);}
50%,70%{transform:scale(1.1);}
0%, 100% { transform: scale(1); }
10%, 30% { transform: scale(0.9); }
20%, 40%, 60%, 80% {transform: scale(1.1); }
50%, 70% {transform: scale(1.1); }
}

if hexo-config('footer.icon.animated') {
Expand Down
13 changes: 6 additions & 7 deletions source/css/_common/components/header/github-banner.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
mobile_layout_economy = hexo-config('mobile_layout_economy');

:hover .octo-arm {
animation:octocat-wave 560ms ease-in-out;
animation: octocat-wave 560ms ease-in-out;
}
@keyframes octocat-wave {
0%,100% {
transform:rotate(0);
transform: rotate(0);
}
20%,60% {
transform:rotate(-25deg);
transform: rotate(-25deg);
}
40%,80% {
transform:rotate(10deg);
transform: rotate(10deg);
}
}
+tablet-mobile() {
Expand All @@ -25,10 +25,10 @@
}
}
.github-corner:hover .octo-arm {
animation:none;
animation: none;
}
.github-corner .octo-arm {
animation:octocat-wave 560ms ease-in-out;
animation: octocat-wave 560ms ease-in-out;
}
}
+mobile() {
Expand All @@ -44,5 +44,4 @@
}
}
}

}
1 change: 0 additions & 1 deletion source/css/_common/components/pages/breadcrumb.styl
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ ul.breadcrumb {
& li+li:last-child {
font-weight: bold;
}

}
4 changes: 2 additions & 2 deletions source/css/_common/components/pages/schedule.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@keyframes dot-flash {
from { opacity: 1; transform:scale(1.1); }
to { opacity: 0; transform:scale(1); }
from { opacity: 1; transform: scale(1.1); }
to { opacity: 0; transform: scale(1); }
}

#schedule {
Expand Down
4 changes: 2 additions & 2 deletions source/css/_common/components/post/post-reward.styl
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
}

#QR {
padding-top:20px;
padding-top: 20px;
}

#QR a {
border:0;
border: 0;
}

#QR img {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}

&:hover {
color:white;
color: white;
background: rgb(252, 100, 35);

i { color: white; }
Expand Down
1 change: 0 additions & 1 deletion source/css/_common/components/sidebar/sidebar.styl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
+mobile() {
hide() if not hexo-config('sidebar.onmobile');
}

}

.sidebar-inner {
Expand Down
1 change: 0 additions & 1 deletion source/css/_common/components/tags/note-modern.styl
Original file line number Diff line number Diff line change
Expand Up @@ -179,5 +179,4 @@
}
}
}

}
1 change: 0 additions & 1 deletion source/css/_common/components/tags/note.styl
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,4 @@
}
}
}

}
1 change: 1 addition & 0 deletions source/css/_common/components/third-party/gitment.styl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
border: 1px solid #0a9caf;
border-radius: 4px;
}

#gitment-display-button:hover {
color: #fff;
background: #0a9caf;
Expand Down
1 change: 1 addition & 0 deletions source/css/_common/scaffolding/tables.styl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ table {
font-size: $table-font-size;
word-break: break-all;
}

table>tbody>tr {
&:nth-of-type(odd) { background-color: $table-row-odd-bg-color; }
&:hover { background-color: $table-row-hover-bg-color; }
Expand Down
1 change: 0 additions & 1 deletion source/css/_schemes/Mist/_header.styl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
}
}


.logo-line-before,
.logo-line-after {
display: block;
Expand Down
4 changes: 0 additions & 4 deletions source/css/_schemes/Mist/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

.headband { display: none; }


// Search
// --------------------------------------------------
.site-search {
Expand All @@ -38,14 +37,12 @@
}
}


// Page - Container
// --------------------------------------------------
.container .main-inner {
+mobile() { width: auto; }
}


// Page - Post details
// --------------------------------------------------
.page-post-detail {
Expand All @@ -57,7 +54,6 @@
.post-meta { margin-bottom: 60px; }
}


// Pagination
// --------------------------------------------------
.pagination {
Expand Down
1 change: 0 additions & 1 deletion source/css/_schemes/Pisces/_sidebar.styl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
.fa-globe { font-size: 15px; }
}


.links-of-blogroll {
text-align: center;
margin-top: 20px;
Expand Down

0 comments on commit d560d3a

Please sign in to comment.