jekyll-theme-tou-dai 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +47 -0
- data/_includes/header.html +21 -0
- data/_layouts/default.html +53 -0
- data/_layouts/plain.txt +1 -0
- data/_sass/_colors.scss +28 -0
- data/_sass/_fonts.scss +0 -0
- data/_sass/_menu.scss +158 -0
- data/_sass/_mixins.scss +10 -0
- data/_sass/_typescale.scss +35 -0
- data/_sass/jekyll-theme-tou-dai.scss +68 -0
- data/_sass/palette.scss +15 -0
- data/assets/css/main.scss +5 -0
- data/assets/js/easing.js +10 -0
- data/assets/js/index.js +41 -0
- data/assets/js/main.bundle.js +524 -0
- metadata +116 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f0ae1f5bdf730d1bc1ec0b5b9cfb7dfe3c421be5
|
4
|
+
data.tar.gz: ce55a49c3d4959d5069f5635b347545de7764fb1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 23da082b063afd3b45387cd30b5c8f421d292157fe04931a214567d312ac2a80e92538b6e9567c08274371a7db2b6a9aa309bba8ddb732aa28a4b168a8fb5309
|
7
|
+
data.tar.gz: '09e52b556302ef8eb8acc31d66fc0622c892a1f54af20aee789cdceef557cda85d7f88bb15cd749ddc31536fb1bfe0a3d845873f40e54209d5c858291d094a70'
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 fabianmoronzirfas
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# jekyll-theme-tou-dai
|
2
|
+
|
3
|
+
> 徒弟 (Tou Dai) – Student / Disciple
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your Jekyll site's `Gemfile`:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem "jekyll-theme-tou-dai"
|
11
|
+
```
|
12
|
+
|
13
|
+
And add this line to your Jekyll site's `_config.yml`:
|
14
|
+
|
15
|
+
```yaml
|
16
|
+
theme: jekyll-theme-tou-dai
|
17
|
+
```
|
18
|
+
|
19
|
+
And then execute:
|
20
|
+
|
21
|
+
$ bundle
|
22
|
+
|
23
|
+
Or install it yourself as:
|
24
|
+
|
25
|
+
$ gem install jekyll-theme-tou-dai
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets.
|
30
|
+
|
31
|
+
## Contributing
|
32
|
+
|
33
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hello. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
34
|
+
|
35
|
+
## Development
|
36
|
+
|
37
|
+
To set up your environment to develop this theme, run `bundle install`.
|
38
|
+
|
39
|
+
Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
|
40
|
+
|
41
|
+
When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
|
42
|
+
To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-tou-dai.gemspec` accordingly.
|
43
|
+
|
44
|
+
## License
|
45
|
+
|
46
|
+
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
47
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<header>
|
2
|
+
<div class="inner">
|
3
|
+
<nav>
|
4
|
+
<a href="{{ site.baseurl }}/" class="logo"></a>
|
5
|
+
<input type="checkbox" id="nav" />
|
6
|
+
<label for="nav"></label>
|
7
|
+
<a href="#" id="menu-icon"></a>
|
8
|
+
<ul id="menu-list">
|
9
|
+
{% for item in site.data.menu %}
|
10
|
+
<li class="menu-item"{%if forloop.last == true %} id="last-item"{%endif%}>
|
11
|
+
<a href="{{site.baseurl}}{{item.url}}">{{item.title}}</a>
|
12
|
+
</li>
|
13
|
+
{% comment %}{% if item.sub != nil %}
|
14
|
+
<ul>{% for sub in item.sub %}
|
15
|
+
<li class="menu-item"><a href="{{site.baseurl}}{{sub.url}}">{{sub.title}}</a></li>{% endfor %}
|
16
|
+
</ul>{% endif %}{% endcomment %}
|
17
|
+
{% endfor %}
|
18
|
+
</ul>
|
19
|
+
</nav>
|
20
|
+
</div>
|
21
|
+
</header>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<!--
|
4
|
+
https://github.com/joshbuchea/HEAD
|
5
|
+
http://gethead.info/ -->
|
6
|
+
|
7
|
+
<head>
|
8
|
+
<meta charset="utf-8">
|
9
|
+
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
10
|
+
<meta name="viewport" content="width=device-width, initial-scale=1 shrink-to-fit=no">
|
11
|
+
<!-- <meta http-equiv="Content-Security-Policy" content="default-src 'self'"> -->
|
12
|
+
<!-- <base href="{{site.url}}/{{page.url}}"> -->
|
13
|
+
<meta name="author" content="{{page.author}}">
|
14
|
+
<meta name="robots" content="index,follow"><!-- All Search Engines -->
|
15
|
+
<meta name="googlebot" content="index,follow"><!-- Google Specific -->
|
16
|
+
<meta name="generator" content="jekyll">
|
17
|
+
<link rel="author" href="humans.txt">
|
18
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
19
|
+
<link rel="stylesheet" href="{{ site.url }}/assets/css/main.css">
|
20
|
+
<title>{{ page.title}}</title>
|
21
|
+
<meta name="description" content="{{page.description}}">
|
22
|
+
<meta name="author" content="{{page.author}}">
|
23
|
+
<!-- <link rel="alternate" title="JSON feed for {{site.domain}}" type="application/json" href="{{site.url}}/feed.json" /> -->
|
24
|
+
<!-- <link rel="alternate" type="application/atom+xml" title="ATOM feed for {{site.domain}}" href="{{site.url}}/atom.xml" /> -->
|
25
|
+
<!--[if lt IE 9]>
|
26
|
+
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
27
|
+
<![endif]-->
|
28
|
+
<script>
|
29
|
+
var menu_data = {{ site.data.menu | jsonify }};
|
30
|
+
</script>
|
31
|
+
</head>
|
32
|
+
<body class="fade">
|
33
|
+
{% include header.html %}
|
34
|
+
<section>
|
35
|
+
<div id="main">
|
36
|
+
<div class="menu-trigger"></div>
|
37
|
+
{{ content }}
|
38
|
+
<footer>
|
39
|
+
<!-- <noscript>
|
40
|
+
<ul class="social-links">
|
41
|
+
<li class="social">foo</li>
|
42
|
+
<li class="social">bah </li>
|
43
|
+
<li class="social">baz</li>
|
44
|
+
</ul>
|
45
|
+
</noscript> -->
|
46
|
+
<p>Build with <a href="http://jekyllrb.com/" target="blank">jekyll</a> and ♥ </p>
|
47
|
+
</footer>
|
48
|
+
</div>
|
49
|
+
<!-- close main -->
|
50
|
+
</section>
|
51
|
+
<script type="text/javascript" src="{{site.url}}/assets/js/main.bundle.js"></script>
|
52
|
+
</body>
|
53
|
+
</html>
|
data/_layouts/plain.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{{content}}
|
data/_sass/_colors.scss
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
/* Coolors Exported Palette - coolors.co/080705-b10f2e-c5cbd3-40434e-7c1d11 */
|
2
|
+
|
3
|
+
/* HSL */
|
4
|
+
|
5
|
+
|
6
|
+
$backgroundColor: #EBEBEB; //hsla($hue, $saturation, $lightness, $alpha)
|
7
|
+
$colDark: hsla(40%, 23%, 3%, 1);
|
8
|
+
$colLight: hsla(214%, 14%, 90%, 1);
|
9
|
+
$colBright:hsla(148, 0%, 100%, 1);
|
10
|
+
$colGrey: hsla(227%, 10%, 28%, 1);
|
11
|
+
$colRed1: hsla(7%, 76%, 28%, 1);
|
12
|
+
$colRed2: hsla(349%, 84%, 38%, 1);
|
13
|
+
|
14
|
+
|
15
|
+
$colLime1: hsla(159%, 75%, 65%, 1);
|
16
|
+
$color2: hsla(240%, 14%, 97%, 1);
|
17
|
+
$color3: hsla(240%, 3%, 85%, 1);
|
18
|
+
$color4: hsla(224%, 12%, 57%, 1);
|
19
|
+
$color5: hsla(215%, 29%, 26%, 1);
|
20
|
+
$colLinks: #330033; //darken($colLime1, 25%);
|
21
|
+
|
22
|
+
|
23
|
+
/* RGB */
|
24
|
+
// $color1: rgba(8, 7, 5, 1);
|
25
|
+
// $color2: rgba(177, 15, 46, 1);
|
26
|
+
// $color3: rgba(197, 203, 211, 1);
|
27
|
+
// $color4: rgba(64, 67, 78, 1);
|
28
|
+
// $color5: rgba(124, 29, 17, 1);
|
data/_sass/_fonts.scss
ADDED
File without changes
|
data/_sass/_menu.scss
ADDED
@@ -0,0 +1,158 @@
|
|
1
|
+
@import 'colors','mixins';
|
2
|
+
// --------- MENU -------
|
3
|
+
// based on this codepen
|
4
|
+
// http://codepen.io/andreasstorm/pen/lriga
|
5
|
+
// by http://codepen.io/andreasstorm/
|
6
|
+
header {
|
7
|
+
height: 5em;
|
8
|
+
// padding-top: 40px;
|
9
|
+
}
|
10
|
+
|
11
|
+
.inner {
|
12
|
+
max-width: 1000px;
|
13
|
+
margin: 0 auto;
|
14
|
+
padding: 0px 20px;
|
15
|
+
position: relative;
|
16
|
+
}
|
17
|
+
|
18
|
+
.logo {
|
19
|
+
text-decoration: none;
|
20
|
+
color: #FFFFFF;
|
21
|
+
font-weight: 800;
|
22
|
+
font-size: 30px;
|
23
|
+
line-height: 40px;
|
24
|
+
}
|
25
|
+
nav > ul {
|
26
|
+
// float: right;
|
27
|
+
max-width:800px;
|
28
|
+
}
|
29
|
+
|
30
|
+
nav > ul > li {
|
31
|
+
text-size:40px;
|
32
|
+
text-align: center;
|
33
|
+
line-height: 40px;
|
34
|
+
margin-left: 0.5em;
|
35
|
+
[class^="icon-"], [class*=" icon-"] {
|
36
|
+
height: 30px;
|
37
|
+
width: 30px;
|
38
|
+
position:relative;
|
39
|
+
top:10px;
|
40
|
+
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
nav > ul li ul li {
|
45
|
+
width: 100%;
|
46
|
+
text-align: left;
|
47
|
+
}
|
48
|
+
|
49
|
+
nav ul li:hover {
|
50
|
+
cursor: pointer;
|
51
|
+
position: relative;
|
52
|
+
}
|
53
|
+
nav ul li:hover > ul {
|
54
|
+
display: block;
|
55
|
+
}
|
56
|
+
nav ul li:hover > a {
|
57
|
+
// color: #777;
|
58
|
+
}
|
59
|
+
nav > ul > li > a {
|
60
|
+
cursor: pointer;
|
61
|
+
display: block;
|
62
|
+
outline: none;
|
63
|
+
width: 100%;
|
64
|
+
text-decoration: none;
|
65
|
+
}
|
66
|
+
|
67
|
+
nav > ul > li {
|
68
|
+
float: left;
|
69
|
+
list-style:none;
|
70
|
+
|
71
|
+
}
|
72
|
+
// nav a {
|
73
|
+
// color: white;
|
74
|
+
// }
|
75
|
+
nav > ul li ul {
|
76
|
+
display: none;
|
77
|
+
position: absolute;
|
78
|
+
left: 0;
|
79
|
+
top: 100%;
|
80
|
+
width: 100%;
|
81
|
+
z-index: 2000;
|
82
|
+
}
|
83
|
+
nav > ul li ul li > a {
|
84
|
+
text-decoration: none;
|
85
|
+
}
|
86
|
+
|
87
|
+
[type="checkbox"], label {
|
88
|
+
display: none;
|
89
|
+
}
|
90
|
+
|
91
|
+
@media screen and (max-width: 800px) {
|
92
|
+
nav ul {
|
93
|
+
display: none;
|
94
|
+
padding:0;
|
95
|
+
}
|
96
|
+
|
97
|
+
label {
|
98
|
+
display: block;
|
99
|
+
//background: #222;
|
100
|
+
width: 40px;
|
101
|
+
height: 40px;
|
102
|
+
cursor: pointer;
|
103
|
+
position: absolute;
|
104
|
+
right: 0px;
|
105
|
+
top: 0px;
|
106
|
+
@include rounded(0,0,0,5px);
|
107
|
+
}
|
108
|
+
|
109
|
+
label:after{
|
110
|
+
content:'';
|
111
|
+
display: block;
|
112
|
+
width: 30px;
|
113
|
+
height: 5px;
|
114
|
+
background: $colLinks;
|
115
|
+
margin: 7px 5px;
|
116
|
+
box-shadow: 0px 10px 0px $colLinks, 0px 20px 0px $colLinks
|
117
|
+
}
|
118
|
+
|
119
|
+
[type="checkbox"]:checked ~ ul {
|
120
|
+
display: block;
|
121
|
+
z-index: 9999;
|
122
|
+
position: absolute;
|
123
|
+
right: -20px;
|
124
|
+
left: -20px;
|
125
|
+
top:20px;
|
126
|
+
}
|
127
|
+
|
128
|
+
nav a {
|
129
|
+
color: #777;
|
130
|
+
}
|
131
|
+
|
132
|
+
nav ul li {
|
133
|
+
display: block;
|
134
|
+
float: none;
|
135
|
+
width: 100%;
|
136
|
+
text-align: left;
|
137
|
+
//background: #222;
|
138
|
+
text-indent: 40px;
|
139
|
+
}
|
140
|
+
|
141
|
+
nav > ul > li {
|
142
|
+
margin-left: 0px;
|
143
|
+
}
|
144
|
+
|
145
|
+
nav > ul li ul li {
|
146
|
+
display: block;
|
147
|
+
float: none;
|
148
|
+
list-style:none;
|
149
|
+
}
|
150
|
+
|
151
|
+
nav > ul li ul {
|
152
|
+
display: block;
|
153
|
+
position: relative;
|
154
|
+
width: 100%;
|
155
|
+
z-index: 9999;
|
156
|
+
float: none;
|
157
|
+
}
|
158
|
+
}
|
data/_sass/_mixins.scss
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
|
2
|
+
@mixin shadow(){
|
3
|
+
-webkit-box-shadow: 0px 0px 5px $colGrey;
|
4
|
+
box-shadow: 0px 0px 5px $colGrey;
|
5
|
+
}
|
6
|
+
|
7
|
+
@mixin rounded($topl : 5px,$topr : 5px, $botr : 5px, $botl : 5px ){
|
8
|
+
-webkit-border-radius:$topl $topr $botr $botl ;
|
9
|
+
border-radius: $topl $topr $botr $botl;
|
10
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/**
|
2
|
+
* created with typescale.com
|
3
|
+
* http://type-scale.com/?size=16&scale=1.200&text=OU%20Akupunktur&webfont=Open%20Sans&font-family=%27Open%20Sans%27%2C%20sans-serif&font-weight=800&font-family-headers=&font-weight-headers=inherit&background-color=white&font-color=%23333
|
4
|
+
*
|
5
|
+
*/
|
6
|
+
html {font-size: 1em;}
|
7
|
+
|
8
|
+
body {
|
9
|
+
background-color: white;
|
10
|
+
font-family: 'Open Sans', 'Georgia', sans-serif;
|
11
|
+
font-weight: 300;
|
12
|
+
line-height: 1.45;
|
13
|
+
color: #333;
|
14
|
+
}
|
15
|
+
|
16
|
+
p {margin-bottom: 1.3em;}
|
17
|
+
|
18
|
+
h1, h2, h3, h4 {
|
19
|
+
margin: 1.414em 0 0.5em;
|
20
|
+
font-weight: inherit;
|
21
|
+
line-height: 1.2;
|
22
|
+
}
|
23
|
+
|
24
|
+
h1 {
|
25
|
+
margin-top: 0;
|
26
|
+
font-size: 2.074em;
|
27
|
+
}
|
28
|
+
|
29
|
+
h2 {font-size: 1.728em;}
|
30
|
+
|
31
|
+
h3 {font-size: 1.44em;}
|
32
|
+
|
33
|
+
h4 {font-size: 1.2em;}
|
34
|
+
|
35
|
+
small, .font_small {font-size: 0.833em;}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
@import 'typescale', 'fonts', 'menu';
|
2
|
+
|
3
|
+
/*css taken from http://jgthms.com/web-design-in-4-minutes/*/
|
4
|
+
body {
|
5
|
+
margin: 0 auto;
|
6
|
+
max-width: 50em;
|
7
|
+
}
|
8
|
+
body {
|
9
|
+
font-family: "Georgia", serif;
|
10
|
+
}
|
11
|
+
|
12
|
+
body {
|
13
|
+
/* top | right | bottom | left */
|
14
|
+
padding: 0em 0em 4em 0em;
|
15
|
+
// padding: 4em 1em;
|
16
|
+
}
|
17
|
+
|
18
|
+
#main{
|
19
|
+
padding: 4em 1em;
|
20
|
+
|
21
|
+
}
|
22
|
+
h2 {
|
23
|
+
margin-top: 1em;
|
24
|
+
padding-top: 1em;
|
25
|
+
}
|
26
|
+
|
27
|
+
body {
|
28
|
+
color: #555;
|
29
|
+
}
|
30
|
+
|
31
|
+
h1,
|
32
|
+
h2,
|
33
|
+
strong {
|
34
|
+
color: #333;
|
35
|
+
}
|
36
|
+
|
37
|
+
code,
|
38
|
+
pre {
|
39
|
+
background: #eee;
|
40
|
+
}
|
41
|
+
|
42
|
+
code {
|
43
|
+
padding: 2px 4px;
|
44
|
+
vertical-align: text-bottom;
|
45
|
+
}
|
46
|
+
|
47
|
+
pre {
|
48
|
+
padding: 1em;
|
49
|
+
}
|
50
|
+
|
51
|
+
a {
|
52
|
+
color: #e81c4f;
|
53
|
+
}
|
54
|
+
|
55
|
+
body {
|
56
|
+
color: #566b78;
|
57
|
+
}
|
58
|
+
|
59
|
+
code,
|
60
|
+
pre {
|
61
|
+
background: #f5f7f9;
|
62
|
+
/*border-bottom: 1px solid #d8dee9;*/
|
63
|
+
color: #a7adba;
|
64
|
+
}
|
65
|
+
|
66
|
+
pre {
|
67
|
+
border-left: 2px solid #69c;
|
68
|
+
}
|
data/_sass/palette.scss
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
/* Coolors Exported Palette - coolors.co/5603ad-8367c7-b3e9c7-c2f8cb-f0fff1 */
|
2
|
+
|
3
|
+
/* HSL */
|
4
|
+
$color1: hsla(269%, 97%, 35%, 1);
|
5
|
+
$color2: hsla(258%, 46%, 59%, 1);
|
6
|
+
$color3: hsla(142%, 55%, 81%, 1);
|
7
|
+
$color4: hsla(130%, 79%, 87%, 1);
|
8
|
+
$color5: hsla(124%, 100%, 97%, 1);
|
9
|
+
|
10
|
+
/* RGB */
|
11
|
+
$color1: rgba(86, 3, 173, 1);
|
12
|
+
$color2: rgba(131, 103, 199, 1);
|
13
|
+
$color3: rgba(179, 233, 199, 1);
|
14
|
+
$color4: rgba(194, 248, 203, 1);
|
15
|
+
$color5: rgba(240, 255, 241, 1);
|
data/assets/js/easing.js
ADDED
data/assets/js/index.js
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
/* global document */
|
2
|
+
import jump from 'jump.js';
|
3
|
+
|
4
|
+
// import easeInOutQuad from './easing';
|
5
|
+
|
6
|
+
import * as ez from 'ez.js';
|
7
|
+
|
8
|
+
import easeInOutQuint from 'ez.js';
|
9
|
+
|
10
|
+
for (const key of Object.keys(ez)) {
|
11
|
+
|
12
|
+
console.log("key", key);
|
13
|
+
console.log(ez[key](100, 0, 10, 1000));
|
14
|
+
}
|
15
|
+
|
16
|
+
const ready = require('document-ready');
|
17
|
+
|
18
|
+
ready(() => {
|
19
|
+
console.log('DOM is ready');
|
20
|
+
// We get all h2 elements
|
21
|
+
const list = document.getElementsByClassName('jump-link');
|
22
|
+
// Get the menu ul
|
23
|
+
const menuList = document.getElementById('menu-list');
|
24
|
+
if (list.length > 0) {
|
25
|
+
for (let i = 0; i < list.length; i++) {
|
26
|
+
const element = list.item(i); // Isolate
|
27
|
+
let target = element.getAttribute('href');
|
28
|
+
console.log(target);
|
29
|
+
element.addEventListener('click', e => {
|
30
|
+
e.preventDefault();
|
31
|
+
jump(target, {
|
32
|
+
duration: 1500,
|
33
|
+
callback: () => {
|
34
|
+
console.log('did the jump!');
|
35
|
+
},
|
36
|
+
easing: easeInOutQuint,
|
37
|
+
a11y: false
|
38
|
+
}) }, false);
|
39
|
+
}
|
40
|
+
}
|
41
|
+
});
|
@@ -0,0 +1,524 @@
|
|
1
|
+
/******/ (function(modules) { // webpackBootstrap
|
2
|
+
/******/ // The module cache
|
3
|
+
/******/ var installedModules = {};
|
4
|
+
/******/
|
5
|
+
/******/ // The require function
|
6
|
+
/******/ function __webpack_require__(moduleId) {
|
7
|
+
/******/
|
8
|
+
/******/ // Check if module is in cache
|
9
|
+
/******/ if(installedModules[moduleId]) {
|
10
|
+
/******/ return installedModules[moduleId].exports;
|
11
|
+
/******/ }
|
12
|
+
/******/ // Create a new module (and put it into the cache)
|
13
|
+
/******/ var module = installedModules[moduleId] = {
|
14
|
+
/******/ i: moduleId,
|
15
|
+
/******/ l: false,
|
16
|
+
/******/ exports: {}
|
17
|
+
/******/ };
|
18
|
+
/******/
|
19
|
+
/******/ // Execute the module function
|
20
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21
|
+
/******/
|
22
|
+
/******/ // Flag the module as loaded
|
23
|
+
/******/ module.l = true;
|
24
|
+
/******/
|
25
|
+
/******/ // Return the exports of the module
|
26
|
+
/******/ return module.exports;
|
27
|
+
/******/ }
|
28
|
+
/******/
|
29
|
+
/******/
|
30
|
+
/******/ // expose the modules object (__webpack_modules__)
|
31
|
+
/******/ __webpack_require__.m = modules;
|
32
|
+
/******/
|
33
|
+
/******/ // expose the module cache
|
34
|
+
/******/ __webpack_require__.c = installedModules;
|
35
|
+
/******/
|
36
|
+
/******/ // define getter function for harmony exports
|
37
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39
|
+
/******/ Object.defineProperty(exports, name, {
|
40
|
+
/******/ configurable: false,
|
41
|
+
/******/ enumerable: true,
|
42
|
+
/******/ get: getter
|
43
|
+
/******/ });
|
44
|
+
/******/ }
|
45
|
+
/******/ };
|
46
|
+
/******/
|
47
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
48
|
+
/******/ __webpack_require__.n = function(module) {
|
49
|
+
/******/ var getter = module && module.__esModule ?
|
50
|
+
/******/ function getDefault() { return module['default']; } :
|
51
|
+
/******/ function getModuleExports() { return module; };
|
52
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
53
|
+
/******/ return getter;
|
54
|
+
/******/ };
|
55
|
+
/******/
|
56
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
57
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
58
|
+
/******/
|
59
|
+
/******/ // __webpack_public_path__
|
60
|
+
/******/ __webpack_require__.p = "";
|
61
|
+
/******/
|
62
|
+
/******/ // Load entry module and return exports
|
63
|
+
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
64
|
+
/******/ })
|
65
|
+
/************************************************************************/
|
66
|
+
/******/ ([
|
67
|
+
/* 0 */
|
68
|
+
/***/ (function(module, exports, __webpack_require__) {
|
69
|
+
|
70
|
+
var require;var require;(function(f){if(true){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Ez = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
71
|
+
"use strict";
|
72
|
+
|
73
|
+
Object.defineProperty(exports, "__esModule", {
|
74
|
+
value: true
|
75
|
+
});
|
76
|
+
exports.easeInQuad = easeInQuad;
|
77
|
+
exports.easeOutQuad = easeOutQuad;
|
78
|
+
exports.easeInOutQuad = easeInOutQuad;
|
79
|
+
exports.easeInCubic = easeInCubic;
|
80
|
+
exports.easeOutCubic = easeOutCubic;
|
81
|
+
exports.easeInOutCubic = easeInOutCubic;
|
82
|
+
exports.easeInQuart = easeInQuart;
|
83
|
+
exports.easeOutQuart = easeOutQuart;
|
84
|
+
exports.easeInOutQuart = easeInOutQuart;
|
85
|
+
exports.easeInQuint = easeInQuint;
|
86
|
+
exports.easeOutQuint = easeOutQuint;
|
87
|
+
exports.easeInOutQuint = easeInOutQuint;
|
88
|
+
exports.easeInSine = easeInSine;
|
89
|
+
exports.easeOutSine = easeOutSine;
|
90
|
+
exports.easeInOutSine = easeInOutSine;
|
91
|
+
exports.easeInExpo = easeInExpo;
|
92
|
+
exports.easeOutExpo = easeOutExpo;
|
93
|
+
exports.easeInOutExpo = easeInOutExpo;
|
94
|
+
exports.easeInCirc = easeInCirc;
|
95
|
+
exports.easeOutCirc = easeOutCirc;
|
96
|
+
exports.easeInOutCirc = easeInOutCirc;
|
97
|
+
exports.easeInElastic = easeInElastic;
|
98
|
+
exports.easeOutElastic = easeOutElastic;
|
99
|
+
exports.easeInOutElastic = easeInOutElastic;
|
100
|
+
exports.easeInBack = easeInBack;
|
101
|
+
exports.easeOutBack = easeOutBack;
|
102
|
+
exports.easeInOutBack = easeInOutBack;
|
103
|
+
exports.easeInBounce = easeInBounce;
|
104
|
+
exports.easeOutBounce = easeOutBounce;
|
105
|
+
exports.easeInOutBounce = easeInOutBounce;
|
106
|
+
|
107
|
+
function easeInQuad(t, b, c, d) {
|
108
|
+
return c * (t /= d) * t + b;
|
109
|
+
}
|
110
|
+
|
111
|
+
function easeOutQuad(t, b, c, d) {
|
112
|
+
return -c * (t /= d) * (t - 2) + b;
|
113
|
+
}
|
114
|
+
|
115
|
+
function easeInOutQuad(t, b, c, d) {
|
116
|
+
if ((t /= d / 2) < 1) return c / 2 * t * t + b;
|
117
|
+
return -c / 2 * (--t * (t - 2) - 1) + b;
|
118
|
+
}
|
119
|
+
|
120
|
+
function easeInCubic(t, b, c, d) {
|
121
|
+
return c * (t /= d) * t * t + b;
|
122
|
+
}
|
123
|
+
|
124
|
+
function easeOutCubic(t, b, c, d) {
|
125
|
+
return c * ((t = t / d - 1) * t * t + 1) + b;
|
126
|
+
}
|
127
|
+
|
128
|
+
function easeInOutCubic(t, b, c, d) {
|
129
|
+
if ((t /= d / 2) < 1) return c / 2 * t * t * t + b;
|
130
|
+
return c / 2 * ((t -= 2) * t * t + 2) + b;
|
131
|
+
}
|
132
|
+
|
133
|
+
function easeInQuart(t, b, c, d) {
|
134
|
+
return c * (t /= d) * t * t * t + b;
|
135
|
+
}
|
136
|
+
|
137
|
+
function easeOutQuart(t, b, c, d) {
|
138
|
+
return -c * ((t = t / d - 1) * t * t * t - 1) + b;
|
139
|
+
}
|
140
|
+
|
141
|
+
function easeInOutQuart(t, b, c, d) {
|
142
|
+
if ((t /= d / 2) < 1) return c / 2 * t * t * t * t + b;
|
143
|
+
return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
|
144
|
+
}
|
145
|
+
|
146
|
+
function easeInQuint(t, b, c, d) {
|
147
|
+
return c * (t /= d) * t * t * t * t + b;
|
148
|
+
}
|
149
|
+
|
150
|
+
function easeOutQuint(t, b, c, d) {
|
151
|
+
return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
|
152
|
+
}
|
153
|
+
|
154
|
+
function easeInOutQuint(t, b, c, d) {
|
155
|
+
if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b;
|
156
|
+
return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
|
157
|
+
}
|
158
|
+
|
159
|
+
function easeInSine(t, b, c, d) {
|
160
|
+
return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
|
161
|
+
}
|
162
|
+
|
163
|
+
function easeOutSine(t, b, c, d) {
|
164
|
+
return c * Math.sin(t / d * (Math.PI / 2)) + b;
|
165
|
+
}
|
166
|
+
|
167
|
+
function easeInOutSine(t, b, c, d) {
|
168
|
+
return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
|
169
|
+
}
|
170
|
+
|
171
|
+
function easeInExpo(t, b, c, d) {
|
172
|
+
return t == 0 ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
|
173
|
+
}
|
174
|
+
|
175
|
+
function easeOutExpo(t, b, c, d) {
|
176
|
+
return t == d ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;
|
177
|
+
}
|
178
|
+
|
179
|
+
function easeInOutExpo(t, b, c, d) {
|
180
|
+
if (t == 0) return b;
|
181
|
+
if (t == d) return b + c;
|
182
|
+
if ((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
|
183
|
+
return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
184
|
+
}
|
185
|
+
|
186
|
+
function easeInCirc(t, b, c, d) {
|
187
|
+
return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;
|
188
|
+
}
|
189
|
+
|
190
|
+
function easeOutCirc(t, b, c, d) {
|
191
|
+
return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;
|
192
|
+
}
|
193
|
+
|
194
|
+
function easeInOutCirc(t, b, c, d) {
|
195
|
+
if ((t /= d / 2) < 1) return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
|
196
|
+
return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
|
197
|
+
}
|
198
|
+
|
199
|
+
function easeInElastic(t, b, c, d) {
|
200
|
+
var s = 1.70158;var p = 0;var a = c;
|
201
|
+
if (t == 0) return b;if ((t /= d) == 1) return b + c;if (!p) p = d * .3;
|
202
|
+
|
203
|
+
if (a < Math.abs(c)) {
|
204
|
+
a = c;var s = p / 4;
|
205
|
+
} else var s = p / (2 * Math.PI) * Math.asin(c / a);
|
206
|
+
return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
|
207
|
+
}
|
208
|
+
|
209
|
+
function easeOutElastic(t, b, c, d) {
|
210
|
+
var s = 1.70158;var p = 0;var a = c;
|
211
|
+
if (t == 0) return b;if ((t /= d) == 1) return b + c;if (!p) p = d * .3;
|
212
|
+
|
213
|
+
if (a < Math.abs(c)) {
|
214
|
+
a = c;var s = p / 4;
|
215
|
+
} else var s = p / (2 * Math.PI) * Math.asin(c / a);
|
216
|
+
return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
|
217
|
+
}
|
218
|
+
|
219
|
+
function easeInOutElastic(t, b, c, d) {
|
220
|
+
var s = 1.70158;var p = 0;var a = c;
|
221
|
+
if (t == 0) return b;if ((t /= d / 2) == 2) return b + c;if (!p) p = d * (.3 * 1.5);
|
222
|
+
|
223
|
+
if (a < Math.abs(c)) {
|
224
|
+
a = c;var s = p / 4;
|
225
|
+
} else var s = p / (2 * Math.PI) * Math.asin(c / a);
|
226
|
+
if (t < 1) return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
|
227
|
+
return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b;
|
228
|
+
}
|
229
|
+
|
230
|
+
function easeInBack(t, b, c, d, s) {
|
231
|
+
if (s == undefined) s = 1.70158;
|
232
|
+
return c * (t /= d) * t * ((s + 1) * t - s) + b;
|
233
|
+
}
|
234
|
+
|
235
|
+
function easeOutBack(t, b, c, d, s) {
|
236
|
+
if (s == undefined) s = 1.70158;
|
237
|
+
return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
|
238
|
+
}
|
239
|
+
|
240
|
+
function easeInOutBack(t, b, c, d, s) {
|
241
|
+
if (s == undefined) s = 1.70158;
|
242
|
+
if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= 1.525) + 1) * t - s)) + b;
|
243
|
+
return c / 2 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + b;
|
244
|
+
}
|
245
|
+
|
246
|
+
function easeInBounce(t, b, c, d) {
|
247
|
+
return c - easeOutBounce(d - t, 0, c, d) + b;
|
248
|
+
}
|
249
|
+
|
250
|
+
function easeOutBounce(t, b, c, d) {
|
251
|
+
|
252
|
+
if ((t /= d) < 1 / 2.75) {
|
253
|
+
return c * (7.5625 * t * t) + b;
|
254
|
+
} else if (t < 2 / 2.75) {
|
255
|
+
return c * (7.5625 * (t -= 1.5 / 2.75) * t + .75) + b;
|
256
|
+
} else if (t < 2.5 / 2.75) {
|
257
|
+
return c * (7.5625 * (t -= 2.25 / 2.75) * t + .9375) + b;
|
258
|
+
} else {
|
259
|
+
return c * (7.5625 * (t -= 2.625 / 2.75) * t + .984375) + b;
|
260
|
+
}
|
261
|
+
}
|
262
|
+
|
263
|
+
function easeInOutBounce(t, b, c, d) {
|
264
|
+
if (t < d / 2) return easeInBounce(t * 2, 0, c, d) * .5 + b;
|
265
|
+
return easeOutBounce(t * 2 - d, 0, c, d) * .5 + c * .5 + b;
|
266
|
+
}
|
267
|
+
|
268
|
+
},{}]},{},[1])(1)
|
269
|
+
});
|
270
|
+
|
271
|
+
/***/ }),
|
272
|
+
/* 1 */
|
273
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
274
|
+
|
275
|
+
"use strict";
|
276
|
+
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
277
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jump_js__ = __webpack_require__(2);
|
278
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ez_js__ = __webpack_require__(0);
|
279
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ez_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_ez_js__);
|
280
|
+
/* global document */
|
281
|
+
|
282
|
+
|
283
|
+
// import easeInOutQuad from './easing';
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
for (const key of Object.keys(__WEBPACK_IMPORTED_MODULE_1_ez_js__)) {
|
290
|
+
|
291
|
+
console.log("key", key);
|
292
|
+
console.log(__WEBPACK_IMPORTED_MODULE_1_ez_js__[key](100, 0, 10, 1000));
|
293
|
+
}
|
294
|
+
|
295
|
+
const ready = __webpack_require__(3);
|
296
|
+
|
297
|
+
ready(() => {
|
298
|
+
console.log('DOM is ready');
|
299
|
+
// We get all h2 elements
|
300
|
+
const list = document.getElementsByClassName('jump-link');
|
301
|
+
// Get the menu ul
|
302
|
+
const menuList = document.getElementById('menu-list');
|
303
|
+
if (list.length > 0) {
|
304
|
+
for (let i = 0; i < list.length; i++) {
|
305
|
+
const element = list.item(i); // Isolate
|
306
|
+
let target = element.getAttribute('href');
|
307
|
+
console.log(target);
|
308
|
+
element.addEventListener('click', e => {
|
309
|
+
e.preventDefault();
|
310
|
+
Object(__WEBPACK_IMPORTED_MODULE_0_jump_js__["a" /* default */])(target, {
|
311
|
+
duration: 1500,
|
312
|
+
callback: () => {
|
313
|
+
console.log('did the jump!');
|
314
|
+
},
|
315
|
+
easing: __WEBPACK_IMPORTED_MODULE_1_ez_js___default.a,
|
316
|
+
a11y: false
|
317
|
+
}) }, false);
|
318
|
+
}
|
319
|
+
}
|
320
|
+
});
|
321
|
+
|
322
|
+
/***/ }),
|
323
|
+
/* 2 */
|
324
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
325
|
+
|
326
|
+
"use strict";
|
327
|
+
// Robert Penner's easeInOutQuad
|
328
|
+
|
329
|
+
// find the rest of his easing functions here: http://robertpenner.com/easing/
|
330
|
+
// find them exported for ES6 consumption here: https://github.com/jaxgeller/ez.js
|
331
|
+
|
332
|
+
var easeInOutQuad = function easeInOutQuad(t, b, c, d) {
|
333
|
+
t /= d / 2;
|
334
|
+
if (t < 1) return c / 2 * t * t + b;
|
335
|
+
t--;
|
336
|
+
return -c / 2 * (t * (t - 2) - 1) + b;
|
337
|
+
};
|
338
|
+
|
339
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
340
|
+
return typeof obj;
|
341
|
+
} : function (obj) {
|
342
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
343
|
+
};
|
344
|
+
|
345
|
+
var jumper = function jumper() {
|
346
|
+
// private variable cache
|
347
|
+
// no variables are created during a jump, preventing memory leaks
|
348
|
+
|
349
|
+
var element = void 0; // element to scroll to (node)
|
350
|
+
|
351
|
+
var start = void 0; // where scroll starts (px)
|
352
|
+
var stop = void 0; // where scroll stops (px)
|
353
|
+
|
354
|
+
var offset = void 0; // adjustment from the stop position (px)
|
355
|
+
var easing = void 0; // easing function (function)
|
356
|
+
var a11y = void 0; // accessibility support flag (boolean)
|
357
|
+
|
358
|
+
var distance = void 0; // distance of scroll (px)
|
359
|
+
var duration = void 0; // scroll duration (ms)
|
360
|
+
|
361
|
+
var timeStart = void 0; // time scroll started (ms)
|
362
|
+
var timeElapsed = void 0; // time spent scrolling thus far (ms)
|
363
|
+
|
364
|
+
var next = void 0; // next scroll position (px)
|
365
|
+
|
366
|
+
var callback = void 0; // to call when done scrolling (function)
|
367
|
+
|
368
|
+
// scroll position helper
|
369
|
+
|
370
|
+
function location() {
|
371
|
+
return window.scrollY || window.pageYOffset;
|
372
|
+
}
|
373
|
+
|
374
|
+
// element offset helper
|
375
|
+
|
376
|
+
function top(element) {
|
377
|
+
return element.getBoundingClientRect().top + start;
|
378
|
+
}
|
379
|
+
|
380
|
+
// rAF loop helper
|
381
|
+
|
382
|
+
function loop(timeCurrent) {
|
383
|
+
// store time scroll started, if not started already
|
384
|
+
if (!timeStart) {
|
385
|
+
timeStart = timeCurrent;
|
386
|
+
}
|
387
|
+
|
388
|
+
// determine time spent scrolling so far
|
389
|
+
timeElapsed = timeCurrent - timeStart;
|
390
|
+
|
391
|
+
// calculate next scroll position
|
392
|
+
next = easing(timeElapsed, start, distance, duration);
|
393
|
+
|
394
|
+
// scroll to it
|
395
|
+
window.scrollTo(0, next);
|
396
|
+
|
397
|
+
// check progress
|
398
|
+
timeElapsed < duration ? window.requestAnimationFrame(loop) // continue scroll loop
|
399
|
+
: done(); // scrolling is done
|
400
|
+
}
|
401
|
+
|
402
|
+
// scroll finished helper
|
403
|
+
|
404
|
+
function done() {
|
405
|
+
// account for rAF time rounding inaccuracies
|
406
|
+
window.scrollTo(0, start + distance);
|
407
|
+
|
408
|
+
// if scrolling to an element, and accessibility is enabled
|
409
|
+
if (element && a11y) {
|
410
|
+
// add tabindex indicating programmatic focus
|
411
|
+
element.setAttribute('tabindex', '-1');
|
412
|
+
|
413
|
+
// focus the element
|
414
|
+
element.focus();
|
415
|
+
}
|
416
|
+
|
417
|
+
// if it exists, fire the callback
|
418
|
+
if (typeof callback === 'function') {
|
419
|
+
callback();
|
420
|
+
}
|
421
|
+
|
422
|
+
// reset time for next jump
|
423
|
+
timeStart = false;
|
424
|
+
}
|
425
|
+
|
426
|
+
// API
|
427
|
+
|
428
|
+
function jump(target) {
|
429
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
430
|
+
|
431
|
+
// resolve options, or use defaults
|
432
|
+
duration = options.duration || 1000;
|
433
|
+
offset = options.offset || 0;
|
434
|
+
callback = options.callback; // "undefined" is a suitable default, and won't be called
|
435
|
+
easing = options.easing || easeInOutQuad;
|
436
|
+
a11y = options.a11y || false;
|
437
|
+
|
438
|
+
// cache starting position
|
439
|
+
start = location();
|
440
|
+
|
441
|
+
// resolve target
|
442
|
+
switch (typeof target === 'undefined' ? 'undefined' : _typeof(target)) {
|
443
|
+
// scroll from current position
|
444
|
+
case 'number':
|
445
|
+
element = undefined; // no element to scroll to
|
446
|
+
a11y = false; // make sure accessibility is off
|
447
|
+
stop = start + target;
|
448
|
+
break;
|
449
|
+
|
450
|
+
// scroll to element (node)
|
451
|
+
// bounding rect is relative to the viewport
|
452
|
+
case 'object':
|
453
|
+
element = target;
|
454
|
+
stop = top(element);
|
455
|
+
break;
|
456
|
+
|
457
|
+
// scroll to element (selector)
|
458
|
+
// bounding rect is relative to the viewport
|
459
|
+
case 'string':
|
460
|
+
element = document.querySelector(target);
|
461
|
+
stop = top(element);
|
462
|
+
break;
|
463
|
+
}
|
464
|
+
|
465
|
+
// resolve scroll distance, accounting for offset
|
466
|
+
distance = stop - start + offset;
|
467
|
+
|
468
|
+
// resolve duration
|
469
|
+
switch (_typeof(options.duration)) {
|
470
|
+
// number in ms
|
471
|
+
case 'number':
|
472
|
+
duration = options.duration;
|
473
|
+
break;
|
474
|
+
|
475
|
+
// function passed the distance of the scroll
|
476
|
+
case 'function':
|
477
|
+
duration = options.duration(distance);
|
478
|
+
break;
|
479
|
+
}
|
480
|
+
|
481
|
+
// start the loop
|
482
|
+
window.requestAnimationFrame(loop);
|
483
|
+
}
|
484
|
+
|
485
|
+
// expose only the jump method
|
486
|
+
return jump;
|
487
|
+
};
|
488
|
+
|
489
|
+
// export singleton
|
490
|
+
|
491
|
+
var singleton = jumper();
|
492
|
+
|
493
|
+
/* harmony default export */ __webpack_exports__["a"] = (singleton);
|
494
|
+
|
495
|
+
|
496
|
+
/***/ }),
|
497
|
+
/* 3 */
|
498
|
+
/***/ (function(module, exports, __webpack_require__) {
|
499
|
+
|
500
|
+
"use strict";
|
501
|
+
/* global document */
|
502
|
+
/* eslint-disable no-undef */
|
503
|
+
|
504
|
+
|
505
|
+
function ready(callback) {
|
506
|
+
if (typeof document === undefined) {
|
507
|
+
console.log('document-ready only runs in the browser');
|
508
|
+
return;
|
509
|
+
}
|
510
|
+
const state = document.readyState;
|
511
|
+
if (state === 'complete' || state === 'interactive') {
|
512
|
+
return setTimeout(callback, 0);
|
513
|
+
}
|
514
|
+
|
515
|
+
document.addEventListener('DOMContentLoaded', () => {
|
516
|
+
callback();
|
517
|
+
});
|
518
|
+
}
|
519
|
+
|
520
|
+
module.exports = ready;
|
521
|
+
|
522
|
+
|
523
|
+
/***/ })
|
524
|
+
/******/ ]);
|
metadata
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-theme-tou-dai
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- fabianmoronzirfas
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-10-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jekyll
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.6'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: jekyll-nav-gen
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.0.5
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.0.5
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: jekyll-tidy
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.2.2
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.2.2
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.12'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.12'
|
69
|
+
description:
|
70
|
+
email:
|
71
|
+
- fabian.moron.zirfas@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- LICENSE.txt
|
77
|
+
- README.md
|
78
|
+
- _includes/header.html
|
79
|
+
- _layouts/default.html
|
80
|
+
- _layouts/plain.txt
|
81
|
+
- _sass/_colors.scss
|
82
|
+
- _sass/_fonts.scss
|
83
|
+
- _sass/_menu.scss
|
84
|
+
- _sass/_mixins.scss
|
85
|
+
- _sass/_typescale.scss
|
86
|
+
- _sass/jekyll-theme-tou-dai.scss
|
87
|
+
- _sass/palette.scss
|
88
|
+
- assets/css/main.scss
|
89
|
+
- assets/js/easing.js
|
90
|
+
- assets/js/index.js
|
91
|
+
- assets/js/main.bundle.js
|
92
|
+
homepage: https://fabianmoronzirfas.me
|
93
|
+
licenses:
|
94
|
+
- MIT
|
95
|
+
metadata: {}
|
96
|
+
post_install_message:
|
97
|
+
rdoc_options: []
|
98
|
+
require_paths:
|
99
|
+
- lib
|
100
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
requirements: []
|
111
|
+
rubyforge_project:
|
112
|
+
rubygems_version: 2.6.13
|
113
|
+
signing_key:
|
114
|
+
specification_version: 4
|
115
|
+
summary: A pretty simple theme. For me...
|
116
|
+
test_files: []
|