tybo 0.0.5 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -1
- data/app/components/cover_component.html.erb +3 -0
- data/app/components/cover_component.rb +5 -0
- data/app/components/forms/delete_button_component.html.erb +1 -1
- data/app/components/forms/submit_button_component.html.erb +1 -1
- data/app/components/index_header_add_component.html.erb +1 -1
- data/app/components/sidebar_component.html.erb +2 -2
- data/app/views/devise/login/home.html.erb +14 -16
- data/app/views/devise/passwords/edit.html.erb +3 -5
- data/app/views/devise/passwords/new.html.erb +3 -5
- data/app/views/devise/sessions/new.html.erb +6 -8
- data/app/views/devise/shared/_devise_errors.html.erb +1 -1
- data/app/views/login/home.html.erb +2 -2
- data/app/views/shared/_pagination.html.erb +4 -4
- data/lib/generators/bo/templates/_search_bar.html.erb +8 -8
- data/lib/generators/bo/templates/_table.html.erb +3 -3
- data/lib/generators/bo_namespace/templates/seeds.rb +1 -1
- data/lib/generators/tybo_install/templates/application.tailwind.css +16 -16
- data/lib/generators/tybo_install/templates/simple_form_tailwind.rb +3 -3
- data/lib/generators/tybo_install/templates/tailwind.config.js +11 -10
- data/lib/generators/tybo_install/templates/tybo_config.rb +6 -0
- data/lib/generators/tybo_install/{tybo_install_generator.rb → tybo_config.rb} +1 -0
- data/lib/tybo/configuration.rb +5 -0
- data/lib/tybo/version.rb +1 -1
- data/lib/tybo.rb +10 -1
- metadata +11 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9adcf1453a167d928120910dee95eb19b31e018593b09cff193c5fea7f1148e1
|
4
|
+
data.tar.gz: 45d9027230f376f2634e42b0c9584d0e772792f36444f30b9d594200d8cbd6b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1fd62b3a41a0638c9da59f555198aac3d0349031095210167ecd4267255b999ad0715b57c821e96e0e7b943e85af6071dd8862c01fec8129c9a8c84cc4bd20a
|
7
|
+
data.tar.gz: 9be1f03398c851dcf2c31b29e0ddebaa4d26911118c61b5d4cf214ac413cc3b7276d82332b26a5b60778ac3120e405733879934fae05844f7b571a13f71e88e7
|
data/README.md
CHANGED
@@ -1,23 +1,52 @@
|
|
1
1
|
# Tybo
|
2
|
+
|
2
3
|
A custom admin engine for Ruby on Rails
|
3
4
|
|
5
|
+
|
6
|
+
|
4
7
|
## Installation
|
8
|
+
|
5
9
|
Add this line to your application's Gemfile:
|
6
10
|
|
11
|
+
|
12
|
+
|
7
13
|
```ruby
|
8
|
-
|
14
|
+
|
15
|
+
gem 'tybo'
|
16
|
+
|
9
17
|
```
|
10
18
|
|
19
|
+
|
20
|
+
|
11
21
|
And
|
22
|
+
|
12
23
|
```bash
|
24
|
+
|
13
25
|
$ bundle install
|
26
|
+
|
14
27
|
```
|
28
|
+
|
15
29
|
Then execute the generator
|
30
|
+
|
16
31
|
```bash
|
32
|
+
|
17
33
|
$ bundle exec rails g tybo_install
|
34
|
+
|
18
35
|
```
|
36
|
+
|
37
|
+
## Customize
|
38
|
+
|
39
|
+
**Update images**: change `logo_url` and `cover_url` in `config/initializer/tybo.rb`
|
40
|
+
|
41
|
+
**Customize colors**: Change the `tybo` colors class in `tailwind.config.js`,
|
42
|
+
you can use https://uicolors.app/create to generate complete palette
|
43
|
+
|
19
44
|
## Contributing
|
45
|
+
|
20
46
|
Contribution directions go here.
|
21
47
|
|
48
|
+
|
49
|
+
|
22
50
|
## License
|
51
|
+
|
23
52
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<button type="button" class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-red-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-
|
1
|
+
<button type="button" class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-red-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-tybo-500" type="delete">
|
2
2
|
<%= link_to "Supprimer", @path, data: { "turbo-method": :delete, turbo_confirm: 'Êtes vous sûr ?' } %>
|
3
3
|
</button>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="pt-5">
|
2
2
|
<div class="flex justify-end">
|
3
|
-
<button type="submit" class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-
|
3
|
+
<button type="submit" class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-tybo-600 hover:bg-tybo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-tybo-500">
|
4
4
|
Sauvegarder
|
5
5
|
</button>
|
6
6
|
</div>
|
@@ -1,3 +1,3 @@
|
|
1
1
|
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
2
|
-
<%= link_to '+', @path, class: "inline-flex items-center justify-center rounded-md border border-transparent bg-
|
2
|
+
<%= link_to '+', @path, class: "inline-flex items-center justify-center rounded-md border border-transparent bg-tybo px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-tybo-700 focus:outline-none focus:ring-2 focus:ring-tybo-500 focus:ring-offset-2 sm:w-auto" %>
|
3
3
|
</div>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<div class=" md:flex md:w-64 md:flex-col md:fixed md:inset-y-0">
|
2
|
-
<div class="flex-1 flex flex-col min-h-0 bg-
|
2
|
+
<div class="flex-1 flex flex-col min-h-0 bg-tybo">
|
3
3
|
<div class="flex-1 flex flex-col pt-5 pb-4 overflow-y-auto">
|
4
4
|
<div class="flex items-center flex-shrink-0 px-4">
|
5
|
-
<%= image_tag(
|
5
|
+
<%= image_tag(Tybo.configuration.logo_url, alt: "logo", class: 'mx-auto h-15 w-auto') %>
|
6
6
|
</div>
|
7
7
|
|
8
8
|
<nav class="mt-5 flex-1 px-2 space-y-1" aria-label="Sidebar">
|
@@ -1,20 +1,18 @@
|
|
1
1
|
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
</div>
|
3
|
+
<div class="flex flex-1 flex-col justify-center py-12 px-4 sm:px-6 lg:flex-none lg:px-20 xl:px-24">
|
4
|
+
<div class="mx-auto w-full max-w-sm lg:w-96">
|
5
|
+
<div>
|
6
|
+
<%= image_tag Tybo.configuration.logo_url, class: 'h-12 w-auto'%>
|
7
|
+
<h2 class="mt-6 text-3xl font-bold tracking-tight text-gray-900">Sign in to your account</h2>
|
8
|
+
</div>
|
9
|
+
<div class="mt-4">
|
10
|
+
<% @resources.each do |resource| %>
|
11
|
+
<a href="<%=send("new_#{resource.to_s}_session_path")%>" class="mt-2 flex w-full justify-center rounded-md border border-transparent bg-tybo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-tybo-700 focus:outline-none focus:ring-2 focus:ring-tybo-500 focus:ring-offset-2">
|
12
|
+
Sign in as <%= I18n.t("bo.#{resource.to_s}.one")%>
|
13
|
+
</a>
|
14
|
+
<% end %>
|
16
15
|
</div>
|
17
16
|
</div>
|
18
|
-
|
19
|
-
|
20
|
-
</div>
|
17
|
+
</div>
|
18
|
+
<%= render(CoverComponent.new) %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<%= render 'devise/shared/devise_errors' %>
|
4
4
|
<div class="mx-auto w-full max-w-sm lg:w-96">
|
5
5
|
<div>
|
6
|
-
|
6
|
+
<%= image_tag Tybo.configuration.logo_url, class: 'h-12 w-auto'%>
|
7
7
|
<h2 class="mt-6 text-3xl font-bold tracking-tight text-gray-900">Créer un nouveau mot de passe</h2>
|
8
8
|
</div>
|
9
9
|
|
@@ -23,14 +23,12 @@
|
|
23
23
|
class: 'block text-sm font-medium text-gray-700' %>
|
24
24
|
</div>
|
25
25
|
<div class="mt-5">
|
26
|
-
<%= f.button :submit, "Sauvegarder", class: "flex w-full justify-center rounded-md border border-transparent bg-
|
26
|
+
<%= f.button :submit, "Sauvegarder", class: "flex w-full justify-center rounded-md border border-transparent bg-tybo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-tybo-700 focus:outline-none focus:ring-2 focus:ring-tybo-500 focus:ring-offset-2" %>
|
27
27
|
</div>
|
28
28
|
<% end %>
|
29
29
|
</div>
|
30
30
|
</div>
|
31
31
|
</div>
|
32
32
|
</div>
|
33
|
-
|
34
|
-
<img class="absolute inset-0 h-full w-full object-cover" src="https://tymate.com/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F33962%2F1667561118-natif-dribbble-2.png%3Fw%3D1600&w=1920&q=75" alt="">
|
35
|
-
</div>
|
33
|
+
<%= render(CoverComponent.new) %>
|
36
34
|
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<%= render 'devise/shared/devise_errors' %>
|
4
4
|
<div class="mx-auto w-full max-w-sm lg:w-96">
|
5
5
|
<div>
|
6
|
-
|
6
|
+
<%= image_tag Tybo.configuration.logo_url, class: 'h-12 w-auto'%>
|
7
7
|
<h2 class="mt-6 text-3xl font-bold tracking-tight text-gray-900">Forgot your password?</h2>
|
8
8
|
</div>
|
9
9
|
|
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
</div>
|
22
22
|
<div class="mt-5">
|
23
|
-
<%= f.button :submit, "Send me reset password instructions", class: "flex w-full justify-center rounded-md border border-transparent bg-
|
23
|
+
<%= f.button :submit, "Send me reset password instructions", class: "flex w-full justify-center rounded-md border border-transparent bg-tybo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-tybo-700 focus:outline-none focus:ring-2 focus:ring-tybo-500 focus:ring-offset-2" %>
|
24
24
|
</div>
|
25
25
|
<% end %>
|
26
26
|
</div>
|
@@ -28,7 +28,5 @@
|
|
28
28
|
<%= render "devise/shared/links" %>
|
29
29
|
</div>
|
30
30
|
</div>
|
31
|
-
|
32
|
-
<img class="absolute inset-0 h-full w-full object-cover" src="https://tymate.com/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F33962%2F1667561118-natif-dribbble-2.png%3Fw%3D1600&w=1920&q=75" alt="">
|
33
|
-
</div>
|
31
|
+
<%= render(CoverComponent.new) %>
|
34
32
|
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div class="mx-auto w-full max-w-sm lg:w-96">
|
4
4
|
<%= render 'devise/shared/devise_errors' %>
|
5
5
|
<div>
|
6
|
-
|
6
|
+
<%= image_tag Tybo.configuration.logo_url, class: 'h-12 w-auto'%>
|
7
7
|
<h2 class="mt-6 text-3xl font-bold tracking-tight text-gray-900">Sign in to your account</h2>
|
8
8
|
</div>
|
9
9
|
<div class="mt-8">
|
@@ -21,30 +21,28 @@
|
|
21
21
|
<%= f.input :password,
|
22
22
|
required: false,
|
23
23
|
input_html: { autocomplete: "current-password" },
|
24
|
-
class: 'block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 placeholder-gray-400 shadow-sm focus:border-
|
24
|
+
class: 'block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 placeholder-gray-400 shadow-sm focus:border-tybo-500 focus:outline-none focus:ring-tybo-500 sm:text-sm' %>
|
25
25
|
</div>
|
26
26
|
</div>
|
27
27
|
|
28
28
|
<div class="flex items-center justify-between">
|
29
29
|
<div class="flex items-center">
|
30
|
-
<input id="remember_me" name="remember_me" type="checkbox" class="h-4 w-4 rounded border-gray-300 text-
|
30
|
+
<input id="remember_me" name="remember_me" type="checkbox" class="h-4 w-4 rounded border-gray-300 text-tybo-600 focus:ring-tybo-500">
|
31
31
|
<label for="remember_me" class="ml-2 block text-sm text-gray-900">Remember me</label>
|
32
32
|
</div>
|
33
33
|
|
34
34
|
<div class="text-sm">
|
35
|
-
<a href="<%= new_password_path(Administrator)%>" class="font-medium text-
|
35
|
+
<a href="<%= new_password_path(Administrator)%>" class="font-medium text-tybo-600 hover:text-tybo-500">Forgot your password?</a>
|
36
36
|
</div>
|
37
37
|
</div>
|
38
38
|
|
39
39
|
<div class="mt-5">
|
40
|
-
<%= f.button :submit, "Sign in", class: "flex w-full justify-center rounded-md border border-transparent bg-
|
40
|
+
<%= f.button :submit, "Sign in", class: "flex w-full justify-center rounded-md border border-transparent bg-tybo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-tybo-700 focus:outline-none focus:ring-2 focus:ring-tybo-500 focus:ring-offset-2" %>
|
41
41
|
</div>
|
42
42
|
<% end %>
|
43
43
|
</div>
|
44
44
|
</div>
|
45
45
|
</div>
|
46
46
|
</div>
|
47
|
-
|
48
|
-
<img class="absolute inset-0 h-full w-full object-cover" src="https://tymate.com/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F33962%2F1667561118-natif-dribbble-2.png%3Fw%3D1600&w=1920&q=75" alt="">
|
49
|
-
</div>
|
47
|
+
<%= render(CoverComponent.new) %>
|
50
48
|
</div>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
</svg>
|
9
9
|
</div>
|
10
10
|
<div class="ml-3">
|
11
|
-
<p class="text-sm font-medium text-
|
11
|
+
<p class="text-sm font-medium text-tybo-800"><%= notice %></p>
|
12
12
|
<p class="text-sm font-medium text-red-800"><%= alert %></p>
|
13
13
|
</div>
|
14
14
|
<div class="ml-auto pl-3">
|
@@ -2,12 +2,12 @@
|
|
2
2
|
<div class="flex flex-1 flex-col justify-center py-12 px-4 sm:px-6 lg:flex-none lg:px-20 xl:px-24">
|
3
3
|
<div class="mx-auto w-full max-w-sm lg:w-96">
|
4
4
|
<div>
|
5
|
-
|
5
|
+
<%= image_tag Tybo.configuration.logo_url, class: 'h-12 w-auto' %>
|
6
6
|
<h2 class="mt-6 text-3xl font-bold tracking-tight text-gray-900">Sign in to your account</h2>
|
7
7
|
</div>
|
8
8
|
<div class="mt-4">
|
9
9
|
<% @resources.each do |resource| %>
|
10
|
-
<a href="<%=send("new_#{resource.to_s}_session_path")%>" class="mt-2 flex w-full justify-center rounded-md border border-transparent bg-
|
10
|
+
<a href="<%=send("new_#{resource.to_s}_session_path")%>" class="mt-2 flex w-full justify-center rounded-md border border-transparent bg-tybo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-tybo-700 focus:outline-none focus:ring-2 focus:ring-tybo-500 focus:ring-offset-2">
|
11
11
|
Sign in as <%= I18n.t("bo.#{resource.to_s}.one")%>
|
12
12
|
</a>
|
13
13
|
<% end %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
<% if pagy.prev -%>
|
5
5
|
<div class="min-w-0 flex-1">
|
6
|
-
<%== link.call(pagy.prev, pagy_t('pagy.nav.prev'), 'aria-label="previous" class="inline-flex h-10 items-center rounded-md border border-gray-300 bg-white px-4 hover:bg-gray-100 focus:border-
|
6
|
+
<%== link.call(pagy.prev, pagy_t('pagy.nav.prev'), 'aria-label="previous" class="inline-flex h-10 items-center rounded-md border border-gray-300 bg-white px-4 hover:bg-gray-100 focus:border-tybo-600 focus:outline-none focus:ring-2 focus:ring-tybo-600 focus:ring-opacity-25 focus:ring-offset-1 focus:ring-offset-tybo-600""') %>
|
7
7
|
</div>
|
8
8
|
<% else -%>
|
9
9
|
<div class="min-w-0 flex-1">
|
@@ -13,9 +13,9 @@
|
|
13
13
|
<% if pagy.next -%>
|
14
14
|
<% pagy.series.each do |item| # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36] -%>
|
15
15
|
<% if item.is_a?(Integer) -%>
|
16
|
-
<%== link.call(item, item, 'class="inline-flex h-10 items-center rounded-md border border-gray-300 bg-white px-4 hover:bg-gray-100 focus:border-
|
16
|
+
<%== link.call(item, item, 'class="inline-flex h-10 items-center rounded-md border border-gray-300 bg-white px-4 hover:bg-gray-100 focus:border-tybo-600 focus:outline-none focus:ring-2 focus:ring-tybo-600 focus:ring-opacity-25 focus:ring-offset-1 focus:ring-offset-tybo-600"') %>
|
17
17
|
<% elsif item.is_a?(String) -%>
|
18
|
-
<%== link.call(item, item, 'class="toto inline-flex h-10 items-center rounded-md border border-
|
18
|
+
<%== link.call(item, item, 'class="toto inline-flex h-10 items-center rounded-md border border-tybo-600 bg-white px-4 ring-1 ring-tybo-600 hover:bg-gray-100 focus:border-tybo-600 focus:outline-none focus:ring-2 focus:ring-tybo-600 focus:ring-opacity-25 focus:ring-offset-1 focus:ring-offset-tybo-600"') %>
|
19
19
|
<% elsif item == :gap -%>
|
20
20
|
<span class="inline-flex h-10 items-center px-1.5 text-gray-500">
|
21
21
|
<%== pagy_t('pagy.nav.gap') %>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
<% if pagy.next -%>
|
28
28
|
<div class="flex min-w-0 flex-1 justify-end">
|
29
|
-
<%== link.call(pagy.next, pagy_t('pagy.nav.next'), 'aria-label="next" class="inline-flex h-10 items-center rounded-md border border-gray-300 bg-white px-4 hover:bg-gray-100 focus:border-
|
29
|
+
<%== link.call(pagy.next, pagy_t('pagy.nav.next'), 'aria-label="next" class="inline-flex h-10 items-center rounded-md border border-gray-300 bg-white px-4 hover:bg-gray-100 focus:border-tybo-600 focus:outline-none focus:ring-2 focus:ring-tybo-600 focus:ring-opacity-25 focus:ring-offset-1 focus:ring-offset-tybo-600"') %>
|
30
30
|
</div>
|
31
31
|
<% else -%>
|
32
32
|
<div class="flex min-w-0 flex-1 justify-end">
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<%%= I18n.t('bo.<%= class_name.underscore %>.attributes.<%= col.name %>') %>
|
20
20
|
</label>
|
21
21
|
<div class="mt-1 sm:col-span-2 sm:mt-0">
|
22
|
-
<%%= f.text_field :<%= col.name %>_cont, placeholder: I18n.t('bo.<%= class_name.underscore %>.attributes.<%= col.name %>'), data: { action: "input->search-form#search" }, class: "block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-
|
22
|
+
<%%= f.text_field :<%= col.name %>_cont, placeholder: I18n.t('bo.<%= class_name.underscore %>.attributes.<%= col.name %>'), data: { action: "input->search-form#search" }, class: "block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-tybo-500 focus:ring-tybo-500 sm:max-w-xs sm:text-sm" %>
|
23
23
|
</div>
|
24
24
|
</div>
|
25
25
|
<%- elsif col.type ==:integer -%>
|
@@ -28,7 +28,7 @@
|
|
28
28
|
<%%= I18n.t('bo.<%= class_name.underscore %>.attributes.<%= col.name %>') %>
|
29
29
|
</label>
|
30
30
|
<div class="mt-1 sm:col-span-2 sm:mt-0">
|
31
|
-
<%%= f.number_field :<%= col.name %>_eq, placeholder: I18n.t('bo.<%= class_name.underscore %>.attributes.<%= col.name %>'), data: { action: "input->search-form#search" }, class: "block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-
|
31
|
+
<%%= f.number_field :<%= col.name %>_eq, placeholder: I18n.t('bo.<%= class_name.underscore %>.attributes.<%= col.name %>'), data: { action: "input->search-form#search" }, class: "block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-tybo-500 focus:ring-tybo-500 sm:max-w-xs sm:text-sm" %>
|
32
32
|
</div>
|
33
33
|
</div>
|
34
34
|
<%- elsif col.type == :boolean -%>
|
@@ -41,20 +41,20 @@
|
|
41
41
|
<button type="button"
|
42
42
|
data-target-id='q_<%= col.name %>_eq'
|
43
43
|
data-action="click->search-form#setBooleanField"
|
44
|
-
class="relative inline-flex items-center rounded-l-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:border-
|
44
|
+
class="relative inline-flex items-center rounded-l-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:border-tybo-500 focus:outline-none focus:ring-1 focus:ring-tybo-500">
|
45
45
|
-
|
46
46
|
</button>
|
47
47
|
<button type="button"
|
48
48
|
data-action="click->search-form#setBooleanField"
|
49
49
|
data-value='true'
|
50
50
|
data-target-id='q_<%= col.name %>_eq'
|
51
|
-
class="relative inline-flex items-center rounded-l-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:border-
|
51
|
+
class="relative inline-flex items-center rounded-l-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:border-tybo-500 focus:outline-none focus:ring-1 focus:ring-tybo-500">ON
|
52
52
|
</button>
|
53
53
|
<button type="button"
|
54
54
|
data-action="click->search-form#setBooleanField"
|
55
55
|
data-value='false'
|
56
56
|
data-target-id='q_<%= col.name %>_eq'
|
57
|
-
class="relative inline-flex items-center rounded-l-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:border-
|
57
|
+
class="relative inline-flex items-center rounded-l-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:border-tybo-500 focus:outline-none focus:ring-1 focus:ring-tybo-500">OFF</button>
|
58
58
|
</span>
|
59
59
|
<%%= f.hidden_field :<%= col.name %>_eq, value: nil, data: { action: "change->search-form#search"}%>
|
60
60
|
</div>
|
@@ -67,13 +67,13 @@
|
|
67
67
|
</label>
|
68
68
|
</div>
|
69
69
|
<div class="mt-1 sm:col-span-3 sm:mt-0">
|
70
|
-
<%%= f.date_field :<%= col.name %>_from_date, data: { action: "input->search-form#search" }, class: "rounded-md border-gray-300 shadow-sm focus:border-
|
70
|
+
<%%= f.date_field :<%= col.name %>_from_date, data: { action: "input->search-form#search" }, class: "rounded-md border-gray-300 shadow-sm focus:border-tybo-500 focus:ring-tybo-500 sm:text-sm" %>
|
71
71
|
</div>
|
72
72
|
<div class="mt-1 sm:col-span-2 text-center">
|
73
73
|
to
|
74
74
|
</div>
|
75
75
|
<div class="mt-1 sm:col-span-3 sm:mt-0">
|
76
|
-
<%%= f.date_field :<%= col.name %>_to_date, data: { action: "input->search-form#search" }, class: "rounded-md border-gray-300 shadow-sm focus:border-
|
76
|
+
<%%= f.date_field :<%= col.name %>_to_date, data: { action: "input->search-form#search" }, class: "rounded-md border-gray-300 shadow-sm focus:border-tybo-500 focus:ring-tybo-500 sm:text-sm" %>
|
77
77
|
</div>
|
78
78
|
</div>
|
79
79
|
<%- end -%>
|
@@ -86,7 +86,7 @@
|
|
86
86
|
<%%=I18n.t('bo.<%=association.klass.name.underscore%>.one')%>
|
87
87
|
</label>
|
88
88
|
<div class="mt-1 sm:col-span-2 sm:mt-0">
|
89
|
-
<%%= f.select :<%= association.foreign_key %>_eq, <%=association.klass.name.constantize%>.all.map { |value| [value.<%=bo_model_title(association.class_name.constantize)%>, value.id] }, { include_blank: true }, { class: "block w-full rounded-md border-gray-300 shadow-sm focus:border-
|
89
|
+
<%%= f.select :<%= association.foreign_key %>_eq, <%=association.klass.name.constantize%>.all.map { |value| [value.<%=bo_model_title(association.class_name.constantize)%>, value.id] }, { include_blank: true }, { class: "block w-full rounded-md border-gray-300 shadow-sm focus:border-tybo-500 focus:ring-tybo-500 sm:text-sm", data: { action: "input->search-form#search" } } %>
|
90
90
|
</div>
|
91
91
|
</div>
|
92
92
|
<%- end -%>
|
@@ -9,16 +9,16 @@
|
|
9
9
|
<%% @<%= class_name.underscore.pluralize %>&.each_with_index do |<%= class_name.underscore %>, i| %>
|
10
10
|
<%%= tbody.with_tr(index: i) do |tr| %>
|
11
11
|
<%- bo_model.column_names.each do |column| -%>
|
12
|
-
<%%= tr.with_td { <%= class_name.underscore %>.<%= column %>.to_s }
|
12
|
+
<%%= tr.with_td { <%= class_name.underscore %>.<%= column %>.to_s } %>
|
13
13
|
<%- end -%>
|
14
14
|
<%%= tr.with_td do %>
|
15
|
-
<%%= link_to <%="#{options[:namespace]}_#{class_name.underscore}_path(#{class_name.underscore})"%>, class: "text-
|
15
|
+
<%%= link_to <%="#{options[:namespace]}_#{class_name.underscore}_path(#{class_name.underscore})"%>, class: "text-tybo-600 hover:text-tybo-900" do %>
|
16
16
|
Détails
|
17
17
|
<%% end %>
|
18
18
|
<%% end %>
|
19
19
|
<%%= tr.with_td do %>
|
20
20
|
<%%= link_to <%="#{options[:namespace]}_#{class_name.underscore}_path(#{class_name.underscore})"%>,
|
21
|
-
class: "text-
|
21
|
+
class: "text-tybo-600 hover:text-tybo-900",
|
22
22
|
data: {turbo_method: :delete, turbo_confirm: "êtes vous sur ?"} do %>
|
23
23
|
<%%= render(Icons::TrashComponent.new) %>
|
24
24
|
<%% end %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
if Rails.env.development?
|
4
|
-
%w[dev@tymate.com admin@tymate.com
|
4
|
+
%w[dev@tymate.com admin@tymate.com].each do |email|
|
5
5
|
<%= class_name %>.find_or_create_by(
|
6
6
|
email:
|
7
7
|
).update!(password: 'password')
|
@@ -17,14 +17,14 @@
|
|
17
17
|
.pagy-nav-js .page.active,
|
18
18
|
.pagy-nav-js .page.prev.disabled,
|
19
19
|
.pagy-nav-js .page.next.disabled {
|
20
|
-
@apply block rounded-lg px-3 py-1 text-sm text-
|
20
|
+
@apply block rounded-lg px-3 py-1 text-sm text-tybo-500 font-semibold bg-tybo-200 shadow-md;
|
21
21
|
|
22
22
|
&:hover {
|
23
|
-
@apply bg-
|
23
|
+
@apply bg-tybo-300;
|
24
24
|
}
|
25
25
|
|
26
26
|
&:active {
|
27
|
-
@apply bg-
|
27
|
+
@apply bg-tybo-400 text-white;
|
28
28
|
}
|
29
29
|
}
|
30
30
|
|
@@ -32,33 +32,33 @@
|
|
32
32
|
.pagy-nav .page.next.disabled,
|
33
33
|
.pagy-nav-js .page.prev.disabled,
|
34
34
|
.pagy-nav-js .page.next.disabled {
|
35
|
-
@apply text-
|
35
|
+
@apply text-tybo-400 cursor-default;
|
36
36
|
|
37
37
|
&:hover {
|
38
|
-
@apply text-
|
38
|
+
@apply text-tybo-400 bg-tybo-200;
|
39
39
|
}
|
40
40
|
|
41
41
|
&:active {
|
42
|
-
@apply text-
|
42
|
+
@apply text-tybo-400 bg-tybo-200;
|
43
43
|
}
|
44
44
|
}
|
45
45
|
|
46
46
|
.pagy-nav .page.active,
|
47
47
|
.pagy-nav-js .page.active {
|
48
|
-
@apply text-white cursor-default bg-
|
48
|
+
@apply text-white cursor-default bg-tybo-400;
|
49
49
|
|
50
50
|
&:hover {
|
51
|
-
@apply text-white bg-
|
51
|
+
@apply text-white bg-tybo-400;
|
52
52
|
}
|
53
53
|
|
54
54
|
&:active {
|
55
|
-
@apply bg-
|
55
|
+
@apply bg-tybo-400 text-white;
|
56
56
|
}
|
57
57
|
}
|
58
58
|
|
59
59
|
|
60
60
|
.pagy-combo-nav-js {
|
61
|
-
@apply flex max-w-max rounded-full px-3 py-1 text-sm text-
|
61
|
+
@apply flex max-w-max rounded-full px-3 py-1 text-sm text-tybo-500 font-semibold bg-tybo-200 shadow-md;
|
62
62
|
}
|
63
63
|
|
64
64
|
.pagy-combo-nav-js .pagy-combo-input {
|
@@ -68,17 +68,17 @@
|
|
68
68
|
.pagy-combo-nav-js .page.prev,
|
69
69
|
.pagy-combo-nav-js .page.next {
|
70
70
|
&:hover {
|
71
|
-
@apply text-
|
71
|
+
@apply text-tybo-800;
|
72
72
|
}
|
73
73
|
|
74
74
|
&:active {
|
75
|
-
@apply text-
|
75
|
+
@apply text-tybo-800;
|
76
76
|
}
|
77
77
|
}
|
78
78
|
|
79
79
|
.pagy-combo-nav-js .page.prev.disabled,
|
80
80
|
.pagy-combo-nav-js .page.next.disabled {
|
81
|
-
@apply text-
|
81
|
+
@apply text-tybo-400 cursor-default;
|
82
82
|
}
|
83
83
|
|
84
84
|
/* tom-select */
|
@@ -87,11 +87,11 @@ ts-wrapper {
|
|
87
87
|
}
|
88
88
|
|
89
89
|
.ts-control {
|
90
|
-
@apply shadow-sm rounded-lg my-5 border-
|
90
|
+
@apply shadow-sm rounded-lg my-5 border-tybo-300 bg-white py-2 px-3 text-base;
|
91
91
|
}
|
92
92
|
|
93
93
|
.ts-dropdown {
|
94
|
-
@apply rounded-md border border-solid border-t border-
|
94
|
+
@apply rounded-md border border-solid border-t border-tybo-300 text-base;
|
95
95
|
}
|
96
96
|
|
97
97
|
.ts-dropdown [data-selectable].option:first-child {
|
@@ -108,5 +108,5 @@ ts-wrapper {
|
|
108
108
|
}
|
109
109
|
|
110
110
|
.ts-dropdown .active {
|
111
|
-
@apply bg-
|
111
|
+
@apply bg-tybo-100 text-tybo-900;
|
112
112
|
}
|
@@ -47,7 +47,7 @@ SimpleForm.setup do |config|
|
|
47
47
|
b.optional :readonly
|
48
48
|
b.use :label, class: 'block text-sm font-medium text-gray-700', error_class: 'text-red-500'
|
49
49
|
b.use :input,
|
50
|
-
class: 'mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-
|
50
|
+
class: 'mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-tybo-500 focus:border-tybo-500 sm:text-sm', error_class: 'border-red-500', valid_class: 'border-green-400'
|
51
51
|
b.use :full_error, wrap_with: { tag: 'p', class: 'mt-2 text-red-500 text-xs italic' }
|
52
52
|
b.use :hint, wrap_with: { tag: 'p', class: 'mt-2 text-grey-700 text-xs italic' }
|
53
53
|
end
|
@@ -58,7 +58,7 @@ SimpleForm.setup do |config|
|
|
58
58
|
b.optional :readonly
|
59
59
|
b.wrapper tag: 'div', class: 'flex items-center h-5' do |ba|
|
60
60
|
ba.use :input,
|
61
|
-
class: 'focus:ring-2 focus:ring-
|
61
|
+
class: 'focus:ring-2 focus:ring-tybo-500:focus ring-offset-2 h-4 w-4 text-tybo-600 border-gray-300 rounded'
|
62
62
|
end
|
63
63
|
b.wrapper tag: 'div', class: 'ml-3 text-sm' do |bb|
|
64
64
|
bb.use :label, class: 'block', error_class: 'text-red-500'
|
@@ -77,7 +77,7 @@ SimpleForm.setup do |config|
|
|
77
77
|
ba.use :label_text
|
78
78
|
end
|
79
79
|
b.use :input,
|
80
|
-
class: 'focus:ring-2 focus:ring-
|
80
|
+
class: 'focus:ring-2 focus:ring-tybo-500 ring-offset-2 h-4 w-4 text-tybo-600 border-gray-300 rounded', error_class: 'text-red-500', valid_class: 'text-green-400'
|
81
81
|
b.use :full_error, wrap_with: { tag: 'p', class: 'block mt-2 text-red-500 text-xs italic' }
|
82
82
|
b.use :hint, wrap_with: { tag: 'p', class: 'mt-2 text-grey-700 text-xs italic' }
|
83
83
|
end
|
@@ -17,17 +17,18 @@ module.exports = {
|
|
17
17
|
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
|
18
18
|
},
|
19
19
|
colors: {
|
20
|
-
|
20
|
+
tybo: {
|
21
21
|
DEFAULT: '#11072C',
|
22
|
-
50: '
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
22
|
+
50: '#e9ebff',
|
23
|
+
100: '#d8d9ff',
|
24
|
+
200: '#b8b8ff',
|
25
|
+
300: '#918eff',
|
26
|
+
400: '#7561ff',
|
27
|
+
500: '#653dff',
|
28
|
+
600: '#5f1cff',
|
29
|
+
700: '#5611f1',
|
30
|
+
800: '#4512c1',
|
31
|
+
900: '#11072c'
|
31
32
|
}
|
32
33
|
}
|
33
34
|
},
|
@@ -15,6 +15,7 @@ class TyboInstallGenerator < Rails::Generators::Base
|
|
15
15
|
template 'tailwind.config.js', File.join('config/tailwind.config.js'), force: true
|
16
16
|
template 'tom-select.css', File.join('app/assets/stylesheets/tom-select.css')
|
17
17
|
template 'simple_form_tailwind.rb', File.join('config/initializers/simple_form_tailwind.rb')
|
18
|
+
template 'tybo_config.rb', File.join('config/initializers/tybo.rb')
|
18
19
|
end
|
19
20
|
|
20
21
|
def pin_js_dependencies
|
data/lib/tybo/version.rb
CHANGED
data/lib/tybo.rb
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
require "tybo/version"
|
2
2
|
require "tybo/engine"
|
3
|
+
require "tybo/configuration"
|
3
4
|
|
4
5
|
module Tybo
|
5
|
-
|
6
|
+
class << self
|
7
|
+
def configuration
|
8
|
+
@configuration ||= Configuration.new
|
9
|
+
end
|
10
|
+
|
11
|
+
def configure
|
12
|
+
yield(configuration)
|
13
|
+
end
|
14
|
+
end
|
6
15
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tybo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michel Delpierre
|
8
8
|
- Julien Camblan
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-02-
|
12
|
+
date: 2023-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -129,6 +129,8 @@ files:
|
|
129
129
|
- app/components/attachment_card_component.rb
|
130
130
|
- app/components/attachments_list_component.html.erb
|
131
131
|
- app/components/attachments_list_component.rb
|
132
|
+
- app/components/cover_component.html.erb
|
133
|
+
- app/components/cover_component.rb
|
132
134
|
- app/components/current_user_mini_card_component.html.erb
|
133
135
|
- app/components/current_user_mini_card_component.rb
|
134
136
|
- app/components/form_component.html.erb
|
@@ -245,8 +247,10 @@ files:
|
|
245
247
|
- lib/generators/tybo_install/templates/simple_form_tailwind.rb
|
246
248
|
- lib/generators/tybo_install/templates/tailwind.config.js
|
247
249
|
- lib/generators/tybo_install/templates/tom-select.css
|
248
|
-
- lib/generators/tybo_install/
|
250
|
+
- lib/generators/tybo_install/templates/tybo_config.rb
|
251
|
+
- lib/generators/tybo_install/tybo_config.rb
|
249
252
|
- lib/tybo.rb
|
253
|
+
- lib/tybo/configuration.rb
|
250
254
|
- lib/tybo/engine.rb
|
251
255
|
- lib/tybo/version.rb
|
252
256
|
homepage: https://rubygems.org/gems/tybo
|
@@ -254,7 +258,7 @@ licenses:
|
|
254
258
|
- MIT
|
255
259
|
metadata:
|
256
260
|
homepage_uri: https://rubygems.org/gems/tybo
|
257
|
-
post_install_message:
|
261
|
+
post_install_message:
|
258
262
|
rdoc_options: []
|
259
263
|
require_paths:
|
260
264
|
- lib
|
@@ -269,8 +273,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
269
273
|
- !ruby/object:Gem::Version
|
270
274
|
version: '0'
|
271
275
|
requirements: []
|
272
|
-
rubygems_version: 3.3.
|
273
|
-
signing_key:
|
276
|
+
rubygems_version: 3.0.3.1
|
277
|
+
signing_key:
|
274
278
|
specification_version: 4
|
275
279
|
summary: A tailwind custom admin engine for Ruby on Rails
|
276
280
|
test_files: []
|