bullet_train-themes-light 1.6.27 → 1.6.29

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42accb4c030ee28d033b5433c154d9b00f8e45c3b92438fce00953bc14f5b5af
4
- data.tar.gz: 425ce5b8e635405466669dc2080fe96976b92450b1c8a59de5ac2557123488b9
3
+ metadata.gz: 841453615fd5367056dc21793ef27dc4df0164e5d2de26ce35e0ef2596518433
4
+ data.tar.gz: 6ab2432307a1e12de018f465502803a607c3b8ec433f21d475c415318d21fb9d
5
5
  SHA512:
6
- metadata.gz: 6851062997e80fbd028d38b07568cb62a4e922236a548b1426ea200326e6e857ddcd3bda9aec9d892ce78396ac8c708e65d31bbec08cd1b2c28562a99497c09e
7
- data.tar.gz: 1a624bad900881234a8392f738fed736ff335f66c7f7d24dd3133fa8dc52e1965a8efa2de2de1a92dbce0b3d743d64c4a529aea01a393602c22368f0c624163e
6
+ metadata.gz: ca763a0baeadb7cbae6c41f12e3ebeab4696da85e7c89c75eac381800dbf4823303aa45407e83c3bc44159191c6754b1fc232ea54f49b499755c6c09379ef0f0
7
+ data.tar.gz: ff3cbc6b120b77d29a21ce3a8ac616befe043ab4274ad3c8aefdf40c8cf65fb571f85bf0ba4dd0f07c54d478d31ce00fddbe010c5124c8f0da5aa55c04fde5f2
@@ -2,4 +2,5 @@
2
2
  @import "tailwindcss/components";
3
3
  @import "tailwindcss/utilities";
4
4
 
5
- @import "light/application";
5
+ @import "$ThemeStylesheetsDir/application.css"; /* alias used to support ejecting the file to local */
6
+
@@ -30,7 +30,8 @@ end
30
30
  errors = [method, method.to_s.gsub(/_id$/, '').to_sym].uniq.map { |attribute| form.object.errors.full_messages_for(attribute) }.flatten
31
31
  has_errors = errors.any? || partial.error? || other_options[:error].present?
32
32
 
33
- options[:class] = "#{options[:class]} block w-full rounded-md shadow-sm font-light text-sm dark:bg-slate-800 dark:text-slate-300"
33
+ options[:class] = "#{options[:class]} block w-full rounded-md shadow-sm font-light dark:bg-slate-800 dark:text-slate-300"
34
+ options[:class] += " text-base md:text-sm" # default to 16px on mobile to prevent zooming
34
35
 
35
36
  options[:class] += if has_errors
36
37
  " pr-10 border-red-500 text-red-900 placeholder-red-500 outline-none focus:ring-red-500 focus:border-red-500 dark:text-slate-300"
@@ -1,7 +1,7 @@
1
1
  module BulletTrain
2
2
  module Themes
3
3
  module Light
4
- VERSION = "1.6.27"
4
+ VERSION = "1.6.29"
5
5
  end
6
6
  end
7
7
  end
@@ -3,6 +3,14 @@ require "masamune"
3
3
  module BulletTrain
4
4
  module Themes
5
5
  module Application
6
+ def self.eject_theme_main_css(theme_name)
7
+ theme_base_path = `bundle show --paths bullet_train-themes-#{theme_name}`.chomp
8
+
9
+ puts "Ejecting app/assets/stylesheets/#{theme_name}.tailwind.css."
10
+ Rails.root.join("app/assets/stylesheets").mkpath
11
+ `cp -R #{theme_base_path}/app/assets/stylesheets/#{theme_name}.tailwind.css #{Rails.root}/app/assets/stylesheets/#{theme_name}.tailwind.css`
12
+ end
13
+
6
14
  def self.eject_theme(theme_name, ejected_theme_name)
7
15
  theme_parts = theme_name.humanize.split.map { |str| str.capitalize }
8
16
  constantized_theme = theme_parts.join
@@ -19,7 +27,7 @@ module BulletTrain
19
27
  %x(sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/#{theme_name}/#{ejected_theme_name}/g" #{Rails.root}/tailwind.mailer.#{ejected_theme_name}.config.js)
20
28
 
21
29
  puts "Ejecting stylesheets into `./app/assets/stylesheets/#{ejected_theme_name}`."
22
- `mkdir #{Rails.root}/app/assets/stylesheets`
30
+ Rails.root.join("app/assets/stylesheets").mkpath
23
31
  `cp -R #{theme_base_path}/app/assets/stylesheets/#{theme_name} #{Rails.root}/app/assets/stylesheets/#{ejected_theme_name}`
24
32
  `cp -R #{theme_base_path}/app/assets/stylesheets/#{theme_name}.tailwind.css #{Rails.root}/app/assets/stylesheets/#{ejected_theme_name}.tailwind.css`
25
33
  %x(sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/light/#{ejected_theme_name}/g" #{Rails.root}/app/assets/stylesheets/#{ejected_theme_name}.tailwind.css)
@@ -27,6 +35,9 @@ module BulletTrain
27
35
  puts "Ejecting JavaScript into `./app/javascript/application.#{ejected_theme_name}.js`."
28
36
  `cp #{theme_base_path}/app/javascript/application.#{theme_name}.js #{Rails.root}/app/javascript/application.#{ejected_theme_name}.js`
29
37
 
38
+ puts "Ejecting postcss import aliases configuration into `./postcss-import-config.js`."
39
+ `cp #{theme_base_path}/postcss-import-config.js #{Rails.root}/postcss-import-config.js`
40
+
30
41
  `mkdir #{Rails.root}/app/views/themes`
31
42
 
32
43
  new_files = {}
@@ -3,6 +3,11 @@ require "tasks/application"
3
3
  namespace :bullet_train do
4
4
  namespace :themes do
5
5
  namespace :light do
6
+ desc "Eject the \"Light\" theme's main CSS file."
7
+ task :eject_css do |task|
8
+ BulletTrain::Themes::Application.eject_theme_main_css(get_theme_name_from_task(task))
9
+ end
10
+
6
11
  desc "Fork the \"Light\" theme into your local repository."
7
12
  task :eject, [:destination] => :environment do |task, args|
8
13
  BulletTrain::Themes::Application.eject_theme(get_theme_name_from_task(task), args[:destination])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-themes-light
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.27
4
+ version: 1.6.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-19 00:00:00.000000000 Z
11
+ date: 2024-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard