mvpkit 0.8.0
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.
- checksums.yaml +7 -0
- data/Gemfile +30 -0
- data/Gemfile.lock +329 -0
- data/LICENSE.txt +20 -0
- data/MIT-LICENSE +20 -0
- data/README.md +134 -0
- data/Rakefile +52 -0
- data/VERSION +1 -0
- data/app/assets/javascripts/mvp/application.js +1 -0
- data/app/assets/stylesheets/mvp/application.scss +0 -0
- data/app/controllers/concerns/mvp/analytics_concern.rb +78 -0
- data/app/controllers/concerns/mvp/seo_concern.rb +25 -0
- data/app/controllers/concerns/mvp/session_concern.rb +44 -0
- data/app/controllers/mvp/analytics_controller.rb +12 -0
- data/app/controllers/mvp/seo_controller.rb +11 -0
- data/app/controllers/mvp/styleguide_controller.rb +23 -0
- data/app/helpers/minimum_viable_product/body_helper.rb +14 -0
- data/app/helpers/minimum_viable_product/bootstrap_helper.rb +38 -0
- data/app/helpers/minimum_viable_product/styleguide_helper.rb +4 -0
- data/app/models/concerns/mvp/slugification.rb +24 -0
- data/app/views/layouts/minimum_viable_product/_instrumentation.html.erb +100 -0
- data/app/views/layouts/minimum_viable_product/_meta.html.erb +37 -0
- data/app/views/layouts/minimum_viable_product/application.html.erb +19 -0
- data/app/views/minimum_viable_product/styleguide/_example.html.erb +6 -0
- data/app/views/minimum_viable_product/styleguide/bootstrap/_buttons.html.erb +191 -0
- data/app/views/minimum_viable_product/styleguide/bootstrap/_forms.html.erb +192 -0
- data/app/views/minimum_viable_product/styleguide/bootstrap/_header.html.erb +48 -0
- data/app/views/minimum_viable_product/styleguide/bootstrap/_panels.html.erb +16 -0
- data/app/views/minimum_viable_product/styleguide/bootstrap/_tables.html.erb +34 -0
- data/app/views/minimum_viable_product/styleguide/bootstrap/_typography.html.erb +51 -0
- data/app/views/minimum_viable_product/styleguide/bootstrap.html.erb +43 -0
- data/app/views/minimum_viable_product/styleguide/elements/_grouping.html.erb +1 -0
- data/app/views/minimum_viable_product/styleguide/elements/partials/_row_groups_of.html.erb +7 -0
- data/app/views/minimum_viable_product/styleguide/index.html.erb +17 -0
- data/app/views/minimum_viable_product/styleguide/layouts/basic.html.erb +4 -0
- data/app/views/minimum_viable_product/styleguide/layouts/carousel.html.erb +120 -0
- data/app/views/minimum_viable_product/styleguide/layouts/cover.html.erb +34 -0
- data/assets/js/application.js +31 -0
- data/assets/js/init/controllers.js +26 -0
- data/assets/js/init/forms.js +12 -0
- data/bin/mvp +78 -0
- data/bin/rails +12 -0
- data/config/initializers/assets.rb +2 -0
- data/config/initializers/canonical_host.rb +3 -0
- data/config/initializers/cloudinary.rb +7 -0
- data/config/initializers/geocoder.rb +9 -0
- data/config/initializers/iteration.rb +33 -0
- data/config/initializers/project.rb +1 -0
- data/config/initializers/rollbar.rb +59 -0
- data/config/initializers/routing.rb +7 -0
- data/config/initializers/spoof_ip.rb +33 -0
- data/config/initializers/ssl.rb +14 -0
- data/config/routes.rb +6 -0
- data/lib/mvp/engine.rb +22 -0
- data/lib/mvp/ext/nil.rb +5 -0
- data/lib/mvp/ext/string.rb +7 -0
- data/lib/mvpkit.rb +6 -0
- data/lib/tasks/sitemap.rake +42 -0
- data/mvpkit.gemspec +245 -0
- data/package.json +43 -0
- data/project/.gitignore +45 -0
- data/project/Gemfile +33 -0
- data/project/Gemfile.lock +437 -0
- data/project/Procfile +2 -0
- data/project/README.md +117 -0
- data/project/Rakefile +14 -0
- data/project/app/controllers/application_controller.rb +12 -0
- data/project/app/controllers/conversions_controller.rb +24 -0
- data/project/app/controllers/examples_controller.rb +2 -0
- data/project/app/controllers/home_controller.rb +7 -0
- data/project/app/decorators/.keep +0 -0
- data/project/app/helpers/application_helper.rb +24 -0
- data/project/app/mailers/.keep +0 -0
- data/project/app/models/conversion.rb +4 -0
- data/project/app/views/examples/index.html.erb +1 -0
- data/project/app/views/examples/mustache/template.mustache +1 -0
- data/project/app/views/examples/mustache.html.erb +18 -0
- data/project/app/views/home/conversion.html.erb +12 -0
- data/project/app/views/home/index.html.erb +28 -0
- data/project/app/views/layouts/_header.html.erb +16 -0
- data/project/app/views/layouts/_includes.html.erb +7 -0
- data/project/app/views/layouts/application.html.erb +17 -0
- data/project/app/views/layouts/modal.html.erb +14 -0
- data/project/assets/images/.keep +0 -0
- data/project/assets/images/favicon.ico +0 -0
- data/project/assets/javascripts/controllers/home.coffee +15 -0
- data/project/assets/javascripts/pack.js +9 -0
- data/project/assets/stylesheets/config/variables.scss +876 -0
- data/project/assets/stylesheets/layout/basic.scss +6 -0
- data/project/assets/stylesheets/layout/carousel.scss +127 -0
- data/project/assets/stylesheets/layout/cover.scss +129 -0
- data/project/assets/stylesheets/lib/spacing.scss +55 -0
- data/project/assets/stylesheets/skin/style.scss +16 -0
- data/project/assets/stylesheets/style.scss +8 -0
- data/project/bin/bundle +3 -0
- data/project/bin/rails +9 -0
- data/project/bin/rake +9 -0
- data/project/bin/setup +32 -0
- data/project/bin/spring +15 -0
- data/project/config/application.rb +32 -0
- data/project/config/boot.rb +3 -0
- data/project/config/database.yml +19 -0
- data/project/config/environment.rb +5 -0
- data/project/config/environments/development.rb +67 -0
- data/project/config/environments/production.rb +93 -0
- data/project/config/environments/test.rb +42 -0
- data/project/config/initializers/assets.rb +11 -0
- data/project/config/initializers/backtrace_silencers.rb +7 -0
- data/project/config/initializers/cookies_serializer.rb +3 -0
- data/project/config/initializers/filter_parameter_logging.rb +4 -0
- data/project/config/initializers/inflections.rb +16 -0
- data/project/config/initializers/mime_types.rb +4 -0
- data/project/config/initializers/mustache.rb +7 -0
- data/project/config/initializers/rails_admin.rb +43 -0
- data/project/config/initializers/session_store.rb +3 -0
- data/project/config/initializers/simple_form.rb +177 -0
- data/project/config/initializers/wrap_parameters.rb +14 -0
- data/project/config/locales/en.yml +23 -0
- data/project/config/locales/simple_form.en.yml +31 -0
- data/project/config/routes.rb +13 -0
- data/project/config/secrets.yml +8 -0
- data/project/config/sitemap.rb +28 -0
- data/project/config.ru +4 -0
- data/project/db/migrate/20160728235100_create_conversions.rb +9 -0
- data/project/db/schema.rb +25 -0
- data/project/db/seeds.rb +7 -0
- data/project/lib/assets/.keep +0 -0
- data/project/lib/tasks/heroku.rake +70 -0
- data/project/log/.keep +0 -0
- data/project/log/development.log +48216 -0
- data/project/log/production.log +0 -0
- data/project/package.json +44 -0
- data/project/public/404.html +67 -0
- data/project/public/422.html +67 -0
- data/project/public/500.html +66 -0
- data/project/public/assets/javascripts/448c34a56d699c29117adc64c43affeb.woff2 +0 -0
- data/project/public/assets/javascripts/89889688147bd7575d6327160d64e760.svg +288 -0
- data/project/public/assets/javascripts/e18bbf611f2a2e43afc071aa2f4e1512.ttf +0 -0
- data/project/public/assets/javascripts/f4769f9bdb7466be65088239c12046d1.eot +0 -0
- data/project/public/assets/javascripts/fa2772327f55d8198301fdb8bcfc8158.woff +0 -0
- data/project/public/assets/javascripts/pack.js +31367 -0
- data/project/public/assets/javascripts/pack.js.map +1 -0
- data/project/public/assets/pack.js +17220 -0
- data/project/public/assets/style.css +7477 -0
- data/project/vendor/assets/javascripts/.keep +0 -0
- data/project/vendor/assets/stylesheets/.keep +0 -0
- data/project/webpack.config.js +67 -0
- data/test/helper.rb +34 -0
- data/test/test_minimum_viable_product.rb +7 -0
- metadata +473 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module ApplicationHelper
|
|
2
|
+
def render_partial(partial, locals={}, &block)
|
|
3
|
+
render(
|
|
4
|
+
partial: partial,
|
|
5
|
+
locals: locals.merge(block: block)
|
|
6
|
+
)
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def render_mustache(template, object)
|
|
10
|
+
mustache = Mustache.new
|
|
11
|
+
mustache.template_extension = 'mustache'
|
|
12
|
+
# mustache.template_path = Rails.root.join("assets/templates")
|
|
13
|
+
# mustache.template_file = Rails.root.join("assets/templates/#{template}.mustache")
|
|
14
|
+
mustache.template_path = Rails.root.join("app/views")
|
|
15
|
+
mustache.template_file = Rails.root.join("app/views/#{template}.mustache")
|
|
16
|
+
mustache.instance_eval %%
|
|
17
|
+
def logged_in
|
|
18
|
+
#{!!current_user}
|
|
19
|
+
end
|
|
20
|
+
%
|
|
21
|
+
# mustache.template_extension = 'mustache'
|
|
22
|
+
mustache.render(object).html_safe
|
|
23
|
+
end
|
|
24
|
+
end
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%= link_to "Mustache Rendering", mustache_example_path %>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This is <code>template.mustache</code>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<div class="row">
|
|
2
|
+
<div class="col-md-9">
|
|
3
|
+
<h1>Mustache Rendering</h1>
|
|
4
|
+
<p>
|
|
5
|
+
You can render mustache files by using <code><<%= "%= render_mustache 'examples/mustache/template', { some: 'value' } %" %>></code>.
|
|
6
|
+
</p>
|
|
7
|
+
<p>
|
|
8
|
+
Place your files into <code>app/views</code> and reference it relatively. You don't need the <code>.mustache</code> file suffix.
|
|
9
|
+
</p>
|
|
10
|
+
<p>
|
|
11
|
+
Here we render <code>examples/mustache/template</code>:
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
<div class="well">
|
|
15
|
+
<%= render_mustache 'examples/mustache/template', { some: 'value' } %>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<div class="row mt100">
|
|
2
|
+
<div class="col-sm-8 offset-sm-2 col-md-6 offset-md-3">
|
|
3
|
+
<p class='text-center mb50'>
|
|
4
|
+
By default, this page is setup to accept an email submission and store in the database. Depending on your configuration, this will fire an conversion event and even submit to Slack.
|
|
5
|
+
</p>
|
|
6
|
+
<div class="card">
|
|
7
|
+
<div class="card-header">
|
|
8
|
+
<h4>Sign Up</h4>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="card-block">
|
|
11
|
+
<%= simple_form_for Conversion.new, url: conversion_path, remote:true, validate: true, html: { class: 'disable-on-submit' } do |f| %>
|
|
12
|
+
<div class="row">
|
|
13
|
+
<div class="col-sm-7 pr10-sm">
|
|
14
|
+
<%= f.input :email, placeholder: 'joe@example.com', label: false, input_html: { class: "mb0" } %>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="col-sm-5 pl0-sm">
|
|
17
|
+
<%= f.submit "Register for Free", class: 'btn btn-primary btn-block' %>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<p class="text-center mt10 mb0 text-grey">
|
|
22
|
+
<small>We hate spam, don't worry, we'll never try to sell you anything or your info to anyone.</small>
|
|
23
|
+
</p>
|
|
24
|
+
<% end %>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<nav class="navbar navbar-light bg-faded mt50">
|
|
2
|
+
<a class="navbar-brand" href="/">__PROJECT_NAME__</a>
|
|
3
|
+
<ul class="nav navbar-nav float-lg-right">
|
|
4
|
+
<li class="nav-item active">
|
|
5
|
+
<%= link_to 'Examples', examples_path, class: 'nav-link' %>
|
|
6
|
+
</li>
|
|
7
|
+
<li class="nav-item dropdown">
|
|
8
|
+
<a class="nav-link dropdown-toggle" href="http://example.com" id="supportedContentDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>
|
|
9
|
+
<div class="dropdown-menu" aria-labelledby="supportedContentDropdown">
|
|
10
|
+
<a class="dropdown-item" href="#">Action</a>
|
|
11
|
+
<a class="dropdown-item" href="#">Another action</a>
|
|
12
|
+
<a class="dropdown-item" href="#">Something else here</a>
|
|
13
|
+
</div>
|
|
14
|
+
</li>
|
|
15
|
+
</ul>
|
|
16
|
+
</nav>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<% page.classes = "body-basic" %>
|
|
2
|
+
<%= render 'layouts/includes' %>
|
|
3
|
+
|
|
4
|
+
<%- content_for :body do %>
|
|
5
|
+
<% if content_for :header %>
|
|
6
|
+
<%= yield :header %>
|
|
7
|
+
<% else %>
|
|
8
|
+
<div class="container">
|
|
9
|
+
<%= render 'layouts/header' %>
|
|
10
|
+
</div>
|
|
11
|
+
<% end %>
|
|
12
|
+
<div class="container">
|
|
13
|
+
<%= yield %>
|
|
14
|
+
</div>
|
|
15
|
+
<% end %>
|
|
16
|
+
|
|
17
|
+
<%= render template: "layouts/minimum_viable_product/application" %>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<% page.classes = "body-cover" %>
|
|
2
|
+
<%= render 'layouts/includes' %>
|
|
3
|
+
|
|
4
|
+
<%- content_for :body do %>
|
|
5
|
+
<div class="site-wrapper">
|
|
6
|
+
<div class="site-wrapper-inner">
|
|
7
|
+
<div class="cover-container">
|
|
8
|
+
<%= yield %>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<% end %>
|
|
13
|
+
|
|
14
|
+
<%= render template: "layouts/minimum_viable_product/application" %>
|
|
File without changes
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
class Controller
|
|
2
|
+
index: ()=>
|
|
3
|
+
# Registration page logic
|
|
4
|
+
$('#new_conversion').on('submit', (e)->
|
|
5
|
+
window.track("Conversion Submit", { source: "Registration Form" })
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
$('#new_conversion').on('ajax:success', ()->
|
|
9
|
+
top.location = "/conversion"
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
thanks: ()=>
|
|
13
|
+
# Conversion page logic
|
|
14
|
+
|
|
15
|
+
window.controllers['home'] = new Controller()
|