Skip to content

Commit 2603353

Browse files
committed
push boilerplate
1 parent 5819c4f commit 2603353

18 files changed

+31099
-0
lines changed

css/scrolling-nav.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*!
2+
* Start Bootstrap - Scrolling Nav (https://startbootstrap.com/template-overviews/scrolling-nav)
3+
* Copyright 2013-2017 Start Bootstrap
4+
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-scrolling-nav/blob/master/LICENSE)
5+
*/
6+
7+
header {
8+
padding: 154px 0 100px;
9+
}
10+
11+
@media (min-width: 992px) {
12+
header {
13+
padding: 156px 0 100px;
14+
}
15+
}
16+
17+
section {
18+
padding: 150px 0;
19+
}

index.html

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
6+
<meta charset="utf-8">
7+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
8+
<meta name="description" content="">
9+
<meta name="author" content="">
10+
11+
<title>Scrolling Nav - Start Bootstrap Template</title>
12+
13+
<!-- Bootstrap core CSS -->
14+
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
15+
16+
<!-- Custom styles for this template -->
17+
<link href="css/scrolling-nav.css" rel="stylesheet">
18+
19+
</head>
20+
21+
<body id="page-top">
22+
23+
<!-- Navigation -->
24+
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" id="mainNav">
25+
<div class="container">
26+
<a class="navbar-brand js-scroll-trigger" href="#page-top">Start Bootstrap</a>
27+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
28+
<span class="navbar-toggler-icon"></span>
29+
</button>
30+
<div class="collapse navbar-collapse" id="navbarResponsive">
31+
<ul class="navbar-nav ml-auto">
32+
<li class="nav-item">
33+
<a class="nav-link js-scroll-trigger" href="#about">About</a>
34+
</li>
35+
<li class="nav-item">
36+
<a class="nav-link js-scroll-trigger" href="#services">Services</a>
37+
</li>
38+
<li class="nav-item">
39+
<a class="nav-link js-scroll-trigger" href="#contact">Contact</a>
40+
</li>
41+
</ul>
42+
</div>
43+
</div>
44+
</nav>
45+
46+
<header class="bg-primary text-white">
47+
<div class="container text-center">
48+
<h1>Welcome to Scrolling Nav</h1>
49+
<p class="lead">A landing page template freshly redesigned for Bootstrap 4</p>
50+
</div>
51+
</header>
52+
53+
<section id="about">
54+
<div class="container">
55+
<div class="row">
56+
<div class="col-lg-8 mx-auto">
57+
<h2>About this page</h2>
58+
<p class="lead">This is a great place to talk about your webpage. This template is purposefully unstyled so you can use it as a boilerplate or starting point for you own landing page designs! This template features:</p>
59+
<ul>
60+
<li>Clickable nav links that smooth scroll to page sections</li>
61+
<li>Responsive behavior when clicking nav links perfect for a one page website</li>
62+
<li>Bootstrap's scrollspy feature which highlights which section of the page you're on in the navbar</li>
63+
<li>Minimal custom CSS so you are free to explore your own unique design options</li>
64+
</ul>
65+
</div>
66+
</div>
67+
</div>
68+
</section>
69+
70+
<section id="services" class="bg-light">
71+
<div class="container">
72+
<div class="row">
73+
<div class="col-lg-8 mx-auto">
74+
<h2>Services we offer</h2>
75+
<p class="lead">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut optio velit inventore, expedita quo laboriosam possimus ea consequatur vitae, doloribus consequuntur ex. Nemo assumenda laborum vel, labore ut velit dignissimos.</p>
76+
</div>
77+
</div>
78+
</div>
79+
</section>
80+
81+
<section id="contact">
82+
<div class="container">
83+
<div class="row">
84+
<div class="col-lg-8 mx-auto">
85+
<h2>Contact us</h2>
86+
<p class="lead">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vero odio fugiat voluptatem dolor, provident officiis, id iusto! Obcaecati incidunt, qui nihil beatae magnam et repudiandae ipsa exercitationem, in, quo totam.</p>
87+
</div>
88+
</div>
89+
</div>
90+
</section>
91+
92+
<!-- Footer -->
93+
<footer class="py-5 bg-dark">
94+
<div class="container">
95+
<p class="m-0 text-center text-white">Copyright &copy; Your Website 2017</p>
96+
</div>
97+
<!-- /.container -->
98+
</footer>
99+
100+
<!-- Bootstrap core JavaScript -->
101+
<script src="vendor/jquery/jquery.min.js"></script>
102+
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
103+
104+
<!-- Plugin JavaScript -->
105+
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
106+
107+
<!-- Custom JavaScript for this theme -->
108+
<script src="js/scrolling-nav.js"></script>
109+
110+
</body>
111+
112+
</html>

js/scrolling-nav.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
(function($) {
2+
"use strict"; // Start of use strict
3+
4+
// Smooth scrolling using jQuery easing
5+
$('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function() {
6+
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
7+
var target = $(this.hash);
8+
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
9+
if (target.length) {
10+
$('html, body').animate({
11+
scrollTop: (target.offset().top - 54)
12+
}, 1000, "easeInOutExpo");
13+
return false;
14+
}
15+
}
16+
});
17+
18+
// Closes responsive menu when a scroll trigger link is clicked
19+
$('.js-scroll-trigger').click(function() {
20+
$('.navbar-collapse').collapse('hide');
21+
});
22+
23+
// Activate scrollspy to add active class to navbar items on scroll
24+
$('body').scrollspy({
25+
target: '#mainNav',
26+
offset: 54
27+
});
28+
29+
})(jQuery); // End of use strict

0 commit comments

Comments
 (0)