middleman-presentation-helpers 0.0.7 → 0.1.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +0 -2
  3. data/.rubocop.yml +45 -4
  4. data/README.md +23 -2
  5. data/Rakefile +6 -2
  6. data/features/image_gallery.feature +3 -4
  7. data/features/metadata.feature +40 -0
  8. data/features/step_definitions.rb +0 -1
  9. data/features/support/aruba.rb +1 -1
  10. data/features/support/ci.rb +1 -1
  11. data/features/support/env.rb +1 -1
  12. data/lib/middleman-presentation-helpers.rb +24 -0
  13. data/lib/middleman-presentation-helpers/helpers/image.rb +20 -0
  14. data/lib/{middleman-presentation → middleman-presentation-helpers}/helpers/image_gallery.rb +9 -7
  15. data/lib/middleman-presentation-helpers/helpers/metadata.rb +29 -0
  16. data/lib/{middleman-presentation → middleman-presentation-helpers}/helpers/slides.rb +6 -4
  17. data/lib/middleman-presentation-helpers/plugins/footer_plugin.rb +17 -0
  18. data/lib/middleman-presentation-helpers/plugins/highlight_plugin.rb +23 -0
  19. data/lib/middleman-presentation-helpers/plugins/image_gallery_plugin.rb +25 -0
  20. data/lib/middleman-presentation-helpers/plugins/images_plugin.rb +19 -0
  21. data/lib/{middleman-presentation/helpers/plugins/footer_plugin.rb → middleman-presentation-helpers/plugins/jquery_plugin.rb} +4 -5
  22. data/lib/middleman-presentation-helpers/plugins/metadata_plugin.rb +13 -0
  23. data/lib/{middleman-presentation/helpers/plugins/diagram_plugin.rb → middleman-presentation-helpers/plugins/normalize_plugin.rb} +4 -5
  24. data/lib/middleman-presentation-helpers/plugins/print_plugin.rb +17 -0
  25. data/lib/middleman-presentation-helpers/plugins/slides_plugin.rb +33 -0
  26. data/lib/{middleman-presentation/helpers → middleman-presentation-helpers}/version.rb +1 -1
  27. data/lib/middleman-presentation-plugin.rb +1 -0
  28. data/middleman-presentation-helpers.gemspec +5 -5
  29. data/vendor/assets/{javascripts → middleman-presentation-helpers/footer}/footer.js +4 -2
  30. data/vendor/assets/middleman-presentation-helpers/footer/footer.scss +3 -0
  31. data/vendor/assets/{stylesheets → middleman-presentation-helpers/image_gallery}/image_gallery.scss +0 -0
  32. data/vendor/assets/{stylesheets → middleman-presentation-helpers/images}/images.scss +0 -0
  33. data/vendor/assets/middleman-presentation-helpers/print/pdf.scss +200 -0
  34. metadata +29 -24
  35. data/.travis.yml +0 -8
  36. data/Gemfile +0 -50
  37. data/Gemfile.lock +0 -382
  38. data/config/rubocop/exclude.yml +0 -25
  39. data/config/rubocop/include.yml +0 -142
  40. data/lib/middleman-presentation/helpers.rb +0 -14
  41. data/lib/middleman-presentation/helpers/plugins/common_plugin.rb +0 -22
  42. data/lib/middleman-presentation/helpers/plugins/image_gallery_plugin.rb +0 -35
  43. data/lib/middleman-presentation/helpers/plugins/slides_plugin.rb +0 -43
  44. data/vendor/assets/stylesheets/footer.scss +0 -29
@@ -0,0 +1,19 @@
1
+ # encoding: utf-8
2
+ module Middleman
3
+ module Presentation
4
+ # Helpers plugin
5
+ module Helpers
6
+ # Image Plugin
7
+ module ImagePlugin
8
+ extend PluginApi
9
+
10
+ add_assets(
11
+ path: File.expand_path('../../../../vendor/assets', __FILE__),
12
+ importable_files: %w(images.scss)
13
+ )
14
+
15
+ add_helpers Middleman::Presentation::Helpers::Image
16
+ end
17
+ end
18
+ end
19
+ end
@@ -3,15 +3,14 @@ module Middleman
3
3
  module Presentation
4
4
  # Helpers plugin
5
5
  module Helpers
6
- module SlidesPlugin
6
+ # JqUERY plugin
7
+ module JqueryPlugin
7
8
  extend PluginApi
8
9
 
9
10
  add_component(
10
- name: 'jquery',
11
+ name: :jquery,
11
12
  version: '~1.11',
12
- importable_files: [
13
- /dist\/jquery\.js$/
14
- ]
13
+ importable_files: %w(dist/jquery.js)
15
14
  )
16
15
  end
17
16
  end
@@ -0,0 +1,13 @@
1
+ # encoding: utf-8
2
+ module Middleman
3
+ module Presentation
4
+ module Helpers
5
+ # Metadata plugin
6
+ module MetadataPlugin
7
+ extend PluginApi
8
+
9
+ add_helpers Middleman::Presentation::Helpers::Metadata
10
+ end
11
+ end
12
+ end
13
+ end
@@ -3,15 +3,14 @@ module Middleman
3
3
  module Presentation
4
4
  # Helpers plugin
5
5
  module Helpers
6
- module DiagramPlugin
6
+ # Slides plugin
7
+ module NormalizePlugin
7
8
  extend PluginApi
8
9
 
9
10
  add_component(
10
- name: 'd3',
11
+ name: :'normalize.css',
11
12
  version: 'latest',
12
- importable_files: [
13
- %r{d3/d3.js},
14
- ]
13
+ importable_files: %w(normalize.css)
15
14
  )
16
15
  end
17
16
  end
@@ -0,0 +1,17 @@
1
+ # encoding: utf-8
2
+ module Middleman
3
+ module Presentation
4
+ # Helpers plugin
5
+ module Helpers
6
+ # Print plugin
7
+ module PrintPlugin
8
+ extend PluginApi
9
+
10
+ add_assets(
11
+ path: File.expand_path('../../../../vendor/assets', __FILE__),
12
+ loadable_files: %w(pdf.scss)
13
+ )
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,33 @@
1
+ # encoding: utf-8
2
+ module Middleman
3
+ module Presentation
4
+ # Helpers plugin
5
+ module Helpers
6
+ # Slides plugin
7
+ module SlidesPlugin
8
+ extend PluginApi
9
+
10
+ output_paths = {
11
+ %r{plugin/notes/notes\.html$} => Pathname.new('javascripts/reveal.js/plugin/notes/notes.html')
12
+ }
13
+
14
+ loadable_files = [
15
+ %r{plugin/notes/notes\.html$},
16
+ %r{reveal\.js/.*/.*\.js$}
17
+ ]
18
+
19
+ add_component(
20
+ name: :'reveal.js',
21
+ version: 'latest',
22
+ # importable_files: %w(js/reveal.min.js lib/js/head.min css/reveal.min.css lib/css/zenburn css/theme/template/mixins.scss css/theme/template/settings.scss),
23
+ importable_files: %w(js/reveal.min.js lib/js/head.min css/reveal.min.css css/theme/template/mixins.scss css/theme/template/settings.scss),
24
+ ignorable_files: %w(reveal\.js/test/),
25
+ output_paths: output_paths,
26
+ loadable_files: loadable_files
27
+ )
28
+
29
+ add_helpers Middleman::Presentation::Helpers::Slides
30
+ end
31
+ end
32
+ end
33
+ end
@@ -5,7 +5,7 @@ module Middleman
5
5
  module Presentation
6
6
  # Helpers
7
7
  module Helpers
8
- VERSION = '0.0.7'
8
+ VERSION = '0.1.0.beta'
9
9
  end
10
10
  end
11
11
  end
@@ -0,0 +1 @@
1
+ # empty
@@ -1,19 +1,19 @@
1
1
  # coding: utf-8
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'middleman-presentation/helpers/version'
4
+ require 'middleman-presentation-helpers/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'middleman-presentation-helpers'
8
8
  spec.version = Middleman::Presentation::Helpers::VERSION
9
9
  spec.authors = ['Max Meyer']
10
10
  spec.email = ['dev@fedux.org']
11
- spec.summary = %q{Helpers for middleman-presentation}
12
- spec.homepage = 'https://github.com/maxmeyer/middleman-presentation-helpers'
11
+ spec.summary = 'Helpers for middleman-presentation'
12
+ spec.homepage = 'https://github.com/maxmeyer/middleman-presentation'
13
13
  spec.license = 'MIT'
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0")
16
- spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) }
17
- spec.test_files = spec.files.grep(/^(test|spec|features)\//)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ['lib']
19
19
  end
@@ -1,9 +1,11 @@
1
1
  check = function() {
2
2
  if ($('.mp-start-slide .present').length > 0) {
3
- $('.mp-copyright-notice').hide();
3
+ //$('.controls').hide();
4
+ $('.mp-presentation-footer').hide();
4
5
  $('.slide-number').hide();
5
6
  } else {
6
- $('.mp-copyright-notice').show();
7
+ //$('.controls').show();
8
+ $('.mp-presentation-footer').show();
7
9
  $('.slide-number').show();
8
10
  }
9
11
  }
@@ -0,0 +1,3 @@
1
+ .reveal footer.mp-site-footer {
2
+ z-index: 29;
3
+ }
@@ -0,0 +1,200 @@
1
+ /* Default Print Stylesheet Template
2
+ by Rob Glazebrook of CSSnewbie.com
3
+ Last Updated: June 4, 2008
4
+
5
+ Feel free (nay, compelled) to edit, append, and
6
+ manipulate this file as you see fit. */
7
+
8
+
9
+ /* SECTION 1: Set default width, margin, float, and
10
+ background. This prevents elements from extending
11
+ beyond the edge of the printed page, and prevents
12
+ unnecessary background images from printing */
13
+
14
+ * {
15
+ -webkit-print-color-adjust: exact;
16
+ }
17
+
18
+ body {
19
+ font-size: 18pt;
20
+ width: 295mm;
21
+ height: 210mm;
22
+ margin: 0 auto !important;
23
+ border: 0;
24
+ padding: 0;
25
+ float: none !important;
26
+ overflow: visible;
27
+ margin: 0;
28
+ }
29
+
30
+ html {
31
+ width: 100%;
32
+ height: 100%;
33
+ overflow: visible;
34
+ }
35
+
36
+ @page {
37
+ size: a4 landscape;
38
+ margin: 0;
39
+ }
40
+
41
+ /* SECTION 2: Remove any elements not needed in print.
42
+ This would include navigation, ads, sidebars, etc. */
43
+ .nestedarrow,
44
+ .controls,
45
+ .reveal .progress,
46
+ .reveal.overview,
47
+ .fork-reveal,
48
+ .share-reveal,
49
+ .state-background {
50
+ display: none !important;
51
+ }
52
+
53
+ /* SECTION 3: Set body font face, size, and color.
54
+ Consider using a serif font for readability. */
55
+ body, p, td, li, div {
56
+ font-size: 18pt;
57
+ }
58
+
59
+ /* SECTION 4: Set heading font face, sizes, and color.
60
+ Differentiate your headings from your body text.
61
+ Perhaps use a large sans-serif for distinction. */
62
+ h1,h2,h3,h4,h5,h6 {
63
+ text-shadow: 0 0 0 #000 !important;
64
+ }
65
+
66
+ /* SECTION 5: Make hyperlinks more usable.
67
+ Ensure links are underlined, and consider appending
68
+ the URL to the end of the link for usability. */
69
+ a:link,
70
+ a:visited {
71
+ font-weight: normal;
72
+ text-decoration: underline;
73
+ }
74
+
75
+ .reveal pre code {
76
+ overflow: hidden !important;
77
+ font-family: monospace !important;
78
+ }
79
+
80
+
81
+ /* SECTION 6: more reveal.js specific additions by @skypanther */
82
+ ul, ol, div, p {
83
+ visibility: visible;
84
+ position: static;
85
+ width: auto;
86
+ height: auto;
87
+ display: block;
88
+ overflow: visible;
89
+ margin: auto;
90
+ }
91
+ .reveal {
92
+ width: auto !important;
93
+ height: auto !important;
94
+ overflow: hidden !important;
95
+ }
96
+ .reveal .slides {
97
+ position: static;
98
+ width: 100%;
99
+ height: auto;
100
+
101
+ left: auto;
102
+ top: auto;
103
+ margin: 0 !important;
104
+ padding: 0 !important;
105
+
106
+ overflow: visible;
107
+ display: block;
108
+
109
+ text-align: center;
110
+
111
+ -webkit-perspective: none;
112
+ -moz-perspective: none;
113
+ -ms-perspective: none;
114
+ perspective: none;
115
+
116
+ -webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */
117
+ -moz-perspective-origin: 50% 50%;
118
+ -ms-perspective-origin: 50% 50%;
119
+ perspective-origin: 50% 50%;
120
+ }
121
+ .reveal .slides section {
122
+
123
+ //page-break-after: always !important;
124
+ page-break-before: none !important;
125
+ page-break-after: none !important;
126
+ page-break-inside: avoid !important;
127
+
128
+ visibility: visible !important;
129
+ position: relative !important;
130
+ width: 100% !important;
131
+ height: 205mm !important;
132
+ min-height: 205mm !important;
133
+ display: block !important;
134
+ overflow: hidden !important;
135
+
136
+ left: 0 !important;
137
+ top: 0 !important;
138
+ margin: 0 !important;
139
+ padding: 2cm 2cm 0 2cm !important;
140
+ box-sizing: border-box !important;
141
+
142
+ opacity: 1 !important;
143
+
144
+ -webkit-transform-style: flat !important;
145
+ -moz-transform-style: flat !important;
146
+ -ms-transform-style: flat !important;
147
+ transform-style: flat !important;
148
+
149
+ -webkit-transform: none !important;
150
+ -moz-transform: none !important;
151
+ -ms-transform: none !important;
152
+ transform: none !important;
153
+ }
154
+ .reveal section.stack {
155
+ margin: 0 !important;
156
+ padding: 0 !important;
157
+ page-break-after: avoid !important;
158
+ height: auto !important;
159
+ min-height: auto !important;
160
+ }
161
+ .reveal .absolute-element {
162
+ margin-left: 2.2cm;
163
+ margin-top: 1.8cm;
164
+ }
165
+ .reveal section .fragment {
166
+ opacity: 1 !important;
167
+ visibility: visible !important;
168
+
169
+ -webkit-transform: none !important;
170
+ -moz-transform: none !important;
171
+ -ms-transform: none !important;
172
+ transform: none !important;
173
+ }
174
+ .reveal section .slide-background {
175
+ position: absolute;
176
+ top: 0;
177
+ left: 0;
178
+ width: 100%;
179
+ z-index: 0;
180
+ }
181
+ .reveal section>* {
182
+ position: relative;
183
+ z-index: 1;
184
+ }
185
+ .reveal img {
186
+ box-shadow: none;
187
+ }
188
+ .reveal .roll {
189
+ overflow: visible;
190
+ line-height: 1em;
191
+ }
192
+ .reveal small a {
193
+ font-size: 16pt !important;
194
+ }
195
+
196
+ a:link:after,
197
+ a:visited:after {
198
+ content: " (" attr(href) ") ";
199
+ font-size: 90%;
200
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-presentation-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.0.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Meyer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-11 00:00:00.000000000 Z
11
+ date: 2014-11-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -22,19 +22,15 @@ files:
22
22
  - ".rspec"
23
23
  - ".rubocop.yml"
24
24
  - ".simplecov"
25
- - ".travis.yml"
26
25
  - ".yardopts"
27
- - Gemfile
28
- - Gemfile.lock
29
26
  - LICENSE.txt
30
27
  - README.md
31
28
  - Rakefile
32
29
  - config/license_finder.yml
33
- - config/rubocop/exclude.yml
34
- - config/rubocop/include.yml
35
30
  - cucumber.yml
36
31
  - doc/licenses/dependencies.db
37
32
  - features/image_gallery.feature
33
+ - features/metadata.feature
38
34
  - features/step_definitions.rb
39
35
  - features/support/aruba.rb
40
36
  - features/support/ci.rb
@@ -43,22 +39,30 @@ files:
43
39
  - features/support/reporting.rb
44
40
  - fixtures/images/image01.png
45
41
  - fixtures/images/image02.png
46
- - lib/middleman-presentation/helpers.rb
47
- - lib/middleman-presentation/helpers/image_gallery.rb
48
- - lib/middleman-presentation/helpers/plugins/common_plugin.rb
49
- - lib/middleman-presentation/helpers/plugins/diagram_plugin.rb
50
- - lib/middleman-presentation/helpers/plugins/footer_plugin.rb
51
- - lib/middleman-presentation/helpers/plugins/image_gallery_plugin.rb
52
- - lib/middleman-presentation/helpers/plugins/slides_plugin.rb
53
- - lib/middleman-presentation/helpers/slides.rb
54
- - lib/middleman-presentation/helpers/version.rb
42
+ - lib/middleman-presentation-helpers.rb
43
+ - lib/middleman-presentation-helpers/helpers/image.rb
44
+ - lib/middleman-presentation-helpers/helpers/image_gallery.rb
45
+ - lib/middleman-presentation-helpers/helpers/metadata.rb
46
+ - lib/middleman-presentation-helpers/helpers/slides.rb
47
+ - lib/middleman-presentation-helpers/plugins/footer_plugin.rb
48
+ - lib/middleman-presentation-helpers/plugins/highlight_plugin.rb
49
+ - lib/middleman-presentation-helpers/plugins/image_gallery_plugin.rb
50
+ - lib/middleman-presentation-helpers/plugins/images_plugin.rb
51
+ - lib/middleman-presentation-helpers/plugins/jquery_plugin.rb
52
+ - lib/middleman-presentation-helpers/plugins/metadata_plugin.rb
53
+ - lib/middleman-presentation-helpers/plugins/normalize_plugin.rb
54
+ - lib/middleman-presentation-helpers/plugins/print_plugin.rb
55
+ - lib/middleman-presentation-helpers/plugins/slides_plugin.rb
56
+ - lib/middleman-presentation-helpers/version.rb
57
+ - lib/middleman-presentation-plugin.rb
55
58
  - middleman-presentation-helpers.gemspec
56
59
  - templates/image_gallery.erb
57
- - vendor/assets/javascripts/footer.js
58
- - vendor/assets/stylesheets/footer.scss
59
- - vendor/assets/stylesheets/image_gallery.scss
60
- - vendor/assets/stylesheets/images.scss
61
- homepage: https://github.com/maxmeyer/middleman-presentation-helpers
60
+ - vendor/assets/middleman-presentation-helpers/footer/footer.js
61
+ - vendor/assets/middleman-presentation-helpers/footer/footer.scss
62
+ - vendor/assets/middleman-presentation-helpers/image_gallery/image_gallery.scss
63
+ - vendor/assets/middleman-presentation-helpers/images/images.scss
64
+ - vendor/assets/middleman-presentation-helpers/print/pdf.scss
65
+ homepage: https://github.com/maxmeyer/middleman-presentation
62
66
  licenses:
63
67
  - MIT
64
68
  metadata: {}
@@ -73,17 +77,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
77
  version: '0'
74
78
  required_rubygems_version: !ruby/object:Gem::Requirement
75
79
  requirements:
76
- - - ">="
80
+ - - ">"
77
81
  - !ruby/object:Gem::Version
78
- version: '0'
82
+ version: 1.3.1
79
83
  requirements: []
80
84
  rubyforge_project:
81
- rubygems_version: 2.4.5.1
85
+ rubygems_version: 2.4.1
82
86
  signing_key:
83
87
  specification_version: 4
84
88
  summary: Helpers for middleman-presentation
85
89
  test_files:
86
90
  - features/image_gallery.feature
91
+ - features/metadata.feature
87
92
  - features/step_definitions.rb
88
93
  - features/support/aruba.rb
89
94
  - features/support/ci.rb