Skip to content

Commit a442889

Browse files
committed
upload file
1 parent 41b1b64 commit a442889

13 files changed

+338
-179
lines changed

_includes/about.html

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<h2>About ME</h2>
66

7-
<p>I love coding, I like compose enjoyable web pages. I like animal. I want to have two babies, one cat and one parrot. I would like to be a CTO in the future.</p>
7+
<p>I love coding. I like animal. I want to have four babies, one cat, one dog and two sheep. I would like to be a CTO in the future.</p>
88

99
<h2>Contact</h2>
1010

@@ -14,20 +14,33 @@ <h2>Contact</h2>
1414
</ul>
1515

1616
<h2>Skill Keywords</h2>
17-
18-
{% if site.skill_web_keywords %}
17+
18+
{% if site.skill_software_keywords %}
1919
<div class="panel panel-default">
2020
<div class="panel-heading">
21-
<h3 class="panel-title">Web Developer Keywords</h3>
21+
<h3 class="panel-title">Software Engineer Keywords</h3>
2222
</div>
2323
<div class="panel-body">
24-
{% for keyword in site.skill_web_keywords %}
24+
{% for keyword in site.skill_software_keywords %}
25+
<button class="btn btn-default" type="button">{{ keyword }}</button>
26+
{% endfor %}
27+
</div>
28+
</div>
29+
{% endif %}
30+
31+
{% if site.skill_j2ee_keywords %}
32+
<div class="panel panel-default">
33+
<div class="panel-heading">
34+
<h3 class="panel-title">J2EE Developer Keywords</h3>
35+
</div>
36+
<div class="panel-body">
37+
{% for keyword in site.skill_j2ee_keywords %}
2538
<button class="btn btn-default" type="button">{{ keyword }}</button>
2639
{% endfor %}
2740
</div>
2841
</div>
2942
{% endif %}
30-
43+
3144
{% if site.skill_mobile_app_keywords %}
3245
<div class="panel panel-default">
3346
<div class="panel-heading">
@@ -41,13 +54,13 @@ <h3 class="panel-title">Mobile Developer Keywords</h3>
4154
</div>
4255
{% endif %}
4356

44-
{% if site.skill_software_keywords %}
57+
{% if site.skill_web_keywords %}
4558
<div class="panel panel-default">
4659
<div class="panel-heading">
47-
<h3 class="panel-title">Software Engineer Keywords</h3>
60+
<h3 class="panel-title">Web Developer Keywords</h3>
4861
</div>
4962
<div class="panel-body">
50-
{% for keyword in site.skill_software_keywords %}
63+
{% for keyword in site.skill_web_keywords %}
5164
<button class="btn btn-default" type="button">{{ keyword }}</button>
5265
{% endfor %}
5366
</div>
@@ -60,4 +73,4 @@ <h3 class="panel-title">Software Engineer Keywords</h3>
6073
{% include sidebar-popular-repo.html %}
6174
</div>
6275

63-
</div>
76+
</div>

_includes/blog-page.html

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,70 @@
11
<div class="row">
22

33
<div class="col-md-8">
4-
54
<!-- Blog list -->
6-
<ul id="posts-list">
7-
{% for post in site.posts %}
8-
<li class="posts-list-item">
9-
<div class="posts-content">
10-
<span class="posts-list-meta">{{ post.date | date: "%Y-%m-%d" }}</span>
5+
<section class="posts-content">
6+
{% assign sorted_categories = site.categories | sort %} {% for category in sorted_categories %}
7+
<h3>{{ category | first }}</h3>
8+
<ol class="posts-list" id="{{ category[0] }}">
9+
{% for post in category.last %}
10+
<li class="posts-list-item">
11+
<span class="posts-list-meta">{{ post.date | date:"%Y-%m-%d" }}</span>
1112
<a class="posts-list-name bubble-float-left" href="{{ site.url }}{{ post.url }}">{{ post.title }}</a>
1213
<span class='circle'></span>
13-
</div>
14-
</li>
14+
</li>
15+
{% endfor %}
16+
</ol>
1517
{% endfor %}
16-
</ul>
18+
</section>
1719

1820
<!-- Pagination -->
19-
{% include pagination.html %}
21+
<!-- {% include pagination.html %} -->
2022

2123
<!-- Comments -->
2224
{% include disqus-comments.html %}
2325

2426
</div>
2527

26-
<div class="col-md-4">
28+
<div class="col-md-4 sidebar-post-tag">
2729
{% include sidebar-search.html %}
2830
{% include sidebar-post-tag.html %}
2931
</div>
3032

3133
</div>
3234
<script>
33-
$(document).ready(function(){
35+
$(document).ready(function () {
3436

3537
// Enable bootstrap tooltip
3638
$("body").tooltip({ selector: '[data-toggle=tooltip]' });
3739

40+
// var fixmeTop = $('.sidebar-post-tag').offset().top - 100; // get initial position of the element
41+
42+
// $(window).scroll(function() { // assign scroll event listener
43+
44+
// var currentScroll = $(window).scrollTop(); // get current position
45+
46+
// if (currentScroll >= fixmeTop) { // apply position: fixed if you
47+
// $('.sidebar-post-tag').css({ // scroll to that element or below it
48+
// top: '100px',
49+
// bottom: '20px',
50+
// right: '30px',
51+
// position: 'fixed'
52+
// });
53+
// } else { // apply position: static
54+
// $('.sidebar-post-tag').css({ // if you scroll above it
55+
// position: 'inherit'
56+
// });
57+
// }
58+
59+
// });
60+
61+
$(window).scroll(scroll)
62+
63+
scroll()
64+
65+
function scroll() {
66+
let top = 450 - $(window).scrollTop() >= 100 ? 450 - $(window).scrollTop() : 100
67+
$('.sidebar-post-tag').css('top', top)
68+
}
3869
});
3970
</script>

_includes/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Power by <a href="https://github.com/DONGChuan/Yummy-Jekyll">Yummy Jekyll</a>
99
</div>
1010

11-
<a href="https://github.com/DONGChuan" target="_blank" aria-label="view source code">
11+
<a href="https://github.com/lhajh" target="_blank" aria-label="view source code">
1212
<span class="mega-octicon octicon-mark-github" title="GitHub"></span>
1313
</a>
1414

_includes/sidebar-post-nav.html

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,27 @@ <h3>Post Directory</h3>
2828
});
2929
});
3030

31-
var fixmeTop = $('#post-directory-module').offset().top - 100; // get initial position of the element
31+
// var fixmeTop = $('#post-directory-module').offset().top - 100; // get initial position of the element
3232

33-
$(window).scroll(function() { // assign scroll event listener
33+
// $(window).scroll(function() { // assign scroll event listener
3434

35-
var currentScroll = $(window).scrollTop(); // get current position
35+
// var currentScroll = $(window).scrollTop(); // get current position
3636

37-
if (currentScroll >= fixmeTop) { // apply position: fixed if you
38-
$('#post-directory-module').css({ // scroll to that element or below it
39-
top: '100px',
40-
position: 'fixed',
41-
width: 'inherit'
42-
});
43-
} else { // apply position: static
44-
$('#post-directory-module').css({ // if you scroll above it
45-
position: 'inherit',
46-
width: 'inherit'
47-
});
48-
}
37+
// if (currentScroll >= fixmeTop) { // apply position: fixed if you
38+
// $('#post-directory-module').css({ // scroll to that element or below it
39+
// top: '100px',
40+
// bottom: '20px',
41+
// position: 'fixed',
42+
// width: 'inherit'
43+
// });
44+
// } else { // apply position: static
45+
// $('#post-directory-module').css({ // if you scroll above it
46+
// position: 'inherit',
47+
// width: 'inherit'
48+
// });
49+
// }
4950

50-
});
51+
// });
5152

5253
$("a.jumper").on("click", function( e ) {
5354

@@ -60,4 +61,4 @@ <h3>Post Directory</h3>
6061
});
6162
});
6263

63-
</script>
64+
</script>

_includes/sidebar-post-tag.html

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
<h3 class="sidebar-title">Blog Categories</h3>
22
<div id="blog-categories">
3-
<ul class="list-group">
4-
{% for category in site.categories %}
5-
<li class="list-group-item">
6-
{{ category | first }}
7-
<span class="badge">{{ category[1].size }}</span>
8-
</li>
9-
{% endfor %}
10-
</ul>
11-
3+
<ul class="list-group">
4+
{% assign sorted_categories = site.categories | sort %}
5+
{% for category in sorted_categories %}
6+
<li class="list-group-item">
7+
<a class="jumper" hre="#{{ category[0] }}">{{ category | first }}</a>
8+
<span class="badge">{{ category[1].size }}</span>
9+
</li>
10+
{% endfor %}
11+
</ul>
1212
</div>
13+
1314
<script type="text/javascript">
15+
$(document).ready(function(){
16+
$("#blog-categories li").css('text-transform','capitalize')
17+
18+
$("a.jumper").on("click", function( e ) {
19+
20+
e.preventDefault();
1421

15-
$(document).ready(function(){
16-
$("#blog-categories li").css('text-transform','capitalize')
17-
});
22+
$("body, html").animate({
23+
scrollTop: ($( $(this).attr('hre') ).offset().top - 140)
24+
}, 600);
1825

19-
</script>
26+
});
27+
});
28+
</script>

_includes/sidebar-search.html

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
1-
21
<h3>Search</h3>
32
<div id="site_search">
4-
<input type="text" id="search_box" placeholder="Search">
5-
<button class="btn btn-default" id="site_search_do"><span class="octicon octicon-search"></span></button>
3+
<input type="text" id="search_box" placeholder="Search" autofocus>
64
</div>
75

86
<ul id="search_results"></ul>
97

108
<link rel="stylesheet" type="text/css" href="{{ site.url }}/assets/css/sidebar-search.css">
11-
<script src="{{ site.url }}/assets/js/lunr.min.js"></script>
9+
<script src="{{ site.url }}/assets/js/simple-jekyll-search.min.js"></script>
1210
<script src="{{ site.url }}/assets/js/search.js"></script>
1311

12+
<script type="text/javascript">
13+
SimpleJekyllSearch({
14+
searchInput: document.getElementById('search_box'),
15+
resultsContainer: document.getElementById('search_results'),
16+
json: '{{ site.url }}/assets/search_data.json',
17+
searchResultTemplate: '<li><a href="{url}" title="{desc}">{title}</a></li>',
18+
noResultsText: 'No results found',
19+
limit: {{ site.simple_jekyll_search.limit }},
20+
fuzzy: false,
21+
exclude: ['Welcome']
22+
})
23+
</script>

_layouts/post.html

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
{% include disqus-comments.html %}
2525
</div>
2626

27-
<div class="col-md-4">
27+
<div class="col-md-4 sidebar-post-tag">
2828
{% include sidebar-search.html %}
2929
{% include sidebar-post-nav.html %}
3030
</div>
@@ -33,3 +33,26 @@
3333
</div>
3434

3535
</article>
36+
37+
<script>
38+
$(document).ready(function () {
39+
var top = $('.sidebar-post-tag').offset().top
40+
scroll()
41+
$(window).scroll(scroll)
42+
43+
function scroll () {
44+
var scrollTop = top - $(window).scrollTop()
45+
if (scrollTop < 100) {
46+
$('.sidebar-post-tag').css({
47+
position: 'fixed',
48+
top: 100
49+
})
50+
} else {
51+
$('.sidebar-post-tag').css({
52+
position: 'fixed',
53+
top: scrollTop
54+
})
55+
}
56+
}
57+
});
58+
</script>

0 commit comments

Comments
 (0)