landing_boi 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +51 -0
  4. data/Rakefile +32 -0
  5. data/app/assets/config/landing_boi_manifest.js +3 -0
  6. data/app/assets/images/landing_boi/avatar_charlie.png +0 -0
  7. data/app/assets/images/landing_boi/avatar_tom.jpg +0 -0
  8. data/app/assets/images/landing_boi/logo.svg +11 -0
  9. data/app/assets/images/landing_boi/screenshot.png +0 -0
  10. data/app/assets/javascripts/landing_boi/application.js +18 -0
  11. data/app/assets/stylesheets/bootstrap_customizer.scss +6 -0
  12. data/app/assets/stylesheets/landing_boi/_header.scss +6 -0
  13. data/app/assets/stylesheets/landing_boi/_index.scss +59 -0
  14. data/app/assets/stylesheets/landing_boi/application.scss +37 -0
  15. data/app/assets/stylesheets/landing_boi/bootstrap_overrides.scss +7 -0
  16. data/app/controllers/landing_boi/application_controller.rb +5 -0
  17. data/app/controllers/landing_boi/landing_controller.rb +25 -0
  18. data/app/helpers/landing_boi/application_helper.rb +16 -0
  19. data/app/jobs/landing_boi/application_job.rb +4 -0
  20. data/app/mailers/landing_boi/application_mailer.rb +6 -0
  21. data/app/models/landing_boi/application_record.rb +5 -0
  22. data/app/views/landing_boi/landing/_faqs.html.erb +19 -0
  23. data/app/views/landing_boi/landing/_features.html.erb +24 -0
  24. data/app/views/landing_boi/landing/_hero_a.html.erb +13 -0
  25. data/app/views/landing_boi/landing/_pricing_blurb.html.erb +23 -0
  26. data/app/views/landing_boi/landing/_recommendations.html.erb +30 -0
  27. data/app/views/landing_boi/landing/_screenshot.html.erb +9 -0
  28. data/app/views/landing_boi/landing/_signup_buttons.html.erb +7 -0
  29. data/app/views/landing_boi/landing/_social_proof.html.erb +13 -0
  30. data/app/views/landing_boi/landing/about.html.erb +42 -0
  31. data/app/views/landing_boi/landing/features.html.erb +25 -0
  32. data/app/views/landing_boi/landing/features/_final_blurb.html.erb +9 -0
  33. data/app/views/landing_boi/landing/features/_hero.html.erb +7 -0
  34. data/app/views/landing_boi/landing/features/_social_proof.html.erb +9 -0
  35. data/app/views/landing_boi/landing/index.html.erb +23 -0
  36. data/app/views/landing_boi/landing/pricing.html.erb +49 -0
  37. data/app/views/landing_boi/landing/pricing/_pricing_tiles.html.erb +28 -0
  38. data/app/views/landing_boi/landing/pricing/_social_proof.html.erb +9 -0
  39. data/app/views/landing_boi/landing/privacy.html.erb +19 -0
  40. data/app/views/landing_boi/landing/terms.html.erb +42 -0
  41. data/app/views/layouts/landing_boi/_footer.html.erb +60 -0
  42. data/app/views/layouts/landing_boi/_header.html.erb +23 -0
  43. data/app/views/layouts/landing_boi/application.html.erb +22 -0
  44. data/config/routes.rb +8 -0
  45. data/lib/generators/landing_boi/config_generator.rb +15 -0
  46. data/lib/generators/landing_boi/views_generator.rb +11 -0
  47. data/lib/landing_boi.rb +263 -0
  48. data/lib/landing_boi/engine.rb +16 -0
  49. data/lib/landing_boi/version.rb +3 -0
  50. data/lib/tasks/landing_boi_tasks.rake +4 -0
  51. metadata +189 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c48a83459cdf9d108ab5222f2761de2ebea42db366c22baa87e84904edf7cd2a
4
+ data.tar.gz: 8a95873ccc14f63306c2cbee023f94b2d5cf8d7a849755e97b209445ee748ec8
5
+ SHA512:
6
+ metadata.gz: c22591f22db9920cf11af37dbbbb07e927bf2a2a63fb945f9dd493c434e4621d511bc9a600c622ce94846b2829659d24971d69a89e326f1e0f94af0edd804681
7
+ data.tar.gz: 76ca094513e8b5c1a3dd6c1c5f958607baefa7a4171737210dab98bcb4afe13701dce49261c0d66f5bb6e169b8e8b26a1fb1541f2ca1e8ab967eef0ce90727ee
@@ -0,0 +1,20 @@
1
+ Copyright 2020
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,51 @@
1
+ # LandingBoi
2
+ Rails landing page generator for micro-SaaS apps
3
+
4
+ ## Installation
5
+ Add this line to your application's Gemfile:
6
+
7
+ ```ruby
8
+ gem 'landing_boi'
9
+ ```
10
+
11
+ And then execute:
12
+ ```bash
13
+ $ bundle
14
+ ```
15
+
16
+ Or install it yourself as:
17
+ ```bash
18
+ $ gem install landing_boi
19
+ ```
20
+
21
+ Then add to your config/routes.rb file:
22
+ ```
23
+ mount LandingBoi::Engine => "/"
24
+ ```
25
+
26
+ ## Configuration Options (i.e. customizing views, titles / text, logo path, URL paths, etc.)
27
+
28
+ Generate LandingBoi initializer file for customizing product name / features, titles, text, URLS, photos, etc. used for landing pages:
29
+
30
+ ```
31
+ rails generate landing_boi:config
32
+ ```
33
+
34
+ Copy LandingBoi views into main application for customizing html pages:
35
+ ```
36
+ rails generate landing_boi:views
37
+ ```
38
+
39
+ ## Custom Styles / Bootstrap Overrides
40
+
41
+ Customize scss colour scheme by creating `stylesheets/bootstrap_customizer.scss` and importing your own custom styles, then `@import 'bootstrap'`.
42
+
43
+ See example in `test/dummy/app/assets/stylesheets`.
44
+
45
+ ## Contributing
46
+
47
+ If you'd like to make a fix / change, please create a pull request; when I have a moment, I'll have a look!
48
+
49
+ ## License
50
+
51
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,32 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'LandingBoi'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.md')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+ load 'rails/tasks/statistics.rake'
21
+
22
+ require 'bundler/gem_tasks'
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'test'
28
+ t.pattern = 'test/**/*_test.rb'
29
+ t.verbose = false
30
+ end
31
+
32
+ task default: :test
@@ -0,0 +1,3 @@
1
+ //= link_directory ../stylesheets/landing_boi .css
2
+ //= link bootstrap_customizer.css
3
+ //= link landing_boi/application.js
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="411" height="155" viewBox="0 0 411 155">
2
+ <g fill="#CC0000" fill-rule="evenodd" transform="translate(8 8)">
3
+ <path d="M344.6 121.5L344.6 139.6 377.3 139.6C384 139.6 395.5 134.7 395.9 121L395.9 114C395.9 102.3 386.3 95.4 377.3 95.4L361 95.4 361 87 393.3 87 393.3 68.8 362.3 68.8C354.3 68.8 343.6 75.4 343.6 87.7L343.6 94C343.6 106.3 354.2 112.6 362.3 112.6 384.8 112.7 356.9 112.6 377.7 112.6L377.7 121.4M169.4 117.1C169.4 117.1 186.9 115.6 186.9 93 186.9 70.4 165.7 68.3 165.7 68.3L127.5 68.3 127.5 139.6 146.7 139.6 146.7 122.4 163.3 139.6 191.7 139.6 169.4 117.1zM162 102.5L146.7 102.5 146.7 86.2 162.1 86.2C162.1 86.2 166.4 87.8 166.4 94.3 166.4 100.8 162 102.5 162 102.5zM234.3 68.8L214.8 68.8C200.9 68.8 196.2 81.4 196.2 87.4L196.2 139.6 215.7 139.6 215.7 127.1 234 127.1 234 139.6 252.9 139.6 252.9 87.4C252.9 72.2 239.1 68.8 234.3 68.8zM234 106.9L215.6 106.9 215.6 89.6C215.6 89.6 215.6 85.7 221.7 85.7L228.4 85.7C233.8 85.7 233.9 89.6 233.9 89.6L233.9 106.9 234 106.9z"/>
4
+ <rect width="20.3" height="70.8" x="261.8" y="68.8"/>
5
+ <polygon points="310.6 121.3 310.6 68.8 290.4 68.8 290.4 121.3 290.4 139.6 310.6 139.6 337.9 139.6 337.9 121.3"/>
6
+ <path d="M7,139.6 L86,139.6 C86,139.6 70.9,70.7 120.9,42.8 C131.8,37.5 166.5,17.7 223.3,59.7 C225.1,58.2 226.8,57 226.8,57 C226.8,57 174.8,5.1 116.9,10.9 C87.8,13.5 52,40 31,75 C10,110 7,139.6 7,139.6 Z"/>
7
+ <path d="M7,139.6 L86,139.6 C86,139.6 70.9,70.7 120.9,42.8 C131.8,37.5 166.5,17.7 223.3,59.7 C225.1,58.2 226.8,57 226.8,57 C226.8,57 174.8,5.1 116.9,10.9 C87.8,13.5 52,40 31,75 C10,110 7,139.6 7,139.6 Z"/>
8
+ <path d="M7 139.6L86 139.6C86 139.6 70.9 70.7 120.9 42.8 131.8 37.5 166.5 17.7 223.3 59.7 225.1 58.2 226.8 57 226.8 57 226.8 57 174.8 5.1 116.9 10.9 87.7 13.5 51.9 40 30.9 75 9.9 110 7 139.6 7 139.6zM171.6 16.5L172 9.8C171.1 9.3 168.6 8.1 162.3 6.3L161.9 12.9C165.2 14 168.4 15.2 171.6 16.5z"/>
9
+ <path d="M162.1 37.7L161.7 44C165 44.1 168.3 44.5 171.6 45.2L172 39C168.6 38.3 165.3 37.9 162.1 37.7zM125.1 6.5L126.1 6.5 124.1.4C121 .4 117.8.6 114.5 1L116.4 6.9C119.3 6.6 122.2 6.5 125.1 6.5zM129.9 43.3L132.2 50.2C135.1 48.8 138 47.6 140.9 46.7L138.7 40.1C135.3 41.1 132.4 42.2 129.9 43.3zM84.5 17L80 10.1C77.5 11.4 74.9 12.8 72.2 14.4L76.8 21.4C79.4 19.8 81.9 18.3 84.5 17zM105 62L109.8 69.2C111.5 66.7 113.5 64.4 115.7 62.1L111.2 55.3C108.9 57.4 106.8 59.7 105 62zM90.5 94.2L98.6 100.6C99 96.7 99.7 92.8 100.7 88.9L93.5 83.2C92.2 86.9 91.3 90.6 90.5 94.2zM46.7 46.7L39.6 40.5C37 43 34.5 45.5 32.2 48L39.9 54.6C42 51.9 44.3 49.2 46.7 46.7zM16.5 91.4L5 87.2C3.1 91.5 1 96.5 0 99.2L11.5 103.4C12.8 100 14.9 95.1 16.5 91.4zM89 119.6C89.2 124.9 89.7 129.2 90.2 132.2L102.2 136.5C101.3 132.6 100.4 128.2 99.8 123.5L89 119.6z"/>
10
+ </g>
11
+ </svg>
@@ -0,0 +1,18 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
+ //
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require jquery3
14
+ //= require popper
15
+ //= require bootstrap-sprockets
16
+ //= require rails-ujs
17
+ //= require activestorage
18
+ //= require_tree .
@@ -0,0 +1,6 @@
1
+ @import 'landing_boi/bootstrap_overrides';
2
+ @import "bootstrap";
3
+
4
+ .text-body {
5
+ color: $body-color !important;
6
+ }
@@ -0,0 +1,6 @@
1
+ header {
2
+ .btn {
3
+ border-radius: 20px !important;
4
+ font-size: 14px;
5
+ }
6
+ }
@@ -0,0 +1,59 @@
1
+ .landing-boi {
2
+
3
+ .h1 {
4
+ font-weight: 900;
5
+ }
6
+ .h5, .h3 {
7
+ font-weight: 700;
8
+ }
9
+
10
+ .plan, .features, .pricing-blurb {
11
+ img {
12
+ max-height: 130px;
13
+ max-width: 110px;
14
+ }
15
+ }
16
+
17
+ .social-proof {
18
+
19
+ .recommendations {
20
+ p {
21
+ font-size: 18px;
22
+ font-style: italic;
23
+ }
24
+
25
+ img {
26
+ max-height: 40px;
27
+ }
28
+
29
+ a:hover {
30
+ text-decoration: none;
31
+ }
32
+ }
33
+
34
+ }
35
+
36
+
37
+ img.logo {
38
+ height: 25px;
39
+ }
40
+
41
+ footer {
42
+ img.logo {
43
+ position: relative;
44
+ height: 16px;
45
+ top: -4px;
46
+ }
47
+
48
+ h3 a:hover {
49
+ text-decoration: none;
50
+ }
51
+
52
+ div.bg-light {
53
+ content: "";
54
+ height: 5px;
55
+ display: block;
56
+ }
57
+ }
58
+
59
+ }
@@ -0,0 +1,37 @@
1
+ @import '_index';
2
+ @import '_header';
3
+ @import "font-awesome";
4
+
5
+ // Fonts
6
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@700;900&display=swap');
7
+
8
+ .text-inter {
9
+ font-family: 'Inter', sans-serif;
10
+ }
11
+
12
+ .py-2_5 {
13
+ padding-top: 12px !important;
14
+ padding-bottom: 12px !important;
15
+ }
16
+
17
+ .px-14 {
18
+ font-size: 14px;
19
+ }
20
+
21
+ .grow {
22
+
23
+ transition: 0.2s ease;
24
+
25
+ &:hover {
26
+ -webkit-transform: scale(1.1);
27
+ -ms-transform: scale(1.1);
28
+ transform: scale(1.1);
29
+ transition: 0.2s ease;
30
+ }
31
+
32
+ }
33
+
34
+ ul {
35
+ list-style-type: none;
36
+ padding: 0;
37
+ }
@@ -0,0 +1,7 @@
1
+ // To override, create boostrap_customizer.scss file in parent application
2
+ // and @import your overrides and then bootstrap
3
+
4
+ // To see available overrides, check out _variables.scss
5
+ // in Bootstrap source code
6
+
7
+ $font-family-sans-serif: 'Roboto';
@@ -0,0 +1,5 @@
1
+ module LandingBoi
2
+ class ApplicationController < ActionController::Base
3
+ protect_from_forgery with: :exception
4
+ end
5
+ end
@@ -0,0 +1,25 @@
1
+ require_dependency "landing_boi/application_controller"
2
+
3
+ module LandingBoi
4
+ class LandingController < ApplicationController
5
+ protect_from_forgery with: :exception
6
+
7
+ def index
8
+ end
9
+
10
+ def features
11
+ end
12
+
13
+ def pricing
14
+ end
15
+
16
+ def about
17
+ end
18
+
19
+ def privacy
20
+ end
21
+
22
+ def terms
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,16 @@
1
+ module LandingBoi
2
+ module ApplicationHelper
3
+ include FontAwesome::Rails::IconHelper
4
+ # Iterates over LandingBoi module class variables
5
+ # and creates helper methods for them
6
+ LandingBoi.class_variables.each do |class_var|
7
+
8
+ mattr_name = class_var.to_s[2..-1]
9
+
10
+ define_method(mattr_name) do
11
+ LandingBoi.send(mattr_name)
12
+ end
13
+
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,4 @@
1
+ module LandingBoi
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module LandingBoi
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: 'from@example.com'
4
+ layout 'mailer'
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module LandingBoi
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -0,0 +1,19 @@
1
+ <div class="pt-5">
2
+
3
+ <h3 class="mt-3 mt-md-5 h3 text-inter">
4
+ Frequently asked questions
5
+ </h3>
6
+
7
+ <% text[:faqs].each do |faq| %>
8
+
9
+ <h3 class="h5 mt-4 pt-3 text-inter">
10
+ <%= faq[:title] %>
11
+ </h3>
12
+
13
+ <p class="text-secondary mt-3 pt-1 mb-0">
14
+ <%= raw(faq[:text]) %>
15
+ </p>
16
+
17
+ <% end %>
18
+
19
+ </div>
@@ -0,0 +1,24 @@
1
+ <% all_features ||= nil %>
2
+ <% feature_li = all_features ? text[:features] + text[:features_secondary] : text[:features] %>
3
+
4
+ <article class="mt-md-5 features">
5
+
6
+ <% feature_li.each_with_index do |feature, idx|
7
+
8
+ %><div class="mt-5 pt-3 col-12 col-md-6 px-0 <%= idx % 2 == 0 ? 'pr-md-5' : 'pl-md-5' %> d-inline-block">
9
+
10
+ <%= image_tag(feature[:img_path], class: 'float-right float-md-none mt-4 mt-md-0 ml-3 ml-md-0 grow') %>
11
+
12
+ <h3 class="h5 mt-3 text-inter">
13
+ <%= raw feature[:title] %>
14
+ </h3>
15
+
16
+ <p class="text-secondary mt-3 mb-0">
17
+ <%= raw feature[:text] %>
18
+ </p>
19
+
20
+ </div><%
21
+
22
+ end %>
23
+
24
+ </article>
@@ -0,0 +1,13 @@
1
+ <h1 class="mt-4 h1 text-inter">
2
+ <%= raw text[:index][:h1] %>
3
+ </h1>
4
+
5
+ <p class="text-secondary mt-3">
6
+ <%= raw text[:index][:h1_subtitle] %>
7
+ </p>
8
+
9
+ <div class="mt-5">
10
+
11
+ <%= render 'signup_buttons' %>
12
+
13
+ </div>
@@ -0,0 +1,23 @@
1
+ <div class="py-5 mt-3 mt-md-5 pricing-blurb">
2
+
3
+ <div class="p-5 shadow rounded">
4
+
5
+ <h3 class="h3 text-inter">
6
+ <%= raw text[:index][:pricing][:title] %>
7
+ </h3>
8
+
9
+ <%= image_tag(assets[:pricing_img_path], class: 'float-right d-none d-md-inline-block mt-5 ml-3 grow') %>
10
+
11
+ <p class="text-secondary mt-3 mb-0">
12
+ <%= raw text[:index][:pricing][:text] %>
13
+ </p>
14
+
15
+ <div class="mt-5">
16
+
17
+ <%= render 'signup_buttons' %>
18
+
19
+ </div>
20
+
21
+ </div>
22
+
23
+ </div>
@@ -0,0 +1,30 @@
1
+ <div class="recommendations">
2
+
3
+ <% text[:recommendations].each_with_index do |reco, idx|
4
+
5
+ %><div class="mt-5 align-top col-12 col-md-6 px-0 <%= idx % 2 == 0 ? 'pr-md-4' : 'pl-md-4' %> d-inline-block">
6
+
7
+ <div class="text-center">
8
+
9
+ <p class="mb-0">
10
+ "<%= raw reco[:text] %>"
11
+ </p>
12
+
13
+ <div class="mt-3">
14
+ <a href="<%= reco[:url] %>" target='_blank_'>
15
+ <%= image_tag(reco[:img_path], class: 'rounded-circle grow') %>
16
+
17
+ <span class="ml-2">
18
+ <%= reco[:name] %>
19
+ </span>
20
+ </a>
21
+ </div>
22
+
23
+ </div>
24
+
25
+
26
+ </div><%
27
+
28
+ end %>
29
+
30
+ </div>