bullet_train-themes-light 1.6.28 → 1.6.29
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 841453615fd5367056dc21793ef27dc4df0164e5d2de26ce35e0ef2596518433
|
4
|
+
data.tar.gz: 6ab2432307a1e12de018f465502803a607c3b8ec433f21d475c415318d21fb9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca763a0baeadb7cbae6c41f12e3ebeab4696da85e7c89c75eac381800dbf4823303aa45407e83c3bc44159191c6754b1fc232ea54f49b499755c6c09379ef0f0
|
7
|
+
data.tar.gz: ff3cbc6b120b77d29a21ce3a8ac616befe043ab4274ad3c8aefdf40c8cf65fb571f85bf0ba4dd0f07c54d478d31ce00fddbe010c5124c8f0da5aa55c04fde5f2
|
@@ -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
|
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"
|
data/lib/tasks/application.rb
CHANGED
@@ -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
|
-
|
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.
|
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-
|
11
|
+
date: 2024-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|