panda_cms 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of panda_cms might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/README.md +72 -0
- data/Rakefile +8 -0
- data/app/assets/builds/panda_cms.css +1 -0
- data/app/assets/config/panda_cms_manifest.js +1 -0
- data/app/assets/stylesheets/panda_cms/application.tailwind.css +30 -0
- data/app/builders/panda_cms/form_builder.rb +118 -0
- data/app/components/panda_cms/admin/button_component.rb +65 -0
- data/app/components/panda_cms/admin/container_component.html.erb +13 -0
- data/app/components/panda_cms/admin/container_component.rb +11 -0
- data/app/components/panda_cms/admin/flash_message_component.html.erb +30 -0
- data/app/components/panda_cms/admin/flash_message_component.rb +44 -0
- data/app/components/panda_cms/admin/heading_component.rb +38 -0
- data/app/components/panda_cms/admin/slideover_component.html.erb +9 -0
- data/app/components/panda_cms/admin/slideover_component.rb +13 -0
- data/app/components/panda_cms/admin/tab_bar_component.html.erb +35 -0
- data/app/components/panda_cms/admin/tab_bar_component.rb +13 -0
- data/app/components/panda_cms/grid_component.html.erb +6 -0
- data/app/components/panda_cms/grid_component.rb +13 -0
- data/app/components/panda_cms/menu_component.html.erb +3 -0
- data/app/components/panda_cms/menu_component.rb +18 -0
- data/app/components/panda_cms/page_menu_component.html.erb +24 -0
- data/app/components/panda_cms/page_menu_component.rb +24 -0
- data/app/components/panda_cms/rich_text_component.html.erb +40 -0
- data/app/components/panda_cms/rich_text_component.rb +35 -0
- data/app/components/panda_cms/text_component.rb +63 -0
- data/app/constraints/panda_cms/admin_constraint.rb +16 -0
- data/app/controllers/panda_cms/admin/block_contents_controller.rb +42 -0
- data/app/controllers/panda_cms/admin/dashboard_controller.rb +15 -0
- data/app/controllers/panda_cms/admin/files_controller.rb +17 -0
- data/app/controllers/panda_cms/admin/menus_controller.rb +81 -0
- data/app/controllers/panda_cms/admin/pages_controller.rb +88 -0
- data/app/controllers/panda_cms/admin/sessions_controller.rb +72 -0
- data/app/controllers/panda_cms/application_controller.rb +51 -0
- data/app/controllers/panda_cms/errors_controller.rb +31 -0
- data/app/controllers/panda_cms/pages_controller.rb +33 -0
- data/app/helpers/panda_cms/admin/files_helper.rb +4 -0
- data/app/helpers/panda_cms/admin/pages_helper.rb +4 -0
- data/app/helpers/panda_cms/application_helper.rb +91 -0
- data/app/helpers/panda_cms/pages_helper.rb +4 -0
- data/app/helpers/panda_cms/theme_helper.rb +16 -0
- data/app/javascript/panda_cms/base.js +37 -0
- data/app/javascript/panda_cms/controllers/menu_controller.js +19 -0
- data/app/javascript/panda_cms/controllers/rich_text_editor_controller.js +59 -0
- data/app/javascript/panda_cms/controllers/text_field_update_controller.js +23 -0
- data/app/javascript/panda_cms/vendor/stimulus-components-rails-nested-form.js +2 -0
- data/app/javascript/panda_cms/vendor/tailwindcss-stimulus-components.js +2 -0
- data/app/jobs/panda_cms/application_job.rb +4 -0
- data/app/lib/panda_cms/demo_site_generator.rb +70 -0
- data/app/lib/panda_cms/slug.rb +21 -0
- data/app/mailers/panda_cms/application_mailer.rb +6 -0
- data/app/models/panda_cms/application_record.rb +5 -0
- data/app/models/panda_cms/block.rb +32 -0
- data/app/models/panda_cms/block_content.rb +16 -0
- data/app/models/panda_cms/block_content_version.rb +6 -0
- data/app/models/panda_cms/breadcrumb.rb +10 -0
- data/app/models/panda_cms/current.rb +15 -0
- data/app/models/panda_cms/menu.rb +50 -0
- data/app/models/panda_cms/menu_item.rb +56 -0
- data/app/models/panda_cms/page.rb +86 -0
- data/app/models/panda_cms/page_version.rb +6 -0
- data/app/models/panda_cms/redirect.rb +9 -0
- data/app/models/panda_cms/template.rb +44 -0
- data/app/models/panda_cms/template_version.rb +6 -0
- data/app/models/panda_cms/user.rb +11 -0
- data/app/models/panda_cms/version.rb +6 -0
- data/app/models/panda_cms/visit.rb +7 -0
- data/app/views/layouts/panda_cms/application.html.erb +68 -0
- data/app/views/layouts/panda_cms/public.html.erb +3 -0
- data/app/views/panda_cms/admin/dashboard/show.html.erb +8 -0
- data/app/views/panda_cms/admin/files/index.html.erb +124 -0
- data/app/views/panda_cms/admin/files/show.html.erb +2 -0
- data/app/views/panda_cms/admin/menus/_form.html.erb +21 -0
- data/app/views/panda_cms/admin/menus/_menu_item_fields.html.erb +7 -0
- data/app/views/panda_cms/admin/menus/edit.html.erb +58 -0
- data/app/views/panda_cms/admin/menus/index.html.erb +32 -0
- data/app/views/panda_cms/admin/menus/new.html.erb +5 -0
- data/app/views/panda_cms/admin/pages/edit.html.erb +35 -0
- data/app/views/panda_cms/admin/pages/index.html.erb +46 -0
- data/app/views/panda_cms/admin/pages/new.html.erb +16 -0
- data/app/views/panda_cms/admin/pages/show.html.erb +1 -0
- data/app/views/panda_cms/admin/sessions/new.html.erb +39 -0
- data/app/views/panda_cms/admin/shared/_breadcrumbs.html.erb +25 -0
- data/app/views/panda_cms/admin/shared/_flash.html.erb +5 -0
- data/app/views/panda_cms/admin/shared/_sidebar.html.erb +29 -0
- data/app/views/panda_cms/shared/_favicons.html.erb +9 -0
- data/app/views/panda_cms/shared/_footer.html.erb +2 -0
- data/app/views/panda_cms/shared/_header.html.erb +19 -0
- data/config/importmap.rb +7 -0
- data/config/initializers/panda_cms/form_errors.rb +38 -0
- data/config/initializers/panda_cms.rb +42 -0
- data/config/locales/en.yml +13 -0
- data/config/routes.rb +26 -0
- data/config/tailwind.config.js +31 -0
- data/config/tailwind.embed.config.js +20 -0
- data/db/migrate/20240205223709_create_panda_cms_pages.rb +9 -0
- data/db/migrate/20240219213327_create_panda_cms_page_versions.rb +14 -0
- data/db/migrate/20240303002805_create_panda_cms_templates.rb +11 -0
- data/db/migrate/20240303003434_create_panda_cms_template_versions.rb +14 -0
- data/db/migrate/20240303022441_create_panda_cms_blocks.rb +13 -0
- data/db/migrate/20240303024256_create_panda_cms_block_contents.rb +10 -0
- data/db/migrate/20240303024746_create_panda_cms_block_content_versions.rb +14 -0
- data/db/migrate/20240303233238_add_panda_cms_menu_table.rb +10 -0
- data/db/migrate/20240303234724_add_panda_cms_menu_item_table.rb +12 -0
- data/db/migrate/20240304134343_add_parent_id_to_panda_cms_pages.rb +5 -0
- data/db/migrate/20240315125421_add_nested_sets_to_panda_cms_pages.rb +16 -0
- data/db/migrate/20240316212822_add_kind_to_panda_cms_menus.rb +6 -0
- data/db/migrate/20240316221425_add_start_page_to_panda_cms_menus.rb +5 -0
- data/db/migrate/20240316230706_add_nested_to_panda_cms_menu_items.rb +24 -0
- data/db/migrate/20240317010532_create_panda_cms_users.rb +12 -0
- data/db/migrate/20240317161534_add_max_uses_to_panda_cms_template.rb +7 -0
- data/db/migrate/20240317163053_reset_counter_cache_on_panda_cms_template.rb +5 -0
- data/db/migrate/20240317214827_create_panda_cms_redirects.rb +15 -0
- data/db/migrate/20240317230622_create_panda_cms_visits.rb +13 -0
- data/db/migrate/20240324205703_create_active_storage_tables.active_storage.rb +58 -0
- data/db/migrate/20240408084718_default_panda_cms_users_admin_to_false.rb +5 -0
- data/db/seeds.rb +4 -0
- data/lib/generators/panda_cms/install_generator.rb +32 -0
- data/lib/panda_cms/engine.rb +172 -0
- data/lib/panda_cms/exceptions_app.rb +24 -0
- data/lib/panda_cms/version.rb +3 -0
- data/lib/panda_cms.rb +14 -0
- data/lib/tasks/panda_cms.rake +67 -0
- data/lib/templates/erb/scaffold/_form.html.erb.tt +43 -0
- data/lib/templates/erb/scaffold/edit.html.erb.tt +8 -0
- data/lib/templates/erb/scaffold/index.html.erb.tt +14 -0
- data/lib/templates/erb/scaffold/new.html.erb.tt +7 -0
- data/lib/templates/erb/scaffold/partial.html.erb.tt +22 -0
- data/lib/templates/erb/scaffold/show.html.erb.tt +15 -0
- data/public/panda-cms-assets/android-chrome-192x192.png +0 -0
- data/public/panda-cms-assets/android-chrome-512x512.png +0 -0
- data/public/panda-cms-assets/apple-touch-icon.png +0 -0
- data/public/panda-cms-assets/browserconfig.xml +9 -0
- data/public/panda-cms-assets/editable.js +212 -0
- data/public/panda-cms-assets/favicon-16x16.png +0 -0
- data/public/panda-cms-assets/favicon-32x32.png +0 -0
- data/public/panda-cms-assets/favicon.ico +0 -0
- data/public/panda-cms-assets/mstile-150x150.png +0 -0
- data/public/panda-cms-assets/panda-logo-screenprint.png +0 -0
- data/public/panda-cms-assets/panda-nav.png +0 -0
- data/public/panda-cms-assets/safari-pinned-tab.svg +61 -0
- data/public/panda-cms-assets/site.webmanifest +14 -0
- data/public/panda-cms-assets/stimulus-loading.js +113 -0
- metadata +845 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4a0b832ae3234611dca00504739648b711dc6383684c07a3fc0a19ef05a7bfda
|
4
|
+
data.tar.gz: 94d6912e1ae61031190bdce5a94f1ab908332931532429013828500f5b0fa1e2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7e8da5a109084feeb8e60a3dad73625945430c4485af95530d59f7bf97ae6525d30970cb9e21a7a1af3a1cd20f7c9471aac9168bb20873455268329a5db1e9fb
|
7
|
+
data.tar.gz: 25067bd5eb4b7add13ca3dc2b5ae2cd933971c468e3d83d32d8bbc08c6cccb150407173d16045279d4e73a23098154c8614045e5333f5d2753f393d43094be24
|
data/README.md
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
# Panda CMS
|
2
|
+
|
3
|
+
> [!CAUTION]
|
4
|
+
> This application is being developed in public. It is not ready for production use. If you'd like to try it out (or help with documentation), please contact [@jfi](https://github.com/jfi).
|
5
|
+
|
6
|
+
## Panda CMS is the CMS we always wanted. 🐼
|
7
|
+
|
8
|
+
Better websites, on Rails.
|
9
|
+
|
10
|
+
[Read more about the project...](https://github.com/pandacms/.github/blob/main/profile/README.md) ✨
|
11
|
+
|
12
|
+
We're [Otaina](https://www.otaina.co.uk), a small group of freelancers. We needed something that could handle websites large and small – but where we could expand it too. We sent our first websites live in March 2024.
|
13
|
+
|
14
|
+
![GitHub Last Commit](https://img.shields.io/github/last-commit/pandacms/panda_cms) [![Ruby Code Style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/standardrb/standard)
|
15
|
+
|
16
|
+
## Usage
|
17
|
+
|
18
|
+
To create a new Rails app[^1], run the command below, replacing `demo` with the name of the application you want to create:
|
19
|
+
|
20
|
+
```
|
21
|
+
rails new demo $(curl -fsSL https://raw.githubusercontent.com/pandacms/generator/main/.railsrc) -m https://raw.githubusercontent.com/pandacms/generator/main/template.rb
|
22
|
+
```
|
23
|
+
|
24
|
+
`cd` into your directory (e.g. `demo`) and run `bin/dev`. You'll see a basic website has automatically been created for you at http://localhost:3000/
|
25
|
+
|
26
|
+
The easiest way for you to get started is to visit http://localhost:3000/admin and login with your GitHub credentials. As the first user, you'll automatically have an administrator account created.
|
27
|
+
|
28
|
+
### Existing applications
|
29
|
+
|
30
|
+
Add the following to `Gemfile`:
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
source "https://rubygems.pkg.github.com/pandacms" do
|
34
|
+
gem "panda_cms"
|
35
|
+
end
|
36
|
+
```
|
37
|
+
|
38
|
+
For initial setup, run:
|
39
|
+
|
40
|
+
```shell
|
41
|
+
bundle install
|
42
|
+
rails generate panda_cms:install
|
43
|
+
rails db:migrate
|
44
|
+
rails db:seed
|
45
|
+
```
|
46
|
+
|
47
|
+
If you don't want to use GitHub to login, you'll need to configure a user provider (in `config/initializers/panda_cms.rb`), and then set your user's `admin` attribute to `true` once you've first tried to login. (And yes, there should be a better first-time setup experience than this. We're working on it!)
|
48
|
+
|
49
|
+
## Gotchas
|
50
|
+
|
51
|
+
This is a non-exhuastive list (there will be many more):
|
52
|
+
|
53
|
+
* To date, this has only been tested with Rails 7.1.
|
54
|
+
* Assets will be automatically loaded if you are using `importmap-rails`. This hasn't yet been tested with Sprockets support.
|
55
|
+
* This assumes you're using Tailwind CSS for your frontend. We'll attempt to relax this in future, but supporting Tailwind CSS is our current priority.
|
56
|
+
* If you change your login path from `/admin` the GitHub application we supply won't work on first login, so probably don't do that until you're setup!
|
57
|
+
|
58
|
+
## Contributing
|
59
|
+
|
60
|
+
We welcome contributions.
|
61
|
+
|
62
|
+
See our [Contributing Guidelines](https://github.com/pandacms/panda_cms/blob/main/CONTRIBUTING.md).
|
63
|
+
|
64
|
+
See [Credits](https://github.com/pandacms/panda_cms/blob/main/CREDITS.md) for thanks, influences, libraries and other credits.
|
65
|
+
|
66
|
+
## License
|
67
|
+
|
68
|
+
The gem is available as open source under the terms of the [BSD-3-Clause License](https://opensource.org/licenses/bsd-3-clause).
|
69
|
+
|
70
|
+
Copyright © 2024, Otaina Limited.
|
71
|
+
|
72
|
+
[^1]: You can of course use an existing Rails app, but on your head be it – we haven't tested this at all yet!
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
/*! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],select,textarea{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,select:focus,textarea:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#2563eb;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000;outline-offset:2px}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-bottom:0;padding-top:0}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:#6b7280;border-width:1px;color:#2563eb;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000;outline-offset:2px}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E")}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=checkbox]:indeterminate,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:#0000}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:100% 100%}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:#0000}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}html{font-family:colfax-web,system-ui,sans-serif}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.aspect-h-7{--tw-aspect-h:7}.aspect-w-10{--tw-aspect-w:10;padding-bottom:calc(var(--tw-aspect-h)/var(--tw-aspect-w)*100%);position:relative}.aspect-w-10>*{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.-inset-1{inset:-.25rem}.-inset-1\.5{inset:-.375rem}.inset-0{inset:0}.inset-y-0{bottom:0;top:0}.left-0{left:0}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-2{top:.5rem}.z-10{z-index:10}.z-50{z-index:50}.col-span-3{grid-column:span 3/span 3}.m-0{margin:0}.m-2{margin:.5rem}.m-4{margin:1rem}.-mx-3{margin-left:-.75rem;margin-right:-.75rem}.mx-auto{margin-left:auto;margin-right:auto}.-mb-px{margin-bottom:-1px}.-ml-1{margin-left:-.25rem}.-mt-4{margin-top:-1rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-0{margin-left:0}.ml-0\.5{margin-left:.125rem}.ml-12{margin-left:3rem}.ml-16{margin-left:4rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.ml-24{margin-left:6rem}.ml-28{margin-left:7rem}.ml-3{margin-left:.75rem}.ml-32{margin-left:8rem}.ml-36{margin-left:9rem}.ml-4{margin-left:1rem}.ml-40{margin-left:10rem}.ml-48{margin-left:12rem}.ml-6{margin-left:1.5rem}.ml-8{margin-left:2rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-5{margin-right:1.25rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0{height:0}.h-16{height:4rem}.h-32{height:8rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\[calc\(100vh-13rem\)\]{height:calc(100vh - 13rem)}.h-full{height:100%}.max-h-16{max-height:4rem}.max-h-full{max-height:100%}.min-h-20{min-height:5rem}.min-h-full{min-height:100%}.w-0{width:0}.w-32{width:8rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-96{width:24rem}.w-auto{width:auto}.w-full{width:100%}.min-w-32{min-width:8rem}.min-w-56{min-width:14rem}.min-w-full{min-width:100%}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-shrink-0{flex-shrink:0}.grow{flex-grow:1}.basis-3\/12{flex-basis:25%}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x:100%}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-100,.scale-95{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-1\.5{-moz-column-gap:.375rem;column-gap:.375rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-5{row-gap:1.25rem}.gap-y-8{row-gap:2rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.5rem*var(--tw-space-x-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 231 235/var(--tw-divide-opacity))}.divide-gray-300>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(209 213 219/var(--tw-divide-opacity))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-blue-900{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-neutral-400{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity))}.border-panda-cms-dark{--tw-border-opacity:1;border-color:rgb(40 46 50/var(--tw-border-opacity))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.border-red-900{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity))}.border-slate-50{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity))}.border-transparent{border-color:#0000}.border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.border-opacity-10{--tw-border-opacity:0.1}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity))}.bg-green-600\/40{background-color:#16a34a66}.bg-green-700{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity))}.bg-panda-cms-dark{--tw-bg-opacity:1;background-color:rgb(40 46 50/var(--tw-bg-opacity))}.bg-pink-400{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-12{padding-bottom:3rem;padding-top:3rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-3\.5{padding-bottom:.875rem;padding-top:.875rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.pb-16{padding-bottom:4rem}.pb-4{padding-bottom:1rem}.pl-0{padding-left:0}.pl-12{padding-left:3rem}.pl-16{padding-left:4rem}.pl-20{padding-left:5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pr-0{padding-right:0}.pr-10{padding-right:2.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-0\.5{padding-top:.125rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-6{line-height:1.5rem}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity))}.text-panda-cms-dark{--tw-text-opacity:1;color:rgb(40 46 50/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}.text-sky-100{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-1,.ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-inset{--tw-ring-inset:inset}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity))}.ring-green-600\/20{--tw-ring-color:#16a34a33}.ring-opacity-5{--tw-ring-opacity:0.05}.ring-offset-2{--tw-ring-offset-width:2px}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.ql-editor{border:none;font-size:1.3em!important;margin:0;padding:0;&:active,&:focus{border:none;outline:none}h1,h2,h3,p{margin-bottom:20px!important}h1,h2,h3,li,p{font-size:130%!important}}.placeholder\:text-gray-300::-moz-placeholder{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.placeholder\:text-gray-300::placeholder{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.read-only\:bg-gray-100:-moz-read-only{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.read-only\:bg-gray-100:read-only{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.focus-within\:text-gray-600:focus-within{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.focus-within\:ring-2:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-within\:ring-offset-2:focus-within{--tw-ring-offset-width:2px}.focus-within\:ring-offset-gray-100:focus-within{--tw-ring-offset-color:#f3f4f6}.hover\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.hover\:bg-panda-cms-dark:hover{--tw-bg-opacity:1;background-color:rgb(40 46 50/var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.hover\:bg-sky-100:hover{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity))}.hover\:bg-white:hover{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.hover\:text-indigo-900:hover{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity))}.hover\:text-red-900:hover{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-sm:hover{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:underline:focus{text-decoration-line:underline}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-0:focus,.focus\:ring-1:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-inset:focus{--tw-ring-inset:inset}.focus\:ring-gray-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(107 114 128/var(--tw-ring-opacity))}.focus\:ring-sky-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(14 165 233/var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus\:placeholder\:text-gray-400:focus::-moz-placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.focus\:placeholder\:text-gray-400:focus::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-panda-cms-dark:focus-visible{outline-color:#282e32}.focus-visible\:outline-panda-cms-light:focus-visible{outline-color:#c8f5ff}.focus-visible\:outline-red-300:focus-visible{outline-color:#fca5a5}.group:hover .group-hover\:opacity-75{opacity:.75}@media (min-width:640px){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:mt-2{margin-top:.5rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:w-full{width:100%}.sm\:max-w-sm{max-width:24rem}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:items-end{align-items:flex-end}.sm\:gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pr-0{padding-right:0}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-6{line-height:1.5rem}}@media (min-width:768px){.md\:ml-0{margin-left:0}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width:1024px){.lg\:fixed{position:fixed}.lg\:inset-y-0{bottom:0;top:0}.lg\:z-50{z-index:50}.lg\:ml-72{margin-left:18rem}.lg\:mt-0{margin-top:0}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-32{height:8rem}.lg\:max-h-full{max-height:100%}.lg\:w-72{width:18rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-col{flex-direction:column}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width:1280px){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.xl\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}}
|
@@ -0,0 +1 @@
|
|
1
|
+
//= link_tree ../builds/ .css
|
@@ -0,0 +1,30 @@
|
|
1
|
+
@tailwind base;
|
2
|
+
@tailwind components;
|
3
|
+
@tailwind utilities;
|
4
|
+
|
5
|
+
@layer base {
|
6
|
+
html {
|
7
|
+
font-family: colfax-web, system-ui, sans-serif;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
.ql-editor {
|
12
|
+
border: none;
|
13
|
+
font-size: 1.3em !important;
|
14
|
+
padding: 0;
|
15
|
+
margin: 0;
|
16
|
+
|
17
|
+
&:active, &:focus {
|
18
|
+
border: none;
|
19
|
+
outline: none;
|
20
|
+
}
|
21
|
+
|
22
|
+
h1, h2, h3, p {
|
23
|
+
margin-bottom: 20px !important;
|
24
|
+
font-size: 130% !important;
|
25
|
+
}
|
26
|
+
|
27
|
+
li {
|
28
|
+
font-size: 130% !important;
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,118 @@
|
|
1
|
+
module PandaCms
|
2
|
+
class FormBuilder < ActionView::Helpers::FormBuilder
|
3
|
+
include ActionView::Helpers::TagHelper
|
4
|
+
|
5
|
+
def label(attribute, text = nil, options = {}, &block)
|
6
|
+
super(attribute, text, options.reverse_merge(class: "font-medium text-sm leading-6 text-gray-500"))
|
7
|
+
end
|
8
|
+
|
9
|
+
def text_field(attribute, options = {})
|
10
|
+
if options.dig(:data, :prefix)
|
11
|
+
content_tag :div, class: container_styles do
|
12
|
+
label(attribute) +
|
13
|
+
content_tag(:div, class: "flex flex-grow") do
|
14
|
+
content_tag(:span, class: "inline-flex items-center px-3 text-sm text-gray-900 bg-gray-200 border border-e-0 border-gray-300 rounded-s-md dark:bg-gray-600 dark:text-gray-400 dark:border-gray-600 whitespace-nowrap break-keep") { options.dig(:data, :prefix) } +
|
15
|
+
super(attribute, options.reverse_merge(class: input_styles_prefix + " rounded-l-none"))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
else
|
19
|
+
content_tag :div, class: container_styles do
|
20
|
+
label(attribute) + super(attribute, options.reverse_merge(class: input_styles))
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def email_field(attribute, options = {})
|
26
|
+
content_tag :div, class: container_styles do
|
27
|
+
label(attribute) + super(attribute, options.reverse_merge(class: input_styles))
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def password_field(attribute, options = {})
|
32
|
+
content_tag :div, class: container_styles do
|
33
|
+
label(attribute) + super(attribute, options.reverse_merge(class: input_styles))
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def select(method, choices = nil, options = {}, html_options = {}, &block)
|
38
|
+
content_tag :div, class: container_styles do
|
39
|
+
label(method) + super(method, choices, options, html_options.reverse_merge(class: input_styles))
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def collection_select(method, collection, value_method, text_method, options = {}, html_options = {})
|
44
|
+
content_tag :div, class: container_styles do
|
45
|
+
label(method) + super(method, collection, value_method, text_method, options, html_options.reverse_merge(class: input_styles))
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def time_zone_select(method, priority_zones = nil, options = {}, html_options = {})
|
50
|
+
content_tag :div, class: container_styles do
|
51
|
+
label(method) + super(method, priority_zones, options, html_options.reverse_merge(class: input_styles))
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def file_field(method, options = {})
|
56
|
+
content_tag :div, class: container_styles do
|
57
|
+
label(method) + super(method, options.reverse_merge(class: "file:rounded file:border-0 file:text-sm file:bg-white file:text-gray-500 hover:file:bg-gray-50 bg-white px-2.5 hover:bg-gray-50".concat(input_styles)))
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def button(value = nil, options = {}, &block) # => 7.1.3
|
62
|
+
case value
|
63
|
+
when Hash
|
64
|
+
value, options = nil, value
|
65
|
+
when Symbol
|
66
|
+
value, options = nil, {name: field_name(value), id: field_id(value)}.merge!(options.to_h)
|
67
|
+
end
|
68
|
+
value ||= submit_default_value
|
69
|
+
|
70
|
+
formmethod = options[:formmethod]
|
71
|
+
if formmethod.present? && !/post|get/i.match?(formmethod) && !options.key?(:name) && !options.key?(:value)
|
72
|
+
options.merge! formmethod: :post, name: "_method", value: formmethod
|
73
|
+
end
|
74
|
+
|
75
|
+
value = if block
|
76
|
+
@template.capture { yield(value) }
|
77
|
+
else
|
78
|
+
content_tag(:i, "", class: "fa-sharp fa-circle-check mr-2 pt-[0.2rem]") + value
|
79
|
+
end
|
80
|
+
|
81
|
+
@template.button_tag(value, options.reverse_merge(class: button_styles))
|
82
|
+
end
|
83
|
+
|
84
|
+
def submit(value = nil, options = {}) # => 7.1.3
|
85
|
+
super(value, options.reverse_merge(class: button_styles))
|
86
|
+
end
|
87
|
+
|
88
|
+
def check_box(method, options = {}, checked_value = "1", unchecked_value = "0")
|
89
|
+
content_tag :div, class: container_styles do
|
90
|
+
label(method) + super(method, options.reverse_merge(class: "border-gray-300 ml-2"), checked_value, unchecked_value)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
def date_field(method, options = {})
|
95
|
+
content_tag :div, class: container_styles do
|
96
|
+
label(method) + super(method, options.reverse_merge(class: input_styles))
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
private
|
101
|
+
|
102
|
+
def input_styles
|
103
|
+
"block w-full rounded-md border-0 p-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-300 focus:outline-panda-light focus:ring-1 focus:ring-inset focus:ring-gray-500 sm:text-sm sm:leading-6 hover:pointer"
|
104
|
+
end
|
105
|
+
|
106
|
+
def input_styles_prefix
|
107
|
+
input_styles.concat(" prefix")
|
108
|
+
end
|
109
|
+
|
110
|
+
def button_styles
|
111
|
+
"mt-4 inline-flex justify-center border border-slate-900 rounded-lg bg-panda-cms-dark px-3 py-2 text-sm font-semibold text-white shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-panda-dark hover:pointer hover:bg-panda-cms-light"
|
112
|
+
end
|
113
|
+
|
114
|
+
def container_styles
|
115
|
+
"panda-field-container mb-2"
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module PandaCms
|
4
|
+
module Admin
|
5
|
+
class ButtonComponent < ViewComponent::Base
|
6
|
+
attr_accessor :text, :action, :link, :icon, :size, :data
|
7
|
+
|
8
|
+
def initialize(text: "Button", action: nil, data: {}, link: "#", icon: nil, size: :regular)
|
9
|
+
@text = text
|
10
|
+
@action = action
|
11
|
+
@data = data
|
12
|
+
@link = link
|
13
|
+
@icon = icon
|
14
|
+
@size = size
|
15
|
+
end
|
16
|
+
|
17
|
+
def call
|
18
|
+
@icon = set_icon_from_action(@action) if @action && @icon.nil?
|
19
|
+
icon = content_tag(:i, "", class: "mr-2 fa-regular fa-#{@icon}") if @icon
|
20
|
+
@text = "#{icon} #{@text.titleize}".html_safe
|
21
|
+
|
22
|
+
classes = "inline-flex items-center rounded-md font-semibold shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 "
|
23
|
+
|
24
|
+
case @size
|
25
|
+
when :small, :sm
|
26
|
+
classes += "gap-x-1.5 px-2.5 py-1.5 text-sm "
|
27
|
+
when :medium, :regular, :md
|
28
|
+
classes += "gap-x-1.5 px-3 py-2 text-base "
|
29
|
+
when :large, :lg
|
30
|
+
classes += "gap-x-2 px-3.5 py-2.5 text-lg "
|
31
|
+
end
|
32
|
+
|
33
|
+
classes += case @action
|
34
|
+
when :save, :create
|
35
|
+
"text-white bg-green-700"
|
36
|
+
when :secondary
|
37
|
+
"text-panda-cms-dark border border-panda-cms-dark bg-white hover:bg-sky-100 focus-visible:outline-panda-cms-dark "
|
38
|
+
when :delete, :destroy, :danger
|
39
|
+
"text-red-900 border border-red-900 bg-red-100 hover:bg-red-200 hover:text-red-900 focus-visible:outline-red-300 "
|
40
|
+
else
|
41
|
+
"text-white border border-panda-cms-dark bg-panda-cms-dark hover:bg-panda-cms-dark focus-visible:outline-panda-cms-light "
|
42
|
+
end
|
43
|
+
|
44
|
+
content_tag :a, href: @link, class: classes, data: @data do
|
45
|
+
@text
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def set_icon_from_action(action)
|
52
|
+
case action
|
53
|
+
when :add, :new, :create
|
54
|
+
"plus"
|
55
|
+
when :save
|
56
|
+
"check"
|
57
|
+
when :edit, :update
|
58
|
+
"pencil"
|
59
|
+
when :delete, :destroy
|
60
|
+
"trash"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<main class="overflow-auto flex-1 h-full min-h-full max-h-full">
|
2
|
+
<div class="px-2 pt-4 mx-auto sm:px-6 lg:px-6">
|
3
|
+
<%= heading %>
|
4
|
+
<%= tab_bar %>
|
5
|
+
<%# I mean, you can edit this CSS if you want, but I hope you want to lose 2 hours to iFrame joy? %>
|
6
|
+
<section class="flex-auto h-[calc(100vh-13rem)]">
|
7
|
+
<div class="flex-1 mt-4 w-full h-full">
|
8
|
+
<%= content %>
|
9
|
+
</div>
|
10
|
+
<%= slideover %>
|
11
|
+
</section>
|
12
|
+
</div>
|
13
|
+
</main>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module PandaCms
|
4
|
+
module Admin
|
5
|
+
class ContainerComponent < ViewComponent::Base
|
6
|
+
renders_one :heading, "PandaCms::Admin::HeadingComponent"
|
7
|
+
renders_one :tab_bar, "PandaCms::Admin::TabBarComponent"
|
8
|
+
renders_one :slideover, "PandaCms::Admin::SlideoverComponent"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<div class="fixed top-2 right-2 z-50 p-2 space-y-4 w-full max-w-sm pointer-events-none sm:items-end" data-controller="alert"
|
2
|
+
data-alert-dismiss-after-value="3000"
|
3
|
+
data-transition-enter="ease-in-out duration-500"
|
4
|
+
data-transition-enter-from="translate-x-full opacity-0"
|
5
|
+
data-transition-enter-to="translate-x-0 opacity-100"
|
6
|
+
data-transition-leave="ease-in-out duration-500"
|
7
|
+
data-transition-leave-from="translate-x-0 opacity-100"
|
8
|
+
data-transition-leave-to="translate-x-full opacity-0">
|
9
|
+
<div class="overflow-hidden w-full max-w-sm bg-white rounded-lg ring-1 ring-black ring-opacity-5 shadow-lg pointer-events-auto">
|
10
|
+
<div class="p-4">
|
11
|
+
<div class="flex items-start">
|
12
|
+
<div class="flex-shrink-0">
|
13
|
+
<i class="fa-regular text-xl <%= icon_css %> <%= text_colour_css %>"></i>
|
14
|
+
</div>
|
15
|
+
<div class="flex-1 pt-0.5 ml-3 w-0">
|
16
|
+
<p class="mb-1 text-sm font-medium <%= text_colour_css %>"><%= kind.to_s.titleize %></p>
|
17
|
+
<p class="mt-1 mb-0 text-sm text-gray-500"><%= message %></p>
|
18
|
+
</div>
|
19
|
+
<div class="flex flex-shrink-0 ml-4">
|
20
|
+
<button data-action="alert#close" type="button" class="inline-flex text-gray-400 bg-white rounded-md transition duration-150 ease-in-out hover:text-gray-500 focus:ring-2 focus:ring-offset-2 focus:outline-none focus:ring-sky-500">
|
21
|
+
<span class="sr-only">Close</span>
|
22
|
+
<svg class="w-5 h-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
23
|
+
<path d="M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" />
|
24
|
+
</svg>
|
25
|
+
</button>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</div>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module PandaCms
|
4
|
+
module Admin
|
5
|
+
class FlashMessageComponent < ::ViewComponent::Base
|
6
|
+
attr_reader :kind, :message
|
7
|
+
|
8
|
+
def initialize(message:, kind:)
|
9
|
+
@kind = kind.to_sym
|
10
|
+
@message = message
|
11
|
+
end
|
12
|
+
|
13
|
+
def text_colour_css
|
14
|
+
case kind
|
15
|
+
when :success
|
16
|
+
"text-green-700"
|
17
|
+
when :alert, :error
|
18
|
+
"text-red-700"
|
19
|
+
when :warning
|
20
|
+
"text-yellow-700"
|
21
|
+
when :info, :notice
|
22
|
+
"text-blue-700"
|
23
|
+
else
|
24
|
+
"text-blue-700"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def icon_css
|
29
|
+
case kind
|
30
|
+
when :success
|
31
|
+
"fa-circle-check"
|
32
|
+
when :alert
|
33
|
+
"fa-circle-xmark"
|
34
|
+
when :warning
|
35
|
+
"fa-triangle-exclamation"
|
36
|
+
when :info, :notice
|
37
|
+
"fa-circle-info"
|
38
|
+
else
|
39
|
+
"fa-circle-info"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module PandaCms
|
4
|
+
module Admin
|
5
|
+
class HeadingComponent < ViewComponent::Base
|
6
|
+
renders_many :buttons, PandaCms::Admin::ButtonComponent
|
7
|
+
|
8
|
+
def initialize(text:, level: 2, icon: "", additional_styles: "")
|
9
|
+
@text = text
|
10
|
+
@level = level
|
11
|
+
@icon = icon
|
12
|
+
@additional_styles = additional_styles
|
13
|
+
@additional_styles = @additional_styles.split(" ") if @additional_styles.is_a?(String)
|
14
|
+
end
|
15
|
+
|
16
|
+
def call
|
17
|
+
output = ""
|
18
|
+
output += content_tag(:div, @text, class: "grow")
|
19
|
+
|
20
|
+
if buttons?
|
21
|
+
output += content_tag(:span, class: "actions flex gap-x-2") do
|
22
|
+
safe_join(buttons, "")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
output = output.html_safe
|
27
|
+
|
28
|
+
if @level == 1
|
29
|
+
content_tag(:h1, output, class: ["flex", "text-2xl", "font-medium", "text-gray-900", @additional_styles])
|
30
|
+
elsif @level == 2
|
31
|
+
content_tag(:h2, output, class: ["flex", "text-xl", "font-medium", "text-gray-800", @additional_styles])
|
32
|
+
elsif @level == 3
|
33
|
+
content_tag(:h3, output, class: ["flex", "text-xl", "font-bold", "text-gray-700", @additional_styles])
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<div class="mt-3 sm:mt-2">
|
2
|
+
<div class="sm:hidden">
|
3
|
+
<label for="tabs" class="sr-only">Select a tab</label>
|
4
|
+
<!-- Use an "onChange" listener to redirect the user to the selected tab URL. -->
|
5
|
+
<select id="tabs" name="tabs" class="block py-1.5 pr-10 pl-3 w-full text-gray-900 rounded-md border-0 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset focus:border-panda-dark focus:ring-panda-dark">
|
6
|
+
<% tabs.each do |tab| %>
|
7
|
+
<option><%= tab %></option>
|
8
|
+
<% end %>
|
9
|
+
</select>
|
10
|
+
</div>
|
11
|
+
<div class="hidden sm:block">
|
12
|
+
<div class="flex items-center border-b border-gray-200">
|
13
|
+
<nav class="flex flex-1 -mb-px space-x-6 xl:space-x-8" aria-label="Tabs">
|
14
|
+
<!-- Current: "border-panda-dark text-panda-dark", Default: "border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700" -->
|
15
|
+
<a href="#" aria-current="page" class="py-4 px-1 text-sm font-medium whitespace-nowrap border-b-2 border-panda-dark text-panda-dark">Recently Viewed</a>
|
16
|
+
<a href="#" class="py-4 px-1 text-sm font-medium text-gray-500 whitespace-nowrap border-b-2 border-transparent hover:text-gray-700 hover:border-gray-300">Recently Added</a>
|
17
|
+
<a href="#" class="py-4 px-1 text-sm font-medium text-gray-500 whitespace-nowrap border-b-2 border-transparent hover:text-gray-700 hover:border-gray-300">Favourited</a>
|
18
|
+
</nav>
|
19
|
+
<div class="hidden items-center p-0.5 ml-6 bg-gray-100 rounded-lg sm:flex">
|
20
|
+
<button type="button" class="p-1.5 text-gray-400 rounded-md hover:bg-white hover:shadow-sm focus:ring-2 focus:ring-inset focus:outline-none focus:ring-panda-dark">
|
21
|
+
<svg class="w-5 h-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
22
|
+
<path fill-rule="evenodd" d="M2 3.75A.75.75 0 012.75 3h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 3.75zm0 4.167a.75.75 0 01.75-.75h14.5a.75.75 0 010 1.5H2.75a.75.75 0 01-.75-.75zm0 4.166a.75.75 0 01.75-.75h14.5a.75.75 0 010 1.5H2.75a.75.75 0 01-.75-.75zm0 4.167a.75.75 0 01.75-.75h14.5a.75.75 0 010 1.5H2.75a.75.75 0 01-.75-.75z" clip-rule="evenodd" />
|
23
|
+
</svg>
|
24
|
+
<span class="sr-only">Use list view</span>
|
25
|
+
</button>
|
26
|
+
<button type="button" class="p-1.5 ml-0.5 text-gray-400 bg-white rounded-md shadow-sm focus:ring-2 focus:ring-inset focus:outline-none focus:ring-panda-dark">
|
27
|
+
<svg class="w-5 h-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
28
|
+
<path fill-rule="evenodd" d="M4.25 2A2.25 2.25 0 002 4.25v2.5A2.25 2.25 0 004.25 9h2.5A2.25 2.25 0 009 6.75v-2.5A2.25 2.25 0 006.75 2h-2.5zm0 9A2.25 2.25 0 002 13.25v2.5A2.25 2.25 0 004.25 18h2.5A2.25 2.25 0 009 15.75v-2.5A2.25 2.25 0 006.75 11h-2.5zm9-9A2.25 2.25 0 0011 4.25v2.5A2.25 2.25 0 0013.25 9h2.5A2.25 2.25 0 0018 6.75v-2.5A2.25 2.25 0 0015.75 2h-2.5zm0 9A2.25 2.25 0 0011 13.25v2.5A2.25 2.25 0 0013.25 18h2.5A2.25 2.25 0 0018 15.75v-2.5A2.25 2.25 0 0015.75 11h-2.5z" clip-rule="evenodd" />
|
29
|
+
</svg>
|
30
|
+
<span class="sr-only">Use grid view</span>
|
31
|
+
</button>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module PandaCms
|
4
|
+
class GridComponent < ViewComponent::Base
|
5
|
+
def initialize(columns: 1, spans: [1])
|
6
|
+
@columns = "grid-cols-#{columns}"
|
7
|
+
@colspans = []
|
8
|
+
spans.each do |span|
|
9
|
+
@colspans << "col-span-#{span}"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module PandaCms
|
4
|
+
class MenuComponent < ViewComponent::Base
|
5
|
+
attr_accessor :menu_item
|
6
|
+
attr_accessor :children
|
7
|
+
|
8
|
+
def initialize(name:, item_styles: "")
|
9
|
+
@menu = PandaCms::Menu.find_by(name: name)
|
10
|
+
@menu_items = @menu.menu_items.order(:lft) if @menu.present?
|
11
|
+
@item_styles = item_styles
|
12
|
+
end
|
13
|
+
|
14
|
+
def render?
|
15
|
+
@menu_items.present?
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|