bullet_train-themes-light 1.4.8 → 1.4.9

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: c2e5dd1eaf25cebadd0a996f2aeddffdd538a715b73127a038a9259c80a62b70
4
- data.tar.gz: 57509f9c40f1377e8565adda931bf0840f61da5fa1f2573b3f35da3e92a7ce93
3
+ metadata.gz: 20112f6305d5f10a0abf55e0b801dc3ea4f02c092e29da84b309ea8490bf6a27
4
+ data.tar.gz: 22bda85b05814543bf0f3ae3f417c4213586fb80e75a7e07137d3aabcc990986
5
5
  SHA512:
6
- metadata.gz: 2706f5bc52ba030641798d9deb46fc4c2eec52dd0389a50d896b3f4814d7c42a0b2a763c1fcea337be06d71c1f14e8482bfd173247d514293fd01ecfa918ab84
7
- data.tar.gz: 5aeaf4c6212d975c1b96ea639cd460c5ebe7f5fbb85314def7a83a18511d440cb9387002ab03f39503ef95353c783fd02e295c0db75c0e6e64b2df998434eaf0
6
+ metadata.gz: bc3eb9a0d8bfe5d913774426060727b85011192eba9e4b10587453e0f8abe00e1360693be53dc206462d3e91b926fa5608caa0cbad726423a45ab4d1549628b5
7
+ data.tar.gz: ff292c3cb8c4475dd0dcd96485bc17418d7770fa5372e666d8a751ede850a3aae81bd1e6a80641ff66735955175821c2c59db63fb49b5d9299a9ca43670f6c33
@@ -45,8 +45,10 @@
45
45
  </script>
46
46
 
47
47
  <template id="bullet_train_theme_selects">
48
- <section class="border-t w-full p-4 flex justify-end left-0 bottom-0 fixed bg-white dark:sc-bg-neutral-900" id="bt-theme-selector">
49
- <h3 class="pt-2">Bullet Train Light theme options</h3>
48
+ <section class="border-t w-full p-4 flex space-between left-0 bottom-0 fixed bg-white dark:sc-bg-neutral-900" id="bt-theme-selector">
49
+ <span class="block pt-2 flex-grow">BulletTrain <%= BulletTrain::VERSION %></span>
50
+
51
+ <h3 class="pt-2">Light Theme options</h3>
50
52
 
51
53
  <div>
52
54
  <label for="bullet_train_color" class="pl-4">Color</label>
@@ -1,7 +1,7 @@
1
1
  module BulletTrain
2
2
  module Themes
3
3
  module Light
4
- VERSION = "1.4.8"
4
+ VERSION = "1.4.9"
5
5
  end
6
6
  end
7
7
  end
@@ -36,6 +36,8 @@ module BulletTrain
36
36
  "bullet_train-themes-light" => "light"
37
37
  }.each do |gem, theme_name|
38
38
  gem_path = `bundle show --paths #{gem}`.chomp
39
+ showcase_partials = Dir.glob("#{gem_path}/app/views/showcase/**/*.html.erb")
40
+
39
41
  `find #{gem_path}/app/views/themes`.lines.map(&:chomp).each do |file_or_directory|
40
42
  target_file_or_directory = file_or_directory.gsub(gem_path, "").gsub("/#{theme_name}", "/#{ejected_theme_name}")
41
43
  target_file_or_directory = Rails.root.to_s + target_file_or_directory
@@ -49,6 +51,28 @@ module BulletTrain
49
51
  gem_with_version = gem_path.split("/").last
50
52
  new_files[target_file_or_directory] = file_or_directory.split(/(?=#{gem_with_version})/).last
51
53
  end
54
+
55
+ # Look for showcase preview.
56
+ file_name = target_file_or_directory.split("/").last
57
+ has_showcase_preview = false
58
+ showcase_preview = nil
59
+ showcase_partials.each do |partial|
60
+ has_showcase_preview = partial.match?(/#{file_name}$/)
61
+ if has_showcase_preview
62
+ showcase_preview = partial
63
+ break
64
+ end
65
+ end
66
+
67
+ if has_showcase_preview
68
+ puts "Ejecting showcase preview for #{target_file_or_directory}"
69
+ partial_relative_path = showcase_preview.scan(/(?=app\/views\/showcase).*/).last
70
+ directory = partial_relative_path.split("/")[0..-2].join("/")
71
+ FileUtils.mkdir_p(directory)
72
+ FileUtils.touch(partial_relative_path)
73
+ `cp #{showcase_preview} #{partial_relative_path}`
74
+ new_files[partial_relative_path] = showcase_preview
75
+ end
52
76
  end
53
77
  end
54
78
 
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.4.8
4
+ version: 1.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-25 00:00:00.000000000 Z
11
+ date: 2023-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard