jasper2 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +113 -0
- data/_data/authors.yml +76 -0
- data/_data/tags.yml +16 -0
- data/_includes/analytics.html +11 -0
- data/_includes/author_pagination.html +13 -0
- data/_includes/dynamic_tag_info.html +8 -0
- data/_includes/dynamic_title.html +16 -0
- data/_includes/facebook.html +1 -0
- data/_includes/floating-header.html +28 -0
- data/_includes/ghost-logo.html +1 -0
- data/_includes/head.html +69 -0
- data/_includes/infinity.html +1 -0
- data/_includes/location.html +1 -0
- data/_includes/navigation.html +6 -0
- data/_includes/page-scripts.html +6 -0
- data/_includes/point.html +3 -0
- data/_includes/post-card-error.html +59 -0
- data/_includes/post-card-next.html +53 -0
- data/_includes/post-card-previous.html +53 -0
- data/_includes/post-card.html +55 -0
- data/_includes/post-scripts.html +63 -0
- data/_includes/post_pagination.html +13 -0
- data/_includes/rss.html +1 -0
- data/_includes/site-nav.html +27 -0
- data/_includes/subscribe-form.html +9 -0
- data/_includes/tag_pagination.html +13 -0
- data/_includes/twitter.html +1 -0
- data/_includes/website.html +1 -0
- data/_layouts/author.html +64 -0
- data/_layouts/default.html +139 -0
- data/_layouts/error.html +1 -0
- data/_layouts/feed.xml +113 -0
- data/_layouts/page.html +48 -0
- data/_layouts/post.html +196 -0
- data/_layouts/tag.html +42 -0
- data/_plugins/jekyll-autgenerator.rb +76 -0
- data/_plugins/jekyll-capitalize-all.rb +11 -0
- data/_plugins/jekyll-tagsgenerator.rb +70 -0
- data/_posts/1863-11-19-gettysburg-address.md +18 -0
- data/_posts/1865-11-26-down-the-rabbit-hole.md +62 -0
- data/_posts/1871-03-18-looking-glass-house.md +41 -0
- data/_posts/1912-07-24-out-to-sea.md +88 -0
- data/_posts/1948-12-12-the-purpose-of-education.md +26 -0
- data/_posts/1963-08-28-i-have-a-dream.md +103 -0
- data/_posts/2012-09-01-a-full-and-comprehensive-style-test.html +424 -0
- data/_posts/2014-08-12-the-businessman-and-fisherman.md +48 -0
- data/_posts/2017-07-27-advanced-markdown.html +57 -0
- data/_posts/2017-07-27-managing-users.html +24 -0
- data/_posts/2017-07-27-private-sites.html +19 -0
- data/_posts/2017-07-27-the-editor.html +55 -0
- data/_posts/2017-07-27-themes.html +30 -0
- data/_posts/2017-07-27-using-tags.html +41 -0
- data/_posts/2017-07-27-welcome.md +28 -0
- data/about/index.md +17 -0
- data/assets/built/global.css +2 -0
- data/assets/built/global.css.map +1 -0
- data/assets/built/screen.css +2 -0
- data/assets/built/screen.css.map +1 -0
- data/assets/built/screen.edited.css +2 -0
- data/assets/built/screen.edited.css.map +1 -0
- data/assets/built/syntax.css +2 -0
- data/assets/built/syntax.css.map +1 -0
- data/assets/css/.csscomb.json +237 -0
- data/assets/css/csscomb.json +240 -0
- data/assets/css/global.css +491 -0
- data/assets/css/screen.css +1928 -0
- data/assets/css/screen.edited.css +152 -0
- data/assets/css/syntax.css +66 -0
- data/assets/images/abraham.jpg +0 -0
- data/assets/images/advanced.jpg +0 -0
- data/assets/images/bear.jpg +0 -0
- data/assets/images/blog-cover.jpg +0 -0
- data/assets/images/blog-icon.png +0 -0
- data/assets/images/bus.jpg +0 -0
- data/assets/images/design.jpg +0 -0
- data/assets/images/edgar.gif +0 -0
- data/assets/images/fables.jpg +0 -0
- data/assets/images/favicon.png +0 -0
- data/assets/images/ghost-logo.svg +1 -0
- data/assets/images/ghost.png +0 -0
- data/assets/images/grapes.jpg +0 -0
- data/assets/images/hannah-cover.jpg +0 -0
- data/assets/images/hannah.jpg +0 -0
- data/assets/images/john.jpg +0 -0
- data/assets/images/lewis.jpeg +0 -0
- data/assets/images/locked.jpg +0 -0
- data/assets/images/martin.jpg +0 -0
- data/assets/images/piano.jpg +0 -0
- data/assets/images/sky.jpg +0 -0
- data/assets/images/speeches.jpg +0 -0
- data/assets/images/summit.jpg +0 -0
- data/assets/images/tags.jpg +0 -0
- data/assets/images/team.jpg +0 -0
- data/assets/images/water.jpg +0 -0
- data/assets/images/waves.jpg +0 -0
- data/assets/images/welcome.jpg +0 -0
- data/assets/images/writing.jpg +0 -0
- data/assets/js/infinitescroll.js +83 -0
- data/assets/js/jquery.fitvids.js +89 -0
- data/assets/screenshot-desktop.jpg +0 -0
- data/assets/screenshot-mobile.jpg +0 -0
- metadata +222 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/* Table of Contents
|
|
2
|
+
/* ------------------------------------------------------------
|
|
3
|
+
|
|
4
|
+
This is a development CSS file which is built to a minified
|
|
5
|
+
production stylesheet in assets/built/screen.css
|
|
6
|
+
|
|
7
|
+
12. Pagination
|
|
8
|
+
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/* 12. Pagination - Tools to let you flick between pages
|
|
12
|
+
/* ---------------------------------------------------------- */
|
|
13
|
+
|
|
14
|
+
/* The main wrapper for our pagination links */
|
|
15
|
+
.pagination {
|
|
16
|
+
position: relative;
|
|
17
|
+
width: 80%;
|
|
18
|
+
max-width: 800px;
|
|
19
|
+
margin: 4rem auto;
|
|
20
|
+
font-family: "Open Sans", sans-serif;
|
|
21
|
+
font-size: 1.3rem;
|
|
22
|
+
color: #9EABB3;
|
|
23
|
+
text-align: center;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.pagination a {
|
|
27
|
+
color: #3eb0ef;
|
|
28
|
+
transition: all 0.2s ease;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Push the previous/next links out to the left/right */
|
|
32
|
+
.older-posts,
|
|
33
|
+
.newer-posts {
|
|
34
|
+
position: absolute;
|
|
35
|
+
display: inline-block;
|
|
36
|
+
padding: 0 15px;
|
|
37
|
+
border: #bfc8cd 1px solid;
|
|
38
|
+
text-decoration: none;
|
|
39
|
+
border-radius: 4px;
|
|
40
|
+
transition: border 0.3s ease;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.older-posts {
|
|
44
|
+
right: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.page-number {
|
|
48
|
+
display: inline-block;
|
|
49
|
+
padding: 2px 0;
|
|
50
|
+
min-width: 100px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.newer-posts {
|
|
54
|
+
left: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.older-posts:hover,
|
|
58
|
+
.newer-posts:hover {
|
|
59
|
+
color: #3eb0ef;
|
|
60
|
+
border-color: #98a0a4;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.extra-pagination {
|
|
64
|
+
display: none;
|
|
65
|
+
border-bottom: #EBF2F6 1px solid;
|
|
66
|
+
}
|
|
67
|
+
.extra-pagination:after {
|
|
68
|
+
display: block;
|
|
69
|
+
content: "";
|
|
70
|
+
width: 7px;
|
|
71
|
+
height: 7px;
|
|
72
|
+
border: #E7EEF2 1px solid;
|
|
73
|
+
position: absolute;
|
|
74
|
+
bottom: -5px;
|
|
75
|
+
left: 50%;
|
|
76
|
+
margin-left: -5px;
|
|
77
|
+
background: #FFF;
|
|
78
|
+
border-radius: 100%;
|
|
79
|
+
box-shadow: #FFF 0 0 0 5px;
|
|
80
|
+
}
|
|
81
|
+
.extra-pagination .pagination {
|
|
82
|
+
width: auto;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* On page2+ make all the headers smaller */
|
|
86
|
+
.paged .main-header {
|
|
87
|
+
max-height: 30vh;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* On page2+ show extra pagination controls at the top of post list */
|
|
91
|
+
.paged .extra-pagination {
|
|
92
|
+
display: block;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Every post, on every page, gets this style on its <article> tag */
|
|
96
|
+
.pagination {
|
|
97
|
+
padding-top: 4rem;
|
|
98
|
+
border-top: #bfc8cd 1px solid;
|
|
99
|
+
word-wrap: break-word;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Add a little circle in the middle of the border-bottom on our .post
|
|
103
|
+
just for the lolz and stylepoints. */
|
|
104
|
+
.pagination:before {
|
|
105
|
+
display: block;
|
|
106
|
+
content: "";
|
|
107
|
+
width: 7px;
|
|
108
|
+
height: 7px;
|
|
109
|
+
border: #bfc8cd 1px solid;
|
|
110
|
+
position: absolute;
|
|
111
|
+
top: -5px;
|
|
112
|
+
left: 50%;
|
|
113
|
+
margin-left: -5px;
|
|
114
|
+
background: #f4f8fb;
|
|
115
|
+
border-radius: 100%;
|
|
116
|
+
box-shadow: #f4f8fb 0 0 0 5px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.highlighter-rouge {
|
|
120
|
+
overflow-x: auto;
|
|
121
|
+
max-width: 100%;
|
|
122
|
+
min-width: 100%;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
figure.highlight,
|
|
126
|
+
.highlight pre,
|
|
127
|
+
.highlight code,
|
|
128
|
+
.highlight table,
|
|
129
|
+
.highlight tbody,
|
|
130
|
+
.highlight tr,
|
|
131
|
+
td.code {
|
|
132
|
+
border: none;
|
|
133
|
+
min-width: 100%;
|
|
134
|
+
max-width: 100%;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.highlight table,
|
|
138
|
+
.highlight td pre {
|
|
139
|
+
padding: 0;
|
|
140
|
+
margin: 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.highlight table td {
|
|
144
|
+
border: none;
|
|
145
|
+
margin: none;
|
|
146
|
+
padding: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.highlight table td:first-child,
|
|
150
|
+
.highlight table td:last-child {
|
|
151
|
+
background: none;
|
|
152
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@import "global.css";
|
|
2
|
+
.highlight pre { background: color(var(--darkgrey) l(-3%)); }
|
|
3
|
+
.highlight .hll { background: color(var(--darkgrey) l(-3%)); }
|
|
4
|
+
.highlight .c { color: #75715e } /* Comment */
|
|
5
|
+
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
|
|
6
|
+
.highlight .k { color: #66d9ef } /* Keyword */
|
|
7
|
+
.highlight .l { color: #ae81ff } /* Literal */
|
|
8
|
+
.highlight .n { color: #f8f8f2 } /* Name */
|
|
9
|
+
.highlight .o { color: #f92672 } /* Operator */
|
|
10
|
+
.highlight .p { color: #f8f8f2 } /* Punctuation */
|
|
11
|
+
.highlight .cm { color: #75715e } /* Comment.Multiline */
|
|
12
|
+
.highlight .cp { color: #75715e } /* Comment.Preproc */
|
|
13
|
+
.highlight .c1 { color: #75715e } /* Comment.Single */
|
|
14
|
+
.highlight .cs { color: #75715e } /* Comment.Special */
|
|
15
|
+
.highlight .ge { font-style: italic } /* Generic.Emph */
|
|
16
|
+
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
|
17
|
+
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
|
|
18
|
+
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
|
|
19
|
+
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
|
|
20
|
+
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
|
|
21
|
+
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
|
|
22
|
+
.highlight .kt { color: #66d9ef } /* Keyword.Type */
|
|
23
|
+
.highlight .ld { color: #e6db74 } /* Literal.Date */
|
|
24
|
+
.highlight .m { color: #ae81ff } /* Literal.Number */
|
|
25
|
+
.highlight .s { color: #e6db74 } /* Literal.String */
|
|
26
|
+
.highlight .na { color: #a6e22e } /* Name.Attribute */
|
|
27
|
+
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
|
|
28
|
+
.highlight .nc { color: #a6e22e } /* Name.Class */
|
|
29
|
+
.highlight .no { color: #66d9ef } /* Name.Constant */
|
|
30
|
+
.highlight .nd { color: #a6e22e } /* Name.Decorator */
|
|
31
|
+
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
|
|
32
|
+
.highlight .ne { color: #a6e22e } /* Name.Exception */
|
|
33
|
+
.highlight .nf { color: #a6e22e } /* Name.Function */
|
|
34
|
+
.highlight .nl { color: #f8f8f2 } /* Name.Label */
|
|
35
|
+
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
|
|
36
|
+
.highlight .nx { color: #a6e22e } /* Name.Other */
|
|
37
|
+
.highlight .py { color: #f8f8f2 } /* Name.Property */
|
|
38
|
+
.highlight .nt { color: #f92672 } /* Name.Tag */
|
|
39
|
+
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
|
|
40
|
+
.highlight .ow { color: #f92672 } /* Operator.Word */
|
|
41
|
+
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
|
|
42
|
+
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
|
|
43
|
+
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
|
|
44
|
+
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
|
|
45
|
+
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
|
|
46
|
+
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
|
|
47
|
+
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
|
|
48
|
+
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
|
|
49
|
+
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
|
|
50
|
+
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
|
|
51
|
+
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
|
|
52
|
+
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
|
|
53
|
+
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
|
|
54
|
+
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
|
|
55
|
+
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
|
|
56
|
+
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
|
|
57
|
+
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
|
|
58
|
+
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
|
|
59
|
+
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
|
|
60
|
+
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
|
|
61
|
+
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
|
|
62
|
+
|
|
63
|
+
.highlight .gh { } /* Generic Heading & Diff Header */
|
|
64
|
+
.highlight .gu { color: #75715e; } /* Generic.Subheading & Diff Unified/Comment? */
|
|
65
|
+
.highlight .gd { color: #f92672; } /* Generic.Deleted & Diff Deleted */
|
|
66
|
+
.highlight .gi { color: #a6e22e; } /* Generic.Inserted & Diff Inserted */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg class="ghost-svg" viewBox="0 0 493 161" xmlns="http://www.w3.org/2000/svg"><title>Ghost Logo</title><g fill="none" fill-rule="evenodd"><path d="M328.52 37.36c-27.017 0-40.97 19.323-40.97 43.16 0 23.837 13.61 43.162 40.97 43.162s40.968-19.325 40.968-43.163c0-23.84-13.954-43.16-40.97-43.16zm20.438 43.237c-.02 15.328-5.126 27.743-20.44 27.743-15.312 0-20.42-12.414-20.435-27.743v-.078c.016-15.33 5.124-27.74 20.437-27.74 15.312 0 20.42 12.41 20.438 27.74v.07zM207.553 5.19c0-1.103.885-2.124 1.984-2.282 0 0 13.577-1.95 14.784-2.115 1.37-.187 3.19.798 3.19 2.744v44.236c3.23-3.105 6.79-5.608 10.66-7.515 3.88-1.906 8.43-2.86 13.66-2.86 4.53 0 8.53.776 12.03 2.33 3.5 1.55 6.43 3.73 8.77 6.533 2.34 2.81 4.12 6.16 5.33 10.05 1.21 3.9 1.82 8.19 1.82 12.87v51.35c0 1.1-.89 2-2 2h-15.95c-1.1 0-2-.9-2-1.99V69.18c0-5.118-1.17-9.08-3.51-11.888-2.35-2.804-5.86-4.207-10.544-4.207-3.45 0-6.677.79-9.69 2.37-3.02 1.58-5.87 3.73-8.564 6.46v58.617c0 1.102-.894 2-2.002 2h-15.94c-1.11 0-2.005-.895-2.005-2V5.188zm244.007 95.327v-43.68h-13.482c-1.1 0-1.742-.87-1.443-1.916l3-10.49c.262-.9.942-1.87 2.308-2.07l9.597-1.35 3.508-23.49c.163-1.09 1.18-2.1 2.274-2.26 0 0 9.192-1.31 10.963-1.58 1.673-.25 3.19.97 3.19 2.81v24.52h17.565c1.106 0 2.002.9 2.002 2.01v11.82c0 1.11-.89 2.01-2.002 2.01h-17.566v43.08c0 6.02 3.623 8.32 7.095 8.32 2.12 0 5.02-1.14 7.19-2.16 1.34-.62 3.41-.16 3.95 1.73l2.45 8.65c.3 1.07-.25 2.37-1.23 2.86 0 0-7.29 4.37-17.06 4.37-13.73 0-22.33-8.08-22.33-23.16zm-44.584-47.74c-7.084 0-12.657 2.476-12.657 8.433 0 7.44 12.01 9.606 20.23 12.64 5.49 2.027 20.24 5.98 20.24 22.016 0 19.48-16 27.807-33.06 27.807-17.06 0-25.4-5.465-25.4-5.465-.96-.527-1.5-1.822-1.2-2.89 0 0 2.1-7.52 2.64-9.386.48-1.68 2.41-2.27 3.64-1.792 4.39 1.712 12.32 4.092 21.28 4.092 9.07 0 13.46-2.803 13.46-8.777 0-7.95-12.26-10.38-20.36-12.967-5.59-1.78-20.36-5.93-20.36-23.566 0-17.373 15.08-25.524 31.2-25.524 13.64 0 23.5 4.69 23.5 4.69 1.01.427 1.58 1.635 1.28 2.698l-2.658 9.357c-.488 1.74-1.898 2.537-3.666 1.957-3.89-1.277-11.2-3.322-18.15-3.322zm-210.313-15.28c-6.695.775-11.472 3.962-14.562 6.93-6.06-4.81-14.49-7.106-23.94-7.106-18.95 0-33.76 9.26-33.76 29.43 0 11.58 4.88 19.56 12.62 24.26-5.75 2.75-9.57 8.59-9.57 14.34 0 9.61 7.5 12.61 7.5 12.61s-13.11 6.44-13.11 19.32c0 16.49 15.01 23.16 33.34 23.16 26.43 0 44.61-11.04 44.61-31.31 0-12.47-9.44-19.36-30.01-20.18-12.2-.48-20.11-.93-22.07-1.58-2.59-.87-3.86-2.96-3.86-5.28 0-2.55 2.08-4.98 5.35-6.65 2.86.516 5.87.768 8.99.768 18.97 0 33.76-9.223 33.76-29.425 0-4.897-.87-9.15-2.46-12.78 2.79-1.506 8.34-2.25 8.34-2.25 1.09-.17 1.975-1.21 1.974-2.31V40.3c0-1.88-1.59-2.955-3.1-2.78zm-49.13 85.132s9.954.38 19.9.84c11.172.52 14.654 2.96 14.654 8.81 0 7.15-9.71 14.1-23.28 14.1-12.88 0-19.314-4.54-19.314-12.08 0-4.33 2.26-9.18 8.04-11.69zm10.66-40.54c-8.978 0-15.983-4.83-15.983-15.35 0-10.53 7.01-15.35 15.983-15.35 8.974 0 15.984 4.81 15.984 15.34 0 10.53-7.002 15.34-15.984 15.34z" fill="#2D3134"/><g opacity=".6" transform="translate(0 36)" fill="#2E3134"><rect x=".209" y="69.017" width="33.643" height="17.014" rx="4"/><rect x="50.672" y="69.017" width="33.622" height="17.014" rx="4"/><rect x=".184" y="34.99" width="84.121" height="17.014" rx="4"/><rect x=".209" y=".964" width="50.469" height="17.013" rx="4"/><rect x="67.494" y=".964" width="16.821" height="17.013" rx="4"/></g></g></svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Code snippet inspired by https://github.com/douglasrodrigues5/ghost-blog-infinite-scroll
|
|
2
|
+
$(function ($) {
|
|
3
|
+
var currentPage = 1;
|
|
4
|
+
var pathname = window.location.pathname;
|
|
5
|
+
var $document = $(document);
|
|
6
|
+
var $result = $('.post-feed');
|
|
7
|
+
var buffer = 100;
|
|
8
|
+
|
|
9
|
+
var ticking = false;
|
|
10
|
+
var isLoading = false;
|
|
11
|
+
|
|
12
|
+
var lastScrollY = window.scrollY;
|
|
13
|
+
var lastWindowHeight = window.innerHeight;
|
|
14
|
+
var lastDocumentHeight = $document.height();
|
|
15
|
+
|
|
16
|
+
// remove hash params from pathname
|
|
17
|
+
pathname = pathname.replace(/#(.*)$/g, '').replace('/\//g', '/');
|
|
18
|
+
|
|
19
|
+
function onScroll() {
|
|
20
|
+
lastScrollY = window.scrollY;
|
|
21
|
+
requestTick();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function onResize() {
|
|
25
|
+
lastWindowHeight = window.innerHeight;
|
|
26
|
+
lastDocumentHeight = $document.height();
|
|
27
|
+
requestTick();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function requestTick() {
|
|
31
|
+
if (!ticking) {
|
|
32
|
+
requestAnimationFrame(infiniteScroll)
|
|
33
|
+
}
|
|
34
|
+
ticking = true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function infiniteScroll () {
|
|
38
|
+
// return if already loading
|
|
39
|
+
if (isLoading) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// return if not scroll to the bottom
|
|
44
|
+
if (lastScrollY + lastWindowHeight <= lastDocumentHeight - buffer) {
|
|
45
|
+
ticking = false;
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// return if currentPage is the last page already
|
|
50
|
+
if (currentPage === maxPages) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
isLoading = true;
|
|
55
|
+
|
|
56
|
+
// next page
|
|
57
|
+
currentPage++;
|
|
58
|
+
|
|
59
|
+
// Load more
|
|
60
|
+
var nextPage = pathname + 'page' + currentPage + '/';
|
|
61
|
+
|
|
62
|
+
$.get(nextPage, function (content) {
|
|
63
|
+
$result.append($(content).find('.post').hide().fadeIn(100));
|
|
64
|
+
|
|
65
|
+
}).fail(function (xhr) {
|
|
66
|
+
// 404 indicates we've run out of pages
|
|
67
|
+
if (xhr.status === 404) {
|
|
68
|
+
window.removeEventListener('scroll', onScroll, {passive: true});
|
|
69
|
+
window.removeEventListener('resize', onResize);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
}).always(function () {
|
|
73
|
+
lastDocumentHeight = $document.height();
|
|
74
|
+
isLoading = false;
|
|
75
|
+
ticking = false;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
window.addEventListener('scroll', onScroll, {passive: true});
|
|
80
|
+
window.addEventListener('resize', onResize);
|
|
81
|
+
|
|
82
|
+
infiniteScroll();
|
|
83
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*jshint browser:true */
|
|
2
|
+
/*!
|
|
3
|
+
* FitVids 1.3
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2017, Chris Coyier + Dave Rupert + Ghost Foundation
|
|
7
|
+
* This is an unofficial release, ported by John O'Nolan
|
|
8
|
+
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
|
|
9
|
+
* Released under the MIT license
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
;(function( $ ){
|
|
14
|
+
|
|
15
|
+
'use strict';
|
|
16
|
+
|
|
17
|
+
$.fn.fitVids = function( options ) {
|
|
18
|
+
var settings = {
|
|
19
|
+
customSelector: null,
|
|
20
|
+
ignore: null
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
if(!document.getElementById('fit-vids-style')) {
|
|
24
|
+
// appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
|
|
25
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
26
|
+
var css = '.fluid-width-video-container{flex-grow: 1;width:100%;}.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
|
|
27
|
+
var div = document.createElement("div");
|
|
28
|
+
div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
|
|
29
|
+
head.appendChild(div.childNodes[1]);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if ( options ) {
|
|
33
|
+
$.extend( settings, options );
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return this.each(function(){
|
|
37
|
+
var selectors = [
|
|
38
|
+
'iframe[src*="player.vimeo.com"]',
|
|
39
|
+
'iframe[src*="youtube.com"]',
|
|
40
|
+
'iframe[src*="youtube-nocookie.com"]',
|
|
41
|
+
'iframe[src*="kickstarter.com"][src*="video.html"]',
|
|
42
|
+
'object',
|
|
43
|
+
'embed'
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
if (settings.customSelector) {
|
|
47
|
+
selectors.push(settings.customSelector);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
var ignoreList = '.fitvidsignore';
|
|
51
|
+
|
|
52
|
+
if(settings.ignore) {
|
|
53
|
+
ignoreList = ignoreList + ', ' + settings.ignore;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
var $allVideos = $(this).find(selectors.join(','));
|
|
57
|
+
$allVideos = $allVideos.not('object object'); // SwfObj conflict patch
|
|
58
|
+
$allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
|
|
59
|
+
|
|
60
|
+
$allVideos.each(function(){
|
|
61
|
+
var $this = $(this);
|
|
62
|
+
if($this.parents(ignoreList).length > 0) {
|
|
63
|
+
return; // Disable FitVids on this video.
|
|
64
|
+
}
|
|
65
|
+
if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
|
|
66
|
+
if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width'))))
|
|
67
|
+
{
|
|
68
|
+
$this.attr('height', 9);
|
|
69
|
+
$this.attr('width', 16);
|
|
70
|
+
}
|
|
71
|
+
var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
|
|
72
|
+
width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
|
|
73
|
+
aspectRatio = height / width;
|
|
74
|
+
if(!$this.attr('name')){
|
|
75
|
+
var videoName = 'fitvid' + $.fn.fitVids._count;
|
|
76
|
+
$this.attr('name', videoName);
|
|
77
|
+
$.fn.fitVids._count++;
|
|
78
|
+
}
|
|
79
|
+
$this.wrap('<div class="fluid-width-video-container"><div class="fluid-width-video-wrapper"></div></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%');
|
|
80
|
+
$this.removeAttr('height').removeAttr('width');
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// Internal counter for unique video names.
|
|
86
|
+
$.fn.fitVids._count = 0;
|
|
87
|
+
|
|
88
|
+
// Works with either jQuery or Zepto
|
|
89
|
+
})( window.jQuery || window.Zepto );
|