nitro_rails 0.1.0 → 0.1.2
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 +18 -0
- data/app/assets/audio/mousetap.mp3 +0 -0
- data/app/assets/config/nitro_rails_manifest.js +2 -0
- data/app/assets/images/nitro_rails/Aros2.png +0 -0
- data/app/assets/javascript/nitro_rails/application.js +4 -0
- data/app/assets/javascript/nitro_rails/controllers/application.js +9 -0
- data/app/assets/javascript/nitro_rails/controllers/audio_controller.js +16 -0
- data/app/assets/javascript/nitro_rails/controllers/clock_controller.js +21 -0
- data/app/assets/javascript/nitro_rails/controllers/editable_text_controller.js +61 -0
- data/app/assets/javascript/nitro_rails/controllers/index.js +21 -0
- data/app/assets/javascript/nitro_rails/controllers/nitro_collection_controller.js +127 -0
- data/app/assets/javascript/nitro_rails/controllers/nitro_controller.js +35 -0
- data/app/assets/javascript/nitro_rails/controllers/nitro_form_controller.js +81 -0
- data/app/assets/javascript/nitro_rails/controllers/panel_controller.js +70 -0
- data/app/assets/javascript/nitro_rails/controllers/panel_manager_controller.js +89 -0
- data/app/assets/javascript/nitro_rails/controllers/tabs_controller.js +81 -0
- data/app/assets/javascript/nitro_rails/controllers/time_zone_controller.js +47 -0
- data/app/assets/javascript/nitro_rails/controllers/togglable_checkbox_controller.js +9 -0
- data/app/assets/javascript/nitro_rails/helpers/device_info_helper.js +99 -0
- data/app/assets/javascript/nitro_rails/helpers/screen_info_helper.js +20 -0
- data/app/assets/javascript/nitro_rails/turbo_streams/clear_errors.js +22 -0
- data/app/assets/javascript/nitro_rails/turbo_streams/focus.js +8 -0
- data/app/assets/javascript/nitro_rails/turbo_streams/index.js +8 -0
- data/app/assets/javascript/nitro_rails/turbo_streams/insert.js +10 -0
- data/app/assets/javascript/nitro_rails/turbo_streams/redirect.js +10 -0
- data/app/assets/javascript/nitro_rails/turbo_streams/refresh_frame.js +9 -0
- data/app/assets/javascript/nitro_rails/turbo_streams/render_errors.js +26 -0
- data/app/assets/javascript/nitro_rails/turbo_streams/toggle_checkbox.js +9 -0
- data/app/assets/javascript/nitro_rails/turbo_streams/toggle_class.js +14 -0
- data/app/assets/stylesheets/nitro_rails/__reset.css +25 -0
- data/app/assets/stylesheets/nitro_rails/_base/_color.css +24 -0
- data/app/assets/stylesheets/nitro_rails/_base/_font.css +35 -0
- data/app/assets/stylesheets/nitro_rails/_base/_format.css +38 -0
- data/app/assets/stylesheets/nitro_rails/_base/_grayscale.css +79 -0
- data/app/assets/stylesheets/nitro_rails/_base/_utility.css +34 -0
- data/app/assets/stylesheets/nitro_rails/application.css +23 -0
- data/app/assets/stylesheets/nitro_rails/modules/action-navigation.css +24 -0
- data/app/assets/stylesheets/nitro_rails/modules/alert.css +31 -0
- data/app/assets/stylesheets/nitro_rails/modules/btn.css +57 -0
- data/app/assets/stylesheets/nitro_rails/modules/checkbox.css +42 -0
- data/app/assets/stylesheets/nitro_rails/modules/clickable.css +9 -0
- data/app/assets/stylesheets/nitro_rails/modules/clock.css +0 -0
- data/app/assets/stylesheets/nitro_rails/modules/editable-text.css +45 -0
- data/app/assets/stylesheets/nitro_rails/modules/forms.css +108 -0
- data/app/assets/stylesheets/nitro_rails/modules/hover-reveal.css +11 -0
- data/app/assets/stylesheets/nitro_rails/modules/inline-svg.css +14 -0
- data/app/assets/stylesheets/nitro_rails/modules/list.css +29 -0
- data/app/assets/stylesheets/nitro_rails/modules/main-navigation.css +20 -0
- data/app/assets/stylesheets/nitro_rails/modules/nitro-checkbox.css +42 -0
- data/app/assets/stylesheets/nitro_rails/modules/resource-collection.css +12 -0
- data/app/assets/stylesheets/nitro_rails/modules/search-bar.css +36 -0
- data/app/assets/stylesheets/nitro_rails/modules/settings.css +33 -0
- data/app/assets/stylesheets/nitro_rails/modules/tabs.css +38 -0
- data/app/assets/stylesheets/nitro_rails/modules/toggle-switch.css +60 -0
- data/app/assets/stylesheets/nitro_rails/panels/bound-card-dropdown-panel.css +0 -0
- data/app/assets/stylesheets/nitro_rails/panels/card-panel.css +0 -0
- data/app/assets/stylesheets/nitro_rails/panels/embedded-panel.css +31 -0
- data/app/assets/stylesheets/nitro_rails/panels/panel-display.css +111 -0
- data/app/assets/stylesheets/nitro_rails/panels/popup-panel.css +123 -0
- data/app/assets/stylesheets/nitro_rails/panels/side-panel.css +0 -0
- data/app/controllers/nitro_rails/sequence_controller.rb +64 -0
- data/app/helpers/nitro_rails/application_helper.rb +42 -1
- data/app/helpers/nitro_rails/color_helper.rb +23 -0
- data/app/helpers/nitro_rails/components_helper.rb +49 -0
- data/app/helpers/nitro_rails/inline_edit_helper.rb +48 -0
- data/app/helpers/nitro_rails/nitro_action_helper.rb +178 -0
- data/app/helpers/nitro_rails/nitro_collection_helper.rb +87 -0
- data/app/helpers/nitro_rails/nitro_edit_helper.rb +15 -0
- data/app/helpers/nitro_rails/nitro_form_helper.rb +104 -0
- data/app/helpers/nitro_rails/nitro_options_helper.rb +78 -0
- data/app/helpers/nitro_rails/nitro_tag_helper.rb +183 -0
- data/app/helpers/nitro_rails/panel_helper.rb +65 -0
- data/app/helpers/nitro_rails/resource_collection_helper.rb +66 -0
- data/app/helpers/nitro_rails/tabs_helper.rb +51 -0
- data/app/helpers/nitro_rails/turbo_stream_helper.rb +46 -0
- data/app/lib/nitro_rails/local_time.rb +51 -0
- data/app/lib/nitro_rails/performable_routes.rb +24 -0
- data/app/lib/nitro_rails/resource_collection.rb +183 -0
- data/app/lib/nitro_rails/sequential_routes.rb +36 -0
- data/app/lib/nitro_rails/time_interval.rb +88 -0
- data/app/lib/nitro_rails/time_string.rb +22 -0
- data/app/models/nitro_rails/broadcast.rb +76 -0
- data/app/models/nitro_rails/broadcastable_model.rb +91 -0
- data/app/models/nitro_rails/broadcastable_record.rb +118 -0
- data/app/models/nitro_rails/default_broadcasts.rb +149 -0
- data/app/models/nitro_rails/record.rb +50 -0
- data/app/pseudocode/nitro.html.erb +18 -0
- data/app/view_components/nitro_rails/nitro_collection/batch_selectable.rb +24 -0
- data/app/view_components/nitro_rails/nitro_collection.rb +66 -0
- data/app/view_components/nitro_rails/view_component.rb +9 -0
- data/app/views/layouts/nitro_rails/application.html.erb +3 -5
- data/app/views/nitro_rails/_editable_text.html.erb +32 -0
- data/app/views/nitro_rails/_nitro_checkbox.html.erb +5 -0
- data/app/views/nitro_rails/_nitro_form.html.erb +10 -0
- data/app/views/nitro_rails/_panel_frame_tag.html.erb +8 -0
- data/app/views/nitro_rails/_panel_template.html.erb +40 -0
- data/app/views/nitro_rails/_togglable_checkbox.html.erb +16 -0
- data/config/importmap.rb +1 -0
- data/config/initializers/date_formatters.rb +9 -0
- data/lib/nitro_rails/engine.rb +25 -0
- data/lib/nitro_rails/version.rb +1 -1
- metadata +166 -3
- data/app/models/nitro_rails/application_record.rb +0 -5
@@ -0,0 +1,42 @@
|
|
1
|
+
.checkbox [type='checkbox'] {
|
2
|
+
display: none;
|
3
|
+
}
|
4
|
+
|
5
|
+
.checkbox {
|
6
|
+
position: relative;
|
7
|
+
cursor: pointer;
|
8
|
+
}
|
9
|
+
|
10
|
+
.checkbox::before {
|
11
|
+
content: "";
|
12
|
+
display: block;
|
13
|
+
border: 2px solid var(--gray);
|
14
|
+
border-radius: 3px;
|
15
|
+
width: 15px;
|
16
|
+
height: 15px;
|
17
|
+
}
|
18
|
+
|
19
|
+
.checkbox::after {
|
20
|
+
content: "";
|
21
|
+
position: absolute;
|
22
|
+
display: block;
|
23
|
+
border-radius: 2px;
|
24
|
+
width: 13px;
|
25
|
+
height: 13px;
|
26
|
+
top: 3px;
|
27
|
+
right: 3px;
|
28
|
+
}
|
29
|
+
|
30
|
+
.checkbox:hover::after {
|
31
|
+
background-color: var(--gray);
|
32
|
+
}
|
33
|
+
|
34
|
+
.checkbox:has(:checked)::before {
|
35
|
+
border-color: var(--active-green);
|
36
|
+
border-color: white;
|
37
|
+
}
|
38
|
+
|
39
|
+
.checkbox:has(:checked)::after {
|
40
|
+
background-color: var(--active-green);
|
41
|
+
background-color: white;
|
42
|
+
}
|
File without changes
|
@@ -0,0 +1,45 @@
|
|
1
|
+
.editable-text-container {
|
2
|
+
position: relative;
|
3
|
+
}
|
4
|
+
|
5
|
+
.editable-text-content {
|
6
|
+
flex-direction: row;
|
7
|
+
align-items: center;
|
8
|
+
}
|
9
|
+
|
10
|
+
.editable-text-content .error-badge {
|
11
|
+
background-color: red;
|
12
|
+
margin-right: 10px;
|
13
|
+
font-size: var(--small-fs-2);
|
14
|
+
font-weight: bold;
|
15
|
+
text-align: center;
|
16
|
+
color: white;
|
17
|
+
line-height: 25px;
|
18
|
+
border-radius: 20px;
|
19
|
+
width: 25px;
|
20
|
+
height: 25px;
|
21
|
+
}
|
22
|
+
|
23
|
+
.editable-text-content .error-message {
|
24
|
+
font-size: var(--small-fs-2);
|
25
|
+
background-color: rgba(255, 0, 0, 0.8);
|
26
|
+
backdrop-filter: blur(5px);
|
27
|
+
font-weight: bold;
|
28
|
+
color: white;
|
29
|
+
margin-right: 10px;
|
30
|
+
padding: 5px;
|
31
|
+
border-radius: 3px;
|
32
|
+
margin-left: 5px;
|
33
|
+
position: absolute;
|
34
|
+
top: -30px;
|
35
|
+
left: 20px;
|
36
|
+
width: fit-content;
|
37
|
+
}
|
38
|
+
|
39
|
+
.error-badge, .error-message {
|
40
|
+
display: none;
|
41
|
+
}
|
42
|
+
|
43
|
+
.error-badge.visible, .error-message.visible {
|
44
|
+
display: block;
|
45
|
+
}
|
@@ -0,0 +1,108 @@
|
|
1
|
+
.form {
|
2
|
+
gap: 30px;
|
3
|
+
/* align-items: flex-start; */
|
4
|
+
}
|
5
|
+
|
6
|
+
.form .label-detail {
|
7
|
+
font-size: var(--small-fs-2);
|
8
|
+
}
|
9
|
+
|
10
|
+
.form .field {
|
11
|
+
gap: 5px;
|
12
|
+
}
|
13
|
+
|
14
|
+
.form label {
|
15
|
+
font-size: var(--small-fs-2);
|
16
|
+
color: var(--foreground-3);
|
17
|
+
font-weight: bold;
|
18
|
+
text-transform: uppercase;
|
19
|
+
}
|
20
|
+
|
21
|
+
.form label::after {
|
22
|
+
content: ":";
|
23
|
+
}
|
24
|
+
|
25
|
+
.form .error-message {
|
26
|
+
text-transform: uppercase;
|
27
|
+
font-size: var(--small-fs-2);
|
28
|
+
color: red;
|
29
|
+
font-weight: 600;
|
30
|
+
}
|
31
|
+
|
32
|
+
.form input[type="text"],
|
33
|
+
.form input[type="email"],
|
34
|
+
.form input[type="password"],
|
35
|
+
.form input[type="date"],
|
36
|
+
.form input[type="datetime-local"],
|
37
|
+
.form input[type="time"] {
|
38
|
+
font-size: var(--large-fs);
|
39
|
+
padding: 6px 12px;
|
40
|
+
border: none;
|
41
|
+
border-bottom: 1px solid var(--backdrop-6);
|
42
|
+
outline-color: var(--theme-accent);
|
43
|
+
max-width: 350px;
|
44
|
+
background-color: var(--backdrop-1);
|
45
|
+
color: var(--foreground-1);
|
46
|
+
}
|
47
|
+
|
48
|
+
.popup.panel-container .form input[type="text"],
|
49
|
+
.popup.panel-container .form input[type="email"],
|
50
|
+
.popup.panel-container .form input[type="password"],
|
51
|
+
.popup.panel-container .form input[type="date"],
|
52
|
+
.popup.panel-container .form input[type="datetime-local"],
|
53
|
+
.popup.panel-container .form input[type="time"] {
|
54
|
+
max-width: 100%;
|
55
|
+
}
|
56
|
+
|
57
|
+
.form input[type="text"]:focus,
|
58
|
+
.form input[type="email"]:focus,
|
59
|
+
.form input[type="password"]:focus,
|
60
|
+
.form input[type="date"]:focus,
|
61
|
+
.form input[type="datetime-local"]:focus,
|
62
|
+
.form input[type="time"]:focus {
|
63
|
+
outline: none;
|
64
|
+
border-color: var(--theme-accent);
|
65
|
+
background-color: var(--backdrop-3);
|
66
|
+
}
|
67
|
+
|
68
|
+
.form textarea {
|
69
|
+
width: 500px;
|
70
|
+
max-width: 100%;
|
71
|
+
box-sizing: border-box;
|
72
|
+
height: 150px;
|
73
|
+
padding: 15px 20px;
|
74
|
+
|
75
|
+
color: var(--foreground-1);
|
76
|
+
background-color: var(--backdrop-2);
|
77
|
+
border: none;
|
78
|
+
border-radius: 5px;
|
79
|
+
|
80
|
+
font-size: var(--large-fs);
|
81
|
+
}
|
82
|
+
|
83
|
+
.form input::placeholder,
|
84
|
+
.form textarea::placeholder {
|
85
|
+
font-weight: 200;
|
86
|
+
font-style: italic;
|
87
|
+
}
|
88
|
+
|
89
|
+
.form .actions {
|
90
|
+
margin-top: 25px;
|
91
|
+
margin-bottom: 25px;
|
92
|
+
|
93
|
+
flex-direction: row;
|
94
|
+
gap: 10px;
|
95
|
+
align-items: center;
|
96
|
+
}
|
97
|
+
|
98
|
+
/* Devise */
|
99
|
+
|
100
|
+
.devise-link {
|
101
|
+
margin-left: 10px;
|
102
|
+
font-weight: 600;
|
103
|
+
color: var(--accent);
|
104
|
+
}
|
105
|
+
|
106
|
+
.devise-link:hover {
|
107
|
+
text-decoration: underline;
|
108
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
.list {
|
2
|
+
/* margin-left: -10px; */
|
3
|
+
gap: 5px;
|
4
|
+
}
|
5
|
+
|
6
|
+
.list--arrow-detail a::after {
|
7
|
+
position: absolute;
|
8
|
+
content: "›";
|
9
|
+
margin-left: 10px;
|
10
|
+
right: 10px;
|
11
|
+
top: 7px;
|
12
|
+
font-weight: 300;
|
13
|
+
color: var(--foreground-1);
|
14
|
+
font-style: normal;
|
15
|
+
}
|
16
|
+
|
17
|
+
.list--basic-link a {
|
18
|
+
font-size: var(--large-fs-2);
|
19
|
+
font-weight: 400;
|
20
|
+
width: 100%;
|
21
|
+
padding: 10px;
|
22
|
+
border-radius: 5px;
|
23
|
+
position: relative;
|
24
|
+
}
|
25
|
+
|
26
|
+
.list--basic-link a:hover {
|
27
|
+
background-color: var(--backdrop-3)
|
28
|
+
}
|
29
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
.main-navigation {
|
2
|
+
display: flex;
|
3
|
+
flex-direction: row;
|
4
|
+
gap: 30px;
|
5
|
+
align-items: center;
|
6
|
+
justify-content: flex-end;
|
7
|
+
padding: 20px var(--side-padding);
|
8
|
+
/* background-color: var(--backdrop-4); */
|
9
|
+
}
|
10
|
+
|
11
|
+
.main-navigation a,
|
12
|
+
.main-navigation button {
|
13
|
+
text-transform: capitalize;
|
14
|
+
font-weight: 500;
|
15
|
+
}
|
16
|
+
|
17
|
+
.main-navigation a:hover,
|
18
|
+
.main-navigation button:hover {
|
19
|
+
/* text-decoration: underline; */
|
20
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
.nitro-checkbox [type='checkbox'] {
|
2
|
+
display: none;
|
3
|
+
}
|
4
|
+
|
5
|
+
.nitro-checkbox {
|
6
|
+
position: relative;
|
7
|
+
cursor: pointer;
|
8
|
+
}
|
9
|
+
|
10
|
+
.nitro-checkbox::before {
|
11
|
+
content: "";
|
12
|
+
display: block;
|
13
|
+
border: 2px solid var(--gray);
|
14
|
+
border-radius: 3px;
|
15
|
+
width: 15px;
|
16
|
+
height: 15px;
|
17
|
+
}
|
18
|
+
|
19
|
+
.nitro-checkbox::after {
|
20
|
+
content: "";
|
21
|
+
position: absolute;
|
22
|
+
display: block;
|
23
|
+
border-radius: 2px;
|
24
|
+
width: 13px;
|
25
|
+
height: 13px;
|
26
|
+
top: 3px;
|
27
|
+
right: 3px;
|
28
|
+
}
|
29
|
+
|
30
|
+
.nitro-checkbox:hover::after {
|
31
|
+
background-color: var(--gray);
|
32
|
+
}
|
33
|
+
|
34
|
+
.nitro-checkbox:has(:checked)::before {
|
35
|
+
border-color: var(--active-green);
|
36
|
+
border-color: white;
|
37
|
+
}
|
38
|
+
|
39
|
+
.nitro-checkbox:has(:checked)::after {
|
40
|
+
background-color: var(--active-green);
|
41
|
+
background-color: white;
|
42
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
.search-bar {
|
2
|
+
align-items: center;
|
3
|
+
gap: 5px;
|
4
|
+
border: 1px solid var(--backdrop-9);
|
5
|
+
border-radius: 5px;
|
6
|
+
padding: 3px 7px;
|
7
|
+
background-color: var(--backdrop-3);
|
8
|
+
overflow: hidden;
|
9
|
+
}
|
10
|
+
|
11
|
+
.search-bar .fa-search {
|
12
|
+
color: var(--backdrop-9);
|
13
|
+
font-size: var(--small-fs-2);
|
14
|
+
}
|
15
|
+
|
16
|
+
.search-bar input[type="text"] {
|
17
|
+
color: var(--foreground-1);
|
18
|
+
background-color: transparent;
|
19
|
+
border: none;
|
20
|
+
width: auto;
|
21
|
+
min-width: auto;
|
22
|
+
max-width: auto;
|
23
|
+
}
|
24
|
+
|
25
|
+
.search-bar:has(input[type="text"]:focus) {
|
26
|
+
border: 1px solid var(--theme-accent);
|
27
|
+
background-color: var(--backdrop-1);
|
28
|
+
}
|
29
|
+
|
30
|
+
.search-bar:has(input[type="text"]:focus) .fa-search {
|
31
|
+
color: var(--theme-accent);
|
32
|
+
}
|
33
|
+
|
34
|
+
.search-bar input[type="text"]:focus {
|
35
|
+
outline: none;
|
36
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
.settings {
|
2
|
+
margin-top: 10px;
|
3
|
+
max-width: 500px;
|
4
|
+
}
|
5
|
+
|
6
|
+
.settings li label {
|
7
|
+
display: flex;
|
8
|
+
flex-direction: row;
|
9
|
+
align-items: center;
|
10
|
+
justify-content: space-between;
|
11
|
+
}
|
12
|
+
|
13
|
+
.settings li {
|
14
|
+
background-color: var(--backdrop-4);
|
15
|
+
border-radius: 5px;
|
16
|
+
}
|
17
|
+
|
18
|
+
.settings li > a,
|
19
|
+
.settings li > label,
|
20
|
+
.settings li > .button_to button[type="submit"] {
|
21
|
+
padding: 15px 20px;
|
22
|
+
width: 100%;
|
23
|
+
box-sizing: border-box;
|
24
|
+
text-align: left;
|
25
|
+
font-weight: 600;
|
26
|
+
cursor: pointer;
|
27
|
+
}
|
28
|
+
|
29
|
+
.settings li > a:hover,
|
30
|
+
.settings li > .button_to button[type="submit"]:hover {
|
31
|
+
text-decoration: none;
|
32
|
+
color: var(--foreground-8);
|
33
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
.tabs-container {
|
2
|
+
display: flex;
|
3
|
+
flex-direction: column;
|
4
|
+
gap: 15px;
|
5
|
+
}
|
6
|
+
|
7
|
+
.tabs {
|
8
|
+
display: flex;
|
9
|
+
flex-direction: row;
|
10
|
+
gap: 5px;
|
11
|
+
position: sticky;
|
12
|
+
top: 0;
|
13
|
+
z-index: 100;
|
14
|
+
}
|
15
|
+
|
16
|
+
.tabs .tab {
|
17
|
+
padding: 5px 10px;
|
18
|
+
border-radius: 8px;
|
19
|
+
font-size: 0.9rem;
|
20
|
+
font-weight: bold;
|
21
|
+
transition: background-color 0.3s ease, color 0.3s ease;
|
22
|
+
color: var(--foreground-8);
|
23
|
+
}
|
24
|
+
|
25
|
+
.tabs .tab:hover {
|
26
|
+
background-color: var(--backdrop-6);
|
27
|
+
color: var(--foreground-1);
|
28
|
+
}
|
29
|
+
|
30
|
+
.tabs .tab.active {
|
31
|
+
background-color: var(--backdrop-6);
|
32
|
+
color: var(--foreground-1);
|
33
|
+
pointer-events: none; /* Prevents click events */
|
34
|
+
}
|
35
|
+
|
36
|
+
.tabs-container .tab-screen {
|
37
|
+
gap: 10px;
|
38
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
/* TOGGLE SWITCH */
|
2
|
+
|
3
|
+
/* Hide the default checkbox */
|
4
|
+
.toggle input[type="checkbox"] {
|
5
|
+
display: none;
|
6
|
+
}
|
7
|
+
|
8
|
+
/* Style the toggle switch */
|
9
|
+
.toggle {
|
10
|
+
display: inline-block;
|
11
|
+
position: relative;
|
12
|
+
width: 50px;
|
13
|
+
height: 25px;
|
14
|
+
border-radius: 20px;
|
15
|
+
background-color: #ccc;
|
16
|
+
cursor: pointer;
|
17
|
+
}
|
18
|
+
|
19
|
+
/* Style the toggle switch when it's checked */
|
20
|
+
.toggle input[type="checkbox"]:checked + .switch {
|
21
|
+
background-color: var(--theme-accent);
|
22
|
+
}
|
23
|
+
|
24
|
+
.toggle input[type="checkbox"]:checked + .switch:before {
|
25
|
+
right: 2px;
|
26
|
+
left: auto;
|
27
|
+
}
|
28
|
+
|
29
|
+
/* Style the switch */
|
30
|
+
.switch {
|
31
|
+
position: absolute;
|
32
|
+
top: 0;
|
33
|
+
left: 0;
|
34
|
+
right: 0;
|
35
|
+
bottom: 0;
|
36
|
+
border-radius: 20px;
|
37
|
+
transition: .4s;
|
38
|
+
}
|
39
|
+
|
40
|
+
/* Style the circle inside the switch */
|
41
|
+
.switch:before {
|
42
|
+
position: absolute;
|
43
|
+
content: "";
|
44
|
+
height: 21px;
|
45
|
+
width: 21px;
|
46
|
+
left: 2px;
|
47
|
+
bottom: 2px;
|
48
|
+
border-radius: 50%;
|
49
|
+
background-color: #fff;
|
50
|
+
transition: .4s;
|
51
|
+
background-color: white;
|
52
|
+
}
|
53
|
+
|
54
|
+
|
55
|
+
/* Style the label */
|
56
|
+
.toggle label {
|
57
|
+
display: block;
|
58
|
+
height: 100%;
|
59
|
+
width: 100%;
|
60
|
+
}
|
File without changes
|
File without changes
|
@@ -0,0 +1,31 @@
|
|
1
|
+
.embedded.panel-container {
|
2
|
+
position: relative;
|
3
|
+
}
|
4
|
+
|
5
|
+
.embedded.panel-container > a {
|
6
|
+
padding: 15px 20px;
|
7
|
+
margin: -17px -22px;
|
8
|
+
border-radius: 10px 10px 0 0;
|
9
|
+
box-sizing: border-box;
|
10
|
+
border: 2px solid transparent;
|
11
|
+
z-index: 1005;
|
12
|
+
}
|
13
|
+
|
14
|
+
.embedded.panel-container.active > a {
|
15
|
+
background-color: var(--backdrop-1);
|
16
|
+
border: 2px solid var(--backdrop-3);
|
17
|
+
border-bottom: none;
|
18
|
+
}
|
19
|
+
|
20
|
+
.right.embedded.panel-container .panel-display {
|
21
|
+
border-radius: 10px 0 10px 10px;
|
22
|
+
right: -22px;
|
23
|
+
top: 36px;
|
24
|
+
}
|
25
|
+
|
26
|
+
.left.embedded.panel-container .panel-display {
|
27
|
+
border-radius: 0 10px 10px 10px;
|
28
|
+
left: -22px;
|
29
|
+
top: 36px;
|
30
|
+
}
|
31
|
+
|
@@ -0,0 +1,111 @@
|
|
1
|
+
.panel-container {
|
2
|
+
position: relative;
|
3
|
+
}
|
4
|
+
|
5
|
+
.panel-display {
|
6
|
+
container-type: inline-size;
|
7
|
+
position: absolute;
|
8
|
+
overflow: scroll;
|
9
|
+
|
10
|
+
z-index: 1000;
|
11
|
+
|
12
|
+
width: 350px;
|
13
|
+
height: fit-content(1ch);
|
14
|
+
max-height: 80vh;
|
15
|
+
max-width: 100vw;
|
16
|
+
|
17
|
+
text-align: left;
|
18
|
+
|
19
|
+
box-sizing: border-box;
|
20
|
+
|
21
|
+
border-radius: 10px;
|
22
|
+
|
23
|
+
flex-direction: column;
|
24
|
+
background-color: var(--backdrop-1);
|
25
|
+
border: 2px solid var(--backdrop-3);
|
26
|
+
|
27
|
+
-ms-overflow-style: none; /* Internet Explorer 10+ */
|
28
|
+
scrollbar-width: none; /* Firefox */
|
29
|
+
}
|
30
|
+
|
31
|
+
.panel-display .content {
|
32
|
+
padding: 20px;
|
33
|
+
}
|
34
|
+
|
35
|
+
.panel-display::-webkit-scrollbar {
|
36
|
+
display: none; /* Safari and Chrome */
|
37
|
+
}
|
38
|
+
|
39
|
+
.panel-display .load-screen {
|
40
|
+
height: 250px;
|
41
|
+
line-height: 240px;
|
42
|
+
width: 100%;
|
43
|
+
text-align: center;
|
44
|
+
font-weight: 800;
|
45
|
+
color: var(--backdrop-6);
|
46
|
+
text-transform: uppercase;
|
47
|
+
font-style: italic;
|
48
|
+
}
|
49
|
+
|
50
|
+
.panel--overlay {
|
51
|
+
border-radius: 10px;
|
52
|
+
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.5);
|
53
|
+
backdrop-filter: blur(15px) brightness(1);
|
54
|
+
-webkit-backdrop-filter: blur(15px) brightness(1);
|
55
|
+
background-color: rgba(255, 255, 255, 0.5);
|
56
|
+
border: 2px solid rgba(235, 235, 235, 0.5);
|
57
|
+
}
|
58
|
+
|
59
|
+
.dark-mode .panel--overlay {
|
60
|
+
background-color: rgba(10, 10, 10, 0.5);
|
61
|
+
border: 2px solid rgba(50, 50, 50, 0.5);
|
62
|
+
}
|
63
|
+
|
64
|
+
.panel-frame-container, .panel-display turbo-frame, .panel-display .content {
|
65
|
+
min-height: 100%;
|
66
|
+
height: 100%;
|
67
|
+
}
|
68
|
+
|
69
|
+
|
70
|
+
/* MEDIA QUERY MOBILE */
|
71
|
+
|
72
|
+
@media (max-width: 768px) {
|
73
|
+
.panel-display {
|
74
|
+
border-radius: 0;
|
75
|
+
position: fixed;
|
76
|
+
bottom: 0;
|
77
|
+
left: 0;
|
78
|
+
right: 0;
|
79
|
+
top: auto;
|
80
|
+
width: 100vw;
|
81
|
+
min-height: 100px;
|
82
|
+
padding: 20px;
|
83
|
+
/* color: black; */
|
84
|
+
border-top-right-radius: 20px;
|
85
|
+
border-top-left-radius: 20px;
|
86
|
+
z-index: 100;
|
87
|
+
padding: 20px;
|
88
|
+
text-align: center;
|
89
|
+
max-height: 85vh;
|
90
|
+
background-color: var(--backdrop-3);
|
91
|
+
border: none;
|
92
|
+
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.5);
|
93
|
+
}
|
94
|
+
|
95
|
+
.panel-container.active > a {
|
96
|
+
background-color: transparent;
|
97
|
+
border: none;
|
98
|
+
border-bottom: none;
|
99
|
+
z-index: -1;
|
100
|
+
}
|
101
|
+
|
102
|
+
.panel-display .content {
|
103
|
+
padding: 0px;
|
104
|
+
--backdrop-4: var(--backdrop-6);
|
105
|
+
}
|
106
|
+
|
107
|
+
.panel-container > a {
|
108
|
+
/* border-radius: 0; */
|
109
|
+
/* margin: 0; */
|
110
|
+
}
|
111
|
+
}
|