jekyll-theme-time-machine 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ ---
2
+ ---
3
+
4
+ @import "jekyll-theme-time-machine";
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,52 @@
1
+ (function($) {
2
+ $(document).ready(function(){
3
+
4
+ // putting lines by the pre blocks
5
+ $("pre").each(function(){
6
+ var pre = $(this).text().split("\n");
7
+ var lines = new Array(pre.length+1);
8
+ for(var i = 0; i < pre.length; i++) {
9
+ var wrap = Math.floor(pre[i].split("").length / 70)
10
+ if (pre[i]==""&&i==pre.length-1) {
11
+ lines.splice(i, 1);
12
+ } else {
13
+ lines[i] = i+1;
14
+ for(var j = 0; j < wrap; j++) {
15
+ lines[i] += "\n";
16
+ }
17
+ }
18
+ }
19
+ $(this).before("<pre class='lines'>" + lines.join("\n") + "</pre>");
20
+ });
21
+
22
+ var headings = [];
23
+
24
+ var collectHeaders = function(){
25
+ headings.push({"top":$(this).offset().top - 15,"text":$(this).text()});
26
+ }
27
+
28
+ if($(".markdown-body h1").length > 1) $(".markdown-body h1").each(collectHeaders)
29
+ else if($(".markdown-body h2").length > 1) $(".markdown-body h2").each(collectHeaders)
30
+ else if($(".markdown-body h3").length > 1) $(".markdown-body h3").each(collectHeaders)
31
+
32
+ $(window).scroll(function(){
33
+ if(headings.length==0) return true;
34
+ var scrolltop = $(window).scrollTop() || 0;
35
+ if(headings[0] && scrolltop < headings[0].top) {
36
+ $(".current-section").css({"opacity":0,"visibility":"hidden"});
37
+ return false;
38
+ }
39
+ $(".current-section").css({"opacity":1,"visibility":"visible"});
40
+ for(var i in headings) {
41
+ if(scrolltop >= headings[i].top) {
42
+ $(".current-section .name").text(headings[i].text);
43
+ }
44
+ }
45
+ });
46
+
47
+ $(".current-section a").click(function(){
48
+ $(window).scrollTop(0);
49
+ return false;
50
+ })
51
+ });
52
+ })(jQuery)
metadata ADDED
@@ -0,0 +1,71 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-theme-time-machine
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jon Rohan
8
+ - GitHub, Inc.
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2016-12-14 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: jekyll
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '3.3'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '3.3'
28
+ description:
29
+ email:
30
+ - opensource+jekyll-theme-time-machine@github.com
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - LICENSE
36
+ - README.md
37
+ - _layouts/default.html
38
+ - _sass/jekyll-theme-time-machine.scss
39
+ - _sass/normalize.scss
40
+ - _sass/rouge-base16-dark.scss
41
+ - assets/css/style.scss
42
+ - assets/images/code.png
43
+ - assets/images/pattern.png
44
+ - assets/images/tar.png
45
+ - assets/images/top.png
46
+ - assets/images/zip.png
47
+ - assets/js/script.js
48
+ homepage: https://github.com/pages-themes/time-machine
49
+ licenses: []
50
+ metadata: {}
51
+ post_install_message:
52
+ rdoc_options: []
53
+ require_paths:
54
+ - lib
55
+ required_ruby_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ requirements: []
66
+ rubyforge_project:
67
+ rubygems_version: 2.5.2
68
+ signing_key:
69
+ specification_version: 4
70
+ summary: Time Machine is a Jekyll theme for GitHub Pages
71
+ test_files: []