shadcn-ui 0.0.1
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 +7 -0
- data/.editorconfig +10 -0
- data/.prettierignore +43 -0
- data/.prettierrc.json +28 -0
- data/.rspec +1 -0
- data/.ruby-version +1 -0
- data/.vscode/settings.json +11 -0
- data/CHANGELOG.md +6 -0
- data/CODE_OF_CONDUCT.md +113 -0
- data/LICENSE.md +18 -0
- data/Procfile.dev +2 -0
- data/README.md +90 -0
- data/Rakefile +12 -0
- data/app/assets/builds/.keep +0 -0
- data/app/assets/config/manifest.js +5 -0
- data/app/assets/images/.keep +0 -0
- data/app/assets/stylesheets/application.scss +42 -0
- data/app/assets/stylesheets/application.tailwind.css +92 -0
- data/app/assets/stylesheets/lambda.light.scss +136 -0
- data/app/channels/application_cable/channel.rb +4 -0
- data/app/channels/application_cable/connection.rb +4 -0
- data/app/controllers/application_controller.rb +8 -0
- data/app/controllers/components_controller.rb +7 -0
- data/app/controllers/concerns/.keep +0 -0
- data/app/helpers/application_helper.rb +2 -0
- data/app/helpers/components/accordion_helper.rb +5 -0
- data/app/helpers/components/alert_dialog_helper.rb +6 -0
- data/app/helpers/components/alert_helper.rb +11 -0
- data/app/helpers/components/badge_helper.rb +20 -0
- data/app/helpers/components/button_helper.rb +20 -0
- data/app/helpers/components/card_helper.rb +5 -0
- data/app/helpers/components/checkbox_helper.rb +5 -0
- data/app/helpers/components/collapsible_helper.rb +6 -0
- data/app/helpers/components/dialog_helper.rb +14 -0
- data/app/helpers/components/dropdown_menu_helper.rb +23 -0
- data/app/helpers/components/hover_card_helper.rb +15 -0
- data/app/helpers/components/popover_helper.rb +15 -0
- data/app/helpers/components/seperator_helper.rb +6 -0
- data/app/helpers/components/textarea_helper.rb +13 -0
- data/app/helpers/components/toast_helper.rb +5 -0
- data/app/helpers/components/toggle_helper.rb +6 -0
- data/app/helpers/components/tooltip_helper.rb +15 -0
- data/app/helpers/components_helper.rb +7 -0
- data/app/helpers/examples_helper.rb +41 -0
- data/app/javascript/application.js +3 -0
- data/app/javascript/controllers/application.js +9 -0
- data/app/javascript/controllers/hello_controller.js +7 -0
- data/app/javascript/controllers/highlight_controller.js +9 -0
- data/app/javascript/controllers/index.js +11 -0
- data/app/javascript/controllers/tabs_controller.js +72 -0
- data/app/javascript/controllers/ui/accordion_controller.js +128 -0
- data/app/javascript/controllers/ui/checkbox_controller.js +17 -0
- data/app/javascript/controllers/ui/collapsible_controller.js +28 -0
- data/app/javascript/controllers/ui/dialog_controller.js +92 -0
- data/app/javascript/controllers/ui/dropdown_controller.js +25 -0
- data/app/javascript/controllers/ui/hover-card_controller.js +39 -0
- data/app/javascript/controllers/ui/popover_controller.js +27 -0
- data/app/javascript/controllers/ui/toast_controller.js +43 -0
- data/app/javascript/controllers/ui/toggle_controller.js +15 -0
- data/app/javascript/controllers/ui/tooltip_controller.js +3 -0
- data/app/javascript/controllers/ui/transition_controller.js +8 -0
- data/app/jobs/application_job.rb +7 -0
- data/app/mailers/application_mailer.rb +4 -0
- data/app/models/application_record.rb +3 -0
- data/app/models/concerns/.keep +0 -0
- data/app/views/application/index.html.erb +0 -0
- data/app/views/components/ui/_accordion.html.erb +40 -0
- data/app/views/components/ui/_alert.html.erb +55 -0
- data/app/views/components/ui/_alert_dialog.html.erb +20 -0
- data/app/views/components/ui/_badge.html.erb +1 -0
- data/app/views/components/ui/_button.html.erb +11 -0
- data/app/views/components/ui/_card.html.erb +13 -0
- data/app/views/components/ui/_checkbox.html.erb +37 -0
- data/app/views/components/ui/_collapsible.html.erb +38 -0
- data/app/views/components/ui/_dialog.html.erb +69 -0
- data/app/views/components/ui/_dropdown_menu.html.erb +9 -0
- data/app/views/components/ui/_hover_card.html.erb +18 -0
- data/app/views/components/ui/_popover.html.erb +19 -0
- data/app/views/components/ui/_separator.html.erb +4 -0
- data/app/views/components/ui/_textarea.html.erb +9 -0
- data/app/views/components/ui/_toast.html.erb +34 -0
- data/app/views/components/ui/_toggle.html.erb +3 -0
- data/app/views/components/ui/_tooltip.html.erb +18 -0
- data/app/views/components/ui/shared/_dialog_background.html.erb +7 -0
- data/app/views/components/ui/shared/_menu_item.html.erb +6 -0
- data/app/views/examples/authentication/index.html.erb +148 -0
- data/app/views/examples/components/accordion.html.erb +17 -0
- data/app/views/examples/components/alert-dialog.html.erb +24 -0
- data/app/views/examples/components/alert.html.erb +22 -0
- data/app/views/examples/components/badge.html.erb +30 -0
- data/app/views/examples/components/button.html.erb +33 -0
- data/app/views/examples/components/card.html.erb +156 -0
- data/app/views/examples/components/checkbox.html.erb +8 -0
- data/app/views/examples/components/collapsible.html.erb +24 -0
- data/app/views/examples/components/dialog/_usage.html.erb +28 -0
- data/app/views/examples/components/dialog/code/form.erb +48 -0
- data/app/views/examples/components/dialog/code/notifications.erb +83 -0
- data/app/views/examples/components/dialog/code/preview.erb +14 -0
- data/app/views/examples/components/dialog/code/usage.erb +8 -0
- data/app/views/examples/components/dialog.html.erb +148 -0
- data/app/views/examples/components/dropdown-menu.html.erb +26 -0
- data/app/views/examples/components/hover-card.html.erb +24 -0
- data/app/views/examples/components/popover.html.erb +34 -0
- data/app/views/examples/components/separator.html.erb +33 -0
- data/app/views/examples/components/textarea.html.erb +12 -0
- data/app/views/examples/components/toast.html.erb +15 -0
- data/app/views/examples/components/toggle.html.erb +12 -0
- data/app/views/examples/components/tooltip.html.erb +23 -0
- data/app/views/layouts/_sidebar.html.erb +270 -0
- data/app/views/layouts/application.html.erb +33 -0
- data/app/views/layouts/component.html.erb +35 -0
- data/app/views/layouts/documentation/_breadcrumb.html.erb +17 -0
- data/app/views/layouts/documentation/_component_header.html.erb +11 -0
- data/app/views/layouts/documentation/_examples.html.erb +80 -0
- data/app/views/layouts/documentation/_preview.html.erb +90 -0
- data/app/views/layouts/mailer.html.erb +13 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/app/views/layouts/shared/_header.html.erb +164 -0
- data/config/application.rb +37 -0
- data/config/boot.rb +4 -0
- data/config/cable.yml +11 -0
- data/config/credentials.yml.enc +1 -0
- data/config/database.yml +25 -0
- data/config/environment.rb +5 -0
- data/config/environments/development.rb +70 -0
- data/config/environments/production.rb +93 -0
- data/config/environments/test.rb +60 -0
- data/config/importmap.rb +13 -0
- data/config/initializers/assets.rb +12 -0
- data/config/initializers/content_security_policy.rb +25 -0
- data/config/initializers/filter_parameter_logging.rb +8 -0
- data/config/initializers/inflections.rb +16 -0
- data/config/initializers/permissions_policy.rb +11 -0
- data/config/locales/en.yml +33 -0
- data/config/puma.rb +43 -0
- data/config/render.yml +9 -0
- data/config/routes.rb +7 -0
- data/config/storage.yml +34 -0
- data/config/tailwind.config.js +86 -0
- data/config.ru +6 -0
- data/db/seeds.rb +7 -0
- data/lib/assets/.keep +0 -0
- data/lib/generators/shadcn_ui_generator.rb +32 -0
- data/lib/shadcn-ui/shadcn-ui.rb +8 -0
- data/lib/shadcn-ui/version.rb +3 -0
- data/lib/tasks/.keep +0 -0
- data/log/.keep +0 -0
- data/package-lock.json +1014 -0
- data/package.json +8 -0
- data/public/404.html +67 -0
- data/public/422.html +67 -0
- data/public/500.html +66 -0
- data/public/android-chrome-192x192.png +0 -0
- data/public/android-chrome-512x512.png +0 -0
- data/public/apple-touch-icon-precomposed.png +0 -0
- data/public/apple-touch-icon.png +0 -0
- data/public/favicon-16x16.png +0 -0
- data/public/favicon-32x32.png +0 -0
- data/public/favicon.ico +0 -0
- data/public/og.jpg +0 -0
- data/public/robots.txt +1 -0
- data/sig/shadcn-ui.rbs +4 -0
- data/storage/.keep +0 -0
- data/tmp/.keep +0 -0
- data/tmp/pids/.keep +0 -0
- data/tmp/storage/.keep +0 -0
- data/vendor/.keep +0 -0
- data/vendor/javascript/.keep +0 -0
- metadata +214 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>ShadcnRails</title>
|
5
|
+
<meta
|
6
|
+
name="viewport"
|
7
|
+
content="width=device-width,initial-scale=1">
|
8
|
+
<!--prettier-ignore-->
|
9
|
+
<%= csrf_meta_tags %>
|
10
|
+
<%= csp_meta_tag %>
|
11
|
+
<%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
|
12
|
+
|
13
|
+
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
14
|
+
<%= content_for :stylesheets %>
|
15
|
+
<%= javascript_importmap_tags %>
|
16
|
+
</head>
|
17
|
+
|
18
|
+
<body>
|
19
|
+
<div class="relative flex min-h-screen flex-col">
|
20
|
+
<%= render 'layouts/shared/header' %>
|
21
|
+
<div class="flex-1">
|
22
|
+
<div class="border-b">
|
23
|
+
<div
|
24
|
+
class="container flex-1 items-start md:grid md:grid-cols-[220px_minmax(0,1fr)] md:gap-6 lg:grid-cols-[240px_minmax(0,1fr)] lg:gap-10">
|
25
|
+
<!--prettier-ignore-->
|
26
|
+
<%= render 'layouts/sidebar' %>
|
27
|
+
<%= yield %>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
</body>
|
33
|
+
</html>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>ShadcnRails</title>
|
5
|
+
<meta
|
6
|
+
name="viewport"
|
7
|
+
content="width=device-width,initial-scale=1">
|
8
|
+
<!--prettier-ignore-->
|
9
|
+
<%= csrf_meta_tags %>
|
10
|
+
<%= csp_meta_tag %>
|
11
|
+
<%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
|
12
|
+
|
13
|
+
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
14
|
+
|
15
|
+
<%= javascript_importmap_tags %>
|
16
|
+
</head>
|
17
|
+
|
18
|
+
<body>
|
19
|
+
<div class="relative flex min-h-screen flex-col">
|
20
|
+
<%= render 'layouts/shared/header' %>
|
21
|
+
<div class="flex-1">
|
22
|
+
<div class="border-b">
|
23
|
+
<div
|
24
|
+
class="container flex-1 items-start md:grid md:grid-cols-[220px_minmax(0,1fr)] md:gap-6 lg:grid-cols-[240px_minmax(0,1fr)] lg:gap-10">
|
25
|
+
<!--prettier-ignore-->
|
26
|
+
<%= render 'layouts/sidebar' %>
|
27
|
+
<main class="relative py-6 lg:gap-10 lg:py-8 xl:grid xl:grid-cols-[1fr_300px]">
|
28
|
+
<div class="mx-auto w-full min-w-0"><%= yield %></div>
|
29
|
+
</main>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</body>
|
35
|
+
</html>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="mb-4 flex items-center space-x-1 text-sm text-muted-foreground">
|
2
|
+
<div class="overflow-hidden text-ellipsis whitespace-nowrap">Docs</div>
|
3
|
+
<svg
|
4
|
+
width="15"
|
5
|
+
height="15"
|
6
|
+
viewBox="0 0 15 15"
|
7
|
+
fill="none"
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
9
|
+
class="h-4 w-4">
|
10
|
+
<path
|
11
|
+
d="M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z"
|
12
|
+
fill="currentColor"
|
13
|
+
fill-rule="evenodd"
|
14
|
+
clip-rule="evenodd"></path>
|
15
|
+
</svg>
|
16
|
+
<div class="font-medium text-foreground">Alert</div>
|
17
|
+
</div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class="space-y-2">
|
2
|
+
<h1 class="scroll-m-20 text-4xl font-bold tracking-tight"><%= title %></h1>
|
3
|
+
<p class="text-lg text-muted-foreground">
|
4
|
+
<span
|
5
|
+
data-br=":r24:"
|
6
|
+
data-brr="1"
|
7
|
+
style="display: inline-block; vertical-align: top; text-decoration: inherit"
|
8
|
+
><%= description %></span
|
9
|
+
>
|
10
|
+
</p>
|
11
|
+
</div>
|
@@ -0,0 +1,80 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
<div class="group relative my-4 flex flex-col space-y-2" data-controller="tabs">
|
4
|
+
<div
|
5
|
+
dir="ltr"
|
6
|
+
data-orientation="horizontal"
|
7
|
+
class="relative mr-auto w-full">
|
8
|
+
<div class="flex items-center justify-between pb-3">
|
9
|
+
<div
|
10
|
+
role="tablist"
|
11
|
+
aria-orientation="horizontal"
|
12
|
+
class="inline-flex h-9 items-center text-muted-foreground w-full justify-start rounded-none border-b bg-transparent p-0"
|
13
|
+
tabindex="0"
|
14
|
+
data-orientation="horizontal"
|
15
|
+
style="outline: none">
|
16
|
+
<button
|
17
|
+
type="button"
|
18
|
+
data-tabs-target="tab"
|
19
|
+
role="tab"
|
20
|
+
aria-selected="true"
|
21
|
+
aria-controls="content-preview"
|
22
|
+
data-state="active"
|
23
|
+
id="trigger-preview"
|
24
|
+
class="inline-flex items-center justify-center whitespace-nowrap py-1 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background relative h-9 rounded-none border-b-2 border-b-transparent bg-transparent px-4 pb-3 pt-2 font-semibold text-muted-foreground shadow-none transition-none data-[state=active]:border-b-primary data-[state=active]:text-foreground data-[state=active]:shadow-none"
|
25
|
+
tabindex="-1"
|
26
|
+
data-orientation="horizontal"
|
27
|
+
data-radix-collection-item="">
|
28
|
+
Preview</button>
|
29
|
+
<button
|
30
|
+
type="button"
|
31
|
+
role="tab"
|
32
|
+
data-tabs-target="tab"
|
33
|
+
aria-selected="false"
|
34
|
+
aria-controls="content-code"
|
35
|
+
data-state="inactive"
|
36
|
+
id="trigger-code"
|
37
|
+
class="inline-flex items-center justify-center whitespace-nowrap py-1 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background relative h-9 rounded-none border-b-2 border-b-transparent bg-transparent px-4 pb-3 pt-2 font-semibold text-muted-foreground shadow-none transition-none data-[state=active]:border-b-primary data-[state=active]:text-foreground data-[state=active]:shadow-none"
|
38
|
+
tabindex="-1"
|
39
|
+
data-orientation="horizontal"
|
40
|
+
data-radix-collection-item="">
|
41
|
+
Code
|
42
|
+
</button>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
<div
|
46
|
+
data-state="active"
|
47
|
+
data-tabs-target="panel"
|
48
|
+
data-orientation="horizontal"
|
49
|
+
role="tabpanel"
|
50
|
+
aria-labelledby="trigger-preview"
|
51
|
+
id="content-preview"
|
52
|
+
tabindex="0"
|
53
|
+
class="mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 relative rounded-md border"
|
54
|
+
style="animation-duration: 0s">
|
55
|
+
<div class="theme-zinc w-full">
|
56
|
+
<div
|
57
|
+
class="preview flex min-h-[350px] w-full justify-center p-10 items-center flex-col gap-y-8">
|
58
|
+
<%= yield(:examples) %>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
<div
|
63
|
+
data-state="inactive"
|
64
|
+
data-tabs-target="panel"
|
65
|
+
data-orientation="horizontal"
|
66
|
+
role="tabpanel"
|
67
|
+
aria-labelledby="trigger-code"
|
68
|
+
id="content-code"
|
69
|
+
tabindex="1"
|
70
|
+
class="hidden mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 relative rounded-md border"
|
71
|
+
style="animation-duration: 0s">
|
72
|
+
<div class="theme-zinc w-full">
|
73
|
+
<div
|
74
|
+
class="code min-h-[350px] w-full overflow-hidden font-mono">
|
75
|
+
<%= yield(:code) %>
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
</div>
|
@@ -0,0 +1,90 @@
|
|
1
|
+
|
2
|
+
<%= stylesheet_link_tag "lambda.light", "data-turbo-track": "reload" %>
|
3
|
+
|
4
|
+
<div class="pb-12 pt-8">
|
5
|
+
<section>
|
6
|
+
<h2
|
7
|
+
class="font-heading mt-12 scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0"
|
8
|
+
id="examples">
|
9
|
+
Examples
|
10
|
+
</h2>
|
11
|
+
<div class="group relative my-4 flex flex-col space-y-2" data-controller="tabs">
|
12
|
+
<div
|
13
|
+
dir="ltr"
|
14
|
+
data-orientation="horizontal"
|
15
|
+
class="relative mr-auto w-full">
|
16
|
+
<div class="flex items-center justify-between pb-3">
|
17
|
+
<div
|
18
|
+
role="tablist"
|
19
|
+
aria-orientation="horizontal"
|
20
|
+
class="inline-flex h-9 items-center text-muted-foreground w-full justify-start rounded-none border-b bg-transparent p-0"
|
21
|
+
tabindex="0"
|
22
|
+
data-orientation="horizontal"
|
23
|
+
style="outline: none">
|
24
|
+
<button
|
25
|
+
type="button"
|
26
|
+
data-tabs-target="tab"
|
27
|
+
role="tab"
|
28
|
+
aria-selected="true"
|
29
|
+
aria-controls="content-preview"
|
30
|
+
data-state="active"
|
31
|
+
id="trigger-preview"
|
32
|
+
class="inline-flex items-center justify-center whitespace-nowrap py-1 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background relative h-9 rounded-none border-b-2 border-b-transparent bg-transparent px-4 pb-3 pt-2 font-semibold text-muted-foreground shadow-none transition-none data-[state=active]:border-b-primary data-[state=active]:text-foreground data-[state=active]:shadow-none"
|
33
|
+
tabindex="-1"
|
34
|
+
data-orientation="horizontal"
|
35
|
+
data-radix-collection-item="">
|
36
|
+
Preview</button>
|
37
|
+
<button
|
38
|
+
type="button"
|
39
|
+
role="tab"
|
40
|
+
data-tabs-target="tab"
|
41
|
+
aria-selected="false"
|
42
|
+
aria-controls="content-code"
|
43
|
+
data-state="inactive"
|
44
|
+
id="trigger-code"
|
45
|
+
class="inline-flex items-center justify-center whitespace-nowrap py-1 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background relative h-9 rounded-none border-b-2 border-b-transparent bg-transparent px-4 pb-3 pt-2 font-semibold text-muted-foreground shadow-none transition-none data-[state=active]:border-b-primary data-[state=active]:text-foreground data-[state=active]:shadow-none"
|
46
|
+
tabindex="-1"
|
47
|
+
data-orientation="horizontal"
|
48
|
+
data-radix-collection-item="">
|
49
|
+
Code
|
50
|
+
</button>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
<div
|
54
|
+
data-state="active"
|
55
|
+
data-tabs-target="panel"
|
56
|
+
data-orientation="horizontal"
|
57
|
+
role="tabpanel"
|
58
|
+
aria-labelledby="trigger-preview"
|
59
|
+
id="content-preview"
|
60
|
+
tabindex="0"
|
61
|
+
class="mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 relative rounded-md border"
|
62
|
+
style="animation-duration: 0s">
|
63
|
+
<div class="theme-zinc w-full">
|
64
|
+
<div
|
65
|
+
class="preview flex min-h-[350px] w-full justify-center p-10 items-center flex-col gap-y-8">
|
66
|
+
<%= yield(:preview) %>
|
67
|
+
</div>
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
<div
|
71
|
+
data-state="inactive"
|
72
|
+
data-tabs-target="panel"
|
73
|
+
data-orientation="horizontal"
|
74
|
+
role="tabpanel"
|
75
|
+
aria-labelledby="trigger-code"
|
76
|
+
id="content-code"
|
77
|
+
tabindex="1"
|
78
|
+
class="hidden mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 relative rounded-md border"
|
79
|
+
style="animation-duration: 0s">
|
80
|
+
<div class="theme-zinc w-full">
|
81
|
+
<div
|
82
|
+
class="code min-h-[350px] w-full overflow-hidden font-mono">
|
83
|
+
<%= yield(:code) %>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
</div>
|
87
|
+
</div>
|
88
|
+
</div>
|
89
|
+
</section>
|
90
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= yield %>
|
@@ -0,0 +1,164 @@
|
|
1
|
+
<header
|
2
|
+
class="supports-backdrop-blur:bg-background/60 sticky top-0 z-40 w-full border-b bg-background/95 backdrop-blur">
|
3
|
+
<div class="container flex h-14 items-center">
|
4
|
+
<div class="mr-4 hidden md:flex">
|
5
|
+
<a
|
6
|
+
class="mr-6 flex items-center space-x-2"
|
7
|
+
href="/">
|
8
|
+
<svg
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
10
|
+
viewBox="0 0 256 256"
|
11
|
+
class="h-6 w-6">
|
12
|
+
<rect
|
13
|
+
width="256"
|
14
|
+
height="256"
|
15
|
+
fill="none"></rect>
|
16
|
+
<line
|
17
|
+
x1="208"
|
18
|
+
y1="128"
|
19
|
+
x2="128"
|
20
|
+
y2="208"
|
21
|
+
fill="none"
|
22
|
+
stroke="currentColor"
|
23
|
+
stroke-linecap="round"
|
24
|
+
stroke-linejoin="round"
|
25
|
+
stroke-width="16"></line>
|
26
|
+
<line
|
27
|
+
x1="192"
|
28
|
+
y1="40"
|
29
|
+
x2="40"
|
30
|
+
y2="192"
|
31
|
+
fill="none"
|
32
|
+
stroke="currentColor"
|
33
|
+
stroke-linecap="round"
|
34
|
+
stroke-linejoin="round"
|
35
|
+
stroke-width="16"></line>
|
36
|
+
</svg>
|
37
|
+
<span class="hidden font-bold sm:inline-block">shadcn/ui on Rails</span>
|
38
|
+
</a>
|
39
|
+
<nav class="flex items-center space-x-6 text-sm font-medium">
|
40
|
+
<a
|
41
|
+
class="transition-colors hover:text-foreground/80 text-foreground/60"
|
42
|
+
href="/docs"
|
43
|
+
>Documentation</a
|
44
|
+
><a
|
45
|
+
class="transition-colors hover:text-foreground/80 text-foreground"
|
46
|
+
href="/docs/components"
|
47
|
+
>Components</a
|
48
|
+
><a
|
49
|
+
class="transition-colors hover:text-foreground/80 text-foreground/60"
|
50
|
+
href="/examples"
|
51
|
+
>Examples</a
|
52
|
+
><a
|
53
|
+
class="hidden text-foreground/60 transition-colors hover:text-foreground/80 lg:block"
|
54
|
+
href="https://github.com/shadcn/ui"
|
55
|
+
>GitHub</a
|
56
|
+
>
|
57
|
+
</nav>
|
58
|
+
</div>
|
59
|
+
<button
|
60
|
+
class="inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground h-9 py-2 mr-2 px-0 text-base hover:bg-transparent focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 md:hidden"
|
61
|
+
type="button"
|
62
|
+
aria-haspopup="dialog"
|
63
|
+
aria-expanded="false"
|
64
|
+
aria-controls="radix-:R15hja:"
|
65
|
+
data-state="closed">
|
66
|
+
<svg
|
67
|
+
width="15"
|
68
|
+
height="15"
|
69
|
+
viewBox="0 0 15 15"
|
70
|
+
fill="none"
|
71
|
+
xmlns="http://www.w3.org/2000/svg"
|
72
|
+
class="h-5 w-5">
|
73
|
+
<path
|
74
|
+
d="M8 2H13.5C13.7761 2 14 2.22386 14 2.5V12.5C14 12.7761 13.7761 13 13.5 13H8V2ZM7 2H1.5C1.22386 2 1 2.22386 1 2.5V12.5C1 12.7761 1.22386 13 1.5 13H7V2ZM0 2.5C0 1.67157 0.671573 1 1.5 1H13.5C14.3284 1 15 1.67157 15 2.5V12.5C15 13.3284 14.3284 14 13.5 14H1.5C0.671573 14 0 13.3284 0 12.5V2.5Z"
|
75
|
+
fill="currentColor"
|
76
|
+
fill-rule="evenodd"
|
77
|
+
clip-rule="evenodd"></path>
|
78
|
+
</svg>
|
79
|
+
<span class="sr-only">Toggle Menu</span>
|
80
|
+
</button>
|
81
|
+
<div class="flex flex-1 items-center justify-between space-x-2 md:justify-end">
|
82
|
+
<div class="w-full flex-1 md:w-auto md:flex-none">
|
83
|
+
<button
|
84
|
+
class="inline-flex items-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2 relative w-full justify-start text-sm text-muted-foreground sm:pr-12 md:w-40 lg:w-64">
|
85
|
+
<span class="hidden lg:inline-flex">Search documentation...</span
|
86
|
+
><span class="inline-flex lg:hidden">Search...</span
|
87
|
+
><kbd
|
88
|
+
class="pointer-events-none absolute right-1.5 top-1.5 hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 sm:flex"
|
89
|
+
><span class="text-xs">⌘</span>K</kbd
|
90
|
+
>
|
91
|
+
</button>
|
92
|
+
</div>
|
93
|
+
<nav class="flex items-center">
|
94
|
+
<a
|
95
|
+
target="_blank"
|
96
|
+
rel="noreferrer"
|
97
|
+
href="https://github.com/shadcn/ui"
|
98
|
+
><div
|
99
|
+
class="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-9 py-2 w-9 px-0">
|
100
|
+
<svg
|
101
|
+
viewBox="0 0 438.549 438.549"
|
102
|
+
class="h-4 w-4">
|
103
|
+
<path
|
104
|
+
fill="currentColor"
|
105
|
+
d="M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z"></path>
|
106
|
+
</svg>
|
107
|
+
<span class="sr-only">GitHub</span>
|
108
|
+
</div>
|
109
|
+
</a>
|
110
|
+
<a
|
111
|
+
target="_blank"
|
112
|
+
rel="noreferrer"
|
113
|
+
href="https://twitter.com/shadcn"
|
114
|
+
><div
|
115
|
+
class="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-9 py-2 w-9 px-0">
|
116
|
+
<svg
|
117
|
+
xmlns="http://www.w3.org/2000/svg"
|
118
|
+
viewBox="0 0 24 24"
|
119
|
+
class="h-4 w-4 fill-current">
|
120
|
+
<path
|
121
|
+
d="M21.543 7.104c.015.211.015.423.015.636 0 6.507-4.954 14.01-14.01 14.01v-.003A13.94 13.94 0 0 1 0 19.539a9.88 9.88 0 0 0 7.287-2.041 4.93 4.93 0 0 1-4.6-3.42 4.916 4.916 0 0 0 2.223-.084A4.926 4.926 0 0 1 .96 9.167v-.062a4.887 4.887 0 0 0 2.235.616A4.928 4.928 0 0 1 1.67 3.148a13.98 13.98 0 0 0 10.15 5.144 4.929 4.929 0 0 1 8.39-4.49 9.868 9.868 0 0 0 3.128-1.196 4.941 4.941 0 0 1-2.165 2.724A9.828 9.828 0 0 0 24 4.555a10.019 10.019 0 0 1-2.457 2.549z"></path>
|
122
|
+
</svg>
|
123
|
+
<span class="sr-only">Twitter</span>
|
124
|
+
</div>
|
125
|
+
</a>
|
126
|
+
<button
|
127
|
+
class="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-9 py-2 w-9 px-0"
|
128
|
+
type="button"
|
129
|
+
id="radix-:Rtlhja:"
|
130
|
+
aria-haspopup="menu"
|
131
|
+
aria-expanded="false"
|
132
|
+
data-state="closed">
|
133
|
+
<svg
|
134
|
+
width="15"
|
135
|
+
height="15"
|
136
|
+
viewBox="0 0 15 15"
|
137
|
+
fill="none"
|
138
|
+
xmlns="http://www.w3.org/2000/svg"
|
139
|
+
class="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0">
|
140
|
+
<path
|
141
|
+
d="M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z"
|
142
|
+
fill="currentColor"
|
143
|
+
fill-rule="evenodd"
|
144
|
+
clip-rule="evenodd"></path>
|
145
|
+
</svg>
|
146
|
+
<svg
|
147
|
+
width="15"
|
148
|
+
height="15"
|
149
|
+
viewBox="0 0 15 15"
|
150
|
+
fill="none"
|
151
|
+
xmlns="http://www.w3.org/2000/svg"
|
152
|
+
class="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100">
|
153
|
+
<path
|
154
|
+
d="M2.89998 0.499976C2.89998 0.279062 2.72089 0.0999756 2.49998 0.0999756C2.27906 0.0999756 2.09998 0.279062 2.09998 0.499976V1.09998H1.49998C1.27906 1.09998 1.09998 1.27906 1.09998 1.49998C1.09998 1.72089 1.27906 1.89998 1.49998 1.89998H2.09998V2.49998C2.09998 2.72089 2.27906 2.89998 2.49998 2.89998C2.72089 2.89998 2.89998 2.72089 2.89998 2.49998V1.89998H3.49998C3.72089 1.89998 3.89998 1.72089 3.89998 1.49998C3.89998 1.27906 3.72089 1.09998 3.49998 1.09998H2.89998V0.499976ZM5.89998 3.49998C5.89998 3.27906 5.72089 3.09998 5.49998 3.09998C5.27906 3.09998 5.09998 3.27906 5.09998 3.49998V4.09998H4.49998C4.27906 4.09998 4.09998 4.27906 4.09998 4.49998C4.09998 4.72089 4.27906 4.89998 4.49998 4.89998H5.09998V5.49998C5.09998 5.72089 5.27906 5.89998 5.49998 5.89998C5.72089 5.89998 5.89998 5.72089 5.89998 5.49998V4.89998H6.49998C6.72089 4.89998 6.89998 4.72089 6.89998 4.49998C6.89998 4.27906 6.72089 4.09998 6.49998 4.09998H5.89998V3.49998ZM1.89998 6.49998C1.89998 6.27906 1.72089 6.09998 1.49998 6.09998C1.27906 6.09998 1.09998 6.27906 1.09998 6.49998V7.09998H0.499976C0.279062 7.09998 0.0999756 7.27906 0.0999756 7.49998C0.0999756 7.72089 0.279062 7.89998 0.499976 7.89998H1.09998V8.49998C1.09998 8.72089 1.27906 8.89997 1.49998 8.89997C1.72089 8.89997 1.89998 8.72089 1.89998 8.49998V7.89998H2.49998C2.72089 7.89998 2.89998 7.72089 2.89998 7.49998C2.89998 7.27906 2.72089 7.09998 2.49998 7.09998H1.89998V6.49998ZM8.54406 0.98184L8.24618 0.941586C8.03275 0.917676 7.90692 1.1655 8.02936 1.34194C8.17013 1.54479 8.29981 1.75592 8.41754 1.97445C8.91878 2.90485 9.20322 3.96932 9.20322 5.10022C9.20322 8.37201 6.82247 11.0878 3.69887 11.6097C3.45736 11.65 3.20988 11.6772 2.96008 11.6906C2.74563 11.702 2.62729 11.9535 2.77721 12.1072C2.84551 12.1773 2.91535 12.2458 2.98667 12.3128L3.05883 12.3795L3.31883 12.6045L3.50684 12.7532L3.62796 12.8433L3.81491 12.9742L3.99079 13.089C4.11175 13.1651 4.23536 13.2375 4.36157 13.3059L4.62496 13.4412L4.88553 13.5607L5.18837 13.6828L5.43169 13.7686C5.56564 13.8128 5.70149 13.8529 5.83857 13.8885C5.94262 13.9155 6.04767 13.9401 6.15405 13.9622C6.27993 13.9883 6.40713 14.0109 6.53544 14.0298L6.85241 14.0685L7.11934 14.0892C7.24637 14.0965 7.37436 14.1002 7.50322 14.1002C11.1483 14.1002 14.1032 11.1453 14.1032 7.50023C14.1032 7.25044 14.0893 7.00389 14.0623 6.76131L14.0255 6.48407C13.991 6.26083 13.9453 6.04129 13.8891 5.82642C13.8213 5.56709 13.7382 5.31398 13.6409 5.06881L13.5279 4.80132L13.4507 4.63542L13.3766 4.48666C13.2178 4.17773 13.0353 3.88295 12.8312 3.60423L12.6782 3.40352L12.4793 3.16432L12.3157 2.98361L12.1961 2.85951L12.0355 2.70246L11.8134 2.50184L11.4925 2.24191L11.2483 2.06498L10.9562 1.87446L10.6346 1.68894L10.3073 1.52378L10.1938 1.47176L9.95488 1.3706L9.67791 1.2669L9.42566 1.1846L9.10075 1.09489L8.83599 1.03486L8.54406 0.98184ZM10.4032 5.30023C10.4032 4.27588 10.2002 3.29829 9.83244 2.40604C11.7623 3.28995 13.1032 5.23862 13.1032 7.50023C13.1032 10.593 10.596 13.1002 7.50322 13.1002C6.63646 13.1002 5.81597 12.9036 5.08355 12.5522C6.5419 12.0941 7.81081 11.2082 8.74322 10.0416C8.87963 10.2284 9.10028 10.3497 9.34928 10.3497C9.76349 10.3497 10.0993 10.0139 10.0993 9.59971C10.0993 9.24256 9.84965 8.94373 9.51535 8.86816C9.57741 8.75165 9.63653 8.63334 9.6926 8.51332C9.88358 8.63163 10.1088 8.69993 10.35 8.69993C11.0403 8.69993 11.6 8.14028 11.6 7.44993C11.6 6.75976 11.0406 6.20024 10.3505 6.19993C10.3853 5.90487 10.4032 5.60464 10.4032 5.30023Z"
|
155
|
+
fill="currentColor"
|
156
|
+
fill-rule="evenodd"
|
157
|
+
clip-rule="evenodd"></path>
|
158
|
+
</svg>
|
159
|
+
<span class="sr-only">Toggle theme</span>
|
160
|
+
</button>
|
161
|
+
</nav>
|
162
|
+
</div>
|
163
|
+
</div>
|
164
|
+
</header>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require_relative "boot"
|
2
|
+
|
3
|
+
require "rails"
|
4
|
+
# Pick the frameworks you want:
|
5
|
+
require "active_model/railtie"
|
6
|
+
require "active_job/railtie"
|
7
|
+
require "active_record/railtie"
|
8
|
+
require "active_storage/engine"
|
9
|
+
require "action_controller/railtie"
|
10
|
+
require "action_mailer/railtie"
|
11
|
+
require "action_mailbox/engine"
|
12
|
+
require "action_text/engine"
|
13
|
+
require "action_view/railtie"
|
14
|
+
require "action_cable/engine"
|
15
|
+
# require "rails/test_unit/railtie"
|
16
|
+
|
17
|
+
# Require the gems listed in Gemfile, including any gems
|
18
|
+
# you've limited to :test, :development, or :production.
|
19
|
+
Bundler.require(*Rails.groups)
|
20
|
+
|
21
|
+
module ShadcnRails
|
22
|
+
class Application < Rails::Application
|
23
|
+
# Initialize configuration defaults for originally generated Rails version.
|
24
|
+
config.load_defaults 7.0
|
25
|
+
|
26
|
+
# Configuration for the application, engines, and railties goes here.
|
27
|
+
#
|
28
|
+
# These settings can be overridden in specific environments using the files
|
29
|
+
# in config/environments, which are processed later.
|
30
|
+
#
|
31
|
+
# config.time_zone = "Central Time (US & Canada)"
|
32
|
+
# config.eager_load_paths << Rails.root.join("extras")
|
33
|
+
|
34
|
+
# Don't generate system test files.
|
35
|
+
config.generators.system_tests = nil
|
36
|
+
end
|
37
|
+
end
|
data/config/boot.rb
ADDED
data/config/cable.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
BsVjYHKGdjdGxAYw+a5vYXdla/aivdh/9DktuEnJmCgyaULJpH0YqU/T+p078Gyxy7Pq6olkGj86S0WUUC4WVV8vWkH8B6ayONGyxxw71H/lFA0MGyxlWrVAAiJSQiG+2TlVGWH6KyEIYlpiXm/rQ4minYA4pYcLnI13/tGA2GHqtEMmVtaGmir3gzm0MgtlrqwfGYwV+i+Fp079Ci6GJODPJ9L9TkCkeFAaaJHr06HIkuJo0e/tB0Wsv5bYeYXRAp4gxbOnAgigWlBdblbmjSL5BQuhUV623r87A4HCQCuUayWEcWLePk0FMyAql6OlLbd0bWX835JeT1nJ2sukwPVsduGVfTMlvAyMg9j/zz8sKAdW63nR3RpPKw3YvKLt4mBe+Bs//u8e+ApNnxrQ/ro/pu3/Be5aYvtw--G4FDerS9avMFHcsB--9jJ0fjil7Q3SYWoF6dC9rw==
|
data/config/database.yml
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite. Versions 3.8.0 and up are supported.
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem "sqlite3"
|
6
|
+
#
|
7
|
+
default: &default
|
8
|
+
adapter: sqlite3
|
9
|
+
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
development:
|
13
|
+
<<: *default
|
14
|
+
database: db/development.sqlite3
|
15
|
+
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
17
|
+
# re-generated from your development database when you run "rake".
|
18
|
+
# Do not set this db to the same as development or production.
|
19
|
+
test:
|
20
|
+
<<: *default
|
21
|
+
database: db/test.sqlite3
|
22
|
+
|
23
|
+
production:
|
24
|
+
<<: *default
|
25
|
+
database: db/production.sqlite3
|
@@ -0,0 +1,70 @@
|
|
1
|
+
require "active_support/core_ext/integer/time"
|
2
|
+
|
3
|
+
Rails.application.configure do
|
4
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
5
|
+
|
6
|
+
# In the development environment your application's code is reloaded any time
|
7
|
+
# it changes. This slows down response time but is perfect for development
|
8
|
+
# since you don't have to restart the web server when you make code changes.
|
9
|
+
config.cache_classes = false
|
10
|
+
|
11
|
+
# Do not eager load code on boot.
|
12
|
+
config.eager_load = false
|
13
|
+
|
14
|
+
# Show full error reports.
|
15
|
+
config.consider_all_requests_local = true
|
16
|
+
|
17
|
+
# Enable server timing
|
18
|
+
config.server_timing = true
|
19
|
+
|
20
|
+
# Enable/disable caching. By default caching is disabled.
|
21
|
+
# Run rails dev:cache to toggle caching.
|
22
|
+
if Rails.root.join("tmp/caching-dev.txt").exist?
|
23
|
+
config.action_controller.perform_caching = true
|
24
|
+
config.action_controller.enable_fragment_cache_logging = true
|
25
|
+
|
26
|
+
config.cache_store = :memory_store
|
27
|
+
config.public_file_server.headers = {
|
28
|
+
"Cache-Control" => "public, max-age=#{2.days.to_i}"
|
29
|
+
}
|
30
|
+
else
|
31
|
+
config.action_controller.perform_caching = false
|
32
|
+
|
33
|
+
config.cache_store = :null_store
|
34
|
+
end
|
35
|
+
|
36
|
+
# Store uploaded files on the local file system (see config/storage.yml for options).
|
37
|
+
config.active_storage.service = :local
|
38
|
+
|
39
|
+
# Don't care if the mailer can't send.
|
40
|
+
config.action_mailer.raise_delivery_errors = false
|
41
|
+
|
42
|
+
config.action_mailer.perform_caching = false
|
43
|
+
|
44
|
+
# Print deprecation notices to the Rails logger.
|
45
|
+
config.active_support.deprecation = :log
|
46
|
+
|
47
|
+
# Raise exceptions for disallowed deprecations.
|
48
|
+
config.active_support.disallowed_deprecation = :raise
|
49
|
+
|
50
|
+
# Tell Active Support which deprecation messages to disallow.
|
51
|
+
config.active_support.disallowed_deprecation_warnings = []
|
52
|
+
|
53
|
+
# Raise an error on page load if there are pending migrations.
|
54
|
+
config.active_record.migration_error = :page_load
|
55
|
+
|
56
|
+
# Highlight code that triggered database queries in logs.
|
57
|
+
config.active_record.verbose_query_logs = true
|
58
|
+
|
59
|
+
# Suppress logger output for asset requests.
|
60
|
+
config.assets.quiet = true
|
61
|
+
|
62
|
+
# Raises error for missing translations.
|
63
|
+
# config.i18n.raise_on_missing_translations = true
|
64
|
+
|
65
|
+
# Annotate rendered view with file names.
|
66
|
+
# config.action_view.annotate_rendered_view_with_filenames = true
|
67
|
+
|
68
|
+
# Uncomment if you wish to allow Action Cable access from any origin.
|
69
|
+
# config.action_cable.disable_request_forgery_protection = true
|
70
|
+
end
|