bullet_train-themes-tester 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/.bt-link +0 -0
  3. data/MIT-LICENSE +20 -0
  4. data/README.md +28 -0
  5. data/Rakefile +8 -0
  6. data/app/assets/config/bullet_train_themes_tester_manifest.js +0 -0
  7. data/app/assets/stylesheets/tailwindcss/base.css +1 -0
  8. data/app/assets/stylesheets/tailwindcss/components.css +1 -0
  9. data/app/assets/stylesheets/tailwindcss/utilities.css +1 -0
  10. data/app/assets/stylesheets/tester/actiontext.css +26 -0
  11. data/app/assets/stylesheets/tester/application.css +33 -0
  12. data/app/assets/stylesheets/tester/electron.css +46 -0
  13. data/app/assets/stylesheets/tester/fields/cloudinary_image.css +58 -0
  14. data/app/assets/stylesheets/tester/fields/date_field.css +19 -0
  15. data/app/assets/stylesheets/tester/fields/index.css +5 -0
  16. data/app/assets/stylesheets/tester/fields/phone_field.css +7 -0
  17. data/app/assets/stylesheets/tester/fields/super_select.css +103 -0
  18. data/app/assets/stylesheets/tester/fields/trix_editor.css +90 -0
  19. data/app/assets/stylesheets/tester/mailer.scss +359 -0
  20. data/app/assets/stylesheets/tester/tailwind/colors.css +100 -0
  21. data/app/assets/stylesheets/tester/tailwind/components.css +151 -0
  22. data/app/assets/stylesheets/tester/tailwind/dark-mode.css +218 -0
  23. data/app/assets/stylesheets/tester/tailwind/utilities.css +49 -0
  24. data/app/assets/stylesheets/tester/turn.css +44 -0
  25. data/app/assets/stylesheets/tester.tailwind.css +5 -0
  26. data/app/javascript/application.tester.js +0 -0
  27. data/app/views/themes/tester/_alert.html.erb +13 -0
  28. data/app/views/themes/tester/_box.html.erb +66 -0
  29. data/app/views/themes/tester/_breadcrumb.html.erb +23 -0
  30. data/app/views/themes/tester/_cell.html.erb +41 -0
  31. data/app/views/themes/tester/_decision_line.html.erb +12 -0
  32. data/app/views/themes/tester/_line.html.erb +3 -0
  33. data/app/views/themes/tester/_notices.html.erb +15 -0
  34. data/app/views/themes/tester/_page.html.erb +12 -0
  35. data/app/views/themes/tester/_title.html.erb +18 -0
  36. data/app/views/themes/tester/attributes/_base.html.erb +30 -0
  37. data/app/views/themes/tester/attributes/_block.html.erb +9 -0
  38. data/app/views/themes/tester/breadcrumbs/_actions.html.erb +22 -0
  39. data/app/views/themes/tester/commentary/_box.html.erb +13 -0
  40. data/app/views/themes/tester/conversations/_card.html.erb +21 -0
  41. data/app/views/themes/tester/conversations/_comment.html.erb +26 -0
  42. data/app/views/themes/tester/conversations/_message.html.erb +136 -0
  43. data/app/views/themes/tester/conversations/_thread_border.html.erb +3 -0
  44. data/app/views/themes/tester/fields/_field.html.erb +81 -0
  45. data/app/views/themes/tester/forms/_errors.html.erb +14 -0
  46. data/app/views/themes/tester/layouts/_account.html.erb +138 -0
  47. data/app/views/themes/tester/layouts/_devise.html.erb +11 -0
  48. data/app/views/themes/tester/layouts/_head.html.erb +8 -0
  49. data/app/views/themes/tester/layouts/_mailer.html.erb +429 -0
  50. data/app/views/themes/tester/memberships/_photos.html.erb +18 -0
  51. data/app/views/themes/tester/menu/_heading.html.erb +3 -0
  52. data/app/views/themes/tester/menu/_item.html.erb +16 -0
  53. data/app/views/themes/tester/menu/_section.html.erb +7 -0
  54. data/app/views/themes/tester/workflow/_box.html.erb +30 -0
  55. data/config/routes.rb +2 -0
  56. data/lib/bullet_train/themes/tester/engine.rb +12 -0
  57. data/lib/bullet_train/themes/tester/version.rb +7 -0
  58. data/lib/bullet_train/themes/tester.rb +15 -0
  59. data/lib/tasks/bullet_train/themes/tester_tasks.rake +53 -0
  60. data/tailwind.tester.config.js +80 -0
  61. metadata +132 -0
@@ -0,0 +1,429 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
5
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
+ <title>Welcome to <%= t('application.name') %>!</title>
7
+
8
+ <%= stylesheet_link_tag 'application', media: 'all'%>
9
+ <%= stylesheet_link_tag 'application.mailer.light', media: 'all' %>
10
+
11
+ <% # TODO replace with Tailwind CSS styles. %>
12
+ <style type="text/css">
13
+ *:not(br):not(tr):not(html) {
14
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
15
+ box-sizing: border-box;
16
+ }
17
+
18
+ body {
19
+ width: 100% !important;
20
+ height: 100%;
21
+ margin: 0;
22
+ line-height: 1.4;
23
+ background-color: #F6F7F8;
24
+ color: #3E4B5B;
25
+ font-size: 16px;
26
+ -webkit-text-size-adjust: none;
27
+ }
28
+
29
+ p,
30
+ ul,
31
+ ol,
32
+ blockquote {
33
+ line-height: 1.4;
34
+ text-align: left;
35
+ }
36
+
37
+ a {
38
+ color: #047BF8;
39
+ }
40
+
41
+ a img {
42
+ border: none;
43
+ }
44
+ /* Layout ------------------------------ */
45
+
46
+ .email-wrapper {
47
+ width: 100%;
48
+ margin: 0;
49
+ padding: 0;
50
+ background-color: #F6F7F8;
51
+ }
52
+
53
+ .email-content {
54
+ width: 100%;
55
+ margin: 0;
56
+ padding: 0;
57
+ }
58
+ /* Masthead ----------------------- */
59
+
60
+ .email-masthead {
61
+ padding: 25px 0;
62
+ text-align: center;
63
+ }
64
+
65
+ .email-masthead_logo {
66
+ width: 94px;
67
+ }
68
+
69
+ .email-masthead_name {
70
+ font-size: 16px;
71
+ /*font-weight: bold;*/
72
+ color: #bbbfc3;
73
+ text-decoration: none;
74
+ /*text-shadow: 0 1px 0 white;*/
75
+ }
76
+ /* Body ------------------------------ */
77
+
78
+ .email-body {
79
+ width: 100%;
80
+ margin: 0;
81
+ padding: 0;
82
+ border-top: 1px solid #EDEFF2;
83
+ border-bottom: 1px solid #EDEFF2;
84
+ background-color: #FFFFFF;
85
+
86
+ }
87
+
88
+ .email-body_inner {
89
+ width: 570px;
90
+ margin: 0 auto;
91
+ padding: 0;
92
+ background-color: #FFFFFF;
93
+ }
94
+
95
+ .email-footer {
96
+ width: 570px;
97
+ margin: 0 auto;
98
+ padding: 0;
99
+ text-align: center;
100
+ }
101
+
102
+ .email-footer p {
103
+ color: #AAAAAA;
104
+ }
105
+
106
+ .body-action {
107
+ width: 100%;
108
+ margin: 30px auto;
109
+ padding: 0;
110
+ text-align: center;
111
+ }
112
+
113
+ .body-sub {
114
+ margin-top: 25px;
115
+ padding-top: 25px;
116
+ border-top: 1px solid #EDEFF2;
117
+ }
118
+
119
+ .content-cell {
120
+ padding: 35px;
121
+ }
122
+
123
+ .preheader {
124
+ display: none !important;
125
+ }
126
+ /* Attribute list ------------------------------ */
127
+
128
+ .attributes {
129
+ margin: 0 0 21px;
130
+ }
131
+
132
+ .attributes_content {
133
+ background-color: #EDEFF2;
134
+ padding: 16px;
135
+ }
136
+
137
+ .attributes_item {
138
+ padding: 0;
139
+ }
140
+ /* Related Items ------------------------------ */
141
+
142
+ .related {
143
+ width: 100%;
144
+ margin: 0;
145
+ padding: 25px 0 0 0;
146
+ }
147
+
148
+ .related_item {
149
+ padding: 10px 0;
150
+ color: #3E4B5B;
151
+ font-size: 15px;
152
+ line-height: 18px;
153
+ }
154
+
155
+ .related_item-title {
156
+ display: block;
157
+ margin: .5em 0 0;
158
+ }
159
+
160
+ .related_item-thumb {
161
+ display: block;
162
+ padding-bottom: 10px;
163
+ }
164
+
165
+ .related_heading {
166
+ border-top: 1px solid #EDEFF2;
167
+ text-align: center;
168
+ padding: 25px 0 10px;
169
+ }
170
+ /* Discount Code ------------------------------ */
171
+
172
+ .discount {
173
+ width: 100%;
174
+ margin: 0;
175
+ padding: 24px;
176
+ background-color: #EDEFF2;
177
+ border: 2px dashed #9BA2AB;
178
+ }
179
+
180
+ .discount_heading {
181
+ text-align: center;
182
+ }
183
+
184
+ .discount_body {
185
+ text-align: center;
186
+ font-size: 15px;
187
+ }
188
+ /* Social Icons ------------------------------ */
189
+
190
+ .social {
191
+ width: auto;
192
+ }
193
+
194
+ .social td {
195
+ padding: 0;
196
+ width: auto;
197
+ }
198
+
199
+ .social_icon {
200
+ height: 20px;
201
+ margin: 0 8px 10px 8px;
202
+ padding: 0;
203
+ }
204
+ /* Data table ------------------------------ */
205
+
206
+ .purchase {
207
+ width: 100%;
208
+ margin: 0;
209
+ padding: 35px 0;
210
+ }
211
+
212
+ .purchase_content {
213
+ width: 100%;
214
+ margin: 0;
215
+ padding: 25px 0 0 0;
216
+ }
217
+
218
+ .purchase_item {
219
+ padding: 10px 0;
220
+ color: #3E4B5B;
221
+ font-size: 15px;
222
+ line-height: 18px;
223
+ }
224
+
225
+ .purchase_heading {
226
+ padding-bottom: 8px;
227
+ border-bottom: 1px solid #EDEFF2;
228
+ }
229
+
230
+ .purchase_heading p {
231
+ margin: 0;
232
+ color: #9BA2AB;
233
+ font-size: 12px;
234
+ }
235
+
236
+ .purchase_footer {
237
+ padding-top: 15px;
238
+ border-top: 1px solid #EDEFF2;
239
+ }
240
+
241
+ .purchase_total {
242
+ margin: 0;
243
+ text-align: right;
244
+ /*font-weight: bold;*/
245
+ color: #3E4B5B;
246
+ }
247
+
248
+ .purchase_total--label {
249
+ padding: 0 15px 0 0;
250
+ }
251
+ /* Utilities ------------------------------ */
252
+
253
+ .align-right {
254
+ text-align: right;
255
+ }
256
+
257
+ .align-left {
258
+ text-align: left;
259
+ }
260
+
261
+ .align-center {
262
+ text-align: center;
263
+ }
264
+ /*Media Queries ------------------------------ */
265
+
266
+ @media only screen and (max-width: 600px) {
267
+ .email-body_inner,
268
+ .email-footer {
269
+ width: 100% !important;
270
+ }
271
+ }
272
+
273
+ @media only screen and (max-width: 500px) {
274
+ .button {
275
+ width: 100% !important;
276
+ }
277
+ }
278
+ /* Buttons ------------------------------ */
279
+
280
+ .button {
281
+ background-color: #047BF8;
282
+ border-top: 10px solid #047BF8;
283
+ border-right: 18px solid #047BF8;
284
+ border-bottom: 10px solid #047BF8;
285
+ border-left: 18px solid #047BF8;
286
+ display: inline-block;
287
+ color: #FFF;
288
+ text-decoration: none;
289
+ border-radius: 3px;
290
+ -webkit-text-size-adjust: none;
291
+ line-height: 22px;
292
+ font-size: 16px;
293
+ color: #FFF;
294
+ }
295
+
296
+ .button--link {
297
+ background-color: transparent;
298
+ border-top: 10px solid transparent;
299
+ border-right: 18px solid transparent;
300
+ border-bottom: 10px solid transparent;
301
+ border-left: 18px solid transparent;
302
+ display: inline-block;
303
+ color: #047BF8;
304
+ text-decoration: underline;
305
+ border-radius: 3px;
306
+ /*box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16);*/
307
+ -webkit-text-size-adjust: none;
308
+ }
309
+
310
+ .button--green {
311
+ background-color: #22BC66;
312
+ border-top: 10px solid #22BC66;
313
+ border-right: 18px solid #22BC66;
314
+ border-bottom: 10px solid #22BC66;
315
+ border-left: 18px solid #22BC66;
316
+ }
317
+
318
+ .button--red {
319
+ background-color: #FF6136;
320
+ border-top: 10px solid #FF6136;
321
+ border-right: 18px solid #FF6136;
322
+ border-bottom: 10px solid #FF6136;
323
+ border-left: 18px solid #FF6136;
324
+ }
325
+ /* Type ------------------------------ */
326
+
327
+ h1 {
328
+ margin-top: 0;
329
+ color: #3E4B5B;
330
+ font-size: 19px;
331
+ font-weight: bold;
332
+ text-align: left;
333
+ }
334
+
335
+ h2 {
336
+ margin-top: 0;
337
+ color: #3E4B5B;
338
+ font-size: 16px;
339
+ font-weight: bold;
340
+ text-align: left;
341
+ }
342
+
343
+ h3 {
344
+ margin-top: 0;
345
+ color: #3E4B5B;
346
+ font-size: 14px;
347
+ font-weight: bold;
348
+ text-align: left;
349
+ }
350
+
351
+ p {
352
+ margin-top: 0;
353
+ color: #3E4B5B;
354
+ font-size: 16px;
355
+ line-height: 1.5em;
356
+ text-align: left;
357
+ }
358
+
359
+ p.sub {
360
+ font-size: 12px;
361
+ }
362
+
363
+ p.center {
364
+ text-align: center;
365
+ }
366
+
367
+ .body-action.less-footer {
368
+ margin-bottom: 10px;
369
+ }
370
+ </style>
371
+ </head>
372
+ <body>
373
+ <% if content_for? :preheader %>
374
+ <span class="preheader"><% yield :preheader %></span>
375
+ <% end %>
376
+ <table class="email-wrapper" width="100%" cellpadding="0" cellspacing="0">
377
+ <tr>
378
+ <td align="center">
379
+ <table class="email-content" width="100%" cellpadding="0" cellspacing="0">
380
+ <tr>
381
+ <td class="email-masthead">
382
+ <a href="<%= root_url %>" class="email-masthead_name">
383
+ <%= email_image_tag("logo/logo.png", width: image_width_for_height("logo/logo.png", BulletTrain::Themes.logo_height), height: BulletTrain::Themes.logo_height, style: "width: #{image_width_for_height('logo/logo.png', BulletTrain::Themes.logo_height)}px; height: #{BulletTrain::Themes.logo_height}px;") %>
384
+ </a>
385
+ </td>
386
+ </tr>
387
+ <!-- Email Body -->
388
+ <tr>
389
+ <td class="email-body" width="100%" cellpadding="0" cellspacing="0">
390
+ <table class="email-body_inner" align="center" width="570" cellpadding="0" cellspacing="0">
391
+ <!-- Body content -->
392
+ <tr>
393
+ <td class="content-cell">
394
+
395
+ <%= yield %>
396
+
397
+ <% if false %>
398
+ <!-- Sub copy -->
399
+ <table class="body-sub">
400
+ <tr>
401
+ <td>
402
+ <p class="sub"><%= t('.trouble') %></p>
403
+ <p class="sub">{{action_url}}</p>
404
+ </td>
405
+ </tr>
406
+ </table>
407
+ <% end %>
408
+ </td>
409
+ </tr>
410
+ </table>
411
+ </td>
412
+ </tr>
413
+ <tr>
414
+ <td>
415
+ <table class="email-footer" align="center" width="570" cellpadding="0" cellspacing="0">
416
+ <tr>
417
+ <td class="content-cell" align="center">
418
+ <p class="sub align-center">&copy; <%= t('layouts.mailer.all_rights_reserved', year: Date.today.year, product_name: t('application.name')) %></p>
419
+ </td>
420
+ </tr>
421
+ </table>
422
+ </td>
423
+ </tr>
424
+ </table>
425
+ </td>
426
+ </tr>
427
+ </table>
428
+ </body>
429
+ </html>
@@ -0,0 +1,18 @@
1
+ <% size ||= 12 %>
2
+ <% align ||= nil %>
3
+
4
+ <% valid_sizes = [7, 9, 12] %>
5
+ <% raise "Invalid membership photo size: #{size}. Valid options are #{valid_sizes.to_sentence}." unless valid_sizes.include?(size) %>
6
+
7
+ <div class="flex overflow-hidden <%= 'place-content-center' if align == :center %>">
8
+ <% memberships.each_with_index do |membership, index| %>
9
+ <%= image_tag membership_profile_photo_url(membership), class: "#{'-ml-1' if index > 0} inline-block h-#{size} w-#{size} rounded-full ring-2 ring-white dark:ring-transparent" %>
10
+ <% end %>
11
+ </div>
12
+
13
+ <% # we have to list out the evaluations we want possible above so purgecss includes them in production. %>
14
+ <% if false %>
15
+ <div class="h-12 w-12"></div>
16
+ <div class="h-9 w-9"></div>
17
+ <div class="h-7 w-7"></div>
18
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <div class="text-xs py-2 uppercase tracking-wider text-primary-400">
2
+ <%= yield %>
3
+ </div>
@@ -0,0 +1,16 @@
1
+ <% yield p = np %>
2
+
3
+ <% method ||= nil %>
4
+ <% active ||= request.path == url %>
5
+
6
+ <%= send (method ? :button_to : :link_to), url, class: "block group hover:text-white hover:no-underline hover-indent-child #{'bg-primary-900 dark:bg-black dark:bg-opacity-10' if active} text-white px-2 py-2 rounded-md dark:text-white", method: method do %>
7
+ <div class="inline-block indent-child flex items-center">
8
+ <!-- Heroicon name: home -->
9
+ <% if p.content_for? :icon %>
10
+ <span class="mr-3 h-6 w-6 text-center text-primary-300 text-xl leading-6 dark:text-gray-400">
11
+ <%= p.content_for :icon %>
12
+ </span>
13
+ <% end %>
14
+ <%= label %>
15
+ </div>
16
+ <% end %>
@@ -0,0 +1,7 @@
1
+ <div class="pb-3">
2
+ <%= render 'account/shared/menu/heading' do %>
3
+ <%= title %>
4
+ <% end %>
5
+
6
+ <%= yield %>
7
+ </div>
@@ -0,0 +1,30 @@
1
+ <% yield p = np %>
2
+
3
+ <% width ||= "max-w-md" %>
4
+
5
+ <div class="min-h-screen flex flex-col justify-center sm:py-12">
6
+ <div class="mx-auto w-full <%= width %> p-1.5">
7
+ <div class="bg-white py-8 px-10 shadow rounded-lg dark:bg-darkPrimary-700">
8
+ <div class="sm:mx-auto sm:w-full sm:max-w-md py-5">
9
+ <a href="<%= main_app.root_path %>" class="block py-3">
10
+ <img alt="" src="<%= image_path("logo/logo.png") %>" width="<%= image_width_for_height("logo/logo.png", BulletTrain::Themes.logo_height) %>" height="<%= BulletTrain::Themes.logo_height %>" class="mx-auto h-12 w-auto" />
11
+ </a>
12
+
13
+ <h1 class="mt-6 text-center text-3xl font-semibold tracking-tight dark:text-white">
14
+ <%= p.yield :title %>
15
+ </h1>
16
+
17
+ <%= render "shared/line" %>
18
+ </div>
19
+
20
+ <div class="electron-undraggable pt-5 space-y-5">
21
+ <%= p.content_for :body %>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </div>
26
+
27
+ <% # We have to list out every option we want to be available at runtime so they're included in our Tailwind output. %>
28
+ <% if false %>
29
+ <div class="max-w-md max-w-lg"></div>
30
+ <% end %>
data/config/routes.rb ADDED
@@ -0,0 +1,2 @@
1
+ Rails.application.routes.draw do
2
+ end
@@ -0,0 +1,12 @@
1
+ module BulletTrain
2
+ module Themes
3
+ module Tester
4
+ class Engine < ::Rails::Engine
5
+ initializer "bullet_train.themes.tester.register" do |app|
6
+ BulletTrain::Themes.themes[:tester] = BulletTrain::Themes::Tester::Theme.new
7
+ BulletTrain.linked_gems << "bullet_train-themes-tester"
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,7 @@
1
+ module BulletTrain
2
+ module Themes
3
+ module Tester
4
+ VERSION = "1.0"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,15 @@
1
+ require "bullet_train/themes/tester/version"
2
+ require "bullet_train/themes/tester/engine"
3
+ require "bullet_train/themes/light"
4
+
5
+ module BulletTrain
6
+ module Themes
7
+ module Tester
8
+ class Theme < BulletTrain::Themes::Light::Theme
9
+ def directory_order
10
+ ["tester"] + super
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,53 @@
1
+ namespace :bullet_train do
2
+ namespace :themes do
3
+ namespace :tester do
4
+ desc "Fork the \"Tester\" theme into your local repository."
5
+ task :eject, [:destination] => :environment do |task, args|
6
+ theme_base_path = `bundle show --paths bullet_train-themes-tester`.chomp
7
+ puts "Ejecting from Tester theme in `#{theme_base_path}`."
8
+
9
+ puts "Ejecting Tailwind configuration into `./tailwind.#{args[:destination]}.config.js`."
10
+ `cp #{theme_base_path}/tailwind.tester.config.js #{Rails.root}/tailwind.#{args[:destination]}.config.js`
11
+
12
+ puts "Ejecting stylesheets into `./app/assets/stylesheets/#{args[:destination]}`."
13
+ `mkdir #{Rails.root}/app/assets/stylesheets`
14
+ `cp -R #{theme_base_path}/app/assets/stylesheets/tester #{Rails.root}/app/assets/stylesheets/#{args[:destination]}`
15
+ `cp -R #{theme_base_path}/app/assets/stylesheets/tester.tailwind.css #{Rails.root}/app/assets/stylesheets/#{args[:destination]}.tailwind.css`
16
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/tester/#{args[:destination]}/g" #{Rails.root}/app/assets/stylesheets/#{args[:destination]}.tailwind.css`
17
+
18
+ puts "Ejecting JavaScript into `./app/javascript/application.#{args[:destination]}.js`."
19
+ `cp #{theme_base_path}/app/javascript/application.tester.js #{Rails.root}/app/javascript/application.#{args[:destination]}.js`
20
+
21
+ puts "Ejecting all theme partials into `./app/views/themes/#{args[:destination]}`."
22
+ `mkdir #{Rails.root}/app/views/themes`
23
+ `cp -R #{theme_base_path}/app/views/themes/tester #{Rails.root}/app/views/themes/#{args[:destination]}`
24
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/tester/#{args[:destination]}/g" #{Rails.root}/app/views/themes/#{args[:destination]}/layouts/_head.html.erb`
25
+
26
+ puts "Cutting local `Procfile.dev` over from `tester` to `#{args[:destination]}`."
27
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/tester/#{args[:destination]}/g" #{Rails.root}/Procfile.dev`
28
+
29
+ puts "Cutting local `package.json` over from `tester` to `#{args[:destination]}`."
30
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/tester/#{args[:destination]}/g" #{Rails.root}/package.json`
31
+
32
+ # Stub out the class that represents this theme and establishes its inheritance structure.
33
+ target_path = "#{Rails.root}/app/lib/bullet_train/themes/#{args[:destination]}.rb"
34
+ puts "Stubbing out a class that represents this theme in `./#{target_path}`."
35
+ `mkdir -p #{Rails.root}/app/lib/bullet_train/themes`
36
+ `cp #{theme_base_path}/lib/bullet_train/themes/tester.rb #{target_path}`
37
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/module Tester/module #{args[:destination].titlecase}/g" #{target_path}`
38
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/TailwindCss/Tester/g" #{target_path}`
39
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/tester/#{args[:destination]}/g" #{target_path}`
40
+ ["require", "TODO", "mattr_accessor"].each do |thing_to_remove|
41
+ `grep -v #{thing_to_remove} #{target_path} > #{target_path}.tmp`
42
+ `mv #{target_path}.tmp #{target_path}`
43
+ end
44
+ `standardrb --fix #{target_path}`
45
+
46
+ puts "Cutting local project over from `tester` to `#{args[:destination]}` in `app/helpers/application_helper.rb`."
47
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/:tester/:#{args[:destination]}/g" #{Rails.root}/app/helpers/application_helper.rb`
48
+
49
+ puts "You must restart `bin/dev` at this point, because of the changes to `Procfile.dev` and `package.json`."
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,80 @@
1
+ const defaultTheme = require('tailwindcss/defaultTheme')
2
+ const colors = require('tailwindcss/colors')
3
+
4
+ module.exports = {
5
+ content: [
6
+ './app/views/**/*.html.erb',
7
+ './app/helpers/**/*.rb',
8
+ './app/assets/stylesheets/**/*.css',
9
+ './app/javascript/**/*.js',
10
+ './tmp/gems/*/app/views/**/*.html.erb',
11
+ './tmp/gems/*/app/helpers/**/*.rb',
12
+ './tmp/gems/*/app/assets/stylesheets/**/*.css',
13
+ './tmp/gems/*/app/javascript/**/*.js',
14
+ ],
15
+ darkMode: 'media',
16
+ theme: {
17
+ extend: {
18
+ fontSize: {
19
+ 'xs': '.81rem',
20
+ },
21
+ colors: {
22
+ red: {
23
+ 400: '#ee8989',
24
+ 500: '#e86060',
25
+ 900: '#652424',
26
+ },
27
+
28
+ yellow: {
29
+ 400: '#fcedbe',
30
+ 500: '#fbe6a8',
31
+ 900: '#6e6446',
32
+ },
33
+
34
+ primary: {
35
+ 300: 'var(--primary-300)',
36
+ 400: 'var(--primary-400)',
37
+ 500: 'var(--primary-500)',
38
+ 600: 'var(--primary-600)',
39
+ 700: 'var(--primary-700)',
40
+ 800: 'var(--primary-800)',
41
+ 900: 'var(--primary-900)',
42
+ },
43
+
44
+ darkPrimary: {
45
+ 300: 'var(--dark-primary-300)',
46
+ 400: 'var(--dark-primary-400)',
47
+ 500: 'var(--dark-primary-500)',
48
+ 600: 'var(--dark-primary-600)',
49
+ 700: 'var(--dark-primary-700)',
50
+ 800: 'var(--dark-primary-800)',
51
+ 900: 'var(--dark-primary-900)',
52
+ },
53
+
54
+ // This is a weird one-off for dark-mode.
55
+ darkAccent: {
56
+ 200: 'var(--dark-accent-200)',
57
+ },
58
+
59
+ black: {
60
+ 100: '#000000',
61
+ 200: '#101112',
62
+ 300: '#171818',
63
+ 400: '#292b2c',
64
+ DEFAULT: '#000000',
65
+ }
66
+ },
67
+ fontFamily: {
68
+ // "Avenir Next W01", "Proxima Nova W01", "", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif
69
+ sans: ['Inter var', ...defaultTheme.fontFamily.sans],
70
+ },
71
+ },
72
+ },
73
+ variants: {
74
+ extend: {},
75
+ },
76
+ plugins: [
77
+ require('@tailwindcss/forms'),
78
+ require('@tailwindcss/typography'),
79
+ ],
80
+ }