Skip to content

Commit 5877e72

Browse files
committed
Add animation
1 parent 475ef3c commit 5877e72

File tree

5 files changed

+97
-26
lines changed

5 files changed

+97
-26
lines changed

_config.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@
99
title: Yummy Theme
1010
name: DONGChuan
1111
12-
description: > # this means to ignore newlines until "baseurl:"
13-
Write an awesome description for your new site here. You can edit this
14-
line in _config.yml. It will appear in your document head meta (for
15-
Google search results) and in your feed.xml site description.
16-
baseurl: "" # the subpath of your site, e.g. /blog
12+
location: Nice, France
13+
company: MyCompany
14+
company_url: https://github.com/DONGChuan
15+
github_url: https://github.com/DONGChuan
16+
1717
url: "http://yourdomain.com" # the base hostname & protocol for your site
18-
twitter_username: jekyllrb
19-
github_username: jekyll
2018

2119
# Build settings
2220
markdown: kramdown

_includes/footer.html

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
<script type="text/javascript" src="/bower_components/jquery/dist/jquery.min.js"></script>
2121
<script type="text/javascript" src="/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
2222

23+
<!-- My JS -->
24+
<script type="text/javascript" src="/assets/js/script.js"></script>
25+
2326
{% for javascript in page.javascript %}
2427
<script src="/assets/js/{{javascript}}"></script>
2528
{% endfor %}

assets/css/common.css

+41
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,47 @@
5555
font-size: 20px;
5656
}
5757

58+
/******* Scroll Start *******/
59+
.site-header.site-header-nav-scrolled {
60+
margin: 0;
61+
background-color: white;
62+
63+
-webkit-box-shadow: 0 0.125em 0.125em 0 rgba(0, 0, 0, 0.125);
64+
-moz-box-shadow: 0 0.125em 0.125em 0 rgba(0, 0, 0, 0.125);
65+
-ms-box-shadow: 0 0.125em 0.125em 0 rgba(0, 0, 0, 0.125);
66+
-o-box-shadow: 0 0.125em 0.125em 0 rgba(0, 0, 0, 0.125);
67+
box-shadow: 0 0.125em 0.125em 0 rgba(0, 0, 0, 0.125);
68+
}
69+
70+
.site-header.site-header-nav-scrolled a, .site-header.site-header-nav-scrolled#site-header-brand {
71+
color: #2e2e2e !important;
72+
}
73+
74+
.site-header.site-header-nav-scrolled a:hover {
75+
color: #4183c4;
76+
}
77+
/******* Scroll End *******/
78+
79+
/** Jumbotron **/
80+
.jumbotron {
81+
padding-top: 200px;
82+
padding-bottom: 100px;
83+
color: #fff;
84+
background: #4183c4;
85+
}
86+
87+
.jumbotron a {
88+
color: #fff;
89+
text-decoration: none;
90+
}
91+
.jumbotron #jumbotron-meta-info {
92+
margin-top: 20px;;
93+
}
94+
95+
.jumbotron .meta-info {
96+
margin-right: 15px
97+
}
98+
5899
/** Footer **/
59100
.site-footer{
60101
position:relative;

assets/js/script.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Window Scroll
2+
var windowScroll = function () {
3+
$(window).scroll(function () {
4+
5+
var scrollPos = $(this).scrollTop();
6+
7+
if ($(window).scrollTop() > 70) {
8+
$('.site-header').addClass('site-header-nav-scrolled');
9+
} else {
10+
$('.site-header').removeClass('site-header-nav-scrolled');
11+
}
12+
});
13+
};
14+
15+
$( document ).ready(function() {
16+
windowScroll();
17+
});

index.html

+31-19
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,35 @@
11
---
22
layout: default
3+
menu: home
34
---
4-
5-
<div class="home">
6-
7-
<h1 class="page-heading">Posts</h1>
8-
9-
<ul class="post-list">
10-
{% for post in site.posts %}
11-
<li>
12-
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
13-
14-
<h2>
15-
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
16-
</h2>
17-
</li>
18-
{% endfor %}
19-
</ul>
20-
21-
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p>
22-
5+
<div class="jumbotron">
6+
<div class="container">
7+
<h1>I'm a Cool Boy :P</h1>
8+
<div id="jumbotron-meta-info">
9+
<span class="meta-info">
10+
<span class="octicon octicon-location"></span>
11+
{{ site.location }}
12+
</span>
13+
<span class="meta-info">
14+
<span class="octicon octicon-organization"></span>
15+
<a href="{{ site.company_url }}" target="_blank">{{ site.company }}</a>
16+
</span>
17+
<span class="meta-info">
18+
<span class="octicon octicon-mark-github"></span>
19+
<a href="{{ site.github_url }}" target="_blank">@{{ site.name }}</a>
20+
</span>
21+
</div>
22+
</div>
2323
</div>
24+
<div>p</div>
25+
<div>p</div>
26+
<div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div>
27+
<div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div>
28+
<div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div>
29+
<div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div>
30+
<div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div>
31+
<div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div>
32+
<div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div>
33+
<div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div>
34+
<div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div><div>p</div>
35+

0 commit comments

Comments
 (0)