jekyll-theme-mdui 0.4.8 → 0.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/_includes/{analytics.html → analytics/google.html} +0 -0
- data/_includes/comment/disqus.html +75 -0
- data/_includes/component/nprogress.html +25 -0
- data/_includes/component/sw.html +7 -0
- data/_includes/{page_tags.html → content/component/page_tags.html} +0 -0
- data/_includes/{qrcode.html → content/component/qrcode.html} +6 -0
- data/_includes/{sns_share.html → content/component/sns_share.html} +0 -0
- data/_includes/content/component/toc.html +84 -0
- data/_includes/content/friends.html +24 -0
- data/_includes/content/page_content.html +51 -0
- data/_includes/content/paginator_button.html +25 -0
- data/_includes/content/paginator_post_list.html +66 -0
- data/_includes/content/tags_list.html +100 -0
- data/_includes/{footer.html → footer/footer.html} +0 -0
- data/_includes/head.html +42 -19
- data/{assets/js/jquery.typeahead.min.js → _includes/header/header.html} +173 -10
- data/_includes/meng/aplayer.html +83 -0
- data/_includes/meng/background.html +35 -0
- data/_includes/meng/card.html +14 -0
- data/_includes/meng/console.html +10 -0
- data/_includes/meng/cursor.html +8 -0
- data/_includes/meng/live2d.html +61 -0
- data/_includes/meng/title.html +24 -0
- data/_layouts/default.html +36 -14
- data/_layouts/friends.html +1 -18
- data/_layouts/home.html +2 -60
- data/_layouts/page.html +2 -30
- data/_layouts/post.html +1 -34
- data/_layouts/tags.html +1 -40
- data/assets/css/{main.css → global.css} +38 -281
- metadata +25 -29
- data/_includes/disqus.html +0 -21
- data/_includes/header.html +0 -66
- data/_includes/live2d.html +0 -49
- data/_includes/main.html +0 -6
- data/_includes/note.html +0 -6
- data/_includes/script.html +0 -496
- data/_includes/test.html +0 -190
- data/_includes/tips.html +0 -6
- data/_includes/toc.html +0 -3
- data/_includes/warn.html +0 -6
- data/_layouts/category.html +0 -34
- data/_layouts/editor.html +0 -78
- data/_layouts/search.html +0 -15
- data/assets/css/pickerdata.css +0 -737
- data/assets/js/bundle.js +0 -2
- data/assets/js/chips.js +0 -2
- data/assets/js/pickerdata.js +0 -9
- data/assets/js/pushpin.js +0 -1
- data/assets/js/rgbaster.min.js +0 -87
- data/assets/js/toc.min.js +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '03707090b7e5731926fd544116dde58e0e507bf8'
|
4
|
+
data.tar.gz: 39de17442456bbe37f297389c94ee73da243194b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 955559563a89595b101896c1cd009dcf93e3f3e21a8ca313f3df9508a81c0c9187b29aceb5eb589e66ee2dad5901ec32586fabd41f4fa950df7062d5e4b862d2
|
7
|
+
data.tar.gz: a21a1867623dc1389a3e94b47bb9ff6a48a526a62efcd82e3fef2568fb19a1a8bedc14dc35960502e223ac76e1ce856133decd950bba64c5483be96234a97545
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
## General
|
20
20
|
|
21
|
-
[![Version](https://img.shields.io/badge/version-0.4.
|
21
|
+
[![Version](https://img.shields.io/badge/version-0.4.9-green.svg?style=flat-square)]()
|
22
22
|
[![Jekyll](https://img.shields.io/badge/Jekyll-3.4+-green.svg?style=flat-square)](https://jekyllrb.com/)
|
23
23
|
[![Gem](https://img.shields.io/gem/dt/jekyll-theme-mdui.svg?style=flat-square)](https://rubygems.org/gems/jekyll-theme-mdui/)
|
24
24
|
|
@@ -46,8 +46,8 @@
|
|
46
46
|
|
47
47
|
## TODO
|
48
48
|
|
49
|
-
- [ ] Editor - Online preview (!!!Need Help!!!)
|
50
49
|
- [ ] Category - Better style
|
50
|
+
- [ ] Tags - Better style
|
51
51
|
- [ ] Site style - More custom options
|
52
52
|
|
53
53
|
## Note
|
File without changes
|
@@ -0,0 +1,75 @@
|
|
1
|
+
{% if site.data.site.lang == 'zh-CN' %}
|
2
|
+
{% assign lang = site.data.lang[site.data.site.lang] %}
|
3
|
+
{% else %}
|
4
|
+
{% assign lang = site.data.lang.en-US %}
|
5
|
+
{% endif %}
|
6
|
+
<style>
|
7
|
+
#disqus_thread{
|
8
|
+
padding: 16px;
|
9
|
+
display: none;
|
10
|
+
}
|
11
|
+
</style>
|
12
|
+
{% if site.data.site.disqus.disqus_shortname != "" %}
|
13
|
+
<div class="mdui-divider"></div>
|
14
|
+
{% if site.data.site.disqus.disqus_proxy == false %}
|
15
|
+
{% if site.data.site.disqus.disqus_button == true %}
|
16
|
+
<button id="load-disqus" class="mdui-btn mdui-btn-block mdui-center" onclick="disqus.load();" data="{{ site.data.site.disqus.disqus_shortname }}">{{lang.post.comments_load_button}}</button>
|
17
|
+
<div id="disqus_thread"></div>
|
18
|
+
<script>
|
19
|
+
var disqus = {
|
20
|
+
load :
|
21
|
+
function disqus(){
|
22
|
+
$('#disqus_thread').css('display','block');
|
23
|
+
if ($('#dsq-app4').attr('name') == 'dsq-app4'){
|
24
|
+
DISQUS.reset({
|
25
|
+
reload: true,
|
26
|
+
config: function () {
|
27
|
+
}
|
28
|
+
});
|
29
|
+
}else{
|
30
|
+
var disqus_shortname = $("#load-disqus").attr("data");
|
31
|
+
if(typeof DISQUS !== 'object') {
|
32
|
+
(function () {
|
33
|
+
var s = document.createElement('script'); s.async = true;
|
34
|
+
s.type = 'text/javascript';
|
35
|
+
s.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
36
|
+
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
37
|
+
}());
|
38
|
+
}
|
39
|
+
}
|
40
|
+
$('#load-disqus').remove();
|
41
|
+
}
|
42
|
+
};
|
43
|
+
</script>
|
44
|
+
{% else %}
|
45
|
+
<div id="disqus_thread"></div>
|
46
|
+
<script>
|
47
|
+
function disqus(){
|
48
|
+
var disqus_shortname = '{{ site.data.site.disqus.disqus_shortname }}';
|
49
|
+
if(typeof DISQUS !== 'object') {
|
50
|
+
(function () {
|
51
|
+
var s = document.createElement('script'); s.async = true;
|
52
|
+
s.type = 'text/javascript';
|
53
|
+
s.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
54
|
+
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
55
|
+
}());
|
56
|
+
}
|
57
|
+
if ($('#dsq-app4').attr('name') == 'dsq-app4'){
|
58
|
+
DISQUS.reset({
|
59
|
+
reload: true,
|
60
|
+
config: function () {
|
61
|
+
}
|
62
|
+
});
|
63
|
+
}
|
64
|
+
}
|
65
|
+
disqus();
|
66
|
+
</script>
|
67
|
+
{% endif %}
|
68
|
+
{% endif %}
|
69
|
+
{% if site.data.site.disqus.disqus_proxy %}
|
70
|
+
<div class="mdui-divider"></div>
|
71
|
+
<div id="disqusreadonly" style="padding-top: 16px;">
|
72
|
+
</div>
|
73
|
+
{% endif %}
|
74
|
+
{% endif %}
|
75
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<link rel="stylesheet" href="https://cdn.bootcss.com/nprogress/0.2.0/nprogress.min.css">
|
2
|
+
<script src="https://cdn.bootcss.com/nprogress/0.2.0/nprogress.min.js"></script>
|
3
|
+
<script>
|
4
|
+
$(document).ready(function () {
|
5
|
+
NProgress.configure({
|
6
|
+
showSpinner: true
|
7
|
+
});
|
8
|
+
NProgress.start();
|
9
|
+
$('#nprogress .bar').css({
|
10
|
+
'background': '{{site.data.site.uiux.nprogress_color}}'
|
11
|
+
});
|
12
|
+
$('#nprogress .peg').css({
|
13
|
+
'box-shadow': '0 0 10px {{site.data.site.uiux.nprogress_color}}, 0 0 15px {{site.data.site.uiux.nprogress_color}}'
|
14
|
+
});
|
15
|
+
$('#nprogress .spinner-icon').css({
|
16
|
+
'border-top-color': '{{site.data.site.uiux.nprogress_color}}',
|
17
|
+
'border-left-color': '{{site.data.site.uiux.nprogress_color}}'
|
18
|
+
});
|
19
|
+
setTimeout(function() {
|
20
|
+
NProgress.done();
|
21
|
+
},{{site.data.site.uiux.nprogress_buffer}});
|
22
|
+
|
23
|
+
});
|
24
|
+
|
25
|
+
</script>
|
File without changes
|
@@ -3,6 +3,12 @@
|
|
3
3
|
{% else %}
|
4
4
|
{% assign lang = site.data.lang.en-US %}
|
5
5
|
{% endif %}
|
6
|
+
<style>
|
7
|
+
#k-qrcode{
|
8
|
+
padding-bottom: 0px;
|
9
|
+
width: 215px;
|
10
|
+
}
|
11
|
+
</style>
|
6
12
|
<button class="mdui-btn mdui-btn-icon" mdui-tooltip="{content: '{{lang.post.qrcode }}', delay: 100}" mdui-menu="{target: '#k-qrcode',align:'right',covered:false}"><i class="mdui-icon material-icons">devices other</i></button>
|
7
13
|
<ul class="mdui-menu mdui-menu-cascade" id="k-qrcode">
|
8
14
|
<li class="mdui-menu-item">
|
File without changes
|
@@ -0,0 +1,84 @@
|
|
1
|
+
<style>
|
2
|
+
#k-toc-card{
|
3
|
+
background-color: transparent;
|
4
|
+
width: 260px;
|
5
|
+
list-style: none;
|
6
|
+
padding: 0;
|
7
|
+
}
|
8
|
+
#k-toc-card ul{
|
9
|
+
list-style: none;
|
10
|
+
padding: 0px;
|
11
|
+
}
|
12
|
+
.pin-top {
|
13
|
+
margin-top: 245px;
|
14
|
+
}
|
15
|
+
.pinned {
|
16
|
+
position: fixed;
|
17
|
+
}
|
18
|
+
#k-toc-card li{
|
19
|
+
max-width: 300px;
|
20
|
+
min-width: 200px;
|
21
|
+
}
|
22
|
+
#k-toc-card a{
|
23
|
+
text-align: left;
|
24
|
+
color: black;
|
25
|
+
display: block;
|
26
|
+
width: 100%;
|
27
|
+
text-decoration: none;
|
28
|
+
position: relative;
|
29
|
+
min-width: 88px;
|
30
|
+
height: 36px;
|
31
|
+
box-sizing: border-box;
|
32
|
+
padding: 0 16px;
|
33
|
+
margin: 0;
|
34
|
+
overflow: hidden;
|
35
|
+
font-size: 14px;
|
36
|
+
font-weight: 500;
|
37
|
+
line-height: 36px;
|
38
|
+
text-transform: uppercase;
|
39
|
+
letter-spacing: .04em;
|
40
|
+
white-space: nowrap;
|
41
|
+
vertical-align: middle;
|
42
|
+
-ms-touch-action: manipulation;
|
43
|
+
touch-action: manipulation;
|
44
|
+
zoom: 1;
|
45
|
+
-webkit-user-select: none;
|
46
|
+
-moz-user-select: none;
|
47
|
+
-ms-user-select: none;
|
48
|
+
user-select: none;
|
49
|
+
background: transparent;
|
50
|
+
border: none;
|
51
|
+
border-radius: 2px;
|
52
|
+
outline: none;
|
53
|
+
transition: all .2s cubic-bezier(.4, 0, .2, 1), box-shadow .2s cubic-bezier(.4, 0, 1, 1);
|
54
|
+
will-change: box-shadow;
|
55
|
+
-webkit-user-drag: none;
|
56
|
+
}
|
57
|
+
#k-toc-card a:hover {
|
58
|
+
background-color: rgba(0, 0, 0, .1);
|
59
|
+
}
|
60
|
+
#toc ul .toc-active {
|
61
|
+
border-left: 3px solid #448aff;
|
62
|
+
background-color: rgba(0, 0, 0, .2);
|
63
|
+
}
|
64
|
+
</style>
|
65
|
+
<div id="k-toc-card" class="mdui-card mdui-shadow-0">
|
66
|
+
<div id="toc"></div>
|
67
|
+
</div>
|
68
|
+
<script>
|
69
|
+
Materialize={};Materialize.guid=(function(){function s4(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return function(){return s4()+s4()+"-"+s4()+"-"+s4()+"-"+s4()+"-"+s4()+s4()+s4()}})();(function($){$.fn.pushpin=function(options){var defaults={top:0,bottom:Infinity,offset:0};if(options==="remove"){this.each(function(){if(id=$(this).data("pushpin-id")){$(window).off("scroll."+id);$(this).removeData("pushpin-id").removeClass("pin-top pinned pin-bottom").removeAttr("style")}});return false}options=$.extend(defaults,options);$index=0;return this.each(function(){var $uniqueId=Materialize.guid(),$this=$(this),$original_offset=$(this).offset().top;function removePinClasses(object){object.removeClass("pin-top");object.removeClass("pinned");object.removeClass("pin-bottom")}function updateElements(objects,scrolled){objects.each(function(){if(options.top<=scrolled&&options.bottom>=scrolled&&!$(this).hasClass("pinned")){removePinClasses($(this));$(this).css("top",options.offset);$(this).addClass("pinned")}if(scrolled<options.top&&!$(this).hasClass("pin-top")){removePinClasses($(this));$(this).css("top",0);$(this).addClass("pin-top")}if(scrolled>options.bottom&&!$(this).hasClass("pin-bottom")){removePinClasses($(this));$(this).addClass("pin-bottom");$(this).css("top",options.bottom-$original_offset)}})}$(this).data("pushpin-id",$uniqueId);updateElements($this,$(window).scrollTop());$(window).on("scroll."+$uniqueId,function(){var $scrolled=$(window).scrollTop()+options.offset;updateElements($this,$scrolled)})})}}(jQuery));
|
70
|
+
!function(a){a.fn.smoothScroller=function(b){b=a.extend({},a.fn.smoothScroller.defaults,b);var c=a(this);return a(b.scrollEl).animate({scrollTop:c.offset().top-a(b.scrollEl).offset().top-b.offset},b.speed,b.ease,function(){var a=c.attr("id");a.length&&(history.pushState?history.pushState(null,null,"#"+a):document.location.hash=a),c.trigger("smoothScrollerComplete")}),this},a.fn.smoothScroller.defaults={speed:400,ease:"swing",scrollEl:"body,html",offset:0},a("body").on("click","[data-smoothscroller]",function(b){b.preventDefault();var c=a(this).attr("href");0===c.indexOf("#")&&a(c).smoothScroller()})}(jQuery),function(a){var b={};a.fn.toc=function(b){var c,d=this,e=a.extend({},jQuery.fn.toc.defaults,b),f=a(e.container),g=a(e.selectors,f),h=[],i=e.activeClass,j=function(b,c){if(e.smoothScrolling&&"function"==typeof e.smoothScrolling){b.preventDefault();var f=a(b.target).attr("href");e.smoothScrolling(f,e,c)}a("li",d).removeClass(i),a(b.target).parent().addClass(i)},k=function(){c&&clearTimeout(c),c=setTimeout(function(){for(var b,c=a(window).scrollTop(),f=Number.MAX_VALUE,g=0,j=0,k=h.length;k>j;j++){var l=Math.abs(h[j]-c);f>l&&(g=j,f=l)}a("li",d).removeClass(i),b=a("li:eq("+g+")",d).addClass(i),e.onHighlight(b)},50)};return e.highlightOnScroll&&(a(window).bind("scroll",k),k()),this.each(function(){var b=a(this),c=a(e.listType);g.each(function(d,f){var g=a(f);h.push(g.offset().top-e.highlightOffset);var i=e.anchorName(d,f,e.prefix);if(f.id!==i){a("<span/>").attr("id",i).insertBefore(g)}var l=a("<a/>").text(e.headerText(d,f,g)).attr("href","#"+i).bind("click",function(c){a(window).unbind("scroll",k),j(c,function(){a(window).bind("scroll",k)}),b.trigger("selected",a(this).attr("href"))}),m=a("<li/>").addClass(e.itemClass(d,f,g,e.prefix)).append(l);c.append(m)}),b.html(c)})},jQuery.fn.toc.defaults={container:"body",listType:"<ul/>",selectors:"h1,h2,h3",smoothScrolling:function(b,c,d){a(b).smoothScroller({offset:c.scrollToOffset}).on("smoothScrollerComplete",function(){d()})},scrollToOffset:0,prefix:"toc",activeClass:"toc-active",onHighlight:function(){},highlightOnScroll:!0,highlightOffset:100,anchorName:function(c,d,e){if(d.id.length)return d.id;var f=a(d).text().replace(/[^a-z0-9]/gi," ").replace(/\s+/g,"-").toLowerCase();if(b[f]){for(var g=2;b[f+g];)g++;f=f+"-"+g}return b[f]=!0,e+"-"+f},headerText:function(a,b,c){return c.text()},itemClass:function(a,b,c,d){return d+"-"+c[0].tagName.toLowerCase()}}}(jQuery);
|
71
|
+
</script>
|
72
|
+
<script>
|
73
|
+
$('#toc').toc({
|
74
|
+
'selectors': 'h2',
|
75
|
+
'prefix': 'toc',
|
76
|
+
'highlightOffset': 64
|
77
|
+
});
|
78
|
+
var tocTop = $('.mdui-card-header').offset().top;
|
79
|
+
$('#k-toc-card').pushpin({
|
80
|
+
top: tocTop,
|
81
|
+
bottom: 99999,
|
82
|
+
offset: 200
|
83
|
+
});
|
84
|
+
</script>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<style>
|
2
|
+
.k-friend {
|
3
|
+
text-decoration: none;
|
4
|
+
}
|
5
|
+
</style>
|
6
|
+
<div class="k-posts-list"></div>
|
7
|
+
<div class="mdui-container">
|
8
|
+
<div class="mdui-row-sm-2 mdui-row-md-4">
|
9
|
+
{% for f in site.data.friends %}
|
10
|
+
<div class="mdui-col">
|
11
|
+
<a class="k-friend" href="{{f.url}}" target="_blank">
|
12
|
+
<div class="mdui-card mdui-hoverable">
|
13
|
+
<div class="mdui-card-header">
|
14
|
+
<img class="mdui-card-header-avatar" src="{{f.image}}" />
|
15
|
+
<div class="mdui-card-header-title">{{f.name}}</div>
|
16
|
+
<div class="mdui-card-header-subtitle">{{f.describe}}</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</a>
|
20
|
+
<br>
|
21
|
+
</div>
|
22
|
+
{% endfor %}
|
23
|
+
</div>
|
24
|
+
</div>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<style>
|
2
|
+
|
3
|
+
.k-post-media {
|
4
|
+
display:block
|
5
|
+
cursor: pointer;
|
6
|
+
max-height: 245px;
|
7
|
+
min-height: 245px;
|
8
|
+
background-position: 50% 50%;
|
9
|
+
background-size: cover;
|
10
|
+
background-color: white;
|
11
|
+
}
|
12
|
+
.k-post-media .mdui-card-primary-title a {
|
13
|
+
text-decoration: none;
|
14
|
+
}
|
15
|
+
</style>
|
16
|
+
<div id="postpage" class="mdui-container">
|
17
|
+
<div class="k-posts-list"></div>
|
18
|
+
<div class="mdui-row">
|
19
|
+
<div class="mdui-col-sm-12 k-page-col mdui-col-md-9">
|
20
|
+
<div class="mdui-card">
|
21
|
+
<div class="mdui-card-media k-post-media" style="background-image: url({{page.img}});">
|
22
|
+
<div class="mdui-card-media-covered mdui-card-media-covered-gradient">
|
23
|
+
<div class="mdui-card-primary">
|
24
|
+
<div class="mdui-card-primary-title"><a class="mdui-text-color-white-text">{{page.title}}</a></div>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
<div class="mdui-card-header">
|
29
|
+
<div class="mdui-card-menu">
|
30
|
+
{% include content/component/qrcode.html %}
|
31
|
+
{% include content/component/page_tags.html %}
|
32
|
+
{% include content/component/sns_share.html %}
|
33
|
+
</div>
|
34
|
+
<img class="mdui-card-header-avatar" src="{{site.data.site.img.avatar}}" />
|
35
|
+
<div class="mdui-card-header-title">{{site.author}}</div>
|
36
|
+
<div class="mdui-card-header-subtitle">{{ page.date | date: "%b %-d, %Y" }}</div>
|
37
|
+
</div>
|
38
|
+
<div class="mdui-card-content mdui-typo">
|
39
|
+
{{ content }}
|
40
|
+
</div>
|
41
|
+
{% include comment/disqus.html %}
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
<div class="mdui-col-md-3 mdui-hidden-sm-down">
|
45
|
+
{% include content/component/toc.html %}
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
<br>
|
49
|
+
<script>
|
50
|
+
</script>
|
51
|
+
</div>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{% if paginator.total_pages > 1 %}
|
2
|
+
<div class="mdui-row-xs-3">
|
3
|
+
<div class="mdui-col">
|
4
|
+
{% if paginator.previous_page %}
|
5
|
+
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="mdui-btn mdui-btn-icon "><i class="mdui-icon material-icons">arrow_back</i></a>
|
6
|
+
{% else %}
|
7
|
+
<button disabled class="mdui-btn mdui-btn-icon "><i class="mdui-icon material-icons">arrow_back</i></button>
|
8
|
+
{% endif%}
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="mdui-col mdui-text-center">
|
12
|
+
<p style="width:100%">{{paginator.page}}/{{paginator.total_pages}}</p>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<div class="mdui-col">
|
16
|
+
{% if paginator.next_page %}
|
17
|
+
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="mdui-btn mdui-btn-icon mdui-float-right"><i class="mdui-icon material-icons">arrow_forward</i></a>
|
18
|
+
{% else %}
|
19
|
+
<button disabled class="mdui-btn mdui-btn-icon mdui-float-right"><i class="mdui-icon material-icons">arrow_forward</i></button>
|
20
|
+
{% endif %}
|
21
|
+
</div>
|
22
|
+
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
{% endif %}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
{% if site.data.site.lang == 'zh-CN' %}
|
2
|
+
{% assign lang = site.data.lang[site.data.site.lang] %}
|
3
|
+
{% else %}
|
4
|
+
{% assign lang = site.data.lang.en-US %}
|
5
|
+
{% endif %}
|
6
|
+
<style>
|
7
|
+
.k-list-card{
|
8
|
+
margin-bottom: 45px;
|
9
|
+
}
|
10
|
+
.k-post-media {
|
11
|
+
display:block
|
12
|
+
cursor: pointer;
|
13
|
+
max-height: 245px;
|
14
|
+
min-height: 245px;
|
15
|
+
background-position: 50% 50%;
|
16
|
+
background-size: cover;
|
17
|
+
background-color: white;
|
18
|
+
}
|
19
|
+
.k-post-media .mdui-card-primary-title a {
|
20
|
+
text-decoration: none;
|
21
|
+
}
|
22
|
+
.k-post-categories {
|
23
|
+
line-height: 40px;
|
24
|
+
}
|
25
|
+
</style>
|
26
|
+
<div class="k-posts-list">
|
27
|
+
{% for post in paginator.posts %}
|
28
|
+
<div class="mdui-card k-list-card mdui-shadow-{{site.data.site.card.card_shadow}} {% if site.data.site.card.card_hoverable == true%}mdui-hoverable{% endif %}">
|
29
|
+
<div class="mdui-card-media mdui-ripple k-post-media" style="background-image:url({{post.img}})" src="{{post.img}}">
|
30
|
+
<div class="mdui-card-media-covered mdui-card-media-covered-gradient">
|
31
|
+
<div class="mdui-card-primary">
|
32
|
+
<div class="mdui-card-primary-title"><a class="mdui-text-color-white-text" href="{{post.url| prepend: site.baseurl}}#">{{post.title}}</a></div>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
<div class="mdui-card-content mdui-text-color-black-secondary mdui-typo">
|
37
|
+
{{ post.excerpt | strip_html}} <a href="{{post.url | prepend: site.baseurl}}">{{lang.post.continue}}</a>
|
38
|
+
</div>
|
39
|
+
<div class="mdui-divider"></div>
|
40
|
+
<div class="mdui-card-header">
|
41
|
+
<div class="mdui-card-menu mdui-typo">
|
42
|
+
{% for p in site.pages %}
|
43
|
+
{% if p.layout == "category" %}
|
44
|
+
{% assign ca = p.url %}
|
45
|
+
{% endif %}
|
46
|
+
{% endfor %}
|
47
|
+
<a class="k-post-categories" href="{{ca | prepend: site.baseurl }}?category={{post.categories}}">{{post.categories}}</a>
|
48
|
+
</div>
|
49
|
+
<img class="mdui-card-header-avatar" src="{{site.data.site.img.avatar}}" />
|
50
|
+
<div class="mdui-card-header-title">{{site.author}}</div>
|
51
|
+
<div class="mdui-card-header-subtitle">{{ post.date | date: "%b %-d, %Y" }}</div>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
{% endfor %}
|
55
|
+
</div>
|
56
|
+
<script>
|
57
|
+
Array.prototype.forEach.call(document.querySelectorAll(".mdui-card-media"), function(a) {
|
58
|
+
var b = a.querySelector("a");
|
59
|
+
if (!b) {
|
60
|
+
return
|
61
|
+
}
|
62
|
+
a.addEventListener("click", function() {
|
63
|
+
b.click();
|
64
|
+
})
|
65
|
+
});
|
66
|
+
</script>
|
@@ -0,0 +1,100 @@
|
|
1
|
+
{% capture tags %}
|
2
|
+
{% for tag in site.tags %}
|
3
|
+
{{ tag[0] }}
|
4
|
+
{% endfor %}
|
5
|
+
{% endcapture %}
|
6
|
+
|
7
|
+
{% assign sortedtags = tags | split:' ' | sort %}
|
8
|
+
|
9
|
+
<style>
|
10
|
+
.k-tagcloud{
|
11
|
+
padding: 1px 9px;
|
12
|
+
margin: 9px 1px;
|
13
|
+
line-height: 40px;
|
14
|
+
text-decoration: none;
|
15
|
+
white-space: nowrap;
|
16
|
+
transition: .6s;
|
17
|
+
display: inline-block;
|
18
|
+
color: #363636;
|
19
|
+
}
|
20
|
+
.k-tagcloud:hover{
|
21
|
+
transition: .6s;
|
22
|
+
opacity: 1;
|
23
|
+
background: #fafafa;
|
24
|
+
}
|
25
|
+
</style>
|
26
|
+
<div class="k-posts-list"></div>
|
27
|
+
{% if site.data.site.uiux.meng == true %}
|
28
|
+
{% if site.data.meng.background.switch == true %}
|
29
|
+
<div class="mdui-card">
|
30
|
+
{% else %}
|
31
|
+
<div class="">
|
32
|
+
{% endif %}
|
33
|
+
{% else %}
|
34
|
+
<div class="">
|
35
|
+
{% endif %}
|
36
|
+
<div class="mdui-card-content">
|
37
|
+
|
38
|
+
|
39
|
+
{% for tag in sortedtags %}
|
40
|
+
{% assign index = site.tags[tag] | size %}
|
41
|
+
{% assign fontsize = 14 %}
|
42
|
+
{% assign color = 125 %}
|
43
|
+
{% for i in (1..index) %}
|
44
|
+
{% capture fontsize %}{{fontsize | plus:1.5}}{% endcapture %}
|
45
|
+
{% endfor %}
|
46
|
+
{% for i in (1..index) %}
|
47
|
+
{% capture color %}{{ color | minus :15}}{% endcapture %}
|
48
|
+
{% endfor %}
|
49
|
+
<a id="{{ tag }}" class="k-tagcloud mdui-ripple mdui-hoverable" style="font-size:{{fontsize}}px;color:rgb({{color}},{{color}},{{color}})">{{ tag }}</a>
|
50
|
+
{% endfor %}
|
51
|
+
</div>
|
52
|
+
<div class="mdui-row">
|
53
|
+
<div class="mdui-col-sm-12">
|
54
|
+
<div id="taglist"></div>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<script>
|
60
|
+
$(function(){
|
61
|
+
function getUrlParam(name) {
|
62
|
+
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
63
|
+
var r = window.location.search.substr(1).match(reg);
|
64
|
+
if (r != null) return unescape(r[2]); return null;
|
65
|
+
}
|
66
|
+
function getTagList(id){
|
67
|
+
$.ajax({
|
68
|
+
type: "GET",
|
69
|
+
url:"{{ "/tags.json" | relative_url }}",
|
70
|
+
dataType:"json",
|
71
|
+
cache: true,
|
72
|
+
success: function(data){
|
73
|
+
var content = "<ul class='mdui-list'>";
|
74
|
+
$.each(data,function(i,n){
|
75
|
+
if(n.id === id){
|
76
|
+
var posts = n.post;
|
77
|
+
$.each(posts,function(i,n){
|
78
|
+
content+="<li class='mdui-list-item mdui-ripple'><a href='"+n.url+"'><div class='mdui-list-item-content'><div class='mdui-list-item-title mdui-list-item-one-line'>"+n.title+"</div><div class='mdui-list-item-text mdui-list-item-one-line'>"+n.excerpt+"</div></div></li>";
|
79
|
+
});
|
80
|
+
}
|
81
|
+
});
|
82
|
+
content += "</ul>";
|
83
|
+
$('#taglist').html(content)
|
84
|
+
}
|
85
|
+
})
|
86
|
+
}
|
87
|
+
var tagid;
|
88
|
+
var urltag = getUrlParam("tag");
|
89
|
+
if(urltag!=null){
|
90
|
+
getTagList(urltag);
|
91
|
+
}
|
92
|
+
$(".k-tagcloud").on("click",function(e){
|
93
|
+
var $this = $(this);
|
94
|
+
tagid = $this.attr("id");
|
95
|
+
if(tagid!=null){
|
96
|
+
getTagList(tagid);
|
97
|
+
}
|
98
|
+
});
|
99
|
+
})
|
100
|
+
</script>
|