-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: the demo is not working in the localhost
- Fix the demo is not working in the localhost - Add .editorconfig - Change output path from /dist to /demo/dist
- Loading branch information
Showing
4 changed files
with
55 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[*] | ||
root = true | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ npm-debug.log | |
yarn-error.log | ||
yarn.lock | ||
/dist | ||
/demo/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,61 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>Simple Scrollspy</title> | ||
<link rel="stylesheet" href="demo.css"> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>Simple Scrollspy</title> | ||
<link rel="stylesheet" href="demo.css"> | ||
</head> | ||
|
||
<body> | ||
|
||
<nav class="navbar"> | ||
<nav class="navbar"> | ||
<div class="container"> | ||
<div class="navbar-brand"> | ||
<h1> | ||
<a href="">Simple Scrollspy</a> | ||
</h1> | ||
</div> | ||
|
||
<div class="menu" id="main-menu"> | ||
<a class="menu-item active" href="#hero">Hero</a> | ||
<a class="menu-item" href="#section-1">Section 1</a> | ||
<a class="menu-item" href="#section-2">Section 2</a> | ||
<a class="menu-item" href="#section-3">Section 3</a> | ||
<a class="menu-item" href="#section-4">Section 4</a> | ||
</div> | ||
<div class="navbar-brand"> | ||
<h1> | ||
<a href="">Simple Scrollspy</a> | ||
</h1> | ||
</div> | ||
|
||
<div class="menu" id="main-menu"> | ||
<a class="menu-item active" href="#hero">Hero</a> | ||
<a class="menu-item" href="#section-1">Section 1</a> | ||
<a class="menu-item" href="#section-2">Section 2</a> | ||
<a class="menu-item" href="#section-3">Section 3</a> | ||
<a class="menu-item" href="#section-4">Section 4</a> | ||
</div> | ||
</div> | ||
</nav> | ||
</nav> | ||
|
||
<section class="section scrollspy" id="hero">Hero</section> | ||
<section class="section scrollspy" id="section-1">Section 1</section> | ||
<section class="section scrollspy" id="section-2">Section 2</section> | ||
<section class="section scrollspy" id="section-3">Section 3</section> | ||
<section class="section scrollspy" id="section-4">Section 4</section> | ||
<section class="section scrollspy" id="hero">Hero</section> | ||
<section class="section scrollspy" id="section-1">Section 1</section> | ||
<section class="section scrollspy" id="section-2">Section 2</section> | ||
<section class="section scrollspy" id="section-3">Section 3</section> | ||
<section class="section scrollspy" id="section-4">Section 4</section> | ||
|
||
<footer class="footer"> | ||
<footer class="footer"> | ||
<div class="container"> | ||
<p> | ||
<a href="https://github.com/huukimit/simple-scrollspy" title="Fork me on Github"> | ||
Simple Scrollspy - Github | ||
</a> | ||
</p> | ||
<p> | ||
<a href="https://github.com/huukimit/simple-scrollspy" title="Fork me on Github"> | ||
Simple Scrollspy - Github | ||
</a> | ||
</p> | ||
</div> | ||
</footer> | ||
|
||
<script src="../dist/simple-scrollspy.min.js"></script> | ||
<script> | ||
window.onload = function () { | ||
scrollSpy('#main-menu', { | ||
sectionClass: '.scrollspy', | ||
menuActiveTarget: '.menu-item', | ||
offset: 100 | ||
}) | ||
} | ||
</script> | ||
</footer> | ||
|
||
<script src="dist/simple-scrollspy.min.js"></script> | ||
<script> | ||
window.onload = function () { | ||
scrollSpy('#main-menu', { | ||
sectionClass: '.scrollspy', | ||
menuActiveTarget: '.menu-item', | ||
offset: 100 | ||
}) | ||
} | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters