showcase-rails 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/builds/showcase.css +36 -22
- data/app/views/layouts/showcase.html.erb +17 -0
- data/app/views/showcase/engine/_root.html.erb +10 -3
- data/config/tailwind.config.js +1 -0
- data/lib/showcase/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d55137272e05cac25eb1a63619d93aec93e58920ce0e10bebe89e4e93212bd2
|
4
|
+
data.tar.gz: 98de3fa5a6a81932393911af0eef39d586e01fcc97dd92e78be74be308dbb660
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81a0a673de41fb14f2790ceafc3657729cd12c2af9049c535bb60fbb03a1b724f8086f141d231758b9e4eb839a53af290a8f13f57e524bf409e7d94bab775dd3
|
7
|
+
data.tar.gz: 5fb343533e486ccb31985b40fef3ce5482ca6594a2bc2838ec4afa60eb38d412e1a40b58c0de254f22a410f32b80e9c7bfa7f80a907c670ba35387d64e4c1c02
|
@@ -191,6 +191,10 @@ pre {
|
|
191
191
|
display: list-item;
|
192
192
|
}
|
193
193
|
|
194
|
+
.sc-hidden {
|
195
|
+
display: none;
|
196
|
+
}
|
197
|
+
|
194
198
|
.sc-h-full {
|
195
199
|
height: 100%;
|
196
200
|
}
|
@@ -241,6 +245,10 @@ pre {
|
|
241
245
|
align-items: center;
|
242
246
|
}
|
243
247
|
|
248
|
+
.sc-items-baseline {
|
249
|
+
align-items: baseline;
|
250
|
+
}
|
251
|
+
|
244
252
|
.sc-justify-between {
|
245
253
|
justify-content: space-between;
|
246
254
|
}
|
@@ -479,33 +487,39 @@ pre {
|
|
479
487
|
background-color: rgb(238 242 255 / var(--tw-bg-opacity));
|
480
488
|
}
|
481
489
|
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
}
|
490
|
+
:is(.sc-dark .dark\:sc-block) {
|
491
|
+
display: block;
|
492
|
+
}
|
486
493
|
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
}
|
494
|
+
:is(.sc-dark .dark\:sc-hidden) {
|
495
|
+
display: none;
|
496
|
+
}
|
491
497
|
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
}
|
498
|
+
:is(.sc-dark .dark\:sc-bg-neutral-700\/50) {
|
499
|
+
background-color: rgb(64 64 64 / 0.5);
|
500
|
+
}
|
496
501
|
|
497
|
-
|
498
|
-
|
499
|
-
|
502
|
+
:is(.sc-dark .dark\:sc-bg-neutral-800) {
|
503
|
+
--tw-bg-opacity: 1;
|
504
|
+
background-color: rgb(38 38 38 / var(--tw-bg-opacity));
|
505
|
+
}
|
500
506
|
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
507
|
+
:is(.sc-dark .dark\:sc-bg-neutral-900) {
|
508
|
+
--tw-bg-opacity: 1;
|
509
|
+
background-color: rgb(23 23 23 / var(--tw-bg-opacity));
|
510
|
+
}
|
505
511
|
|
506
|
-
|
507
|
-
|
508
|
-
|
512
|
+
:is(.sc-dark .dark\:sc-text-inherit) {
|
513
|
+
color: inherit;
|
514
|
+
}
|
515
|
+
|
516
|
+
:is(.sc-dark .dark\:sc-text-white) {
|
517
|
+
--tw-text-opacity: 1;
|
518
|
+
color: rgb(255 255 255 / var(--tw-text-opacity));
|
519
|
+
}
|
520
|
+
|
521
|
+
:is(.sc-dark .dark\:hover\:sc-bg-neutral-700\/50:hover) {
|
522
|
+
background-color: rgb(64 64 64 / 0.5);
|
509
523
|
}
|
510
524
|
|
511
525
|
@media (min-width: 768px) {
|
@@ -4,6 +4,23 @@
|
|
4
4
|
<title>Showcase</title>
|
5
5
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
6
|
|
7
|
+
<script>
|
8
|
+
// We're setting this directly here to help prevent Flash of Unstyled Content (FOUC).
|
9
|
+
class Showcase {
|
10
|
+
static start() {
|
11
|
+
const preference = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"
|
12
|
+
this.colorScheme = localStorage.colorScheme || preference
|
13
|
+
}
|
14
|
+
|
15
|
+
static set colorScheme(value) {
|
16
|
+
localStorage.colorScheme = value
|
17
|
+
document.documentElement.classList.toggle("sc-dark", value === "dark")
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
Showcase.start()
|
22
|
+
</script>
|
23
|
+
|
7
24
|
<%= render "showcase/engine/head" %>
|
8
25
|
<%= render "showcase/engine/stylesheets" %>
|
9
26
|
<%= render "showcase/engine/javascripts" %>
|
@@ -1,9 +1,16 @@
|
|
1
1
|
<main class="sc-flex sc-flex-wrap dark:sc-bg-neutral-900 dark:sc-text-white" aria-labelledby="showcase_main_title">
|
2
2
|
<section class="sc-grid sc-grid-cols-12 sc-w-full">
|
3
3
|
<nav class="sc-col-span-3 xl:sc-col-span-2 sc-h-full sc-border-0 sc-border-r sc-border-solid sc-border-gray-200">
|
4
|
-
<
|
5
|
-
|
6
|
-
|
4
|
+
<header class="sc-flex sc-items-baseline sc-pt-5 sc-pb-2 sc-pl-4">
|
5
|
+
<h1 id="showcase_main_title" class="sc-font-black sc-text-2xl sc-m-0">
|
6
|
+
<%= link_to "Showcase", root_url, class: "sc-link" %>
|
7
|
+
</h1>
|
8
|
+
|
9
|
+
<section class="sc-link sc-text-sm sc-px-2 sc-cursor-pointer">
|
10
|
+
<a onclick="Showcase.colorScheme = 'light'" class="sc-hidden dark:sc-block">light mode</a>
|
11
|
+
<a onclick="Showcase.colorScheme = 'dark'" class="sc-block dark:sc-hidden">dark mode</a>
|
12
|
+
</section>
|
13
|
+
</header>
|
7
14
|
|
8
15
|
<%= render Showcase::Path.tree %>
|
9
16
|
</nav>
|
data/config/tailwind.config.js
CHANGED
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.4.
|
4
|
+
version: 0.4.6
|
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-
|
12
|
+
date: 2023-08-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
rubygems_version: 3.4.
|
106
|
+
rubygems_version: 3.4.17
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: Showcase helps you show off and document your partials, components, view
|