nopoint 0.1.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/nopoint +12 -6
- data/lib/nopoint.rb +2 -1
- data/lib/nopoint/chapter.rb +26 -0
- data/lib/nopoint/commands/build.rb +87 -21
- data/lib/nopoint/commands/new.rb +1 -2
- data/lib/nopoint/slide.rb +4 -5
- data/lib/nopoint/version.rb +1 -1
- data/lib/slideshow_template/config.yml +2 -1
- data/lib/slideshow_template/slides/welcome.md +6 -0
- data/lib/slideshow_template/templates/flat/.sass-cache/a4c4ae6bc8d2ebcfd264bee16365b35b58890f5a/main.sassc +0 -0
- data/lib/slideshow_template/templates/flat/main.css +107 -0
- data/lib/slideshow_template/templates/flat/main.css.map +6 -0
- data/lib/slideshow_template/templates/flat/main.sass +119 -0
- data/lib/slideshow_template/templates/flat/slide.erb +33 -0
- data/lib/slideshow_template/{public → vendor}/index.html +3 -3
- data/lib/slideshow_template/{public/assets → vendor}/jquery.min.js +0 -0
- data/lib/slideshow_template/vendor/s3.min.js +26 -0
- metadata +13 -9
- data/lib/slideshow_template/layout/slide.erb +0 -20
- data/lib/slideshow_template/public/assets/s3.min.css +0 -1
- data/lib/slideshow_template/public/assets/s3.min.js +0 -3
- data/lib/slideshow_template/slides/intro.md +0 -156
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b59dab6bf207fcf978c930a0e37d72515b808627
|
4
|
+
data.tar.gz: 60310224bd93de509cf51de5de961aca8f48c17b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a7b34059b066f2172fc562e4a5f7528a4a72455f7c1da929d215b41d9f886ca7855ce91093b9d8e1797b6d8e077de85c9a916a4ae1656f4201a5d956f502381
|
7
|
+
data.tar.gz: c92440d634fd6ea8e7ac41d4d304b73999ed088697deca85007afb90116cf53d55046d97b99d9d20e45735681d11a3e320b6a0338bf0998cb04d62a2de6e1237
|
data/bin/nopoint
CHANGED
@@ -13,7 +13,7 @@ default_command :help
|
|
13
13
|
command :new do |c|
|
14
14
|
c.syntax = 'nopoint new PATH [options]'
|
15
15
|
c.summary = 'Scaffold a new Slide'
|
16
|
-
c.description = 'Creates a new Nopoint
|
16
|
+
c.description = 'Creates a new Nopoint scaffold at $PATH'
|
17
17
|
|
18
18
|
c.action do |args, options|
|
19
19
|
Nopoint::Commands::New.process(args, options)
|
@@ -23,20 +23,26 @@ end
|
|
23
23
|
command :serve do |c|
|
24
24
|
c.syntax = 'nopoint serve [options]'
|
25
25
|
c.summary = 'Start a webserver'
|
26
|
-
c.description = '
|
27
|
-
|
26
|
+
c.description = 'Serve your slideshow locally'
|
27
|
+
|
28
|
+
c.option '-w', '--watch', 'watch for changes and rebuild'
|
29
|
+
|
28
30
|
c.action do |args, options|
|
31
|
+
# let the build command know that we are serving
|
32
|
+
options.default :serving => true
|
33
|
+
Nopoint::Commands::Build.process(options)
|
29
34
|
Nopoint::Commands::Serve.process(options)
|
30
35
|
end
|
31
36
|
end
|
32
37
|
|
33
38
|
command :build do |c|
|
34
39
|
c.syntax = 'nopoint build [options]'
|
35
|
-
c.summary = '
|
40
|
+
c.summary = 'Generate slideshow'
|
36
41
|
c.description = 'Converts the slideshow to a static html site'
|
37
42
|
|
43
|
+
c.option '-w', '--watch', 'watch for changes and rebuild'
|
44
|
+
|
38
45
|
c.action do |args, options|
|
39
46
|
Nopoint::Commands::Build.process(options)
|
40
47
|
end
|
41
|
-
end
|
42
|
-
|
48
|
+
end
|
data/lib/nopoint.rb
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
module Nopoint
|
2
|
+
class Chapter
|
3
|
+
require 'kramdown'
|
4
|
+
|
5
|
+
attr_accessor :id, :data, :slides
|
6
|
+
|
7
|
+
def initialize(id, file)
|
8
|
+
@id = id
|
9
|
+
@slides = []
|
10
|
+
source = File.read(file)
|
11
|
+
if source =~ /\A(---\s*\n.*?\n?)^(---\s*$\n?)/m
|
12
|
+
# remove the matched header
|
13
|
+
source = $'
|
14
|
+
self.data = YAML.safe_load($1)
|
15
|
+
else
|
16
|
+
self.data = Hash.new
|
17
|
+
end
|
18
|
+
|
19
|
+
source.split(/\* ?\* ?\*/).each do |slide|
|
20
|
+
@slides << Nopoint::Slide.new(slide)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
|
@@ -5,34 +5,100 @@ module Nopoint
|
|
5
5
|
require 'erb'
|
6
6
|
|
7
7
|
def self.process(options)
|
8
|
+
puts 'Let’s go!'
|
9
|
+
self.build(options)
|
10
|
+
self.watch(options) if options.watch
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.build(options)
|
8
14
|
config = YAML.safe_load_file('config.yml')
|
9
|
-
|
10
|
-
|
11
|
-
slides = []
|
12
|
-
source = []
|
15
|
+
template = config['template'] # Error handling
|
13
16
|
|
14
|
-
|
15
|
-
|
17
|
+
chapters = []
|
18
|
+
source = []
|
19
|
+
destination = 'public'
|
20
|
+
|
21
|
+
config['chapters'].each_with_index do |chapter, index|
|
22
|
+
name = File.join(Dir.pwd, "slides/#{chapter}")
|
23
|
+
chapters.push Nopoint::Chapter.new(index, name)
|
16
24
|
end
|
25
|
+
|
26
|
+
# Cleanup and rebuild the Public folder
|
27
|
+
if File.directory? destination
|
28
|
+
FileUtils.rm_rf(Dir.glob("#{destination}/*"))
|
29
|
+
else
|
30
|
+
FileUtils.mkdir(destination)
|
31
|
+
end
|
32
|
+
|
33
|
+
# Insert vendor template
|
34
|
+
FileUtils.mkdir destination + '/assets'
|
35
|
+
FileUtils.mkdir destination + '/slides'
|
36
|
+
FileUtils.mkdir destination + '/images'
|
37
|
+
|
38
|
+
FileUtils.cp 'vendor/index.html', destination
|
39
|
+
FileUtils.cp Dir.glob('vendor/*.js'), destination + '/assets'
|
40
|
+
FileUtils.cp_r Dir.glob('images/*'), destination + '/images' if File.directory? 'images'
|
41
|
+
FileUtils.cp Dir.glob("templates/#{template}/*.{css,js}"), destination + '/assets'
|
42
|
+
|
43
|
+
# Build Stitic slides
|
44
|
+
@slide_index = 0
|
45
|
+
@slide_max = chapters.inject(0) {|sum, ch| sum + ch.slides.count}
|
46
|
+
@chapter_max = chapters.count
|
47
|
+
|
48
|
+
chapters.each_with_index do |chapter, index|
|
49
|
+
@chapter_index = index
|
50
|
+
|
51
|
+
if chapter.data.has_key? 'title'
|
52
|
+
@title = chapter.data['title']
|
53
|
+
else
|
54
|
+
@title = ''
|
55
|
+
end
|
56
|
+
|
57
|
+
chapter.slides.each do |slide|
|
58
|
+
path = "public/slides/#{@slide_index}.html"
|
59
|
+
file = File.new(path, 'w')
|
60
|
+
# slides.count - 1
|
61
|
+
@content = slide.content
|
62
|
+
erb = ERB.new(File.read("templates/#{template}/slide.erb"))
|
63
|
+
|
64
|
+
file.puts erb.result(binding)
|
65
|
+
file.close
|
66
|
+
|
67
|
+
@slide_index += 1
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def self.watch(options)
|
73
|
+
require 'directory_watcher'
|
17
74
|
|
18
|
-
|
19
|
-
slides.push Nopoint::Slide.new(index, slide)
|
20
|
-
end
|
75
|
+
source = File.join(Dir.pwd, 'slides/')
|
21
76
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
id = slide.id
|
77
|
+
glob = './{slides/*, templates/*, config.yml, images/*}'
|
78
|
+
|
79
|
+
puts "watching #{source} for changes"
|
80
|
+
|
81
|
+
dw = DirectoryWatcher.new(Dir.pwd, :glob => glob, :pre_load => true)
|
82
|
+
dw.interval = 1
|
29
83
|
|
30
|
-
|
84
|
+
dw.add_observer do |*args|
|
85
|
+
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
86
|
+
print "Regenerating: #{args.size} files at #{t}"
|
87
|
+
self.build(options)
|
88
|
+
puts "...done."
|
89
|
+
end
|
31
90
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
91
|
+
dw.start
|
92
|
+
|
93
|
+
unless options.serving
|
94
|
+
trap("INT") do
|
95
|
+
puts " Halting auto-regeneration."
|
96
|
+
exit 0
|
97
|
+
end
|
98
|
+
loop { sleep 1000 }
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
36
102
|
end
|
37
103
|
end
|
38
104
|
end
|
data/lib/nopoint/commands/new.rb
CHANGED
data/lib/nopoint/slide.rb
CHANGED
@@ -2,14 +2,13 @@ module Nopoint
|
|
2
2
|
class Slide
|
3
3
|
require 'kramdown'
|
4
4
|
|
5
|
-
attr_accessor :
|
6
|
-
|
7
|
-
def initialize(
|
8
|
-
@id = id
|
5
|
+
attr_accessor :content, :comment
|
6
|
+
|
7
|
+
def initialize(source)
|
9
8
|
notes = /\/\/ .*/
|
10
9
|
@comments = source.match(notes)
|
11
10
|
markdown = source.sub(notes, '')
|
12
11
|
@content = Kramdown::Document.new(markdown).to_html
|
13
|
-
|
12
|
+
end
|
14
13
|
end
|
15
14
|
end
|
data/lib/nopoint/version.rb
CHANGED
Binary file
|
@@ -0,0 +1,107 @@
|
|
1
|
+
* {
|
2
|
+
-webkit-box-sizing: padding; }
|
3
|
+
|
4
|
+
body {
|
5
|
+
font: 25px/1.5em "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
|
6
|
+
color: #2c3e50;
|
7
|
+
background: white;
|
8
|
+
margin: 0;
|
9
|
+
min-height: 100vh;
|
10
|
+
flex-direction: column;
|
11
|
+
-webkit-box-orient: vertical;
|
12
|
+
-webkit-box-direction: normal;
|
13
|
+
display: -webkit-box;
|
14
|
+
display: flex; }
|
15
|
+
|
16
|
+
header {
|
17
|
+
padding: 0 50px;
|
18
|
+
background: #2c3e50;
|
19
|
+
color: white; }
|
20
|
+
header h1 {
|
21
|
+
font-size: 1.5em; }
|
22
|
+
|
23
|
+
main {
|
24
|
+
padding: 1em;
|
25
|
+
margin-bottom: 1.5em;
|
26
|
+
position: relative;
|
27
|
+
-webkit-box-flex: 1;
|
28
|
+
flex: 1;
|
29
|
+
display: -webkit-box;
|
30
|
+
display: flex;
|
31
|
+
-webkit-box-align: center;
|
32
|
+
align-items: center;
|
33
|
+
-webkit-box-pack: center;
|
34
|
+
justify-content: center; }
|
35
|
+
|
36
|
+
footer {
|
37
|
+
text-align: center;
|
38
|
+
position: fixed;
|
39
|
+
bottom: 0;
|
40
|
+
left: 0;
|
41
|
+
right: 0;
|
42
|
+
background: #2c3e50;
|
43
|
+
color: #95a5a6;
|
44
|
+
line-height: 1.5em;
|
45
|
+
display: -webkit-box;
|
46
|
+
display: flex;
|
47
|
+
flex-direction: row;
|
48
|
+
-webkit-box-orient: horizontal;
|
49
|
+
-webkit-box-direction: normal; }
|
50
|
+
|
51
|
+
a {
|
52
|
+
color: inherit;
|
53
|
+
text-decoration: none; }
|
54
|
+
|
55
|
+
.cell-button {
|
56
|
+
flex: 0 0 3em;
|
57
|
+
height: 1.5em;
|
58
|
+
background: #34495e; }
|
59
|
+
.cell-button a {
|
60
|
+
display: block;
|
61
|
+
height: 100%; }
|
62
|
+
|
63
|
+
.cell-center {
|
64
|
+
-webkit-box-flex: 1;
|
65
|
+
flex: 1;
|
66
|
+
height: 1.5em;
|
67
|
+
margin: 0; }
|
68
|
+
.cell-center p {
|
69
|
+
margin: 0; }
|
70
|
+
|
71
|
+
.large {
|
72
|
+
font-size: 3em; }
|
73
|
+
|
74
|
+
.line-numbers {
|
75
|
+
margin-right: 10px;
|
76
|
+
opacity: 0.4; }
|
77
|
+
|
78
|
+
.nolinenos .line-numbers {
|
79
|
+
display: none; }
|
80
|
+
|
81
|
+
.full {
|
82
|
+
top: 0;
|
83
|
+
left: 0;
|
84
|
+
bottom: 0;
|
85
|
+
right: 0;
|
86
|
+
position: absolute; }
|
87
|
+
|
88
|
+
.center {
|
89
|
+
display: flex;
|
90
|
+
align-items: center;
|
91
|
+
justify-content: center;
|
92
|
+
display: -webkit-box;
|
93
|
+
-webkit-box-align: center;
|
94
|
+
-webkit-box-pack: center; }
|
95
|
+
|
96
|
+
.hidden {
|
97
|
+
opacity: 0;
|
98
|
+
-webkit-transition-duration: 0.5s;
|
99
|
+
-moz-transition-duration: 0.5s;
|
100
|
+
transition-duration: 0.5s; }
|
101
|
+
|
102
|
+
.visible {
|
103
|
+
opacity: 1; }
|
104
|
+
|
105
|
+
pre {
|
106
|
+
max-width: 100vw;
|
107
|
+
word-wrap: break-word; }
|
@@ -0,0 +1,6 @@
|
|
1
|
+
{
|
2
|
+
"version": "3",
|
3
|
+
"mappings": "AAGA,IAAI;EACF,IAAI,EAAE,2DAAuB;EAC7B,KAAK,EAAE,OAAO;EACd,UAAU,EALJ,KAAK;EAMX,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,cAAc,EAAE,MAAM;;AAExB,MAAM;EACJ,OAAO,EAAE,MAAM;EACf,UAAU,EAAE,OAAO;EACnB,KAAK,EAdC,KAAK;EAeX,SAAE;IACA,SAAS,EAAE,KAAK;;AAEpB,IAAI;EACF,OAAO,EAAE,GAAG;EACZ,IAAI,EAAE,CAAC;EACP,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,MAAM;EACnB,eAAe,EAAE,MAAM;EACvB,aAAa,EAzBC,KAAK;EA0BnB,QAAQ,EAAE,QAAQ;;AAEpB,MAAM;EACJ,UAAU,EAAE,MAAM;EAClB,OAAO,EAAE,IAAI;EACb,cAAc,EAAE,GAAG;EACnB,QAAQ,EAAE,KAAK;EACf,MAAM,EAAE,CAAC;EACT,IAAI,EAAE,CAAC;EACP,KAAK,EAAE,CAAC;EACR,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,OAAO;EACd,WAAW,EAtCG,KAAK;;AAuCrB,CAAC;EACC,KAAK,EAAE,OAAO;EACd,eAAe,EAAE,IAAI;;AAEvB,YAAY;EACV,IAAI,EAAE,OAAO;EACb,MAAM,EA7CQ,KAAK;EA8CnB,UAAU,EAAE,OAAO;EACnB,cAAC;IACC,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,IAAI;;AAEhB,YAAY;EACV,IAAI,EAAE,CAAC;EACP,MAAM,EArDQ,KAAK;EAsDnB,MAAM,EAAE,CAAC;EACT,cAAC;IACC,MAAM,EAAE,CAAC;;AAEb,MAAM;EACJ,SAAS,EAAE,GAAG;;AAEhB,aAAa;EACX,YAAY,EAAE,IAAI;EAClB,OAAO,EAAE,GAAG;;AAEZ,wBAAa;EACX,OAAO,EAAE,IAAI;;AAEjB,KAAK;EACH,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;EACP,MAAM,EAAE,CAAC;EACT,KAAK,EAAE,CAAC;EACR,QAAQ,EAAE,QAAQ;;AAGpB,GAAG;EACD,SAAS,EAAE,KAAK;EAChB,SAAS,EAAE,UAAU",
|
4
|
+
"sources": ["main.sass"],
|
5
|
+
"file": "main.css"
|
6
|
+
}
|
@@ -0,0 +1,119 @@
|
|
1
|
+
$footer_height: 1.5em
|
2
|
+
$white: white
|
3
|
+
|
4
|
+
@mixin display-flex
|
5
|
+
display: -webkit-box
|
6
|
+
display: flex
|
7
|
+
|
8
|
+
@mixin flex-1
|
9
|
+
-webkit-box-flex: 1
|
10
|
+
flex: 1
|
11
|
+
|
12
|
+
*
|
13
|
+
-webkit-box-sizing: padding
|
14
|
+
|
15
|
+
body
|
16
|
+
font: 25px/1.5em "Gill Sans", "Gill Sans MT", Calibri, sans-serif
|
17
|
+
color: #2c3e50
|
18
|
+
background: $white
|
19
|
+
margin: 0
|
20
|
+
min-height: 100vh
|
21
|
+
|
22
|
+
flex-direction: column
|
23
|
+
-webkit-box-orient: vertical
|
24
|
+
-webkit-box-direction: normal
|
25
|
+
|
26
|
+
@include display-flex
|
27
|
+
|
28
|
+
header
|
29
|
+
padding: 0 50px
|
30
|
+
background: #2c3e50
|
31
|
+
color: $white
|
32
|
+
h1
|
33
|
+
font-size: 1.5em
|
34
|
+
|
35
|
+
main
|
36
|
+
padding: 1em
|
37
|
+
margin-bottom: $footer_height
|
38
|
+
position: relative
|
39
|
+
|
40
|
+
@include flex-1
|
41
|
+
@include display-flex
|
42
|
+
|
43
|
+
-webkit-box-align: center
|
44
|
+
align-items: center
|
45
|
+
-webkit-box-pack: center
|
46
|
+
justify-content: center
|
47
|
+
|
48
|
+
footer
|
49
|
+
text-align: center
|
50
|
+
position: fixed
|
51
|
+
bottom: 0
|
52
|
+
left: 0
|
53
|
+
right: 0
|
54
|
+
background: #2c3e50
|
55
|
+
color: #95a5a6
|
56
|
+
line-height: $footer_height
|
57
|
+
|
58
|
+
@include display-flex
|
59
|
+
|
60
|
+
flex-direction: row
|
61
|
+
-webkit-box-orient: horizontal
|
62
|
+
-webkit-box-direction: normal
|
63
|
+
a
|
64
|
+
color: inherit
|
65
|
+
text-decoration: none
|
66
|
+
|
67
|
+
.cell-button
|
68
|
+
flex: 0 0 3em
|
69
|
+
height: $footer_height
|
70
|
+
background: #34495e
|
71
|
+
a
|
72
|
+
display: block
|
73
|
+
height: 100%
|
74
|
+
|
75
|
+
.cell-center
|
76
|
+
@include flex-1
|
77
|
+
height: $footer_height
|
78
|
+
margin: 0
|
79
|
+
p
|
80
|
+
margin: 0
|
81
|
+
|
82
|
+
.large
|
83
|
+
font-size: 3em
|
84
|
+
|
85
|
+
.line-numbers
|
86
|
+
margin-right: 10px
|
87
|
+
opacity: 0.4
|
88
|
+
|
89
|
+
.nolinenos
|
90
|
+
.line-numbers
|
91
|
+
display: none
|
92
|
+
|
93
|
+
.full
|
94
|
+
top: 0
|
95
|
+
left: 0
|
96
|
+
bottom: 0
|
97
|
+
right: 0
|
98
|
+
position: absolute
|
99
|
+
|
100
|
+
.center
|
101
|
+
display: flex
|
102
|
+
align-items: center
|
103
|
+
justify-content: center
|
104
|
+
|
105
|
+
display: -webkit-box
|
106
|
+
-webkit-box-align: center
|
107
|
+
-webkit-box-pack: center
|
108
|
+
|
109
|
+
.hidden
|
110
|
+
opacity: 0
|
111
|
+
-webkit-transition-duration: 0.5s
|
112
|
+
-moz-transition-duration: 0.5s
|
113
|
+
transition-duration: 0.5s
|
114
|
+
.visible
|
115
|
+
opacity: 1
|
116
|
+
|
117
|
+
pre
|
118
|
+
max-width: 100vw
|
119
|
+
word-wrap: break-word
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<script type="text/javascript" src="/assets/jquery.min.js"></script>
|
4
|
+
<link rel="stylesheet" href="/assets/main.css">
|
5
|
+
<meta charset="utf-8">
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
<header>
|
9
|
+
<h1><%= @chapter_index %> - <%= @title %></h1>
|
10
|
+
</header>
|
11
|
+
<main>
|
12
|
+
<section>
|
13
|
+
<%= @content %>
|
14
|
+
</section>
|
15
|
+
</main>
|
16
|
+
<footer>
|
17
|
+
<section class="cell-button">
|
18
|
+
<% if @slide_index > 0 %>
|
19
|
+
<a id="prev" href="<%= @slide_index - 1 %>.html">←</a>
|
20
|
+
<% end %>
|
21
|
+
</section>
|
22
|
+
<section class="cell-center">
|
23
|
+
<p><%= @slide_index+1 %>/<%= @slide_max %></p>
|
24
|
+
</section>
|
25
|
+
<section class="cell-button">
|
26
|
+
<% if @slide_index+1 < @slide_max %>
|
27
|
+
<a id="next" href="<%= @slide_index + 1 %>.html">→</a>
|
28
|
+
<% end %>
|
29
|
+
</section>
|
30
|
+
</footer>
|
31
|
+
<script type="text/javascript" src="/assets/s3.min.js"></script>
|
32
|
+
</body>
|
33
|
+
</html>
|
@@ -2,14 +2,14 @@
|
|
2
2
|
<html lang="en-US">
|
3
3
|
<head>
|
4
4
|
<meta charset="UTF-8">
|
5
|
-
<meta http-equiv="refresh" content="1;url
|
5
|
+
<meta http-equiv="refresh" content="1;url=slides/0.html">
|
6
6
|
<script type="text/javascript">
|
7
|
-
window.location.href = "
|
7
|
+
window.location.href = "slides/0.html"
|
8
8
|
</script>
|
9
9
|
<title>Page Redirection</title>
|
10
10
|
</head>
|
11
11
|
<body>
|
12
12
|
<!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
|
13
|
-
If you are not redirected automatically, follow the <a href='
|
13
|
+
If you are not redirected automatically, follow the <a href='slides/0.html'>link to first slide</a>
|
14
14
|
</body>
|
15
15
|
</html>
|
File without changes
|
@@ -0,0 +1,26 @@
|
|
1
|
+
var all = document.getElementsByTagName("li");
|
2
|
+
var i
|
3
|
+
for (i=0, max=all.length; i < max; i++) {
|
4
|
+
all[i].className = 'hidden';
|
5
|
+
}
|
6
|
+
i = 0
|
7
|
+
$(document).keydown(function(e){
|
8
|
+
// left
|
9
|
+
if (e.keyCode == 37) {
|
10
|
+
window.location.href = document.getElementById("prev").href;
|
11
|
+
}
|
12
|
+
// right
|
13
|
+
if (e.keyCode == 39) {
|
14
|
+
window.location.href = document.getElementById("next").href;
|
15
|
+
}
|
16
|
+
// down
|
17
|
+
if (e.keyCode == 40 && i < all.length) {
|
18
|
+
all[i].className = 'vis';
|
19
|
+
i++;
|
20
|
+
}
|
21
|
+
// up
|
22
|
+
else if (e.keyCode == 38 && i > 0) {
|
23
|
+
i--;
|
24
|
+
all[i].className = 'hid';
|
25
|
+
}
|
26
|
+
});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nopoint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leon Rische
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: liquid
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- Rakefile
|
96
96
|
- bin/nopoint
|
97
97
|
- lib/nopoint.rb
|
98
|
+
- lib/nopoint/chapter.rb
|
98
99
|
- lib/nopoint/command.rb
|
99
100
|
- lib/nopoint/commands/build.rb
|
100
101
|
- lib/nopoint/commands/new.rb
|
@@ -102,12 +103,15 @@ files:
|
|
102
103
|
- lib/nopoint/slide.rb
|
103
104
|
- lib/nopoint/version.rb
|
104
105
|
- lib/slideshow_template/config.yml
|
105
|
-
- lib/slideshow_template/
|
106
|
-
- lib/slideshow_template/
|
107
|
-
- lib/slideshow_template/
|
108
|
-
- lib/slideshow_template/
|
109
|
-
- lib/slideshow_template/
|
110
|
-
- lib/slideshow_template/
|
106
|
+
- lib/slideshow_template/slides/welcome.md
|
107
|
+
- lib/slideshow_template/templates/flat/.sass-cache/a4c4ae6bc8d2ebcfd264bee16365b35b58890f5a/main.sassc
|
108
|
+
- lib/slideshow_template/templates/flat/main.css
|
109
|
+
- lib/slideshow_template/templates/flat/main.css.map
|
110
|
+
- lib/slideshow_template/templates/flat/main.sass
|
111
|
+
- lib/slideshow_template/templates/flat/slide.erb
|
112
|
+
- lib/slideshow_template/vendor/index.html
|
113
|
+
- lib/slideshow_template/vendor/jquery.min.js
|
114
|
+
- lib/slideshow_template/vendor/s3.min.js
|
111
115
|
- nopoint.gemspec
|
112
116
|
homepage: http://nopoint.l3kn.de
|
113
117
|
licenses:
|
@@ -129,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
133
|
version: '0'
|
130
134
|
requirements: []
|
131
135
|
rubyforge_project:
|
132
|
-
rubygems_version: 2.0.
|
136
|
+
rubygems_version: 2.0.7
|
133
137
|
signing_key:
|
134
138
|
specification_version: 4
|
135
139
|
summary: Slideshow generator
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<script type="text/javascript" src="../assets/jquery.min.js"></script>
|
5
|
-
<link rel="stylesheet" href="../assets/s3.min.css">
|
6
|
-
<meta charset="utf-8">
|
7
|
-
</head>
|
8
|
-
<body>
|
9
|
-
<div class="slide">
|
10
|
-
<%= content %>
|
11
|
-
</div>
|
12
|
-
<% if id > 0 %>
|
13
|
-
<a id="prev" class="button" href="<%= id - 1 %>.html">←</a>
|
14
|
-
<% end %>
|
15
|
-
<% if id < max %>
|
16
|
-
<a id="next" class="button" href="<%= id + 1 %>.html">→</a>
|
17
|
-
<% end %>
|
18
|
-
<script type="text/javascript" src="../assets/s3.min.js"></script>
|
19
|
-
</body>
|
20
|
-
</html>
|
@@ -1 +0,0 @@
|
|
1
|
-
html{height:100%}body{margin:0;padding:0;height:100%;font-family:"Lato",Calibri,Arial,sans-serif;background:white;font-weight:400;color:#333;font-size:150%;height:100%;width:80%;margin:0 auto;display:table}img{max-width:100%}.title{position:fixed;top:0px;left:40px}.slide{display:table-cell;vertical-align:middle}.half{width:50%;float:right;word-wrap:break-word}.center{text-align:center}.vis{visibility:visible;opacity:1;transition:opacity .5s linear}.hid{visibility:hidden;opacity:0}.large{font-size:400%}.line-numbers{visibility:hidden}#next{position:absolute;width:32px;height:32px;bottom:5px;right:5px;text-decoration:none;background:#f1103a;border-radius:50%;color:white;line-height:30px;text-align:center;speak:none;font-weight:bold;cursor:pointer}#prev{position:absolute;width:32px;height:32px;bottom:5px;right:45px;text-decoration:none;background:#f1103a;border-radius:50%;color:white;line-height:30px;text-align:center;speak:none;font-weight:bold;cursor:pointer}
|
@@ -1,3 +0,0 @@
|
|
1
|
-
var all=document.getElementsByTagName('li');var i
|
2
|
-
for(i=0,max=all.length;i<max;i++){all[i].className='hid';}i=0
|
3
|
-
$(document).keydown(function(e){if(e.keyCode==37){window.location.href=document.getElementById('prev').href;}if(e.keyCode==39){window.location.href=document.getElementById('next').href;}if(e.keyCode==40&&i<all.length){all[i].className='vis';i++;}else if(e.keyCode==38&&i>0){i--;all[i].className='hid';}});
|
@@ -1,156 +0,0 @@
|
|
1
|
-
// Intro
|
2
|
-
|
3
|
-
Nopoint
|
4
|
-
{: .large .center}
|
5
|
-
|
6
|
-
* * *
|
7
|
-
|
8
|
-
# Wait, what?
|
9
|
-
{: .title }
|
10
|
-
|
11
|
-
## This slideshow aims to be a simple guide to nopoint.
|
12
|
-
_(Of course is based on nopoint, sofuckingmeta)_
|
13
|
-
|
14
|
-
* * *
|
15
|
-
|
16
|
-
# Static slides?
|
17
|
-
{: .title }
|
18
|
-
|
19
|
-
There are many other web-based slideshow tools like _deck.js_ or _reveal.js_, but all of these are barely usable for people who disabled JavaScript in their browsers.
|
20
|
-
|
21
|
-
__Nopoint__ tries to solve this problem by converting every slide into a .html file.
|
22
|
-
|
23
|
-
* * *
|
24
|
-
|
25
|
-
# Static Slide Script (s3.js)
|
26
|
-
{: .title }
|
27
|
-
|
28
|
-
Nopoint ships with an optional JavaScript which enhances your slideshow experience in multiple ways:
|
29
|
-
|
30
|
-
__Protipp: press [↓]__
|
31
|
-
|
32
|
-
* Switch slides with [←] and [→]
|
33
|
-
* Reveal list items one at a time with [↓] and [↑]
|
34
|
-
|
35
|
-
* * *
|
36
|
-
|
37
|
-
# Getting started
|
38
|
-
{: .title }
|
39
|
-
|
40
|
-
~~~ text
|
41
|
-
$ gem install nopoint # install the nopoint-gem
|
42
|
-
$ nopoint new hello # scaffold a new slideshow
|
43
|
-
$ cd hello/
|
44
|
-
$ nopoint build # build it
|
45
|
-
$ nopoint serve # serve the static slides on port 2337
|
46
|
-
~~~
|
47
|
-
|
48
|
-
* * *
|
49
|
-
|
50
|
-
# Files
|
51
|
-
{: .title }
|
52
|
-
|
53
|
-
A basic nopoint slideshow could like this
|
54
|
-
|
55
|
-
~~~ text
|
56
|
-
config.yml # configure chapters of your slideshow
|
57
|
-
slides/ # place the markdown sources here
|
58
|
-
\- intro.md # one chapter of the slideshow
|
59
|
-
layout/ # erb layouts for the html slides
|
60
|
-
public/ # converted slides
|
61
|
-
\- index.html # a redirection to the first slide
|
62
|
-
\- assets/ # js and css files go here
|
63
|
-
\- slides/ # generated html slides
|
64
|
-
\- 0.html
|
65
|
-
~~~
|
66
|
-
|
67
|
-
* * *
|
68
|
-
|
69
|
-
# A noobs guide to [markdown](http://daringfireball.net/projects/markdown/)
|
70
|
-
{: .title }
|
71
|
-
|
72
|
-
~~~ text
|
73
|
-
_italic_
|
74
|
-
__bold__
|
75
|
-
|
76
|
-
# heading 1
|
77
|
-
## heading 2
|
78
|
-
...
|
79
|
-
|
80
|
-
* unordered
|
81
|
-
* list
|
82
|
-
|
83
|
-
1. ordered
|
84
|
-
2. list
|
85
|
-
~~~
|
86
|
-
|
87
|
-
* * *
|
88
|
-
|
89
|
-
# A noobs guide to [markdown](http://daringfireball.net/projects/markdown/)
|
90
|
-
{: .title }
|
91
|
-
|
92
|
-
~~~ text
|
93
|
-
[an url](www.example.com)
|
94
|
-
![an image](www.image.com)
|
95
|
-
|
96
|
-
> blockquote
|
97
|
-
`code`
|
98
|
-
|
99
|
-
*_*_* seperate single slides
|
100
|
-
(replace the _ with spaces)
|
101
|
-
~~~
|
102
|
-
|
103
|
-
* * *
|
104
|
-
|
105
|
-
# A noobs guide to [kramdown](http://kramdown.rubyforge.org)
|
106
|
-
{: .title }
|
107
|
-
|
108
|
-
~~~ text
|
109
|
-
~~~ ruby
|
110
|
-
puts 'syntax highlighting'
|
111
|
-
~~~
|
112
|
-
|
113
|
-
{: .css_class }
|
114
|
-
~~~
|
115
|
-
|
116
|
-
Available css-classes are:
|
117
|
-
_(remember the [↓]-key!)_
|
118
|
-
|
119
|
-
* __.center__ -> center the element above
|
120
|
-
* __.title__ -> mark element as a slides title
|
121
|
-
* __.large__ -> increase font size
|
122
|
-
|
123
|
-
* * *
|
124
|
-
|
125
|
-
# Your first slide
|
126
|
-
{: .title }
|
127
|
-
|
128
|
-
~~~ text
|
129
|
-
$ vim slides/intro.md
|
130
|
-
~~~
|
131
|
-
|
132
|
-
and enter something like this
|
133
|
-
|
134
|
-
~~~ text
|
135
|
-
|
136
|
-
# My first nopoint
|
137
|
-
{: .center .large }
|
138
|
-
|
139
|
-
*_*_* (replace _ with spaces)
|
140
|
-
|
141
|
-
# A title
|
142
|
-
{: .title }
|
143
|
-
|
144
|
-
Hello world!
|
145
|
-
|
146
|
-
~~~
|
147
|
-
|
148
|
-
* * *
|
149
|
-
|
150
|
-
# One more thing!
|
151
|
-
{: .title }
|
152
|
-
|
153
|
-
## Follow me on [Twitter](http://twitter.com/l3kn) and [Github](http://github.com/l3kn)
|
154
|
-
|
155
|
-
[![Flattr](http://api.flattr.com/button/button-static-50x60.png)](https://flattr.com/submit/auto?user_id=l3kn&url=http://www.nopoint.l3kn.de&title=Nopoint)
|
156
|
-
|