Skip to content

Commit 62e43ce

Browse files
committed
Add scrolling effect.
Add 'About' section.
1 parent 91cefa2 commit 62e43ce

8 files changed

+150
-51
lines changed

_includes/about.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!-- About Section -->
2+
<section id="about" class="container content-section text-center">
3+
<div class="row">
4+
<div class="col-lg-8 col-lg-offset-2">
5+
<h2>About Landing-Page</h2>
6+
<p>Landing-Page is a free Bootstrap 3 theme created by Start Bootstrap. It can be yours right now, simply download the template on <a href="http://startbootstrap.com/template-overviews/landing-page/">the preview page</a>. The theme is open source, and you can use it for any purpose, personal or commercial.</p>
7+
<p>The Jekyll version is brought to you by <a href="https://github.com/swcool">Shane Weng</a></p>
8+
<p>This theme features stock photos by <a href="http://join.deathtothestockphoto.com//">Death to the Stock Photo</a>.</p>
9+
<p>Landing-Page includes full HTML, CSS, and custom JavaScript files along with LESS files for easy customization.</p>
10+
</div>
11+
</div>
12+
</section>

_includes/contact.html

+21-20
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
<div class="banner">
1+
<section id="contact">
2+
<div class="banner">
3+
<div class="container">
24

3-
<div class="container">
5+
<div class="row">
6+
<div class="col-lg-6">
7+
<h2>Keep in Touch:</h2>
8+
</div>
9+
<div class="col-lg-6">
10+
<ul class="list-inline banner-social-buttons">
11+
{% for social in site.social %}
12+
<li>
13+
<a href="{{ social.url }}" class="btn btn-default btn-lg"><i class="fa fa-{{ social.title }} fa-fw"></i> <span class="network-name">{{ social.title }}</span></a>
14+
</li>
15+
{% endfor %}
16+
</ul>
17+
</div>
18+
</div>
419

5-
<div class="row">
6-
<div class="col-lg-6">
7-
<h2>Connect to Start Bootstrap:</h2>
8-
</div>
9-
<div class="col-lg-6">
10-
<ul class="list-inline banner-social-buttons">
11-
{% for social in site.social %}
12-
<li>
13-
<a href="{{ social.url }}" class="btn btn-default btn-lg"><i class="fa fa-{{ social.title }} fa-fw"></i> <span class="network-name">{{ social.title }}</span></a>
14-
</li>
15-
{% endfor %}
16-
</ul>
17-
</div>
18-
</div>
20+
</div>
21+
<!-- /.container -->
1922

20-
</div>
21-
<!-- /.container -->
22-
23-
</div>
23+
</div>
24+
</section>
2425
<!-- /.banner -->

_includes/header.html

+32-30
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
33
<div class="container">
44
<!-- Brand and toggle get grouped for better mobile display -->
5-
<div class="navbar-header">
5+
<div class="navbar-header page-scroll">
66
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
77
<span class="sr-only">Toggle navigation</span>
88
<span class="icon-bar"></span>
99
<span class="icon-bar"></span>
1010
<span class="icon-bar"></span>
1111
</button>
12-
<a class="navbar-brand" href="#">{{ site.title }}</a>
12+
<a class="navbar-brand page-scroll" href="#home">{{ site.title }}</a>
1313
</div>
1414
<!-- Collect the nav links, forms, and other content for toggling -->
1515
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
16-
<ul class="nav navbar-nav navbar-right">
16+
<ul class="nav navbar-nav navbar-right">
17+
<li>
18+
<a class="page-scroll" href="#about">About</a>
19+
</li>
1720
<li>
18-
<a href="#">About</a>
21+
<a class="page-scroll" href="#services">Services</a>
1922
</li>
2023
<li>
21-
<a href="#">Services</a>
22-
</li>
23-
<li>
24-
<a href="#">Contact</a>
24+
<a class="page-scroll" href="#contact">Contact</a>
2525
</li>
2626
</ul>
2727
</div>
@@ -30,30 +30,32 @@
3030
<!-- /.container -->
3131
</nav>
3232

33+
<section id="home">
3334
<!-- Header -->
34-
<div class="intro-header">
35+
<div class="intro-header">
3536

36-
<div class="container">
37+
<div class="container">
3738

38-
<div class="row">
39-
<div class="col-lg-12">
40-
<div class="intro-message">
41-
<h1>{{ page.title }}</h1>
42-
<h3>{{ page.subTitle }}</h3>
43-
<hr class="intro-divider">
44-
<ul class="list-inline intro-social-buttons">
45-
{% for social in site.social %}
46-
<li>
47-
<a href="{{ social.url }}" class="btn btn-default btn-lg"><i class="fa fa-{{ social.title }} fa-fw"></i> <span class="network-name">{{ social.title }}</span></a>
48-
</li>
49-
{% endfor %}
50-
</ul>
51-
</div>
52-
</div>
53-
</div>
39+
<div class="row">
40+
<div class="col-lg-12">
41+
<div class="intro-message">
42+
<h1>{{ page.title }}</h1>
43+
<h3>{{ page.subTitle }}</h3>
44+
<hr class="intro-divider">
45+
<ul class="list-inline intro-social-buttons">
46+
{% for social in site.social %}
47+
<li>
48+
<a href="{{ social.url }}" class="btn btn-default btn-lg"><i class="fa fa-{{ social.title }} fa-fw"></i> <span class="network-name">{{ social.title }}</span></a>
49+
</li>
50+
{% endfor %}
51+
</ul>
52+
</div>
53+
</div>
54+
</div>
5455

55-
</div>
56-
<!-- /.container -->
56+
</div>
57+
<!-- /.container -->
5758

58-
</div>
59-
<!-- /.intro-header -->
59+
</div>
60+
<!-- /.intro-header -->
61+
</section>

_includes/js.html

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<!-- jQuery Version 1.11.0 -->
22
<script src="js/jquery-1.11.0.js"></script>
33

4+
<!-- Plugin JavaScript -->
5+
<script src="{{ "/js/jquery.easing.min.js" | prepend: site.baseurl }}"></script>
6+
47
<!-- Bootstrap Core JavaScript -->
58
<script src="js/bootstrap.min.js"></script>
9+
10+
<!-- Custom Theme JavaScript -->
11+
<script src="js/landing-page.js"></script>

_includes/page_content.html _includes/services.html

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<section id="services">
12
<!-- Page Content -->
23
{% for post in site.posts reversed %}
34
{% capture thecycle %}{% cycle 'odd', 'even' %}{% endcapture %}
@@ -48,3 +49,4 @@ <h2 class="section-heading">{{ post.title }}</h2>
4849
<!-- /.content-section-b -->
4950
{% endif %}
5051
{% endfor %}
52+
</section>

_layouts/default.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
<body>
66
{% include header.html %}
7-
{% include page_content.html %}
7+
{% include about.html %}
8+
{% include services.html %}
89
{% include contact.html %}
910
{% include footer.html %}
1011
{% include js.html %}

js/jquery.easing.min.js

+44
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/landing-page.js

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// jQuery for page scrolling feature - requires jQuery Easing plugin
2+
$(function() {
3+
$('a.page-scroll').bind('click', function(event) {
4+
var $anchor = $(this);
5+
$('html, body').stop().animate({
6+
scrollTop: $($anchor.attr('href')).offset().top
7+
}, 1500, 'easeInOutExpo');
8+
event.preventDefault();
9+
});
10+
});
11+
12+
// Highlight the top nav as scrolling occurs
13+
$('body').scrollspy({
14+
target: '.navbar-fixed-top'
15+
})
16+
17+
// Closes the Responsive Menu on Menu Item Click
18+
$('.navbar-collapse ul li a').click(function() {
19+
$('.navbar-toggle:visible').click();
20+
});
21+
22+
$('div.modal').on('show.bs.modal', function() {
23+
var modal = this;
24+
var hash = modal.id;
25+
window.location.hash = hash;
26+
window.onhashchange = function() {
27+
if (!location.hash){
28+
$(modal).modal('hide');
29+
}
30+
}
31+
});

0 commit comments

Comments
 (0)