showcase-rails 0.2.6 → 0.2.7
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 +4 -4
- data/README.md +6 -2
- data/app/assets/builds/showcase.css +13 -12
- data/app/views/layouts/showcase.html.erb +1 -0
- data/app/views/showcase/engine/_head.html.erb +2 -0
- data/app/views/showcase/engine/_javascripts.html.erb +1 -1
- data/app/views/showcase/engine/_sample.html.erb +2 -2
- data/app/views/showcase/engine/_stylesheets.html.erb +1 -1
- data/app/views/showcase/engine/index.html.erb +3 -0
- data/app/views/showcase/engine/path/_path.html.erb +1 -1
- data/lib/showcase/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 616178a6d44d9d2a3da1d3e501d65fcd15375b89d87c1ec25dff13f58dba3f4a
|
|
4
|
+
data.tar.gz: 9f2c3e39bda86712762003630c92796967f5b30f6d87102c72cb69fbd905580d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c47ba2bdb23a3173b3c4460387423338b02096b2b3fdd9cba9114f2bc429d39bae6c4a7c010991c7659294e6ab9508c663112701cca3450a4005e84a3282ee1
|
|
7
|
+
data.tar.gz: 575cb0f98daab6bfe9353d2faf3e5356756f7a67e8158ac16fd59bf5479ad50d2b4260a106b72c0bf27136531f01058200c9bbdf62114b7e84fe8b1e9ae20c51
|
data/README.md
CHANGED
|
@@ -157,12 +157,16 @@ Showcase bundles its own `showcase.js`, `showcase.css` and `showcase.highlights.
|
|
|
157
157
|
Action View's [javascript_include_tag][] and [stylesheet_link_tag][].
|
|
158
158
|
|
|
159
159
|
If your assets require more sophisticated loading techniques, declare your own
|
|
160
|
-
|
|
160
|
+
version of the [showcase/engine/_head.html.erb][] partial.
|
|
161
|
+
|
|
162
|
+
If you need to tweak showcase's assets, declare your own versions of
|
|
163
|
+
the [showcase/engine/_javascripts.html.erb][] and
|
|
161
164
|
[showcase/engine/_stylesheets.html.erb][] partials. When customizing those
|
|
162
165
|
partials, make sure to include `"showcase"` in your list of assets.
|
|
163
166
|
|
|
164
167
|
[javascript_include_tag]: https://edgeapi.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#method-i-javascript_include_tag
|
|
165
168
|
[stylesheet_link_tag]: https://edgeapi.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#method-i-stylesheet_link_tag
|
|
169
|
+
[showcase/engine/_head.html.erb]: ./showcase/engine/_head.html.erb
|
|
166
170
|
[showcase/engine/_javascripts.html.erb]: ./showcase/engine/_javascripts.html.erb
|
|
167
171
|
[showcase/engine/_stylesheets.html.erb]: ./showcase/engine/_stylesheets.html.erb
|
|
168
172
|
|
|
@@ -173,7 +177,7 @@ By default, Showcase's syntax highlighting runs on Rouge's "github" theme.
|
|
|
173
177
|
To use a different theme, override [showcase/engine/_stylesheets.html.erb][] with the following, replacing `:magritte` with a [valid theme](rouge-themes):
|
|
174
178
|
|
|
175
179
|
```erb
|
|
176
|
-
<%= stylesheet_link_tag "
|
|
180
|
+
<%= stylesheet_link_tag "showcase" %> # We've removed the default showcase.highlights file here.
|
|
177
181
|
<%= tag.style Rouge::Theme.find(:magritte).render(scope: ".sc-highlight") %>
|
|
178
182
|
```
|
|
179
183
|
|
|
@@ -727,10 +727,6 @@ select {
|
|
|
727
727
|
height: 100%;
|
|
728
728
|
}
|
|
729
729
|
|
|
730
|
-
.sc-max-h-20 {
|
|
731
|
-
max-height: 5rem;
|
|
732
|
-
}
|
|
733
|
-
|
|
734
730
|
.sc-min-h-screen {
|
|
735
731
|
min-height: 100vh;
|
|
736
732
|
}
|
|
@@ -826,6 +822,11 @@ select {
|
|
|
826
822
|
border-radius: 0.375rem;
|
|
827
823
|
}
|
|
828
824
|
|
|
825
|
+
.sc-rounded-b-md {
|
|
826
|
+
border-bottom-right-radius: 0.375rem;
|
|
827
|
+
border-bottom-left-radius: 0.375rem;
|
|
828
|
+
}
|
|
829
|
+
|
|
829
830
|
.sc-rounded-t-md {
|
|
830
831
|
border-top-left-radius: 0.375rem;
|
|
831
832
|
border-top-right-radius: 0.375rem;
|
|
@@ -969,11 +970,19 @@ select {
|
|
|
969
970
|
line-height: 1.375;
|
|
970
971
|
}
|
|
971
972
|
|
|
973
|
+
.sc-text-inherit {
|
|
974
|
+
color: inherit;
|
|
975
|
+
}
|
|
976
|
+
|
|
972
977
|
.sc-text-slate-500 {
|
|
973
978
|
--tw-text-opacity: 1;
|
|
974
979
|
color: rgb(100 116 139 / var(--tw-text-opacity));
|
|
975
980
|
}
|
|
976
981
|
|
|
982
|
+
.sc-no-underline {
|
|
983
|
+
text-decoration-line: none;
|
|
984
|
+
}
|
|
985
|
+
|
|
977
986
|
.hover\:sc-select-all:hover {
|
|
978
987
|
-webkit-user-select: all;
|
|
979
988
|
-moz-user-select: all;
|
|
@@ -985,14 +994,6 @@ select {
|
|
|
985
994
|
background-color: rgb(238 242 255 / var(--tw-bg-opacity));
|
|
986
995
|
}
|
|
987
996
|
|
|
988
|
-
.hover\:sc-text-inherit:hover {
|
|
989
|
-
color: inherit;
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
.hover\:sc-no-underline:hover {
|
|
993
|
-
text-decoration-line: none;
|
|
994
|
-
}
|
|
995
|
-
|
|
996
997
|
@media (prefers-color-scheme: dark) {
|
|
997
998
|
.dark\:sc-bg-neutral-700\/50 {
|
|
998
999
|
background-color: rgb(64 64 64 / 0.5);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<%= javascript_include_tag "
|
|
1
|
+
<%= javascript_include_tag "showcase" %>
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
<% end %>
|
|
35
35
|
|
|
36
36
|
<% if sample.events.any? %>
|
|
37
|
-
<section class="sc-px-4 sc-py-2 sc-font-small sc-bg-slate-50" aria-labelledby="showcase_<%= sample.id %>_javascript_events_title">
|
|
37
|
+
<section class="sc-px-4 sc-py-2 sc-font-small sc-bg-slate-50 dark:sc-bg-neutral-800 sc-rounded-b-md" aria-labelledby="showcase_<%= sample.id %>_javascript_events_title">
|
|
38
38
|
<h4 id="showcase_<%= sample.id %>_javascript_events_title" class="sc-mb-2 sc-font-medium sc-text-base">JavaScript Events</h4>
|
|
39
39
|
|
|
40
|
-
<div class="sc-overflow-scroll sc-max-h-
|
|
40
|
+
<div class="sc-overflow-scroll sc-max-h-50">
|
|
41
41
|
<pre data-showcase-sample-target="relay"></pre>
|
|
42
42
|
</div>
|
|
43
43
|
</section>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<%= stylesheet_link_tag "
|
|
1
|
+
<%= stylesheet_link_tag "showcase", "showcase.highlights" %>
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
<section class="sc-space-y-4">
|
|
26
26
|
<h2 class="sc-font-semibold sc-text-2xl">Additional resources</h2>
|
|
27
27
|
<ul class="sc-list-none">
|
|
28
|
+
<li>
|
|
29
|
+
<%= link_to "Showcase documentation", "https://github.com/bullet-train-co/showcase", target: "_blank" %>
|
|
30
|
+
</li>
|
|
28
31
|
<li>
|
|
29
32
|
<%= link_to "Bullet Train field partials documentation", "https://bullettrain.co/docs/field-partials", target: "_blank" %>
|
|
30
33
|
</li>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
<article class="hover:sc-bg-indigo-50 dark:hover:sc-bg-neutral-700/50 <%= "sc-bg-indigo-50 dark:sc-bg-neutral-700/50" if path.id == params[:id] %>">
|
|
2
|
-
<%= link_to path.basename.titleize, preview_path(path.id), class: "sc-inline-block sc-py-2 sc-px-8 sc-w-full
|
|
2
|
+
<%= link_to path.basename.titleize, preview_path(path.id), class: "sc-inline-block sc-py-2 sc-px-8 sc-w-full sc-text-inherit sc-no-underline" %>
|
|
3
3
|
</article>
|
data/lib/showcase/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: showcase-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Pence
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2023-03-
|
|
12
|
+
date: 2023-03-14 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|
|
@@ -59,6 +59,7 @@ files:
|
|
|
59
59
|
- app/models/showcase/preview.rb
|
|
60
60
|
- app/models/showcase/sample.rb
|
|
61
61
|
- app/views/layouts/showcase.html.erb
|
|
62
|
+
- app/views/showcase/engine/_head.html.erb
|
|
62
63
|
- app/views/showcase/engine/_javascripts.html.erb
|
|
63
64
|
- app/views/showcase/engine/_options.html.erb
|
|
64
65
|
- app/views/showcase/engine/_preview.html.erb
|
|
@@ -101,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
101
102
|
- !ruby/object:Gem::Version
|
|
102
103
|
version: '0'
|
|
103
104
|
requirements: []
|
|
104
|
-
rubygems_version: 3.4.
|
|
105
|
+
rubygems_version: 3.4.8
|
|
105
106
|
signing_key:
|
|
106
107
|
specification_version: 4
|
|
107
108
|
summary: Showcase helps you show off and document your partials, components, view
|