rails_app 0.5.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +30 -1
  4. data/bin/rails_app +1 -1
  5. data/lib/rails_app/cli.rb +16 -7
  6. data/lib/rails_app/command.rb +8 -3
  7. data/lib/rails_app/options_data.rb +57 -0
  8. data/lib/rails_app/rails_app.rb +2 -2
  9. data/lib/rails_app/template/app_bulma/assets/stylesheets/application.bulma.scss +43 -0
  10. data/lib/rails_app/template/app_bulma/views/devise/confirmations/new.html.erb +16 -0
  11. data/lib/rails_app/template/app_bulma/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  12. data/lib/rails_app/template/app_bulma/views/devise/mailer/email_changed.html.erb +7 -0
  13. data/lib/rails_app/template/app_bulma/views/devise/mailer/password_change.html.erb +3 -0
  14. data/lib/rails_app/template/app_bulma/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  15. data/lib/rails_app/template/app_bulma/views/devise/mailer/unlock_instructions.html.erb +7 -0
  16. data/lib/rails_app/template/app_bulma/views/devise/passwords/edit.html.erb +25 -0
  17. data/lib/rails_app/template/app_bulma/views/devise/passwords/new.html.erb +16 -0
  18. data/lib/rails_app/template/app_bulma/views/devise/registrations/edit.html.erb +43 -0
  19. data/lib/rails_app/template/app_bulma/views/devise/registrations/new.html.erb +29 -0
  20. data/lib/rails_app/template/app_bulma/views/devise/sessions/new.html.erb +26 -0
  21. data/lib/rails_app/template/app_bulma/views/devise/shared/_error_messages.html.erb +15 -0
  22. data/lib/rails_app/template/app_bulma/views/devise/shared/_links.html.erb +25 -0
  23. data/lib/rails_app/template/app_bulma/views/devise/unlocks/new.html.erb +16 -0
  24. data/lib/rails_app/template/app_bulma/views/layouts/application.html.erb +19 -0
  25. data/lib/rails_app/template/app_bulma/views/layouts/mailer.html.erb +13 -0
  26. data/lib/rails_app/template/app_bulma/views/layouts/mailer.text.erb +1 -0
  27. data/lib/rails_app/template/app_bulma/views/shared/_navbar.html.erb +33 -0
  28. data/lib/rails_app/template/app_bulma/views/static/home.html.erb +2 -0
  29. data/lib/rails_app/template/app_tailwind/assets/stylesheets/application.tailwind.css +18 -0
  30. data/lib/rails_app/template/app_tailwind/assets/stylesheets/components/alerts.css +8 -0
  31. data/lib/rails_app/template/app_tailwind/assets/stylesheets/components/buttons.css +30 -0
  32. data/lib/rails_app/template/app_tailwind/assets/stylesheets/components/cards.css +3 -0
  33. data/lib/rails_app/template/app_tailwind/assets/stylesheets/components/forms.css +21 -0
  34. data/lib/rails_app/template/app_tailwind/assets/stylesheets/components/links.css +39 -0
  35. data/lib/rails_app/template/app_tailwind/assets/stylesheets/components/pagination.css +39 -0
  36. data/lib/rails_app/template/app_tailwind/assets/stylesheets/components/tables.css +19 -0
  37. data/lib/rails_app/template/app_tailwind/assets/stylesheets/components/typography.css +32 -0
  38. data/lib/rails_app/template/app_tailwind/assets/stylesheets/custom.css +3 -0
  39. data/lib/rails_app/template/app_tailwind/assets/stylesheets/flatpickr_themes/light.css +809 -0
  40. data/lib/rails_app/template/app_tailwind/assets/stylesheets/simple_calendar.css +94 -0
  41. data/lib/rails_app/template/app_tailwind/postcss.config.js +10 -0
  42. data/lib/rails_app/template/app_tailwind/tailwind.config.js +37 -0
  43. data/lib/rails_app/template/app_tailwind/views/devise/confirmations/new.html.erb +16 -0
  44. data/lib/rails_app/template/app_tailwind/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  45. data/lib/rails_app/template/app_tailwind/views/devise/mailer/email_changed.html.erb +7 -0
  46. data/lib/rails_app/template/app_tailwind/views/devise/mailer/password_change.html.erb +3 -0
  47. data/lib/rails_app/template/app_tailwind/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  48. data/lib/rails_app/template/app_tailwind/views/devise/mailer/unlock_instructions.html.erb +7 -0
  49. data/lib/rails_app/template/app_tailwind/views/devise/passwords/edit.html.erb +25 -0
  50. data/lib/rails_app/template/app_tailwind/views/devise/passwords/new.html.erb +16 -0
  51. data/lib/rails_app/template/app_tailwind/views/devise/registrations/edit.html.erb +50 -0
  52. data/lib/rails_app/template/app_tailwind/views/devise/registrations/new.html.erb +31 -0
  53. data/lib/rails_app/template/app_tailwind/views/devise/sessions/new.html.erb +30 -0
  54. data/lib/rails_app/template/app_tailwind/views/devise/shared/_error_messages.html.erb +15 -0
  55. data/lib/rails_app/template/app_tailwind/views/devise/shared/_links.html.erb +25 -0
  56. data/lib/rails_app/template/app_tailwind/views/devise/unlocks/new.html.erb +16 -0
  57. data/lib/rails_app/template/app_tailwind/views/layouts/application.html.erb +28 -0
  58. data/lib/rails_app/template/app_tailwind/views/layouts/mailer.html.erb +13 -0
  59. data/lib/rails_app/template/app_tailwind/views/layouts/mailer.text.erb +1 -0
  60. data/lib/rails_app/template/app_tailwind/views/shared/_navbar.html.erb +23 -0
  61. data/lib/rails_app/template/app_tailwind/views/static/home.html.erb +2 -0
  62. data/lib/rails_app/template/template.rb +13 -5
  63. data/lib/rails_app/version.rb +1 -1
  64. data/lib/rails_app.rb +1 -0
  65. data/screenshot_cli.png +0 -0
  66. data/screenshot_cli_db.png +0 -0
  67. metadata +56 -1
@@ -0,0 +1,94 @@
1
+ .simple-calendar {
2
+ table {
3
+ -webkit-border-horizontal-spacing: 0px;
4
+ -webkit-border-vertical-spacing: 0px;
5
+ background-color: rgba(0, 0, 0, 0);
6
+ border: 1px solid rgb(221, 221, 221);
7
+ border-collapse: collapse;
8
+ box-sizing: border-box;
9
+ max-width: 100%;
10
+ width: 100%;
11
+ }
12
+
13
+ tr {
14
+ border-collapse: collapse;
15
+ }
16
+
17
+ th {
18
+ padding: 6px;
19
+ border-bottom: 2px solid rgb(221, 221, 221);
20
+ border-collapse: collapse;
21
+ border-left: 1px solid rgb(221, 221, 221);
22
+ border-right: 1px solid rgb(221, 221, 221);
23
+ border-top: 0px none rgb(51, 51, 51);
24
+ box-sizing: border-box;
25
+ text-align: left;
26
+ }
27
+
28
+ td {
29
+ padding: 6px;
30
+ vertical-align: top;
31
+ width: 14%;
32
+
33
+ border: 1px solid #ddd;
34
+ border-top-color: rgb(221, 221, 221);
35
+ border-top-style: solid;
36
+ border-top-width: 1px;
37
+ border-right-color: rgb(221, 221, 221);
38
+ border-right-style: solid;
39
+ border-right-width: 1px;
40
+ border-bottom-color: rgb(221, 221, 221);
41
+ border-bottom-style: solid;
42
+ border-bottom-width: 1px;
43
+ border-left-color: rgb(221, 221, 221);
44
+ border-left-style: solid;
45
+ border-left-width: 1px;
46
+ }
47
+
48
+ .day {
49
+ height: 80px;
50
+ }
51
+
52
+ .wday-0 {}
53
+ .wday-1 {}
54
+ .wday-2 {}
55
+ .wday-3 {}
56
+ .wday-4 {}
57
+ .wday-5 {}
58
+ .wday-6 {}
59
+
60
+ .today {
61
+ background: #FFFFC0
62
+ }
63
+
64
+ .past {}
65
+ .future {}
66
+
67
+ .start-date {}
68
+
69
+ .prev-month {
70
+ background: #DDD;
71
+ }
72
+ .next-month {
73
+ background: #DDD;
74
+ }
75
+ .current-month {}
76
+
77
+ .has-events {}
78
+
79
+ .calendar-heading {
80
+ display: flex;
81
+ align-items: center;
82
+ justify-content: space-between;
83
+
84
+ a {
85
+ padding: 0 1rem;
86
+ }
87
+
88
+ .calendar-title {
89
+ text-align: center;
90
+ font-size: 1.5em;
91
+ font-weight: bold;
92
+ }
93
+ }
94
+ }
@@ -0,0 +1,10 @@
1
+ // postcss.config.js
2
+ module.exports = {
3
+ plugins: {
4
+ 'postcss-import': {},
5
+ 'tailwindcss/nesting': {},
6
+ tailwindcss: {},
7
+ autoprefixer: {},
8
+ ...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {})
9
+ }
10
+ }
@@ -0,0 +1,37 @@
1
+ // See the Tailwind default theme values here:
2
+ // https://github.com/tailwindcss/tailwindcss/blob/master/stubs/defaultConfig.stub.js
3
+ const colors = require('tailwindcss/colors')
4
+ const defaultTheme = require('tailwindcss/defaultTheme')
5
+
6
+ module.exports = {
7
+ content: [
8
+ './app/views/**/*.html.erb',
9
+ './app/helpers/**/*.rb',
10
+ './app/assets/stylesheets/**/*.css',
11
+ './app/javascript/**/*.js',
12
+ './node_modules/flowbite/**/*.js'
13
+ ],
14
+ plugins: [
15
+ require('flowbite/plugin')
16
+ ],
17
+ theme: {
18
+ // Extend (add to) the default theme in the `extend` key
19
+ extend: {
20
+ // Create your own at: https://javisperez.github.io/tailwindcolorshades
21
+ colors: {
22
+ primary: colors.red,
23
+ secondary: colors.emerald,
24
+ tertiary: colors.blue,
25
+ success: colors.green,
26
+ danger: colors.rose,
27
+ gray: colors.neutral
28
+ },
29
+ fontFamily: {
30
+ sans: ['Inter', ...defaultTheme.fontFamily.sans],
31
+ },
32
+ },
33
+
34
+ // Opt-in to TailwindCSS future changes
35
+ future: {},
36
+ },
37
+ }
@@ -0,0 +1,16 @@
1
+ <h2>Resend confirmation instructions</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+
6
+ <div class="field">
7
+ <%= f.label :email %><br />
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
9
+ </div>
10
+
11
+ <div class="actions">
12
+ <%= f.submit "Resend confirmation instructions" %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,5 @@
1
+ <p>Welcome <%= @email %>!</p>
2
+
3
+ <p>You can confirm your account email through the link below:</p>
4
+
5
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @email %>!</p>
2
+
3
+ <% if @resource.try(:unconfirmed_email?) %>
4
+ <p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
5
+ <% else %>
6
+ <p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
7
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>We're contacting you to notify you that your password has been changed.</p>
@@ -0,0 +1,8 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Someone has requested a link to change your password. You can do this through the link below.</p>
4
+
5
+ <p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
6
+
7
+ <p>If you didn't request this, please ignore this email.</p>
8
+ <p>Your password won't change until you access the link above and create a new one.</p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
4
+
5
+ <p>Click the link below to unlock your account:</p>
6
+
7
+ <p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
@@ -0,0 +1,25 @@
1
+ <h2>Change your password</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+ <%= f.hidden_field :reset_password_token %>
6
+
7
+ <div class="field">
8
+ <%= f.label :password, "New password" %><br />
9
+ <% if @minimum_password_length %>
10
+ <em>(<%= @minimum_password_length %> characters minimum)</em><br />
11
+ <% end %>
12
+ <%= f.password_field :password, autofocus: true, autocomplete: "new-password" %>
13
+ </div>
14
+
15
+ <div class="field">
16
+ <%= f.label :password_confirmation, "Confirm new password" %><br />
17
+ <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
18
+ </div>
19
+
20
+ <div class="actions">
21
+ <%= f.submit "Change my password" %>
22
+ </div>
23
+ <% end %>
24
+
25
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,16 @@
1
+ <h2>Forgot your password?</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+
6
+ <div class="field">
7
+ <%= f.label :email %><br />
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
+ </div>
10
+
11
+ <div class="actions">
12
+ <%= f.submit "Send me reset password instructions" %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,50 @@
1
+ <div class="block max-w-sm mx-auto my-8 p-6 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700">
2
+
3
+ <h2>Edit <%= resource_name.to_s.humanize %></h2>
4
+
5
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
6
+ <%= render "devise/shared/error_messages", resource: resource %>
7
+
8
+ <div class="mb-3">
9
+ <%= f.label :email, class: "form-label" %>
10
+ <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %>
11
+ </div>
12
+
13
+ <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
14
+ <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
15
+ <% end %>
16
+
17
+ <div class="mb-3">
18
+ <%= f.label :password, class: "form-label" %><small class="my-0"><em>(leave blank if you don't want to change it)</em></small>
19
+ <%= f.password_field :password, autocomplete: "new-password", class: "form-control" %>
20
+ <% if @minimum_password_length %>
21
+ <small><em><%= @minimum_password_length %> characters minimum</em></small>
22
+ <% end %>
23
+ </div>
24
+
25
+ <div class="mb-3">
26
+ <%= f.label :password_confirmation, class: "form-label" %>
27
+ <%= f.password_field :password_confirmation, autocomplete: "new-password", class: "form-control" %>
28
+ </div>
29
+
30
+ <div class="mb-3">
31
+ <%= f.label :current_password, class: "form-label" %>
32
+ <small><em>(we need your current password to confirm your changes)</em></small><br/>
33
+ <%= f.password_field :current_password, autocomplete: "current-password", class: "form-control" %>
34
+ </div>
35
+
36
+ <div class="mb-3">
37
+ <%= f.submit "Update", class: "btn btn-primary" %>
38
+ </div>
39
+ <% end %>
40
+
41
+ <h3 class="h4">Cancel my account</h3>
42
+
43
+ <div class="flex justify-between mb-3 p-3">
44
+ <div>Unhappy?</div>
45
+ <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" },
46
+ method: :delete, class: "btn btn-outline-primary" %>
47
+ </div>
48
+
49
+ <%= link_to "Back", :back %>
50
+ </div>
@@ -0,0 +1,31 @@
1
+ <div class="block max-w-sm mx-auto my-8 p-6 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700">
2
+ <h2>Sign up</h2>
3
+
4
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
5
+ <%= render "devise/shared/error_messages", resource: resource %>
6
+
7
+ <div class="mb-3">
8
+ <%= f.label :email, class: "form-label" %>
9
+ <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %>
10
+ </div>
11
+
12
+ <div class="mb-3">
13
+ <%= f.label :password, class: "form-label" %>
14
+ <% if @minimum_password_length %>
15
+ <em>(<%= @minimum_password_length %> characters minimum)</em>
16
+ <% end %><br />
17
+ <%= f.password_field :password, autocomplete: "new-password", class: "form-control" %>
18
+ </div>
19
+
20
+ <div class="mb-3">
21
+ <%= f.label :password_confirmation, class: "form-label" %>
22
+ <%= f.password_field :password_confirmation, autocomplete: "new-password", class: "form-control" %>
23
+ </div>
24
+
25
+ <div class="mb-3">
26
+ <%= f.submit "Sign up", class: "btn btn-primary" %>
27
+ </div>
28
+ <% end %>
29
+
30
+ <%= render "devise/shared/links" %>
31
+ </div>
@@ -0,0 +1,30 @@
1
+ <div class="block max-w-sm mx-auto my-8 p-6 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700">
2
+ <h2>Log in</h2>
3
+
4
+ <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
5
+ <div class="mb-3">
6
+ <%= f.label :email, class: "form-label" %>
7
+ <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %>
8
+ </div>
9
+
10
+ <div class="mb-3">
11
+ <%= f.label :password, class: "form-label" %>
12
+ <%= f.password_field :password, autocomplete: "current-password", class: "form-control" %>
13
+ </div>
14
+
15
+ <% if devise_mapping.rememberable? %>
16
+ <div class="mb-3">
17
+ <%= f.check_box :remember_me, class: "form-check-input" %>
18
+ <%= f.label :remember_me, class: "form-check-label"%>
19
+ </div>
20
+ <% end %>
21
+
22
+ <div class="mb-3">
23
+ <%= f.submit "Log in", class: "btn btn-primary"%>
24
+ </div>
25
+ <% end %>
26
+
27
+ <div class="text-center">
28
+ <%= render "devise/shared/links" %>
29
+ </div>
30
+ </div>
@@ -0,0 +1,15 @@
1
+ <% if resource.errors.any? %>
2
+ <div id="error_explanation" data-turbo-cache="false">
3
+ <h2>
4
+ <%= I18n.t("errors.messages.not_saved",
5
+ count: resource.errors.count,
6
+ resource: resource.class.model_name.human.downcase)
7
+ %>
8
+ </h2>
9
+ <ul>
10
+ <% resource.errors.full_messages.each do |message| %>
11
+ <li><%= message %></li>
12
+ <% end %>
13
+ </ul>
14
+ </div>
15
+ <% end %>
@@ -0,0 +1,25 @@
1
+ <%- if controller_name != 'sessions' %>
2
+ <%= link_to "Log in", new_session_path(resource_name) %><br />
3
+ <% end %>
4
+
5
+ <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
+ <%= link_to "Sign up", new_registration_path(resource_name) %><br />
7
+ <% end %>
8
+
9
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
10
+ <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
11
+ <% end %>
12
+
13
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
+ <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
15
+ <% end %>
16
+
17
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
+ <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
19
+ <% end %>
20
+
21
+ <%- if devise_mapping.omniauthable? %>
22
+ <%- resource_class.omniauth_providers.each do |provider| %>
23
+ <%= button_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), data: { turbo: false } %><br />
24
+ <% end %>
25
+ <% end %>
@@ -0,0 +1,16 @@
1
+ <h2>Resend unlock instructions</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+
6
+ <div class="field">
7
+ <%= f.label :email %><br />
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
+ </div>
10
+
11
+ <div class="actions">
12
+ <%= f.submit "Resend unlock instructions" %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,28 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Catapp</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <%= csrf_meta_tags %>
7
+ <%= csp_meta_tag %>
8
+
9
+ <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
10
+ <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
11
+ </head>
12
+
13
+ <body class="flex flex-col h-screen bg-gray-50">
14
+ <main class="mb-auto">
15
+ <%= render "shared/navbar" %>
16
+
17
+ <div class="container mx-auto">
18
+ <%= yield %>
19
+ </div>
20
+
21
+ <% if Rails.env.development? %>
22
+ <div class="bg-white w-1/2 p-4 mx-auto text-center border text-red-500 text-sm">
23
+ <%= debug(params) %>
24
+ </div>
25
+ <% end %>
26
+ </main>
27
+ </body>
28
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1,23 @@
1
+ <nav class="bg-transparent border-gray-200 dark:bg-gray-900">
2
+ <div class="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
3
+ <%= link_to root_path, class: "flex items-center space-x-3 rtl:space-x-reverse" do %>
4
+ Testapp
5
+ <% end %>
6
+ <button data-collapse-toggle="navbar-default" type="button" class="inline-flex items-center p-2 w-10 h-10 justify-center text-sm text-gray-500 rounded-lg md:hidden hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400" aria-controls="navbar-default" aria-expanded="false">
7
+ <span class="sr-only">Open main menu</span>
8
+ <svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 17 14">
9
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 1h15M1 7h15M1 13h15" />
10
+ </svg>
11
+ </button>
12
+ <div class="hidden w-full lg:block lg:w-auto" id="navbar-default">
13
+ <ul class="font-medium flex flex-col p-4 md:p-0 mt-4 border border-gray-200 rounded-lg bg-transparent md:flex-row md:space-x-8 rtl:space-x-reverse md:mt-0 md:border-0 md:bg-transparent">
14
+ <% if user_signed_in? %>
15
+ <li><%= button_to "Log out", destroy_user_session_path, method: :delete, class: "nav-link" %></li>
16
+ <% else %>
17
+ <li><%= link_to "Login", new_user_session_path, class: "nav-link" %></li>
18
+ <li><%= link_to "Sign up", new_user_registration_path, class: "nav-link" %></li>
19
+ <% end %>
20
+ </ul>
21
+ </div>
22
+ </div>
23
+ </nav>
@@ -0,0 +1,2 @@
1
+ <h1>Static#home</h1>
2
+ <p>Find me in app/views/static/home.html.erb</p>
@@ -3,7 +3,7 @@
3
3
  require "fileutils"
4
4
  require "shellwords"
5
5
 
6
- # puts "options: #{options}"
6
+ puts "options: #{options}"
7
7
 
8
8
  def add_template_to_source_path
9
9
  source_paths.unshift(File.expand_path(File.join(__dir__)))
@@ -89,10 +89,11 @@ end
89
89
  def add_styling
90
90
  if options[:css] == "bootstrap"
91
91
  directory "app_bootstrap", "app", force: true
92
- elsif options[:css] == "tailwindcss"
92
+ elsif options[:css] == "tailwind"
93
+ config_tailwind
93
94
  say "TAILWIND CSS COMING SOON", :red
94
95
  elsif options[:css] == "bulma"
95
- say "BULMA COMING SOON", :red
96
+ directory "app_bulma", "app", force: true
96
97
  elsif options[:css] == "postcss"
97
98
  directory "app_postcss", "app", force: true
98
99
  elsif options[:css] == "sass"
@@ -100,6 +101,15 @@ def add_styling
100
101
  end
101
102
  end
102
103
 
104
+ def config_tailwind
105
+ run "yarn add flowbite postcss-import postcss-nested"
106
+
107
+ copy_file "app_tailwind/tailwind.config.js", "tailwind.config.js", force: true
108
+ copy_file "app_tailwind/postcss.config.js", "postcss.config.js", force: true
109
+
110
+ gsub_file "package.json", "tailwindcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css --minify", "tailwindcss --postcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css --minify"
111
+ end
112
+
103
113
  def setup_rspec
104
114
  copy_file ".rspec", ".rspec"
105
115
  directory "spec", "spec", force: true
@@ -116,8 +126,6 @@ def copy_templates
116
126
  end
117
127
 
118
128
  def database_setup
119
- remove_file "config/database.yml"
120
- rails_command("db:system:change --to=postgresql")
121
129
  rails_command("db:create")
122
130
  rails_command("db:migrate")
123
131
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsApp
4
- VERSION = "0.5.0"
4
+ VERSION = "0.7.0"
5
5
  end
data/lib/rails_app.rb CHANGED
@@ -6,5 +6,6 @@ module RailsApp
6
6
  autoload :App, "rails_app/rails_app"
7
7
  autoload :CLI, "rails_app/cli"
8
8
  autoload :Command, "rails_app/command"
9
+ autoload :OptionsData, "rails_app/options_data"
9
10
  autoload :Error, "rails_app/error"
10
11
  end
data/screenshot_cli.png CHANGED
Binary file
Binary file