markdown_slider 0.0.1 → 0.0.2

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.
Files changed (3) hide show
  1. data/README.md +25 -28
  2. data/lib/markdown_slider.rb +15 -3
  3. metadata +37 -7
data/README.md CHANGED
@@ -5,8 +5,7 @@ Markdown Slider
5
5
  Generates HTML5-slides from markdown.
6
6
 
7
7
 
8
- Features
9
- --------
8
+ ### Features
10
9
 
11
10
  * Generates a single html includes style and script based on [html5slides](http://html5slides.googlecode.com/).
12
11
  * Syntax highliting with [redcarpet](https://github.com/tanoku/redcarpet) and [prettify.js](http://google-code-prettify.googlecode.com)
@@ -15,6 +14,8 @@ Features
15
14
  Get Started
16
15
  -----------
17
16
 
17
+ ### install
18
+
18
19
  It's available as a Ruby gem.
19
20
 
20
21
  ``` sh
@@ -27,13 +28,17 @@ The source is available on GitHub:
27
28
  $ git clone git://github.com/massat/markdown_slider.git
28
29
  ```
29
30
 
30
- ### Write your talk in markdown format.
31
+ ### Publish
32
+
33
+ #### Write your talk in markdown format.
31
34
 
32
35
  TITLE
33
36
  =====
34
37
 
35
- section1
36
- --------
38
+ section title
39
+ -------------
40
+
41
+ ### slide title
37
42
 
38
43
  It's my awsome code.
39
44
 
@@ -41,7 +46,7 @@ $ git clone git://github.com/massat/markdown_slider.git
41
46
  STDOUT.puts 'awsome!'
42
47
  ```
43
48
 
44
- ### And publish it!
49
+ #### And publish it!
45
50
 
46
51
  ``` sh
47
52
  $ md-slider example.md > index.html
@@ -50,41 +55,38 @@ $ md-slider example.md > index.html
50
55
  Usage
51
56
  -----
52
57
 
53
- #### Dividing rules
58
+ ### Dividing rules
54
59
 
55
- `md-slider` divides html into slides with `h1` or `h2`.
60
+ `md-slider` divides html into slides with `h1`, `h2` and `h3`.
56
61
 
57
- So, following markdown is divided into 3slides.
62
+ Following markdown is divided into 4slides.
58
63
 
59
64
  ``` md
60
65
  title
61
- -----
66
+ =====
62
67
 
63
68
  subtitle
64
69
 
65
- agenda
66
- ======
70
+ ### agenda
67
71
 
68
72
  * foo
69
73
  * bar
70
74
 
71
75
  foo
72
- ===
76
+ ---
77
+
78
+ ### what's who?
73
79
 
74
80
  about foo...
75
81
 
76
82
  ```
77
83
 
78
- And so you can use `--` (=h2) at positions you want to divide.
79
-
80
- Syntax highlite
81
- ---------------
84
+ ### Syntax highliting
82
85
 
83
86
  writing...
84
87
 
85
88
 
86
- Publish
87
- -------
89
+ ### md-slider
88
90
 
89
91
  You can publish slides with `md-slider` command.
90
92
  It outputs HTML into STDOUT.
@@ -109,22 +111,17 @@ You can use following options.
109
111
  --script SCRIPT :specifies a js file
110
112
  ```
111
113
 
112
- requirements
113
- ------------
114
+ ### requirements
114
115
 
115
116
  * [redcarpet](https://github.com/tanoku/redcarpet)
116
117
 
117
- TODO
118
- ----
118
+ ### TODO
119
119
 
120
- * Scroll to top when changeing slides.
120
+ * improve navigation.
121
121
  * improve syntax highliting.
122
122
  * Write tests.
123
- * Fix default style.
124
- * Add margin between neighboring headers.
125
123
 
126
- License
127
- -------
124
+ ### License
128
125
 
129
126
  ``` nocode
130
127
  Copyright 2012 Masato Hirai
@@ -5,7 +5,7 @@ require 'redcarpet'
5
5
 
6
6
  class MarkdownSlider
7
7
 
8
- VERSION = '0.0.1'
8
+ VERSION = '0.0.2'
9
9
 
10
10
  attr_reader :title, :style, :script, :slides
11
11
 
@@ -78,7 +78,7 @@ class MarkdownSlider
78
78
  def split(html)
79
79
 
80
80
  delimiter = '<!--%% DELIMITER %%-->'
81
- pattern = /<h1>.*?<\/h1>|<h2>.*?<\/h2>/
81
+ pattern = /<h1>.*?<\/h1>|<h2>.*?<\/h2>|<h3>.*?<\/h3>/
82
82
  text = '';
83
83
 
84
84
  html.lines.each do |line|
@@ -123,7 +123,14 @@ class MarkdownSlider
123
123
  # CSS
124
124
  STYLE =<<-'EOS'
125
125
  /*
126
- Based on Google HTML5 slides template
126
+ Google HTML5 slides template
127
+
128
+ Authors: Luke Mahé (code)
129
+ Marcin Wichary (code and design)
130
+
131
+ Dominic Mazzoni (browser compatibility)
132
+ Charles Chen (ChromeVox support)
133
+
127
134
  URL: http://code.google.com/p/html5slides/
128
135
  */
129
136
 
@@ -219,6 +226,7 @@ body {
219
226
 
220
227
  .slides.template-io2011 > article:not(.nobackground):not(.biglogo) {
221
228
  background-size: 100%, 225px;
229
+
222
230
  background-color: white;
223
231
  }
224
232
  .slides.layout-widescreen > article:not(.nobackground):not(.biglogo),
@@ -271,6 +279,7 @@ body {
271
279
 
272
280
  .slides.template-io2011 article.biglogo {
273
281
  background: white;
282
+
274
283
  background-size: 600px;
275
284
  }
276
285
 
@@ -433,6 +442,9 @@ h2 {
433
442
  font-size: 45px;
434
443
  line-height: 45px;
435
444
 
445
+ position: absolute;
446
+ bottom: 150px;
447
+
436
448
  padding: 0;
437
449
  margin: 0;
438
450
  padding-right: 40px;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown_slider
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,40 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-04 00:00:00.000000000 Z
13
- dependencies: []
12
+ date: 2012-04-05 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: erb
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: redcarpet
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
14
46
  description:
15
47
  email: mail@massat.jp
16
48
  executables:
@@ -41,12 +73,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
41
73
  - - ! '>='
42
74
  - !ruby/object:Gem::Version
43
75
  version: '0'
44
- requirements:
45
- - erb
46
- - redcarpet
76
+ requirements: []
47
77
  rubyforge_project:
48
78
  rubygems_version: 1.8.21
49
79
  signing_key:
50
80
  specification_version: 3
51
- summary: A slide generator based on html5slides
81
+ summary: Generates HTML5-slides from markdown.
52
82
  test_files: []