middleman-presentation-core 0.16.0.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rdebugrc +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +52 -0
- data/.simplecov +25 -0
- data/.yardopts +5 -0
- data/Guardfile +13 -0
- data/LICENSE.software +21 -0
- data/Rakefile +200 -0
- data/config/license_finder.yml +13 -0
- data/cucumber.yml +2 -0
- data/doc/licenses/dependencies.csv +55 -0
- data/doc/licenses/dependencies.db +0 -0
- data/doc/licenses/dependencies.html +1415 -0
- data/doc/licenses/dependencies.md +603 -0
- data/doc/licenses/dependencies_detailed.csv +190 -0
- data/doc/yard/.keep +0 -0
- data/features/build_presentation.feature +62 -0
- data/features/code_highlighting.feature +43 -0
- data/features/components.feature +29 -0
- data/features/create_plugin-cli.feature +11 -0
- data/features/create_presentation-cli.feature +349 -0
- data/features/create_slide-cli.feature +188 -0
- data/features/create_slides-templates-cli.feature +114 -0
- data/features/create_theme-cli.feature +58 -0
- data/features/default_slides.feature +58 -0
- data/features/edit_slide-cli.feature +121 -0
- data/features/export_presentation-cli.feature +23 -0
- data/features/grouping_slides.feature +150 -0
- data/features/ignore_slides.feature +103 -0
- data/features/init_application-cli.feature +59 -0
- data/features/init_predefined_slides.feature +9 -0
- data/features/language_detection.feature +0 -0
- data/features/list_assets-cli.feature +13 -0
- data/features/list_components-cli.feature +13 -0
- data/features/list_helpers-cli.feature +13 -0
- data/features/list_plugins-cli.feature +13 -0
- data/features/list_styles-cli.feature +17 -0
- data/features/plugins.feature +63 -0
- data/features/presentation.feature +57 -0
- data/features/rename_slide-cli.feature +176 -0
- data/features/render_slides.feature +76 -0
- data/features/show_config-cli.feature +25 -0
- data/features/show_footer.feature +14 -0
- data/features/show_slide_number.feature +31 -0
- data/features/show_support_information-cli.feature +12 -0
- data/features/support/aruba.rb +18 -0
- data/features/support/ci.rb +3 -0
- data/features/support/env.rb +25 -0
- data/features/support/fixtures.rb +21 -0
- data/features/support/hash.rb +2 -0
- data/features/support/reporting.rb +2 -0
- data/features/version_number.feature +15 -0
- data/fixtures/middleman-presentation-simple_plugin/Rakefile +1 -0
- data/fixtures/middleman-presentation-simple_plugin/lib/middleman-presentation-plugin.rb +0 -0
- data/fixtures/middleman-presentation-simple_plugin/lib/middleman-presentation-simple_plugin/helpers.rb +13 -0
- data/fixtures/middleman-presentation-simple_plugin/lib/middleman-presentation-simple_plugin/plugin.rb +34 -0
- data/fixtures/middleman-presentation-simple_plugin/lib/middleman-presentation-simple_plugin/version.rb +8 -0
- data/fixtures/middleman-presentation-simple_plugin/lib/middleman-presentation-simple_plugin.rb +11 -0
- data/fixtures/middleman-presentation-simple_plugin/middleman-presentation-simple_plugin.gemspec +22 -0
- data/fixtures/middleman-presentation-simple_plugin/vendor/assets/stylesheets/test_simple.scss +3 -0
- data/lib/middleman-presentation-core/application_config.rb +198 -0
- data/lib/middleman-presentation-core/asset.rb +103 -0
- data/lib/middleman-presentation-core/asset_component.rb +34 -0
- data/lib/middleman-presentation-core/asset_list.rb +84 -0
- data/lib/middleman-presentation-core/asset_store.rb +73 -0
- data/lib/middleman-presentation-core/assets_loader.rb +95 -0
- data/lib/middleman-presentation-core/assets_manager.rb +73 -0
- data/lib/middleman-presentation-core/cache.rb +49 -0
- data/lib/middleman-presentation-core/cli/base.rb +30 -0
- data/lib/middleman-presentation-core/cli/base_group.rb +11 -0
- data/lib/middleman-presentation-core/cli/build.rb +13 -0
- data/lib/middleman-presentation-core/cli/build_presentation.rb +57 -0
- data/lib/middleman-presentation-core/cli/change.rb +13 -0
- data/lib/middleman-presentation-core/cli/change_slide.rb +82 -0
- data/lib/middleman-presentation-core/cli/create.rb +16 -0
- data/lib/middleman-presentation-core/cli/create_plugin.rb +62 -0
- data/lib/middleman-presentation-core/cli/create_presentation.rb +300 -0
- data/lib/middleman-presentation-core/cli/create_slide.rb +52 -0
- data/lib/middleman-presentation-core/cli/create_theme.rb +81 -0
- data/lib/middleman-presentation-core/cli/edit.rb +13 -0
- data/lib/middleman-presentation-core/cli/edit_slide.rb +49 -0
- data/lib/middleman-presentation-core/cli/export.rb +11 -0
- data/lib/middleman-presentation-core/cli/export_presentation.rb +55 -0
- data/lib/middleman-presentation-core/cli/init.rb +12 -0
- data/lib/middleman-presentation-core/cli/init_application.rb +48 -0
- data/lib/middleman-presentation-core/cli/init_predefined_slides.rb +31 -0
- data/lib/middleman-presentation-core/cli/list.rb +66 -0
- data/lib/middleman-presentation-core/cli/reset_thor.rb +18 -0
- data/lib/middleman-presentation-core/cli/runner.rb +47 -0
- data/lib/middleman-presentation-core/cli/serve.rb +13 -0
- data/lib/middleman-presentation-core/cli/serve_presentation.rb +30 -0
- data/lib/middleman-presentation-core/cli/shared.rb +51 -0
- data/lib/middleman-presentation-core/cli/show.rb +70 -0
- data/lib/middleman-presentation-core/comparable_slide.rb +69 -0
- data/lib/middleman-presentation-core/component.rb +86 -0
- data/lib/middleman-presentation-core/components_manager.rb +96 -0
- data/lib/middleman-presentation-core/configuration_file.rb +15 -0
- data/lib/middleman-presentation-core/css_class_extracter.rb +41 -0
- data/lib/middleman-presentation-core/custom_template.rb +15 -0
- data/lib/middleman-presentation-core/erb_template.rb +15 -0
- data/lib/middleman-presentation-core/errors.rb +10 -0
- data/lib/middleman-presentation-core/existing_slide.rb +92 -0
- data/lib/middleman-presentation-core/frontend_component.rb +75 -0
- data/lib/middleman-presentation-core/group_template.rb +15 -0
- data/lib/middleman-presentation-core/helpers_manager.rb +37 -0
- data/lib/middleman-presentation-core/ignore_file.rb +52 -0
- data/lib/middleman-presentation-core/liquid_template.rb +15 -0
- data/lib/middleman-presentation-core/list.rb +7 -0
- data/lib/middleman-presentation-core/locale_configurator.rb +84 -0
- data/lib/middleman-presentation-core/logger.rb +8 -0
- data/lib/middleman-presentation-core/main.rb +55 -0
- data/lib/middleman-presentation-core/markdown_template.rb +15 -0
- data/lib/middleman-presentation-core/middleman_environment.rb +108 -0
- data/lib/middleman-presentation-core/middleman_extension.rb +12 -0
- data/lib/middleman-presentation-core/middleman_step_definitions.rb +131 -0
- data/lib/middleman-presentation-core/new_slide.rb +140 -0
- data/lib/middleman-presentation-core/overwrite_sass.rb +22 -0
- data/lib/middleman-presentation-core/plugin.rb +8 -0
- data/lib/middleman-presentation-core/plugin_api.rb +65 -0
- data/lib/middleman-presentation-core/plugins_manager.rb +7 -0
- data/lib/middleman-presentation-core/predefined_slide_templates_directory.rb +15 -0
- data/lib/middleman-presentation-core/presentation_helper.rb +69 -0
- data/lib/middleman-presentation-core/register_extension.rb +4 -0
- data/lib/middleman-presentation-core/roles/comparable_by_name.rb +24 -0
- data/lib/middleman-presentation-core/slide_group.rb +33 -0
- data/lib/middleman-presentation-core/slide_list.rb +52 -0
- data/lib/middleman-presentation-core/slide_name.rb +61 -0
- data/lib/middleman-presentation-core/start.rb +68 -0
- data/lib/middleman-presentation-core/step_definitions.rb +238 -0
- data/lib/middleman-presentation-core/syntax_highlighter.rb +42 -0
- data/lib/middleman-presentation-core/test_helpers.rb +22 -0
- data/lib/middleman-presentation-core/transformers/file_keeper.rb +13 -0
- data/lib/middleman-presentation-core/transformers/group_slides.rb +34 -0
- data/lib/middleman-presentation-core/transformers/ignore_slides.rb +28 -0
- data/lib/middleman-presentation-core/transformers/remove_duplicate_slides.rb +32 -0
- data/lib/middleman-presentation-core/transformers/sort_slides.rb +13 -0
- data/lib/middleman-presentation-core/utils.rb +40 -0
- data/lib/middleman-presentation-core/version.rb +8 -0
- data/lib/middleman-presentation-core.rb +127 -0
- data/locales/de.yml +233 -0
- data/locales/en.yml +236 -0
- data/middleman-presentation-core.gemspec +40 -0
- data/source/slides/01.html.liquid +0 -0
- data/spec/asset_component_spec.rb +13 -0
- data/spec/asset_list_spec.rb +50 -0
- data/spec/asset_spec.rb +45 -0
- data/spec/asset_store_spec.rb +61 -0
- data/spec/assets_manager_spec.rb +111 -0
- data/spec/components_manager_spec.rb +142 -0
- data/spec/css_class_extracter_spec.rb +28 -0
- data/spec/existing_slide_spec.rb +177 -0
- data/spec/frontend_component_spec.rb +94 -0
- data/spec/helpers_manager_spec.rb +90 -0
- data/spec/ignore_file_spec.rb +75 -0
- data/spec/new_slide_spec.rb +155 -0
- data/spec/presentation_helper_spec.rb +137 -0
- data/spec/shared_examples/.keep +0 -0
- data/spec/slide_group_spec.rb +54 -0
- data/spec/slide_list_spec.rb +125 -0
- data/spec/slide_name_spec.rb +53 -0
- data/spec/spec_helper.rb +19 -0
- data/spec/support/aruba.rb +53 -0
- data/spec/support/ci.rb +20 -0
- data/spec/support/environment.rb +18 -0
- data/spec/support/filesystem.rb +22 -0
- data/spec/support/locale.rb +2 -0
- data/spec/support/reporting.rb +2 -0
- data/spec/support/rspec.rb +9 -0
- data/spec/support/string.rb +2 -0
- data/spec/transformers/file_keeper_spec.rb +24 -0
- data/spec/transformers/group_slides_spec.rb +44 -0
- data/spec/transformers/ignore_slides_spec.rb +64 -0
- data/spec/transformers/remove_duplicate_slides_spec.rb +120 -0
- data/spec/transformers/sort_slides_spec.rb +17 -0
- data/spec/utils_spec.rb +14 -0
- data/templates/.bowerrc.tt +4 -0
- data/templates/.gitignore +5 -0
- data/templates/Gemfile.tt +32 -0
- data/templates/LICENSE.presentation +1 -0
- data/templates/Rakefile +59 -0
- data/templates/bower.json.tt +8 -0
- data/templates/bundler_config.tt +6 -0
- data/templates/config.rb.tt +2 -0
- data/templates/config.yaml.tt +17 -0
- data/templates/gitignore.tt +14 -0
- data/templates/plugin/%plugin_name%.gemspec.tt +24 -0
- data/templates/plugin/.gitignore +13 -0
- data/templates/plugin/Gemfile.tt +4 -0
- data/templates/plugin/LICENSE.txt.tt +22 -0
- data/templates/plugin/README.md.tt +31 -0
- data/templates/plugin/Rakefile +1 -0
- data/templates/plugin/lib/%plugin_name%/version.rb.tt +8 -0
- data/templates/plugin/lib/%plugin_name%.rb.tt +10 -0
- data/templates/predefined_slides.d/00_00.html.erb.tt +26 -0
- data/templates/predefined_slides.d/00_01.html.md.tt +6 -0
- data/templates/predefined_slides.d/999980.html.erb.tt +4 -0
- data/templates/predefined_slides.d/999981.html.erb.tt +27 -0
- data/templates/predefined_slides.d/999982.html.erb.tt +4 -0
- data/templates/presentation_theme/bower.json.tt +20 -0
- data/templates/presentation_theme/images/.keep +0 -0
- data/templates/presentation_theme/javascripts/%theme_name%.js.tt +0 -0
- data/templates/presentation_theme/stylesheets/%theme_name%.scss.tt +9 -0
- data/templates/presentation_theme/stylesheets/_fonts.scss.tt +0 -0
- data/templates/presentation_theme/stylesheets/_images.scss.tt +5 -0
- data/templates/presentation_theme/stylesheets/_theme.scss.tt +251 -0
- data/templates/rackup.config.erb +16 -0
- data/templates/script/bootstrap +5 -0
- data/templates/script/build +3 -0
- data/templates/script/export +3 -0
- data/templates/script/presentation +3 -0
- data/templates/script/slide +3 -0
- data/templates/script/start +43 -0
- data/templates/slides/custom.md.tt +3 -0
- data/templates/slides/erb.tt +5 -0
- data/templates/slides/group.tt +3 -0
- data/templates/slides/liquid.tt +5 -0
- data/templates/slides/markdown.tt +3 -0
- data/templates/source/index.html.erb +1 -0
- data/templates/source/javascripts/application.js.tt +3 -0
- data/templates/source/layout.erb +133 -0
- data/templates/source/stylesheets/application.scss.tt +3 -0
- metadata +574 -0
@@ -0,0 +1,43 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'optparse'
|
4
|
+
require 'ostruct'
|
5
|
+
require 'addressable/uri'
|
6
|
+
|
7
|
+
uri = Addressable::URI.parse('http://127.0.0.1:1234')
|
8
|
+
|
9
|
+
options = OpenStruct.new
|
10
|
+
options.listen = uri
|
11
|
+
options.verbose = false
|
12
|
+
|
13
|
+
OptionParser.new do |opts|
|
14
|
+
opts.banner = 'Usage: script/start [options]'
|
15
|
+
|
16
|
+
opts.on('-p PORT', '--port PORT', 'Port to listen on') do |p|
|
17
|
+
options.listen.port = p
|
18
|
+
end
|
19
|
+
|
20
|
+
opts.on('-h HOST', '--host HOST', 'Host to listen on') do |h|
|
21
|
+
options.listen.host = h
|
22
|
+
end
|
23
|
+
|
24
|
+
opts.on('-v', '--verbose', 'Verbose mode') do |_h|
|
25
|
+
options.verbose = true
|
26
|
+
end
|
27
|
+
|
28
|
+
end.parse!
|
29
|
+
|
30
|
+
launchy_pid = fork do
|
31
|
+
system("bundle exec launchy #{options.listen}")
|
32
|
+
end
|
33
|
+
|
34
|
+
Process.waitpid(launchy_pid)
|
35
|
+
|
36
|
+
command = []
|
37
|
+
command << 'bundle exec'
|
38
|
+
command << 'middleman server'
|
39
|
+
command << "-p #{options.listen.port}"
|
40
|
+
command << "-h #{options.listen.host}"
|
41
|
+
command << '--verbose' if options.verbose
|
42
|
+
|
43
|
+
system(command.join(' '))
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= yield_slides %>
|
@@ -0,0 +1,133 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="<%= @language %>">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
|
6
|
+
<title><%%= Middleman::Presentation.config.title %><%% if Middleman::Presentation.config.subtitle %> – <%%= Middleman::Presentation.config.subtitle %><%% end %></title>
|
7
|
+
|
8
|
+
<%% if Middleman::Presentation.config.description -%>
|
9
|
+
<meta name="description" content="<%%= Middleman::Presentation.config.description %>">
|
10
|
+
<%% end -%>
|
11
|
+
<meta name="author" content="<%%= Middleman::Presentation.config.author %>">
|
12
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
13
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
14
|
+
|
15
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
16
|
+
|
17
|
+
<%%= stylesheet_link_tag 'application' %>
|
18
|
+
|
19
|
+
<!-- If the query includes 'print-pdf', include the PDF print sheet -->
|
20
|
+
<script>
|
21
|
+
if( window.location.search.match( /print-pdf/gi ) ) {
|
22
|
+
var link = document.createElement( 'link' );
|
23
|
+
link.rel = 'stylesheet';
|
24
|
+
link.type = 'text/css';
|
25
|
+
link.href = '<%%= asset_path(:css, "middleman-presentation-helpers/print/pdf.css") %>';
|
26
|
+
document.getElementsByTagName( 'head' )[0].appendChild( link );
|
27
|
+
|
28
|
+
window.print();
|
29
|
+
}
|
30
|
+
</script>
|
31
|
+
|
32
|
+
<!--
|
33
|
+
w[if lt IE 9]>
|
34
|
+
<script src="<%%= asset_path(:js, 'reveal.js/lib/js/html5shiv.js') %>"></script>
|
35
|
+
w<![endif]
|
36
|
+
-->
|
37
|
+
</head>
|
38
|
+
|
39
|
+
<body>
|
40
|
+
<div class="reveal">
|
41
|
+
<!-- Any section element inside of this container is displayed as a slide -->
|
42
|
+
<div class="slides">
|
43
|
+
<%%= yield %>
|
44
|
+
</div>
|
45
|
+
<footer class="mp-site-footer">
|
46
|
+
<div class="mp-copyright-notice">
|
47
|
+
© <%%= Time.now.strftime('%Y') %> <%%= Middleman::Presentation.config.author -%>,
|
48
|
+
<span class="mp-license">
|
49
|
+
<%%- if Middleman::Presentation.config.license -%>
|
50
|
+
<%%= Middleman::Presentation.config.license %>
|
51
|
+
<%%- end -%>
|
52
|
+
</span>
|
53
|
+
<a href="?print-pdf" class="mp-print-link"><i class="mp-print"></i></a>
|
54
|
+
</div>
|
55
|
+
</footer>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<%%= javascript_include_tag 'application' %>
|
59
|
+
|
60
|
+
<script>
|
61
|
+
// Full list of configuration options available here:
|
62
|
+
// https://github.com/hakimel/reveal.js#configuration
|
63
|
+
Reveal.initialize({
|
64
|
+
// The "normal" size of the presentation, aspect ratio will be preserved
|
65
|
+
// when the presentation is scaled to fit different resolutions. Can be
|
66
|
+
// specified using percentage units.
|
67
|
+
width: <%%= Middleman::Presentation.config.width %>,
|
68
|
+
height: <%%= Middleman::Presentation.config.height %>,
|
69
|
+
// Factor of the display size that should remain empty around the content
|
70
|
+
margin: <%%= Middleman::Presentation.config.margin %>,
|
71
|
+
// Bounds for smallest/largest possible scale to apply to content
|
72
|
+
minScale: <%%= Middleman::Presentation.config.min_scale %>,
|
73
|
+
maxScale: <%%= Middleman::Presentation.config.max_scale %>,
|
74
|
+
// Display controls in the bottom right corner
|
75
|
+
controls: <%%= Middleman::Presentation.config.activate_controls %>,
|
76
|
+
// Display a presentation progress bar
|
77
|
+
progress: <%%= Middleman::Presentation.config.activate_progress %>,
|
78
|
+
// Display the page number of the current slide
|
79
|
+
slideNumber: <%%= Middleman::Presentation.config.activate_slide_number %>,
|
80
|
+
// Push each slide change to the browser history
|
81
|
+
history: <%%= Middleman::Presentation.config.activate_history %>,
|
82
|
+
// Enable keyboard shortcuts for navigation
|
83
|
+
keyboard: <%%= Middleman::Presentation.config.activate_keyboard %>,
|
84
|
+
// Enable the slide overview mode
|
85
|
+
overview: <%%= Middleman::Presentation.config.activate_overview %>,
|
86
|
+
// Vertical centering of slides
|
87
|
+
center: <%%= Middleman::Presentation.config.activate_center %>,
|
88
|
+
// Enables touch navigation on devices with touch input
|
89
|
+
touch: <%%= Middleman::Presentation.config.activate_touch %>,
|
90
|
+
// Loop the presentation
|
91
|
+
loop: <%%= Middleman::Presentation.config.activate_loop %>,
|
92
|
+
// Change the presentation direction to be RTL
|
93
|
+
rtl: <%%= Middleman::Presentation.config.activate_rtl %>,
|
94
|
+
// Turns fragments on and off globally
|
95
|
+
fragments: <%%= Middleman::Presentation.config.activate_fragments %>,
|
96
|
+
// Flags if the presentation is running in an embedded mode,
|
97
|
+
// i.e. contained within a limited portion of the screen
|
98
|
+
embedded: <%%= Middleman::Presentation.config.activate_embedded %>,
|
99
|
+
// Number of milliseconds between automatically proceeding to the
|
100
|
+
// next slide, disabled when set to 0, this value can be overwritten
|
101
|
+
// by using a data-autoslide attribute on your slides
|
102
|
+
autoSlide: <%%= Middleman::Presentation.config.auto_slide %>,
|
103
|
+
// Stop auto-sliding after user input
|
104
|
+
autoSlideStoppable: <%%= Middleman::Presentation.config.auto_slide_stoppable %>,
|
105
|
+
// Enable slide navigation via mouse wheel
|
106
|
+
mouseWheel: <%%= Middleman::Presentation.config.activate_mouse_wheel %>,
|
107
|
+
// Hides the address bar on mobile devices
|
108
|
+
hideAddressBar: <%%= Middleman::Presentation.config.hide_address_bar %>,
|
109
|
+
// Opens links in an iframe preview overlay
|
110
|
+
previewLinks: <%%= Middleman::Presentation.config.preview_links %>,
|
111
|
+
// Transition style
|
112
|
+
transition: '<%%= Middleman::Presentation.config.default_transition_type %>',
|
113
|
+
// Transition speed
|
114
|
+
transitionSpeed: '<%%= Middleman::Presentation.config.default_transition_speed %>',
|
115
|
+
// Transition style for full page slide backgrounds
|
116
|
+
backgroundTransition: '<%%= Middleman::Presentation.config.default_background_transition %>',
|
117
|
+
// Number of slides away from the current that are visible
|
118
|
+
viewDistance: <%%= Middleman::Presentation.config.view_distance %>,
|
119
|
+
// Parallax background image
|
120
|
+
parallaxBackgroundImage: '<%%= Middleman::Presentation.config.parallax_background_image %>',
|
121
|
+
// Parallax background size
|
122
|
+
parallaxBackgroundSize: '<%%= Middleman::Presentation.config.parallax_background_size %>',
|
123
|
+
dependencies: [
|
124
|
+
{ src: '<%%= asset_path(:js, "reveal.js/lib/js/classList.js") %>', condition: function() { return !document.body.classList; } },
|
125
|
+
{ src: '<%%= asset_path(:js, "highlightjs/highlight.pack.js") %>', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
|
126
|
+
{ src: '<%%= asset_path(:js, "reveal.js/plugin/zoom-js/zoom.js") %>', async: true, condition: function() { return !!document.body.classList; } },
|
127
|
+
{ src: '<%%= asset_path(:js, "reveal.js/plugin/notes/notes.js") %>', async: true, condition: function() { return !!document.body.classList; } }
|
128
|
+
]
|
129
|
+
});
|
130
|
+
</script>
|
131
|
+
|
132
|
+
</body>
|
133
|
+
</html>
|