bullet_train-themes-light 1.4.7 → 1.4.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20112f6305d5f10a0abf55e0b801dc3ea4f02c092e29da84b309ea8490bf6a27
|
4
|
+
data.tar.gz: 22bda85b05814543bf0f3ae3f417c4213586fb80e75a7e07137d3aabcc990986
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
49
|
-
<
|
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>
|
data/lib/tasks/application.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2023-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|