strada-rails 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/strada/scaffold/templates/edit.html.erb.tt +2 -2
- data/lib/generators/strada/scaffold/templates/index.html.erb.tt +1 -1
- data/lib/generators/strada/scaffold/templates/new.html.erb.tt +2 -2
- data/lib/generators/strada/scaffold/templates/show.html.erb.tt +1 -1
- data/lib/install/app/assets/stylesheets/strada.css +7 -0
- data/lib/install/strada_with_bun.rb +0 -11
- data/lib/install/strada_with_importmap.rb +0 -11
- data/lib/install/strada_with_node.rb +0 -11
- data/lib/strada/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac7dfd80b1e6ee99b8aa2f190a92e882c88a1518c4ff2a1598d593e9d7cf9f06
|
4
|
+
data.tar.gz: 1ce7a6cb480ddc4859bc6fca7498d376b18e6ed4d1beaa800694831d712c835c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2ccbc9ff08f34df5fe905e0fe761e6d96e8b6796a4876c001cc2e56e6c6bb26c68e7b163ceb1ea07c95b6878cd6b5d879adfa40b50fdf77cc33fec75b6871b3
|
7
|
+
data.tar.gz: 9a95e80197f3eb2a23347d6eeb3c69eabe5a4311bfa210839b6624da7c2567b3cad390aad7d1307610fab8843e2c18a131c9da9b90facc79b2fc9700b9538d91
|
@@ -1,10 +1,10 @@
|
|
1
|
-
<h1 class="hide-on-
|
1
|
+
<h1 class="hide-on-native">Editing <%= human_name.downcase %></h1>
|
2
2
|
|
3
3
|
<%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
|
4
4
|
|
5
5
|
<br>
|
6
6
|
|
7
|
-
<div class="hide-on-
|
7
|
+
<div class="hide-on-native">
|
8
8
|
<%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %> %> |
|
9
9
|
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %> %>
|
10
10
|
</div>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<p style="color: green" data-controller="bridge--flash-message"><%%= notice %></p>
|
3
3
|
<%% end %>
|
4
4
|
|
5
|
-
<h1 class="hide-on-
|
5
|
+
<h1 class="hide-on-native"><%= human_name.pluralize %></h1>
|
6
6
|
|
7
7
|
<div id="<%= plural_table_name %>">
|
8
8
|
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<h1 class="hide-on-
|
1
|
+
<h1 class="hide-on-native">New <%= human_name.downcase %></h1>
|
2
2
|
|
3
3
|
<%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
|
4
4
|
|
5
5
|
<br>
|
6
6
|
|
7
|
-
<div class="hide-on-
|
7
|
+
<div class="hide-on-native">
|
8
8
|
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %> %>
|
9
9
|
</div>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<%%= render @<%= singular_table_name %> %>
|
6
6
|
|
7
7
|
<div>
|
8
|
-
<div class="hide-on-
|
8
|
+
<div class="hide-on-native">
|
9
9
|
<%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, data: { controller: "bridge--nav-button", bridge_title: "Edit" } %> |
|
10
10
|
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %> %>
|
11
11
|
</div>
|
@@ -1,5 +1,12 @@
|
|
1
1
|
/* Strada — hide elements for registered bridge components */
|
2
2
|
|
3
|
+
/*
|
4
|
+
* Hide elements with "hide-on-native" when strada is registered.
|
5
|
+
*/
|
6
|
+
[data-bridge-platform] .hide-on-native {
|
7
|
+
display: none;
|
8
|
+
}
|
9
|
+
|
3
10
|
/*
|
4
11
|
* Hide the submit button when the "form" component is registered.
|
5
12
|
*/
|
@@ -1,11 +1,3 @@
|
|
1
|
-
APPLICATION_LAYOUT_PATH = Rails.root.join("app/views/layouts/application.html.erb")
|
2
|
-
|
3
|
-
HIDE_ON_MOBILE_STYLE = <<-HTML.chomp
|
4
|
-
<% if turbo_native_app? %>
|
5
|
-
<style>.hide-on-mobile { display: none; }</style>
|
6
|
-
<% end %>
|
7
|
-
HTML
|
8
|
-
|
9
1
|
destination = Pathname(destination_root)
|
10
2
|
|
11
3
|
say "Copy bridge controllers"
|
@@ -23,8 +15,5 @@ unless destination.join("app/assets/application.css").exist?
|
|
23
15
|
end
|
24
16
|
end
|
25
17
|
|
26
|
-
say "Add hide-on-mobile style in application layout"
|
27
|
-
insert_into_file APPLICATION_LAYOUT_PATH.to_s, "\n\n#{HIDE_ON_MOBILE_STYLE}", before: /\s*<\/head>/
|
28
|
-
|
29
18
|
say "Install Strada"
|
30
19
|
run "bun add @hotwired/stimulus"
|
@@ -1,11 +1,3 @@
|
|
1
|
-
APPLICATION_LAYOUT_PATH = Rails.root.join("app/views/layouts/application.html.erb")
|
2
|
-
|
3
|
-
HIDE_ON_MOBILE_STYLE = <<-HTML.chomp
|
4
|
-
<% if turbo_native_app? %>
|
5
|
-
<style>.hide-on-mobile { display: none; }</style>
|
6
|
-
<% end %>
|
7
|
-
HTML
|
8
|
-
|
9
1
|
destination = Pathname(destination_root)
|
10
2
|
|
11
3
|
say "Copy bridge controllers"
|
@@ -20,9 +12,6 @@ unless destination.join("app/assets/application.css").exist?
|
|
20
12
|
end
|
21
13
|
end
|
22
14
|
|
23
|
-
say "Add hide-on-mobile style in application layout"
|
24
|
-
insert_into_file APPLICATION_LAYOUT_PATH.to_s, "\n\n#{HIDE_ON_MOBILE_STYLE}", before: /\s*<\/head>/
|
25
|
-
|
26
15
|
say "Pin Strada"
|
27
16
|
say %(Appending: pin "@hotwired/strada", to: "strada.js", preload: true")
|
28
17
|
append_to_file "config/importmap.rb", %(pin "@hotwired/strada", to: "strada.js", preload: true\n)
|
@@ -1,11 +1,3 @@
|
|
1
|
-
APPLICATION_LAYOUT_PATH = Rails.root.join("app/views/layouts/application.html.erb")
|
2
|
-
|
3
|
-
HIDE_ON_MOBILE_STYLE = <<-HTML.chomp
|
4
|
-
<% if turbo_native_app? %>
|
5
|
-
<style>.hide-on-mobile { display: none; }</style>
|
6
|
-
<% end %>
|
7
|
-
HTML
|
8
|
-
|
9
1
|
destination = Pathname(destination_root)
|
10
2
|
|
11
3
|
say "Copy bridge controllers"
|
@@ -23,8 +15,5 @@ unless destination.join("app/assets/application.css").exist?
|
|
23
15
|
end
|
24
16
|
end
|
25
17
|
|
26
|
-
say "Add hide-on-mobile style in application layout"
|
27
|
-
insert_into_file APPLICATION_LAYOUT_PATH.to_s, "\n\n#{HIDE_ON_MOBILE_STYLE}", before: /\s*<\/head>/
|
28
|
-
|
29
18
|
say "Install Strada"
|
30
19
|
run "yarn add @hotwired/strada"
|
data/lib/strada/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: strada-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nixon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|