locomotivecms_builder 1.0.0.alpha1

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 (137) hide show
  1. data/.gitignore +31 -0
  2. data/Gemfile +8 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +68 -0
  5. data/Rakefile +47 -0
  6. data/TODO +57 -0
  7. data/bin/builder +9 -0
  8. data/generators/blank/Gemfile.tt +20 -0
  9. data/generators/blank/app/content_types/.empty_directory +1 -0
  10. data/generators/blank/app/views/pages/404.liquid +11 -0
  11. data/generators/blank/app/views/pages/index.liquid +19 -0
  12. data/generators/blank/app/views/snippets/.empty_directory +1 -0
  13. data/generators/blank/config/deploy.yml +12 -0
  14. data/generators/blank/config/site.yml.tt +16 -0
  15. data/generators/blank/config/translations.yml +8 -0
  16. data/generators/blank/config.ru +3 -0
  17. data/generators/blank/data/.empty_directory +1 -0
  18. data/generators/blank/public/fonts/.empty_directory +1 -0
  19. data/generators/blank/public/images/.empty_directory +1 -0
  20. data/generators/blank/public/javascripts/.empty_directory +1 -0
  21. data/generators/blank/public/samples/.empty_directory +1 -0
  22. data/generators/blank/public/stylesheets/.empty_directory +1 -0
  23. data/generators/bootstrap/Gemfile.tt +20 -0
  24. data/generators/bootstrap/app/content_types/.empty_directory +1 -0
  25. data/generators/bootstrap/app/views/pages/404.liquid +13 -0
  26. data/generators/bootstrap/app/views/pages/404.liquid.haml +10 -0
  27. data/generators/bootstrap/app/views/pages/index.liquid +85 -0
  28. data/generators/bootstrap/app/views/pages/index.liquid.haml +72 -0
  29. data/generators/bootstrap/app/views/snippets/footer.liquid +3 -0
  30. data/generators/bootstrap/app/views/snippets/footer.liquid.haml +2 -0
  31. data/generators/bootstrap/config/deploy.yml +12 -0
  32. data/generators/bootstrap/config/site.yml.tt +16 -0
  33. data/generators/bootstrap/config/translations.yml +8 -0
  34. data/generators/bootstrap/config.ru +3 -0
  35. data/generators/bootstrap/data/.empty_directory +1 -0
  36. data/generators/bootstrap/public/fonts/FontAwesome.otf +0 -0
  37. data/generators/bootstrap/public/fonts/font-awesome-ie7.min.css +23 -0
  38. data/generators/bootstrap/public/fonts/font-awesome.css +469 -0
  39. data/generators/bootstrap/public/fonts/font-awesome.min.css +34 -0
  40. data/generators/bootstrap/public/fonts/fontawesome-webfont.eot +0 -0
  41. data/generators/bootstrap/public/fonts/fontawesome-webfont.ttf +0 -0
  42. data/generators/bootstrap/public/fonts/fontawesome-webfont.woff +0 -0
  43. data/generators/bootstrap/public/javascripts/bootstrap.js +2159 -0
  44. data/generators/bootstrap/public/javascripts/bootstrap.min.js +6 -0
  45. data/generators/bootstrap/public/samples/.empty_directory +1 -0
  46. data/generators/bootstrap/public/stylesheets/application.css.scss +39 -0
  47. data/generators/bootstrap/public/stylesheets/bootstrap-responsive.css +1092 -0
  48. data/generators/bootstrap/public/stylesheets/bootstrap-responsive.min.css +9 -0
  49. data/generators/bootstrap/public/stylesheets/bootstrap.css +5652 -0
  50. data/generators/bootstrap/public/stylesheets/bootstrap.min.css +726 -0
  51. data/generators/content_type/app/content_types/%name%.yml.tt +58 -0
  52. data/generators/content_type/data/%name%.yml.tt +24 -0
  53. data/generators/page/template.liquid.haml.tt +35 -0
  54. data/generators/page/template.liquid.tt +1 -0
  55. data/generators/snippet/template.liquid.haml.tt +4 -0
  56. data/generators/snippet/template.liquid.tt +4 -0
  57. data/lib/locomotive/builder/cli.rb +225 -0
  58. data/lib/locomotive/builder/exceptions.rb +17 -0
  59. data/lib/locomotive/builder/generators/content_type.rb +47 -0
  60. data/lib/locomotive/builder/generators/page.rb +57 -0
  61. data/lib/locomotive/builder/generators/site/base.rb +30 -0
  62. data/lib/locomotive/builder/generators/site/blank.rb +23 -0
  63. data/lib/locomotive/builder/generators/site/bootstrap.rb +35 -0
  64. data/lib/locomotive/builder/generators/site.rb +97 -0
  65. data/lib/locomotive/builder/generators/snippet.rb +54 -0
  66. data/lib/locomotive/builder/liquid/drops/base.rb +44 -0
  67. data/lib/locomotive/builder/liquid/drops/content_entry.rb +48 -0
  68. data/lib/locomotive/builder/liquid/drops/content_types.rb +121 -0
  69. data/lib/locomotive/builder/liquid/drops/page.rb +36 -0
  70. data/lib/locomotive/builder/liquid/drops/site.rb +21 -0
  71. data/lib/locomotive/builder/liquid/errors.rb +7 -0
  72. data/lib/locomotive/builder/liquid/filters/date.rb +98 -0
  73. data/lib/locomotive/builder/liquid/filters/html.rb +154 -0
  74. data/lib/locomotive/builder/liquid/filters/misc.rb +28 -0
  75. data/lib/locomotive/builder/liquid/filters/resize.rb +18 -0
  76. data/lib/locomotive/builder/liquid/filters/text.rb +50 -0
  77. data/lib/locomotive/builder/liquid/filters/translate.rb +24 -0
  78. data/lib/locomotive/builder/liquid/patches.rb +47 -0
  79. data/lib/locomotive/builder/liquid/tags/consume.rb +58 -0
  80. data/lib/locomotive/builder/liquid/tags/csrf.rb +34 -0
  81. data/lib/locomotive/builder/liquid/tags/editable/base.rb +46 -0
  82. data/lib/locomotive/builder/liquid/tags/editable/control.rb +19 -0
  83. data/lib/locomotive/builder/liquid/tags/editable/file.rb +15 -0
  84. data/lib/locomotive/builder/liquid/tags/editable/long_text.rb +15 -0
  85. data/lib/locomotive/builder/liquid/tags/editable/short_text.rb +15 -0
  86. data/lib/locomotive/builder/liquid/tags/editable.rb +5 -0
  87. data/lib/locomotive/builder/liquid/tags/extends.rb +25 -0
  88. data/lib/locomotive/builder/liquid/tags/google_analytics.rb +28 -0
  89. data/lib/locomotive/builder/liquid/tags/inline_editor.rb +16 -0
  90. data/lib/locomotive/builder/liquid/tags/locale_switcher.rb +180 -0
  91. data/lib/locomotive/builder/liquid/tags/nav.rb +167 -0
  92. data/lib/locomotive/builder/liquid/tags/paginate.rb +105 -0
  93. data/lib/locomotive/builder/liquid/tags/seo.rb +74 -0
  94. data/lib/locomotive/builder/liquid/tags/snippet.rb +42 -0
  95. data/lib/locomotive/builder/liquid/tags/with_scope.rb +43 -0
  96. data/lib/locomotive/builder/liquid.rb +19 -0
  97. data/lib/locomotive/builder/listen.rb +48 -0
  98. data/lib/locomotive/builder/misc/core_ext.rb +29 -0
  99. data/lib/locomotive/builder/misc/dragonfly.rb +82 -0
  100. data/lib/locomotive/builder/misc/httparty.rb +47 -0
  101. data/lib/locomotive/builder/misc/i18n.rb +2 -0
  102. data/lib/locomotive/builder/misc/will_paginate.rb +16 -0
  103. data/lib/locomotive/builder/misc.rb +5 -0
  104. data/lib/locomotive/builder/server/dynamic_assets.rb +31 -0
  105. data/lib/locomotive/builder/server/entry_submission.rb +116 -0
  106. data/lib/locomotive/builder/server/favicon.rb +17 -0
  107. data/lib/locomotive/builder/server/locale.rb +42 -0
  108. data/lib/locomotive/builder/server/middleware.rb +54 -0
  109. data/lib/locomotive/builder/server/not_found.rb +18 -0
  110. data/lib/locomotive/builder/server/page.rb +59 -0
  111. data/lib/locomotive/builder/server/path.rb +34 -0
  112. data/lib/locomotive/builder/server/renderer.rb +105 -0
  113. data/lib/locomotive/builder/server/templatized_page.rb +32 -0
  114. data/lib/locomotive/builder/server.rb +78 -0
  115. data/lib/locomotive/builder/standalone_server.rb +33 -0
  116. data/lib/locomotive/builder/version.rb +5 -0
  117. data/lib/locomotive/builder.rb +167 -0
  118. data/locales/de.yml +143 -0
  119. data/locales/en.yml +164 -0
  120. data/locales/es.yml +119 -0
  121. data/locales/et.yml +140 -0
  122. data/locales/fr.yml +133 -0
  123. data/locales/it.yml +141 -0
  124. data/locales/nb.yml +177 -0
  125. data/locales/nl.yml +148 -0
  126. data/locales/pl.yml +189 -0
  127. data/locales/pt-BR.yml +125 -0
  128. data/locales/ru.yml +210 -0
  129. data/locomotivecms_builder.gemspec +42 -0
  130. data/spec/integration/cassettes/pull.yml +590 -0
  131. data/spec/integration/cassettes/push.yml +775 -0
  132. data/spec/integration/integration_helper.rb +15 -0
  133. data/spec/integration/server_spec.rb +37 -0
  134. data/spec/integration/sites_spec.rb +27 -0
  135. data/spec/spec_helper.rb +12 -0
  136. data/spec/support/helpers.rb +13 -0
  137. metadata +468 -0
data/.gitignore ADDED
@@ -0,0 +1,31 @@
1
+ .DS_Store
2
+ <<<<<<< HEAD
3
+ site
4
+ tests
5
+ .sass-cache
6
+ .rbenv-gemsets
7
+ =======
8
+ /site
9
+ >>>>>>> wip
10
+ *.gem
11
+ *.rbc
12
+ .bundle
13
+ .config
14
+ .yardoc
15
+ Gemfile.lock
16
+ InstalledFiles
17
+ _yardoc
18
+ coverage
19
+ doc/
20
+ lib/bundler/man
21
+ pkg
22
+ rdoc
23
+ spec/reports
24
+ test/tmp
25
+ test/version_tmp
26
+ tmp
27
+
28
+ /.rbenv-gemsets
29
+ /.sass-cache/
30
+
31
+ /tests
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in builder.gemspec
4
+ gemspec
5
+
6
+ gem 'locomotivecms_mounter', path: '../gems/mounter', require: false
7
+
8
+ gem 'rb-fsevent', '~> 0.9.1'
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Rodrigo Alvarez
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # LocomotiveCMS::Builder
2
+
3
+ The LocomotiveCMS builder is a site generator for the LocomotiveCMS engine powered by all the efficient and modern HTML development tools (Haml, SASS, Compass, Less).
4
+
5
+ (TO BE COMPLETED)
6
+
7
+ ## Developers / Alpha users / Contributors
8
+
9
+ The push/pull functionalities require to have the edge version of the engine (master branch).
10
+ Also, please, keep in mind, that is nearly an alpha version so it is not stable enough to be used in production.
11
+
12
+ ### Get the development of the mounter
13
+
14
+ $ git clone git://github.com/locomotivecms/mounter.git
15
+
16
+ Note: If you want to contribute, you may consider to fork it instead
17
+
18
+ ### Get the source of the builder
19
+
20
+ $ git clone git://github.com/locomotivecms/builder.git
21
+ $ cd builder
22
+ $ git checkout wip
23
+
24
+ Note: Again, if you want to contribute, you may consider to fork it instead
25
+
26
+ Modify the Gemfile to change the link to the *mounter* gem which should point to your local installation of the mounter.
27
+
28
+ $ bundle install
29
+
30
+ ### Test it
31
+
32
+ #### Run the server with a default site
33
+
34
+ $ bundle exec bin/builder server <path to the mounter gem>/spec/fixtures/default
35
+
36
+ #### Push a site (WIP)
37
+
38
+ $ bundle exec bin/builder push <path to your LocomotiveCMS local site> <url of your remote LocomotiveCMS site> <email of your admin account> <password>
39
+
40
+ #### Pull a site (Not tested yet)
41
+
42
+ $ bundle exec bin/builder pull <url of your remote LocomotiveCMS site> <email of your admin account> <password>
43
+
44
+ ## Contributing
45
+
46
+ 1. Fork it
47
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
48
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
49
+ 4. Push to the branch (`git push origin my-new-feature`)
50
+ 5. Create new Pull Request
51
+
52
+ ## Installation (TODO)
53
+
54
+ Add this line to your application's Gemfile:
55
+
56
+ gem 'locomotive_builder'
57
+
58
+ And then execute:
59
+
60
+ $ bundle
61
+
62
+ Or install it yourself as:
63
+
64
+ $ gem install locomotive_builder
65
+
66
+ ## Usage
67
+
68
+ TODO: Write usage instructions here
data/Rakefile ADDED
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env rake
2
+ # encoding: utf-8
3
+
4
+ require 'rubygems'
5
+ require 'bundler/setup'
6
+ require 'bundler/gem_tasks'
7
+
8
+ require 'rake'
9
+ require 'vcr'
10
+ require 'rspec'
11
+ require 'rspec/core/rake_task'
12
+ require 'rubygems/package_task'
13
+
14
+ $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
15
+
16
+ require 'locomotive/builder'
17
+ require 'locomotive/builder/version'
18
+
19
+ gemspec = eval(File.read('locomotivecms_builder.gemspec'))
20
+ Gem::PackageTask.new(gemspec) do |pkg|
21
+ pkg.gem_spec = gemspec
22
+ end
23
+
24
+ desc 'build the gem and release it to rubygems.org'
25
+ task :release => :gem do
26
+ sh "gem push pkg/locomotivecms_builder-#{gemspec.version}.gem"
27
+ end
28
+
29
+ namespace :development do
30
+ task :bootstrap do
31
+ VCR.configure do |c|
32
+ c.cassette_library_dir = File.expand_path(File.dirname(__FILE__) + '/spec/integration/cassettes')
33
+ c.hook_into :webmock # or :fakeweb
34
+ c.allow_http_connections_when_no_cassette = true
35
+ # c.ignore_request do |request|
36
+ # URI(request.uri).path =~ /translations/
37
+ # end
38
+ end
39
+
40
+ FileUtils.rm_rf(File.join(File.dirname(__FILE__), 'site'))
41
+ VCR.use_cassette('pull') do
42
+ exit unless Locomotive::Builder.clone("site", {"host" => "http://locomotive.engine.dev:3000"}, "email" => "admin@locomotivecms.com", "password" => "locomotive")
43
+ end
44
+
45
+ Locomotive::Builder.push("site", {"host" => "http://locomotive.engine.dev:3000"}, "email" => "admin@locomotivecms.com", "password" => "locomotive", "force" => true, "data" => true)
46
+ end
47
+ end
data/TODO ADDED
@@ -0,0 +1,57 @@
1
+ *** REQUIREMENTS ***
2
+
3
+ x templatized page
4
+ x localized page
5
+ x dragonfly
6
+ - listen:
7
+ x content types and content entries / site
8
+ - make it work for other platforms (linux, windows)
9
+ x post content entry
10
+ x liquid assigns: sessions (rack)
11
+ x I18n keys
12
+ x fr/en
13
+ x other locales
14
+ x static js/css assets (non coffeescript or sass files) are not reloaded if got changed.
15
+ x content types / liquid
16
+ x group_contents_by
17
+ x select_names
18
+ x params to launch the thin server (port, address ?)
19
+ - commands:
20
+ ! create
21
+ ! sites
22
+ x blank
23
+ x twitter bootstrap + HAML
24
+ ? localized
25
+ ? boilerplate
26
+ ! copy Bundler / Gemfile (pending)
27
+ x content types
28
+ x definitions
29
+ x data (Faker)
30
+ x page
31
+ x snippet
32
+ - push:
33
+ x option to select to push only some parts (pages, ...etc)
34
+ x --force option
35
+ - more tests
36
+ - pull
37
+ - translations (Rod)
38
+ - version checkings:
39
+ - builder when running it
40
+ - engine when pushing a site
41
+ - nice error page (replace the default exception middleware) to display:
42
+ - liquid errors
43
+ - other exceptions
44
+ - nice logs
45
+
46
+ - tests (Rod/Did)
47
+
48
+ - refactoring:
49
+ x generators/sites -> generators/site
50
+ x list is only for site generators
51
+ x move the call to the CC generator directly in the builder.rb file
52
+
53
+ *** FEATURES ***
54
+
55
+ - toolbar to:
56
+ - push a whole site / page(s) / snippet(s) / ....
57
+ - create / update a content type
data/bin/builder ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # needed if you launch it without bundler
4
+ $:.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib'))
5
+
6
+ require 'locomotive/builder'
7
+ require 'locomotive/builder/cli'
8
+
9
+ Locomotive::Builder::CLI::Main.start
@@ -0,0 +1,20 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # ruby '1.9.3'
4
+
5
+ gem 'locomotivecms_builder', '<%= config[:version] -%>'
6
+
7
+ group :development do
8
+ # Mac OS X
9
+ gem 'rb-fsevent', '~> 0.9.1', :require => RUBY_PLATFORM.include?('darwin') && 'rb-fsevent'
10
+
11
+ # TODO: Linux
12
+
13
+ # TODO: Windows
14
+ end
15
+
16
+ group :misc do
17
+ # Add your extra gems here
18
+ # gem 'susy', require: 'susy'
19
+ # gem 'redcarpet', require: 'redcarpet'
20
+ end
@@ -0,0 +1 @@
1
+ .empty_directory
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: Page not found
3
+ published: false
4
+ ---
5
+ {% extends index %}
6
+
7
+ {% block 'main' %}
8
+
9
+ <p>Page not found</p>
10
+
11
+ {% endblock %}
@@ -0,0 +1,19 @@
1
+ ---
2
+ title: Home page
3
+ published: true
4
+ ---
5
+ <!DOCTYPE html>
6
+ <html lang="en">
7
+ <head>
8
+ <meta charset="utf-8">
9
+ <title>{{ site.name }}</title>
10
+ <meta name="keywords" value="{{ site.meta_keywords }}" />
11
+ <meta name="description" value="{{ site.meta_description }}" />
12
+ </head>
13
+ <body>
14
+ <h1>{{ page.title }}</h1>
15
+ {% block 'main' %}
16
+ <p>Lorem ipsum....</p>
17
+ {% endblock %}
18
+ </body>
19
+ </html>
@@ -0,0 +1 @@
1
+ .empty_directory
@@ -0,0 +1,12 @@
1
+ development:
2
+ host: dev.example.com
3
+ email: john@doe.net
4
+ password: apassword
5
+ staging:
6
+ host: staging.example.com
7
+ email: john@doe.net
8
+ password: apassword
9
+ production:
10
+ host: www.example.com
11
+ email: john@doe.net
12
+ password: apassword
@@ -0,0 +1,16 @@
1
+ # TODO: explain it
2
+ name: <%= config[:name] %>
3
+
4
+ # TODO: explain it
5
+ # subdomain: sample
6
+
7
+ # TODO: explain it
8
+ # domains: [www.example.com, example.com]
9
+
10
+ # TODO: explain it
11
+ locales: [en]
12
+
13
+ # TODO: explain it
14
+ seo_title: <%= @name %>
15
+ meta_keywords: "some meta keywords"
16
+ meta_description: "some meta description"
@@ -0,0 +1,8 @@
1
+ # Your translations go here. To be used with the 'translate' liquid filter
2
+ # Example:
3
+ # {{ 'hello_world | translate '}}
4
+ #
5
+
6
+ # hello_world:
7
+ # en: Hello world !
8
+ # fr: Bonjour le monde !
@@ -0,0 +1,3 @@
1
+ require 'locomotive/builder/standalone_server'
2
+
3
+ run Locomotive::Builder::StandaloneServer.new(File.expand_path('.'))
@@ -0,0 +1 @@
1
+ .empty_directory
@@ -0,0 +1 @@
1
+ .empty_directory
@@ -0,0 +1 @@
1
+ .empty_directory
@@ -0,0 +1 @@
1
+ .empty_directory
@@ -0,0 +1 @@
1
+ .empty_directory
@@ -0,0 +1 @@
1
+ .empty_directory
@@ -0,0 +1,20 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # ruby '1.9.3'
4
+
5
+ gem 'locomotivecms_builder', '<%= config[:version] -%>'
6
+
7
+ group :development do
8
+ # Mac OS X
9
+ gem 'rb-fsevent', '~> 0.9.1', :require => RUBY_PLATFORM.include?('darwin') && 'rb-fsevent'
10
+
11
+ # TODO: Linux
12
+
13
+ # TODO: Windows
14
+ end
15
+
16
+ group :misc do
17
+ # Add your extra gems here
18
+ # gem 'susy', require: 'susy'
19
+ # gem 'redcarpet', require: 'redcarpet'
20
+ end
@@ -0,0 +1 @@
1
+ .empty_directory
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: Page not found
3
+ published: true
4
+ ---
5
+ {% extends index %}
6
+
7
+ {% block 'main' %}
8
+
9
+ <div class="jumbotron">
10
+ <h1>Arrggggh, page not found</h1>
11
+ </div>
12
+
13
+ {% endblock %}
@@ -0,0 +1,10 @@
1
+ ---
2
+ title: Page not found
3
+ published: true
4
+ ---
5
+ {% extends index %}
6
+
7
+ {% block 'main' %}
8
+ .jumbotron
9
+ %h1 Arrggggh, page not found
10
+ {% endblock %}
@@ -0,0 +1,85 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>{{ page.title }}</title>
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <meta name="description" content="{{ site.meta_description }}">
8
+ <meta name="keywords" content="{{ site.meta_keywords }}">
9
+
10
+ <!-- Le styles -->
11
+ {{ 'bootstrap.css' | stylesheet_tag }}
12
+ {{ 'bootstrap-responsive.css' | stylesheet_tag }}
13
+ {{ 'application.css' | stylesheet_tag }}
14
+
15
+ <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
16
+ <!--[if lt IE 9]>
17
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
18
+ <![endif]-->
19
+ </head>
20
+
21
+ <body>
22
+
23
+ <div class="container-narrow">
24
+
25
+ <div class="masthead">
26
+ <ul class="nav nav-pills pull-right">
27
+ <li class="active"><a href="/">Home</a></li>
28
+ <li><a href="/about">About</a></li>
29
+ <li><a href="/contact">Contact</a></li>
30
+ </ul>
31
+ <h3 class="muted">{{ site.name }}</h3>
32
+ </div>
33
+
34
+ <hr>
35
+
36
+ {% block 'main' %}
37
+
38
+ <div class="jumbotron">
39
+ <h1>Super awesome marketing speak!</h1>
40
+ <p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
41
+ <a class="btn btn-large btn-success" href="#">Sign up today</a>
42
+ </div>
43
+
44
+ <hr>
45
+
46
+ <div class="row-fluid marketing">
47
+ <div class="span6">
48
+ <h4>Subheading</h4>
49
+ <p>Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.</p>
50
+
51
+ <h4>Subheading</h4>
52
+ <p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.</p>
53
+
54
+ <h4>Subheading</h4>
55
+ <p>Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
56
+ </div>
57
+
58
+ <div class="span6">
59
+ <h4>Subheading</h4>
60
+ <p>Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.</p>
61
+
62
+ <h4>Subheading</h4>
63
+ <p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.</p>
64
+
65
+ <h4>Subheading</h4>
66
+ <p>Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
67
+ </div>
68
+ </div>
69
+
70
+ {% endblock %}
71
+
72
+ <hr>
73
+
74
+ {% include footer %}
75
+
76
+ </div> <!-- /container -->
77
+
78
+ <!-- Le javascript
79
+ ================================================== -->
80
+ <!-- Placed at the end of the document so the pages load faster -->
81
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
82
+ {{ 'bootstrap.js' | javascript_tag }}
83
+
84
+ </body>
85
+ </html>
@@ -0,0 +1,72 @@
1
+ ---
2
+ title: Home page
3
+ published: true
4
+ ---
5
+ !!!
6
+ %html{:lang => "en"}
7
+ %head
8
+ %meta{:charset => "utf-8"}
9
+
10
+ %title {{ page.title }}
11
+
12
+ %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}
13
+ %meta{:content => "{{ site.meta_description }}", :name => "description"}
14
+ %meta{:content => "{{ site.meta_keywords }}", :name => "keywords"}
15
+
16
+ / Le styles
17
+ {{ 'bootstrap.css' | stylesheet_tag }}
18
+ {{ 'bootstrap-responsive.css' | stylesheet_tag }}
19
+ {{ 'application.css' | stylesheet_tag }}
20
+
21
+ / HTML5 shim, for IE6-8 support of HTML5 elements
22
+ /[if lt IE 9]
23
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
24
+ %body
25
+
26
+ .container-narrow
27
+ .masthead
28
+ %ul.nav.nav-pills.pull-right
29
+ %li.active
30
+ %a{:href => "/"} Home
31
+ %li
32
+ %a{:href => "/about"} About
33
+ %li
34
+ %a{:href => "/contact"} Contact
35
+ %h3.muted {{ site.name }}
36
+
37
+ %hr
38
+
39
+ {% block 'main' %}
40
+ .jumbotron
41
+ %h1 Super awesome marketing speak!
42
+ %p.lead Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
43
+ %a.btn.btn-large.btn-success{:href => "#"} Sign up today
44
+
45
+ %hr
46
+
47
+ .row-fluid.marketing
48
+ .span6
49
+ %h4 Subheading
50
+ %p Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.
51
+ %h4 Subheading
52
+ %p Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.
53
+ %h4 Subheading
54
+ %p Maecenas sed diam eget risus varius blandit sit amet non magna.
55
+ .span6
56
+ %h4 Subheading
57
+ %p Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.
58
+ %h4 Subheading
59
+ %p Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.
60
+ %h4 Subheading
61
+ %p Maecenas sed diam eget risus varius blandit sit amet non magna.
62
+ {% endblock %}
63
+ %hr
64
+
65
+ {% include footer %}
66
+ / /container
67
+ /
68
+ Le javascript
69
+ \==================================================
70
+ / Placed at the end of the document so the pages load faster
71
+ %script{:src => "//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"}
72
+ {{ 'bootstrap.js' | javascript_tag }}
@@ -0,0 +1,3 @@
1
+ <div class="footer">
2
+ <p>&copy; Company {{ now | localized_date: '%Y' }} </p>
3
+ </div>
@@ -0,0 +1,2 @@
1
+ .footer
2
+ %p &copy; Company {{ now | localized_date: '%Y' }}
@@ -0,0 +1,12 @@
1
+ development:
2
+ host: dev.example.com
3
+ email: john@doe.net
4
+ password: apassword
5
+ staging:
6
+ host: staging.example.com
7
+ email: john@doe.net
8
+ password: apassword
9
+ production:
10
+ host: www.example.com
11
+ email: john@doe.net
12
+ password: apassword
@@ -0,0 +1,16 @@
1
+ # TODO: explain it
2
+ name: <%= config[:name] %>
3
+
4
+ # TODO: explain it
5
+ # subdomain: sample
6
+
7
+ # TODO: explain it
8
+ # domains: [www.example.com, example.com]
9
+
10
+ # TODO: explain it
11
+ locales: [en]
12
+
13
+ # TODO: explain it
14
+ seo_title: <%= @name %>
15
+ meta_keywords: "some meta keywords"
16
+ meta_description: "some meta description"
@@ -0,0 +1,8 @@
1
+ # Your translations go here. To be used with the 'translate' liquid filter
2
+ # Example:
3
+ # {{ 'hello_world | translate '}}
4
+ #
5
+
6
+ # hello_world:
7
+ # en: Hello world !
8
+ # fr: Bonjour le monde !
@@ -0,0 +1,3 @@
1
+ require 'locomotive/builder/standalone_server'
2
+
3
+ run Locomotive::Builder::StandaloneServer.new(File.expand_path('.'))
@@ -0,0 +1 @@
1
+ .empty_directory