madmin 1.2.11 → 2.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 +4 -4
- data/README.md +36 -7
- data/app/assets/config/madmin_manifest.js +3 -0
- data/app/assets/stylesheets/madmin/actiontext.css +31 -0
- data/app/assets/stylesheets/madmin/application-sprockets.css +11 -0
- data/app/assets/stylesheets/madmin/application.css +10 -0
- data/app/assets/stylesheets/madmin/base.css +117 -0
- data/app/assets/stylesheets/madmin/buttons.css +46 -0
- data/app/assets/stylesheets/madmin/forms.css +64 -0
- data/app/assets/stylesheets/madmin/pagination.css +59 -0
- data/app/assets/stylesheets/madmin/reset.css +242 -0
- data/app/assets/stylesheets/madmin/sidebar.css +80 -0
- data/app/assets/stylesheets/madmin/tables.css +56 -0
- data/app/controllers/madmin/application_controller.rb +7 -12
- data/app/controllers/madmin/base_controller.rb +1 -0
- data/app/controllers/madmin/resource_controller.rb +7 -1
- data/app/helpers/madmin/application_helper.rb +1 -12
- data/app/helpers/madmin/sort_helper.rb +17 -1
- data/app/javascript/madmin/application.js +4 -0
- data/app/javascript/madmin/controllers/application.js +12 -0
- data/app/javascript/madmin/controllers/index.js +5 -0
- data/app/javascript/madmin/controllers/nested_form_controller.js +34 -0
- data/app/javascript/madmin/controllers/select_controller.js +32 -0
- data/app/views/layouts/madmin/application.html.erb +12 -13
- data/app/views/madmin/application/_flash.html.erb +13 -0
- data/app/views/madmin/application/_form.html.erb +13 -12
- data/app/views/madmin/application/_javascript.html.erb +3 -136
- data/app/views/madmin/application/_navigation.html.erb +22 -27
- data/app/views/madmin/application/edit.html.erb +9 -5
- data/app/views/madmin/application/index.html.erb +37 -31
- data/app/views/madmin/application/new.html.erb +9 -5
- data/app/views/madmin/application/show.html.erb +28 -22
- data/app/views/madmin/dashboard/show.html.erb +4 -1
- data/app/views/madmin/fields/attachment/_form.html.erb +11 -4
- data/app/views/madmin/fields/attachment/_index.html.erb +5 -1
- data/app/views/madmin/fields/attachment/_show.html.erb +4 -4
- data/app/views/madmin/fields/attachments/_form.html.erb +1 -4
- data/app/views/madmin/fields/belongs_to/_form.html.erb +1 -4
- data/app/views/madmin/fields/belongs_to/_index.html.erb +2 -1
- data/app/views/madmin/fields/boolean/_form.html.erb +3 -4
- data/app/views/madmin/fields/currency/_form.html.erb +1 -0
- data/app/views/madmin/fields/currency/_index.html.erb +1 -0
- data/app/views/madmin/fields/currency/_show.html.erb +1 -0
- data/app/views/madmin/fields/date/_form.html.erb +1 -4
- data/app/views/madmin/fields/date_time/_form.html.erb +1 -4
- data/app/views/madmin/fields/decimal/_form.html.erb +1 -4
- data/app/views/madmin/fields/enum/_form.html.erb +1 -4
- data/app/views/madmin/fields/file/_form.html.erb +1 -4
- data/app/views/madmin/fields/float/_form.html.erb +1 -4
- data/app/views/madmin/fields/has_many/_form.html.erb +1 -4
- data/app/views/madmin/fields/has_many/_show.html.erb +7 -1
- data/app/views/madmin/fields/has_one/_form.html.erb +0 -3
- data/app/views/madmin/fields/integer/_form.html.erb +1 -4
- data/app/views/madmin/fields/integer/_index.html.erb +1 -5
- data/app/views/madmin/fields/json/_form.html.erb +1 -4
- data/app/views/madmin/fields/nested_has_many/_fields.html.erb +4 -5
- data/app/views/madmin/fields/nested_has_many/_form.html.erb +0 -4
- data/app/views/madmin/fields/nested_has_many/_show.html.erb +7 -1
- data/app/views/madmin/fields/password/_form.html.erb +1 -4
- data/app/views/madmin/fields/polymorphic/_form.html.erb +1 -4
- data/app/views/madmin/fields/rich_text/_form.html.erb +1 -6
- data/app/views/madmin/fields/select/_form.html.erb +1 -0
- data/app/views/madmin/fields/select/_index.html.erb +1 -0
- data/app/views/madmin/fields/select/_show.html.erb +1 -0
- data/app/views/madmin/fields/string/_form.html.erb +1 -4
- data/app/views/madmin/fields/text/_form.html.erb +1 -4
- data/app/views/madmin/shared/_label.html.erb +2 -2
- data/config/importmap.rb +10 -0
- data/lib/generators/madmin/field/templates/_form.html.erb +1 -4
- data/lib/generators/madmin/install/templates/controller.rb.tt +5 -12
- data/lib/generators/madmin/resource/resource_generator.rb +1 -1
- data/lib/generators/madmin/resource/templates/resource.rb.tt +12 -10
- data/lib/madmin/engine.rb +26 -0
- data/lib/madmin/field.rb +21 -5
- data/lib/madmin/fields/belongs_to.rb +10 -5
- data/lib/madmin/fields/currency.rb +15 -0
- data/lib/madmin/fields/has_many.rb +17 -0
- data/lib/madmin/fields/nested_has_many.rb +5 -1
- data/lib/madmin/fields/polymorphic.rb +1 -1
- data/lib/madmin/fields/select.rb +9 -0
- data/lib/madmin/generator_helpers.rb +6 -2
- data/lib/madmin/menu.rb +70 -0
- data/lib/madmin/resource.rb +56 -24
- data/lib/madmin/search.rb +1 -1
- data/lib/madmin/version.rb +1 -1
- data/lib/madmin.rb +23 -1
- metadata +61 -13
- data/app/assets/config/manifest.js +0 -2
- data/app/assets/stylesheets/actiontext.scss +0 -36
- data/app/assets/stylesheets/application.css +0 -15
- data/app/views/madmin/application/_menu_resources.html.erb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 531eb134ff2fc5b4f8d16f24167561fcd7836f1f5e8886d39f103a156ccffc6b
|
4
|
+
data.tar.gz: 28cec8a6ae99f9a36e6ecdc65383fe10306f2880ec7ae499e08a50093b38b7e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 122ff7eda3d0bc65945b4e34b9b23d6ddc700d711b9fa7381e8c3fd9bdfcd73113a083f2dcaded130978b6716bf79e3233bcc0e132c80704436b42d5065d407b
|
7
|
+
data.tar.gz: 92e06ee0cfcba0279947e46972efc5f2463b35b020b97bc5d830f7554cf5b004cc242f4203d3cc124919df49d8ecf1a4b16ac1e94b5e70715961b8e2afa8a1aa
|
data/README.md
CHANGED
@@ -6,14 +6,15 @@
|
|
6
6
|
|
7
7
|
Why another Ruby on Rails admin? We wanted an admin that was:
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
- Familiar and customizable like Rails scaffolds (less DSL)
|
10
|
+
- Supports all the Rails features out of the box (ActionText, ActionMailbox, has_secure_password, etc)
|
11
|
+
- Stimulus / Turbolinks / Hotwire ready
|
12
12
|
|
13
13
|

|
14
14
|
_We're still working on the design!_
|
15
15
|
|
16
16
|
## Installation
|
17
|
+
|
17
18
|
Add `madmin` to your application's Gemfile:
|
18
19
|
|
19
20
|
```bash
|
@@ -40,6 +41,23 @@ To generate a resource for a model, you can run:
|
|
40
41
|
rails g madmin:resource ActionText::RichText
|
41
42
|
```
|
42
43
|
|
44
|
+
### Avoid N+1 queries
|
45
|
+
|
46
|
+
In case of N+1 queries, you can preload the association by overriding the `scoped_resource` method in the controller:
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
module Madmin
|
50
|
+
class PostsController < Madmin::ResourceController
|
51
|
+
private
|
52
|
+
|
53
|
+
def scoped_resources
|
54
|
+
super.includes(:user)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
```
|
60
|
+
|
43
61
|
## Configuring Views
|
44
62
|
|
45
63
|
The views packaged within the gem are a great starting point, but inevitably people will need to be able to customize those views.
|
@@ -47,16 +65,19 @@ The views packaged within the gem are a great starting point, but inevitably peo
|
|
47
65
|
You can use the included generator to create the appropriate view files, which can then be customized.
|
48
66
|
|
49
67
|
For example, running the following will copy over all of the views into your application that will be used for every resource:
|
68
|
+
|
50
69
|
```bash
|
51
70
|
rails generate madmin:views
|
52
71
|
```
|
53
72
|
|
54
|
-
The view files that are copied over in this case includes all of the standard Rails action views (index, new, edit, show, and _form), as well as:
|
55
|
-
|
56
|
-
|
57
|
-
|
73
|
+
The view files that are copied over in this case includes all of the standard Rails action views (index, new, edit, show, and \_form), as well as:
|
74
|
+
|
75
|
+
- `application.html.erb` (layout file)
|
76
|
+
- `_javascript.html.erb` (default JavaScript setup)
|
77
|
+
- `_navigation.html.erb` (renders the navigation/sidebar menu)
|
58
78
|
|
59
79
|
As with the other views, you can specifically run the views generator for only the navigation or application layout views:
|
80
|
+
|
60
81
|
```bash
|
61
82
|
rails g madmin:views:navigation
|
62
83
|
# -> app/views/madmin/_navigation.html.erb
|
@@ -68,6 +89,7 @@ rails g madmin:views:layout # Note the layout generator includes the layout, ja
|
|
68
89
|
```
|
69
90
|
|
70
91
|
If you only need to customize specific views, you can restrict which views are copied by the generator:
|
92
|
+
|
71
93
|
```bash
|
72
94
|
rails g madmin:views:index
|
73
95
|
# -> app/views/madmin/application/index.html.erb
|
@@ -79,6 +101,7 @@ The `attribute` method in model_resource.rb gives you that flexibility.
|
|
79
101
|
```bash
|
80
102
|
# -> app/madmin/resources/book_resource.rb
|
81
103
|
```
|
104
|
+
|
82
105
|
```ruby
|
83
106
|
class UserResource < Madmin::Resource
|
84
107
|
attribute :id, form: false
|
@@ -91,6 +114,7 @@ end
|
|
91
114
|
```
|
92
115
|
|
93
116
|
You can also scope the copied view(s) to a specific Resource/Model:
|
117
|
+
|
94
118
|
```bash
|
95
119
|
rails generate madmin:views:index Book
|
96
120
|
# -> app/views/madmin/books/index.html.erb
|
@@ -126,9 +150,14 @@ end
|
|
126
150
|
You can use a couple of strategies to authenticate users who are trying to
|
127
151
|
access your madmin panel: [Authentication Docs](docs/authentication.md)
|
128
152
|
|
153
|
+
## Assets
|
154
|
+
You can customize the JavaScript and CSS assets used by Madmin for your application. To learn how
|
155
|
+
see the [Assets Doc](docs/assets.md)
|
156
|
+
|
129
157
|
## 🙏 Contributing
|
130
158
|
|
131
159
|
This project uses Standard for formatting Ruby code. Please make sure to run standardrb before submitting pull requests.
|
132
160
|
|
133
161
|
## 📝 License
|
162
|
+
|
134
163
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -0,0 +1,31 @@
|
|
1
|
+
/*
|
2
|
+
* Provides a drop-in pointer for the default Trix stylesheet that will format the toolbar and
|
3
|
+
* the trix-editor content (whether displayed or under editing). Feel free to incorporate this
|
4
|
+
* inclusion directly in any other asset bundle and remove this file.
|
5
|
+
*
|
6
|
+
*= require trix
|
7
|
+
*/
|
8
|
+
|
9
|
+
/*
|
10
|
+
* We need to override trix.css’s image gallery styles to accommodate the
|
11
|
+
* <action-text-attachment> element we wrap around attachments. Otherwise,
|
12
|
+
* images in galleries will be squished by the max-width: 33%; rule.
|
13
|
+
*/
|
14
|
+
.trix-content .attachment-gallery > action-text-attachment,
|
15
|
+
.trix-content .attachment-gallery > .attachment {
|
16
|
+
flex: 1 0 33%;
|
17
|
+
padding: 0 0.5em;
|
18
|
+
max-width: 33%;
|
19
|
+
}
|
20
|
+
|
21
|
+
.trix-content .attachment-gallery.attachment-gallery--2 > action-text-attachment,
|
22
|
+
.trix-content .attachment-gallery.attachment-gallery--2 > .attachment, .trix-content .attachment-gallery.attachment-gallery--4 > action-text-attachment,
|
23
|
+
.trix-content .attachment-gallery.attachment-gallery--4 > .attachment {
|
24
|
+
flex-basis: 50%;
|
25
|
+
max-width: 50%;
|
26
|
+
}
|
27
|
+
|
28
|
+
.trix-content action-text-attachment .attachment {
|
29
|
+
padding: 0 !important;
|
30
|
+
max-width: 100% !important;
|
31
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
@import url("/trix.css");
|
2
|
+
@import url("/madmin/actiontext.css");
|
3
|
+
@import url("/madmin/reset.css");
|
4
|
+
@import url("/madmin/base.css");
|
5
|
+
@import url("/madmin/sidebar.css");
|
6
|
+
@import url("/madmin/buttons.css");
|
7
|
+
@import url("/madmin/forms.css");
|
8
|
+
@import url("/madmin/tables.css");
|
9
|
+
@import url("/madmin/pagination.css");
|
10
|
+
|
@@ -0,0 +1,117 @@
|
|
1
|
+
:root {
|
2
|
+
--primary-color: rgb(37 99 235);
|
3
|
+
--border-color: rgb(229 231 235);
|
4
|
+
--background-color: rgb(249 250 251);
|
5
|
+
--text-color: rgb(2 6 23);
|
6
|
+
--light-text-color: rgb(71 85 105);
|
7
|
+
--sidebar-width: 16rem;
|
8
|
+
}
|
9
|
+
|
10
|
+
body {
|
11
|
+
color: var(--text-color);
|
12
|
+
font-size: 14px;
|
13
|
+
}
|
14
|
+
|
15
|
+
a {
|
16
|
+
color: var(--primary-color);
|
17
|
+
}
|
18
|
+
|
19
|
+
.alert {
|
20
|
+
border-radius: 0.5rem;
|
21
|
+
font-weight: 500;
|
22
|
+
padding: 1rem;
|
23
|
+
margin-bottom: 1rem;
|
24
|
+
|
25
|
+
ul {
|
26
|
+
margin-top: 0.5rem;
|
27
|
+
margin-bottom: 0;
|
28
|
+
padding-left: 2rem;
|
29
|
+
}
|
30
|
+
|
31
|
+
svg {
|
32
|
+
display: inline-block;
|
33
|
+
height: 1rem;
|
34
|
+
margin-right: 0.25rem;
|
35
|
+
width: 1rem;
|
36
|
+
vertical-align: text-bottom;
|
37
|
+
}
|
38
|
+
|
39
|
+
&.alert-danger {
|
40
|
+
background-color: oklch(.936 .032 17.717);
|
41
|
+
color: oklch(.444 .177 26.899);
|
42
|
+
|
43
|
+
svg {
|
44
|
+
color: oklch(.637 .237 25.331);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
&.alert-notice {
|
49
|
+
background-color: oklch(.962 .044 156.743);
|
50
|
+
color: oklch(.448 .119 151.328);
|
51
|
+
|
52
|
+
svg {
|
53
|
+
color: oklch(.723 .219 149.579);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
.search {
|
59
|
+
display: flex;
|
60
|
+
align-items: center;
|
61
|
+
}
|
62
|
+
|
63
|
+
.header {
|
64
|
+
border-bottom: 1px solid rgb(229 231 235);
|
65
|
+
display: flex;
|
66
|
+
justify-content: space-between;
|
67
|
+
align-items: center;
|
68
|
+
padding-bottom: 1rem;
|
69
|
+
margin-bottom: 1rem;
|
70
|
+
|
71
|
+
h1 {
|
72
|
+
margin: 0;
|
73
|
+
}
|
74
|
+
|
75
|
+
a {
|
76
|
+
text-decoration: none;
|
77
|
+
|
78
|
+
&:hover {
|
79
|
+
text-decoration: underline;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
.actions {
|
84
|
+
align-items: center;
|
85
|
+
display: flex;
|
86
|
+
gap: 0.5rem;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
.metrics {
|
91
|
+
display: flex;
|
92
|
+
|
93
|
+
.metric {
|
94
|
+
border: 1px solid rgb(229 231 235);
|
95
|
+
border-radius: 0.25rem;
|
96
|
+
padding: 1rem;
|
97
|
+
margin: 1rem;
|
98
|
+
flex: 1 1 0%;
|
99
|
+
|
100
|
+
h4 {
|
101
|
+
color: rgb(75 85 99);
|
102
|
+
font-weight: 600;
|
103
|
+
margin-top: 0;
|
104
|
+
margin-bottom: 0.5rem;
|
105
|
+
}
|
106
|
+
|
107
|
+
p {
|
108
|
+
font-size: 2rem;
|
109
|
+
font-weight: 600;
|
110
|
+
margin: 0;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
115
|
+
.scopes {
|
116
|
+
margin-bottom: 1rem;
|
117
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
.btn {
|
2
|
+
border-radius: 0.375rem;
|
3
|
+
display: inline-block;
|
4
|
+
font-weight: 600;
|
5
|
+
text-decoration: none;
|
6
|
+
|
7
|
+
font-size: 0.875rem;
|
8
|
+
line-height: 1.25rem;
|
9
|
+
padding-bottom: 0.5rem;
|
10
|
+
padding-top: 0.5rem;
|
11
|
+
padding-left: 0.75rem;
|
12
|
+
padding-right: 0.75rem;
|
13
|
+
|
14
|
+
&:hover {
|
15
|
+
text-decoration: none !important;
|
16
|
+
}
|
17
|
+
|
18
|
+
&.btn-primary {
|
19
|
+
background-color: var(--primary-color);
|
20
|
+
color: white;
|
21
|
+
}
|
22
|
+
|
23
|
+
&.btn-secondary {
|
24
|
+
background-color: white;
|
25
|
+
color: rgb(31 41 55);
|
26
|
+
box-shadow: inset 0 0 0 1px rgb(156 163 175);
|
27
|
+
|
28
|
+
&:hover {
|
29
|
+
background-color: rgb(243 244 246);
|
30
|
+
}
|
31
|
+
|
32
|
+
&.active {
|
33
|
+
background-color: rgb(243 244 246);
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
&.btn-danger {
|
38
|
+
background-color: white;
|
39
|
+
color: rgb(239 68 68);
|
40
|
+
box-shadow: inset 0 0 0 1px rgb(239 68 68);
|
41
|
+
|
42
|
+
&:hover {
|
43
|
+
background-color: rgb(243 244 246);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
.form-hint {
|
2
|
+
font-size: 0.875rem;
|
3
|
+
margin-top: 0.5rem;
|
4
|
+
|
5
|
+
&.error {
|
6
|
+
color: rgb(239 68 68);
|
7
|
+
}
|
8
|
+
}
|
9
|
+
|
10
|
+
.form-group {
|
11
|
+
margin-bottom: 1rem;
|
12
|
+
}
|
13
|
+
|
14
|
+
.form-input {
|
15
|
+
width: 100%;
|
16
|
+
}
|
17
|
+
|
18
|
+
.form-description {
|
19
|
+
color: var(--light-text-color);
|
20
|
+
}
|
21
|
+
|
22
|
+
label {
|
23
|
+
color: rgb(17 24 39);
|
24
|
+
line-height: 1.5rem;
|
25
|
+
font-weight: 500;
|
26
|
+
font-size: 0.875rem;
|
27
|
+
}
|
28
|
+
|
29
|
+
button, input, optgroup, select, textarea {
|
30
|
+
font-family: inherit;
|
31
|
+
font-feature-settings: inherit;
|
32
|
+
font-variation-settings: inherit;
|
33
|
+
font-size: 100%;
|
34
|
+
font-weight: inherit;
|
35
|
+
line-height: inherit;
|
36
|
+
letter-spacing: inherit;
|
37
|
+
color: inherit;
|
38
|
+
margin: 0;
|
39
|
+
padding: 0;
|
40
|
+
}
|
41
|
+
|
42
|
+
[type='text'], input:where(:not([type])), [type='email'], [type='url'], [type='password'], [type='number'], [type='date'], [type='datetime-local'], [type='month'], [type='search'], [type='tel'], [type='time'], [type='week'], [multiple], textarea, select {
|
43
|
+
-webkit-appearance: none;
|
44
|
+
-moz-appearance: none;
|
45
|
+
appearance: none;
|
46
|
+
background-color: #fff;
|
47
|
+
|
48
|
+
border-radius: 0.375rem;
|
49
|
+
box-shadow: inset 0 0 0 1px rgb(156 163 175);
|
50
|
+
line-height: 1.5rem;
|
51
|
+
padding-bottom: 0.375rem;
|
52
|
+
padding-left: 0.75rem;
|
53
|
+
padding-right: 0.75rem;
|
54
|
+
padding-top: 0.375rem;
|
55
|
+
|
56
|
+
&:focus {
|
57
|
+
box-shadow: inset 0 0 0 1px rgb(var(--primary-color));
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
.required {
|
62
|
+
color: rgb(239 68 68);
|
63
|
+
font-weight: 600;
|
64
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
.pagination {
|
2
|
+
padding: 0.5rem;
|
3
|
+
}
|
4
|
+
|
5
|
+
.pagy {
|
6
|
+
display: inline-flex;
|
7
|
+
isolation: isolate;
|
8
|
+
border-radius: 0.375rem;
|
9
|
+
|
10
|
+
a {
|
11
|
+
display: inline-flex;
|
12
|
+
position: relative;
|
13
|
+
padding-top: 0.5rem;
|
14
|
+
padding-bottom: 0.5rem;
|
15
|
+
padding-left: 0.75rem;
|
16
|
+
padding-right: 0.75rem;
|
17
|
+
align-items: center;
|
18
|
+
box-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
19
|
+
--tw-ring-inset: inset;
|
20
|
+
--tw-ring-color: #D1D5DB;
|
21
|
+
font-size: 0.875rem;
|
22
|
+
line-height: 1.25rem;
|
23
|
+
color: #111827;
|
24
|
+
background-color: #ffffff;
|
25
|
+
border-radius: 0.25rem;
|
26
|
+
text-decoration: none;
|
27
|
+
}
|
28
|
+
|
29
|
+
a:hover {
|
30
|
+
background-color: #F3F4F6;
|
31
|
+
}
|
32
|
+
|
33
|
+
a:not([href]) {
|
34
|
+
color: #D1D5DB;
|
35
|
+
cursor: default;
|
36
|
+
}
|
37
|
+
|
38
|
+
a.current {
|
39
|
+
color: #ffffff;
|
40
|
+
background-color: var(--primary-color);
|
41
|
+
}
|
42
|
+
|
43
|
+
label {
|
44
|
+
display: inline-block;
|
45
|
+
padding-top: 0.125rem;
|
46
|
+
padding-bottom: 0.125rem;
|
47
|
+
padding-left: 0.75rem;
|
48
|
+
padding-right: 0.75rem;
|
49
|
+
border-radius: 0.5rem;
|
50
|
+
white-space: nowrap;
|
51
|
+
background-color: #E5E7EB;
|
52
|
+
}
|
53
|
+
|
54
|
+
label input {
|
55
|
+
border-radius: 0.375rem;
|
56
|
+
border-style: none;
|
57
|
+
background-color: #F3F4F6;
|
58
|
+
}
|
59
|
+
}
|
@@ -0,0 +1,242 @@
|
|
1
|
+
*, ::before, ::after {
|
2
|
+
box-sizing: border-box;
|
3
|
+
border-width: 0;
|
4
|
+
border-style: solid;
|
5
|
+
border-color: #e5e7eb;
|
6
|
+
}
|
7
|
+
|
8
|
+
body {
|
9
|
+
line-height: 1.5;
|
10
|
+
-webkit-font-smoothing: antialiased;
|
11
|
+
-moz-osx-font-smoothing: grayscale;
|
12
|
+
}
|
13
|
+
img, picture, video, canvas, svg {
|
14
|
+
display: block;
|
15
|
+
max-width: 100%;
|
16
|
+
}
|
17
|
+
input, button, textarea, select {
|
18
|
+
font: inherit;
|
19
|
+
}
|
20
|
+
p, h1, h2, h3, h4, h5, h6 {
|
21
|
+
overflow-wrap: break-word;
|
22
|
+
}
|
23
|
+
p {
|
24
|
+
text-wrap: pretty;
|
25
|
+
}
|
26
|
+
h1, h2, h3, h4, h5, h6 {
|
27
|
+
text-wrap: balance;
|
28
|
+
}
|
29
|
+
|
30
|
+
/*! modern-normalize v3.0.1 | MIT License | https://github.com/sindresorhus/modern-normalize */
|
31
|
+
|
32
|
+
/*
|
33
|
+
Document
|
34
|
+
========
|
35
|
+
*/
|
36
|
+
|
37
|
+
/**
|
38
|
+
Use a better box model (opinionated).
|
39
|
+
*/
|
40
|
+
|
41
|
+
*,
|
42
|
+
::before,
|
43
|
+
::after {
|
44
|
+
box-sizing: border-box;
|
45
|
+
}
|
46
|
+
|
47
|
+
html {
|
48
|
+
/* Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) */
|
49
|
+
font-family:
|
50
|
+
system-ui,
|
51
|
+
'Segoe UI',
|
52
|
+
Roboto,
|
53
|
+
Helvetica,
|
54
|
+
Arial,
|
55
|
+
sans-serif,
|
56
|
+
'Apple Color Emoji',
|
57
|
+
'Segoe UI Emoji';
|
58
|
+
line-height: 1.15; /* 1. Correct the line height in all browsers. */
|
59
|
+
-webkit-text-size-adjust: 100%; /* 2. Prevent adjustments of font size after orientation changes in iOS. */
|
60
|
+
tab-size: 4; /* 3. Use a more readable tab size (opinionated). */
|
61
|
+
}
|
62
|
+
|
63
|
+
/*
|
64
|
+
Sections
|
65
|
+
========
|
66
|
+
*/
|
67
|
+
|
68
|
+
body {
|
69
|
+
margin: 0; /* Remove the margin in all browsers. */
|
70
|
+
}
|
71
|
+
|
72
|
+
/*
|
73
|
+
Text-level semantics
|
74
|
+
====================
|
75
|
+
*/
|
76
|
+
|
77
|
+
/**
|
78
|
+
Add the correct font weight in Chrome and Safari.
|
79
|
+
*/
|
80
|
+
|
81
|
+
b,
|
82
|
+
strong {
|
83
|
+
font-weight: bolder;
|
84
|
+
}
|
85
|
+
|
86
|
+
/**
|
87
|
+
1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
|
88
|
+
2. Correct the odd 'em' font sizing in all browsers.
|
89
|
+
*/
|
90
|
+
|
91
|
+
code,
|
92
|
+
kbd,
|
93
|
+
samp,
|
94
|
+
pre {
|
95
|
+
font-family:
|
96
|
+
ui-monospace,
|
97
|
+
SFMono-Regular,
|
98
|
+
Consolas,
|
99
|
+
'Liberation Mono',
|
100
|
+
Menlo,
|
101
|
+
monospace; /* 1 */
|
102
|
+
font-size: 1em; /* 2 */
|
103
|
+
}
|
104
|
+
|
105
|
+
/**
|
106
|
+
Add the correct font size in all browsers.
|
107
|
+
*/
|
108
|
+
|
109
|
+
small {
|
110
|
+
font-size: 80%;
|
111
|
+
}
|
112
|
+
|
113
|
+
/**
|
114
|
+
Prevent 'sub' and 'sup' elements from affecting the line height in all browsers.
|
115
|
+
*/
|
116
|
+
|
117
|
+
sub,
|
118
|
+
sup {
|
119
|
+
font-size: 75%;
|
120
|
+
line-height: 0;
|
121
|
+
position: relative;
|
122
|
+
vertical-align: baseline;
|
123
|
+
}
|
124
|
+
|
125
|
+
sub {
|
126
|
+
bottom: -0.25em;
|
127
|
+
}
|
128
|
+
|
129
|
+
sup {
|
130
|
+
top: -0.5em;
|
131
|
+
}
|
132
|
+
|
133
|
+
/*
|
134
|
+
Tabular data
|
135
|
+
============
|
136
|
+
*/
|
137
|
+
|
138
|
+
/**
|
139
|
+
Correct table border color inheritance in Chrome and Safari. (https://issues.chromium.org/issues/40615503, https://bugs.webkit.org/show_bug.cgi?id=195016)
|
140
|
+
*/
|
141
|
+
|
142
|
+
table {
|
143
|
+
border-color: currentcolor;
|
144
|
+
}
|
145
|
+
|
146
|
+
/*
|
147
|
+
Forms
|
148
|
+
=====
|
149
|
+
*/
|
150
|
+
|
151
|
+
/**
|
152
|
+
1. Change the font styles in all browsers.
|
153
|
+
2. Remove the margin in Firefox and Safari.
|
154
|
+
*/
|
155
|
+
|
156
|
+
button,
|
157
|
+
input,
|
158
|
+
optgroup,
|
159
|
+
select,
|
160
|
+
textarea {
|
161
|
+
font-family: inherit; /* 1 */
|
162
|
+
font-size: 100%; /* 1 */
|
163
|
+
line-height: 1.15; /* 1 */
|
164
|
+
margin: 0; /* 2 */
|
165
|
+
}
|
166
|
+
|
167
|
+
/**
|
168
|
+
Correct the inability to style clickable types in iOS and Safari.
|
169
|
+
*/
|
170
|
+
|
171
|
+
button,
|
172
|
+
[type='button'],
|
173
|
+
[type='reset'],
|
174
|
+
[type='submit'] {
|
175
|
+
-webkit-appearance: button;
|
176
|
+
}
|
177
|
+
|
178
|
+
/**
|
179
|
+
Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.
|
180
|
+
*/
|
181
|
+
|
182
|
+
legend {
|
183
|
+
padding: 0;
|
184
|
+
}
|
185
|
+
|
186
|
+
/**
|
187
|
+
Add the correct vertical alignment in Chrome and Firefox.
|
188
|
+
*/
|
189
|
+
|
190
|
+
progress {
|
191
|
+
vertical-align: baseline;
|
192
|
+
}
|
193
|
+
|
194
|
+
/**
|
195
|
+
Correct the cursor style of increment and decrement buttons in Safari.
|
196
|
+
*/
|
197
|
+
|
198
|
+
::-webkit-inner-spin-button,
|
199
|
+
::-webkit-outer-spin-button {
|
200
|
+
height: auto;
|
201
|
+
}
|
202
|
+
|
203
|
+
/**
|
204
|
+
1. Correct the odd appearance in Chrome and Safari.
|
205
|
+
2. Correct the outline style in Safari.
|
206
|
+
*/
|
207
|
+
|
208
|
+
[type='search'] {
|
209
|
+
-webkit-appearance: textfield; /* 1 */
|
210
|
+
outline-offset: -2px; /* 2 */
|
211
|
+
}
|
212
|
+
|
213
|
+
/**
|
214
|
+
Remove the inner padding in Chrome and Safari on macOS.
|
215
|
+
*/
|
216
|
+
|
217
|
+
::-webkit-search-decoration {
|
218
|
+
-webkit-appearance: none;
|
219
|
+
}
|
220
|
+
|
221
|
+
/**
|
222
|
+
1. Correct the inability to style clickable types in iOS and Safari.
|
223
|
+
2. Change font properties to 'inherit' in Safari.
|
224
|
+
*/
|
225
|
+
|
226
|
+
::-webkit-file-upload-button {
|
227
|
+
-webkit-appearance: button; /* 1 */
|
228
|
+
font: inherit; /* 2 */
|
229
|
+
}
|
230
|
+
|
231
|
+
/*
|
232
|
+
Interactive
|
233
|
+
===========
|
234
|
+
*/
|
235
|
+
|
236
|
+
/*
|
237
|
+
Add the correct display in Chrome and Safari.
|
238
|
+
*/
|
239
|
+
|
240
|
+
summary {
|
241
|
+
display: list-item;
|
242
|
+
}
|