Skip to content

Commit

Permalink
feature: add basic stimulus controllers to handle modals, tabs, and s…
Browse files Browse the repository at this point in the history
…elect interactions
  • Loading branch information
johnkrovitch committed Oct 28, 2023
1 parent ab3407c commit 1ded4e9
Show file tree
Hide file tree
Showing 67 changed files with 92,912 additions and 96 deletions.
13 changes: 13 additions & 0 deletions assets/js/controllers/lag_admin_image_form_controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import {Controller} from "@hotwired/stimulus";

export default class extends Controller {
connect() {
console.log('gggggggggggggggggggggggggg')

}

hideImage() {
console.log('click ?')
this.element.querySelector('.image-card').classList.add('d-none')
}
};
11 changes: 11 additions & 0 deletions assets/js/controllers/lag_admin_modal_controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {Controller} from "@hotwired/stimulus";
import {Modal} from "bootstrap";

export default class extends Controller {
openModal(event) {
event.preventDefault()

const modal = new Modal(this.element.dataset.target)
modal.show()
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ export default class extends Controller {
new TomSelect(this.element, {
create: this.element.dataset.allowAdd ?? true,
maxItems: this.element.dataset.multiple ?? null ? null : 1,
render: {
item: function(data, escape) {
console.log(data)
return '<span class="item badge me-1 bg-secondary" title="' + escape(data.text) + '">' + escape(data.text) + '</span>';
}
}
})
}
}
File renamed without changes.
1 change: 1 addition & 0 deletions assets/scss/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
@import "partials/list";
@import "partials/login";
@import "partials/header";
@import "partials/table";
7 changes: 7 additions & 0 deletions assets/scss/partials/_table.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.admin-table.table {
@for $i from 1 through 3 {
.column-button-#{$i} {
min-width: $i * 130px;
}
}
}
1,081 changes: 1,080 additions & 1 deletion public/admin.css

Large diffs are not rendered by default.

21,496 changes: 21,494 additions & 2 deletions public/admin.js

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions public/admin.js.LICENSE.txt

This file was deleted.

12,900 changes: 12,899 additions & 1 deletion public/bootstrap.css

Large diffs are not rendered by default.

8,522 changes: 8,520 additions & 2 deletions public/bootstrap.js

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions public/bootstrap.js.LICENSE.txt

This file was deleted.

347 changes: 346 additions & 1 deletion public/choice-js.css

Large diffs are not rendered by default.

186 changes: 185 additions & 1 deletion public/icons/default/icons.js

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion public/icons/default/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
require("./icons.js");
// Exports the "default" icons for usage with module loaders
// Usage:
// CommonJS:
// require('tinymce/icons/default')
// ES2015:
// import 'tinymce/icons/default'
require('./icons.js');
44 changes: 22 additions & 22 deletions public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,60 @@
"bootstrap.css": "/bundles/lagadmin/bootstrap.css",
"bootstrap.js": "/bundles/lagadmin/bootstrap.js",
"choice-js.css": "/bundles/lagadmin/choice-js.css",
"plugins/emoticons/js/emojiimages.js": "/bundles/lagadmin/plugins/emoticons/js/emojiimages.js",
"plugins/emoticons/js/emojiimages.min.js": "/bundles/lagadmin/plugins/emoticons/js/emojiimages.min.js",
"themes/silver/theme.js": "/bundles/lagadmin/themes/silver/theme.js",
"plugins/emoticons/js/emojiimages.min.js": "/bundles/lagadmin/plugins/emoticons/js/emojiimages.min.js",
"plugins/emoticons/js/emojiimages.js": "/bundles/lagadmin/plugins/emoticons/js/emojiimages.js",
"themes/silver/theme.min.js": "/bundles/lagadmin/themes/silver/theme.min.js",
"plugins/emoticons/js/emojis.js": "/bundles/lagadmin/plugins/emoticons/js/emojis.js",
"plugins/emoticons/js/emojis.min.js": "/bundles/lagadmin/plugins/emoticons/js/emojis.min.js",
"plugins/emoticons/js/emojis.js": "/bundles/lagadmin/plugins/emoticons/js/emojis.js",
"fonts/bootstrap-icons.woff?": "/bundles/lagadmin/fonts/bootstrap-icons.6959d0d9.woff",
"fonts/bootstrap-icons.woff2?": "/bundles/lagadmin/fonts/bootstrap-icons.b2e5aab6.woff2",
"icons/default/icons.js": "/bundles/lagadmin/icons/default/icons.js",
"icons/default/icons.min.js": "/bundles/lagadmin/icons/default/icons.min.js",
"skins/ui/tinymce-5/skin.css": "/bundles/lagadmin/skins/ui/tinymce-5/skin.css",
"skins/ui/tinymce-5/skin.min.css": "/bundles/lagadmin/skins/ui/tinymce-5/skin.min.css",
"skins/ui/tinymce-5-dark/skin.css": "/bundles/lagadmin/skins/ui/tinymce-5-dark/skin.css",
"skins/ui/tinymce-5-dark/skin.min.css": "/bundles/lagadmin/skins/ui/tinymce-5-dark/skin.min.css",
"skins/ui/oxide/skin.css": "/bundles/lagadmin/skins/ui/oxide/skin.css",
"skins/ui/oxide-dark/skin.css": "/bundles/lagadmin/skins/ui/oxide-dark/skin.css",
"skins/ui/oxide/skin.min.css": "/bundles/lagadmin/skins/ui/oxide/skin.min.css",
"skins/ui/oxide/skin.css": "/bundles/lagadmin/skins/ui/oxide/skin.css",
"icons/default/icons.js": "/bundles/lagadmin/icons/default/icons.js",
"skins/ui/tinymce-5/skin.min.css": "/bundles/lagadmin/skins/ui/tinymce-5/skin.min.css",
"skins/ui/tinymce-5-dark/skin.min.css": "/bundles/lagadmin/skins/ui/tinymce-5-dark/skin.min.css",
"icons/default/icons.min.js": "/bundles/lagadmin/icons/default/icons.min.js",
"skins/ui/oxide-dark/skin.min.css": "/bundles/lagadmin/skins/ui/oxide-dark/skin.min.css",
"skins/ui/oxide/skin.min.css": "/bundles/lagadmin/skins/ui/oxide/skin.min.css",
"skins/ui/oxide/content.css": "/bundles/lagadmin/skins/ui/oxide/content.css",
"skins/ui/tinymce-5/content.css": "/bundles/lagadmin/skins/ui/tinymce-5/content.css",
"skins/ui/oxide/content.min.css": "/bundles/lagadmin/skins/ui/oxide/content.min.css",
"skins/ui/tinymce-5/content.min.css": "/bundles/lagadmin/skins/ui/tinymce-5/content.min.css",
"skins/ui/oxide-dark/content.inline.css": "/bundles/lagadmin/skins/ui/oxide-dark/content.inline.css",
"skins/ui/oxide/content.inline.css": "/bundles/lagadmin/skins/ui/oxide/content.inline.css",
"skins/ui/tinymce-5-dark/content.inline.css": "/bundles/lagadmin/skins/ui/tinymce-5-dark/content.inline.css",
"skins/ui/tinymce-5/content.inline.css": "/bundles/lagadmin/skins/ui/tinymce-5/content.inline.css",
"skins/ui/oxide-dark/content.css": "/bundles/lagadmin/skins/ui/oxide-dark/content.css",
"skins/ui/tinymce-5-dark/content.css": "/bundles/lagadmin/skins/ui/tinymce-5-dark/content.css",
"skins/ui/oxide/content.min.css": "/bundles/lagadmin/skins/ui/oxide/content.min.css",
"skins/ui/tinymce-5/content.min.css": "/bundles/lagadmin/skins/ui/tinymce-5/content.min.css",
"skins/ui/oxide-dark/content.inline.min.css": "/bundles/lagadmin/skins/ui/oxide-dark/content.inline.min.css",
"skins/ui/oxide/content.inline.min.css": "/bundles/lagadmin/skins/ui/oxide/content.inline.min.css",
"skins/ui/tinymce-5-dark/content.inline.min.css": "/bundles/lagadmin/skins/ui/tinymce-5-dark/content.inline.min.css",
"skins/ui/tinymce-5/content.inline.min.css": "/bundles/lagadmin/skins/ui/tinymce-5/content.inline.min.css",
"skins/ui/oxide-dark/content.css": "/bundles/lagadmin/skins/ui/oxide-dark/content.css",
"skins/ui/tinymce-5-dark/content.css": "/bundles/lagadmin/skins/ui/tinymce-5-dark/content.css",
"skins/ui/oxide-dark/content.min.css": "/bundles/lagadmin/skins/ui/oxide-dark/content.min.css",
"skins/ui/tinymce-5-dark/content.min.css": "/bundles/lagadmin/skins/ui/tinymce-5-dark/content.min.css",
"skins/content/document/content.css": "/bundles/lagadmin/skins/content/document/content.css",
"skins/content/document/content.min.css": "/bundles/lagadmin/skins/content/document/content.min.css",
"skins/content/tinymce-5-dark/content.css": "/bundles/lagadmin/skins/content/tinymce-5-dark/content.css",
"skins/content/tinymce-5-dark/content.min.css": "/bundles/lagadmin/skins/content/tinymce-5-dark/content.min.css",
"skins/content/dark/content.css": "/bundles/lagadmin/skins/content/dark/content.css",
"skins/content/dark/content.min.css": "/bundles/lagadmin/skins/content/dark/content.min.css",
"favicon.ico": "/bundles/lagadmin/favicon.ico",
"skins/content/writer/content.css": "/bundles/lagadmin/skins/content/writer/content.css",
"skins/content/writer/content.min.css": "/bundles/lagadmin/skins/content/writer/content.min.css",
"skins/content/default/content.css": "/bundles/lagadmin/skins/content/default/content.css",
"skins/content/default/content.min.css": "/bundles/lagadmin/skins/content/default/content.min.css",
"skins/content/tinymce-5/content.css": "/bundles/lagadmin/skins/content/tinymce-5/content.css",
"skins/content/document/content.min.css": "/bundles/lagadmin/skins/content/document/content.min.css",
"skins/content/tinymce-5-dark/content.min.css": "/bundles/lagadmin/skins/content/tinymce-5-dark/content.min.css",
"skins/content/dark/content.min.css": "/bundles/lagadmin/skins/content/dark/content.min.css",
"skins/content/writer/content.min.css": "/bundles/lagadmin/skins/content/writer/content.min.css",
"favicon.ico": "/bundles/lagadmin/favicon.ico",
"skins/content/default/content.min.css": "/bundles/lagadmin/skins/content/default/content.min.css",
"skins/content/tinymce-5/content.min.css": "/bundles/lagadmin/skins/content/tinymce-5/content.min.css",
"skins/ui/oxide-dark/skin.shadowdom.css": "/bundles/lagadmin/skins/ui/oxide-dark/skin.shadowdom.css",
"skins/ui/oxide-dark/skin.shadowdom.min.css": "/bundles/lagadmin/skins/ui/oxide-dark/skin.shadowdom.min.css",
"skins/ui/oxide/skin.shadowdom.css": "/bundles/lagadmin/skins/ui/oxide/skin.shadowdom.css",
"skins/ui/oxide/skin.shadowdom.min.css": "/bundles/lagadmin/skins/ui/oxide/skin.shadowdom.min.css",
"skins/ui/tinymce-5-dark/skin.shadowdom.css": "/bundles/lagadmin/skins/ui/tinymce-5-dark/skin.shadowdom.css",
"skins/ui/tinymce-5-dark/skin.shadowdom.min.css": "/bundles/lagadmin/skins/ui/tinymce-5-dark/skin.shadowdom.min.css",
"skins/ui/tinymce-5/skin.shadowdom.css": "/bundles/lagadmin/skins/ui/tinymce-5/skin.shadowdom.css",
"skins/ui/oxide-dark/skin.shadowdom.min.css": "/bundles/lagadmin/skins/ui/oxide-dark/skin.shadowdom.min.css",
"skins/ui/oxide/skin.shadowdom.min.css": "/bundles/lagadmin/skins/ui/oxide/skin.shadowdom.min.css",
"skins/ui/tinymce-5-dark/skin.shadowdom.min.css": "/bundles/lagadmin/skins/ui/tinymce-5-dark/skin.shadowdom.min.css",
"skins/ui/tinymce-5/skin.shadowdom.min.css": "/bundles/lagadmin/skins/ui/tinymce-5/skin.shadowdom.min.css",
"icons/default/index.js": "/bundles/lagadmin/icons/default/index.js",
"themes/silver/index.js": "/bundles/lagadmin/themes/silver/index.js"
Expand Down
2 changes: 1 addition & 1 deletion public/plugins/emoticons/js/emojiimages.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion public/plugins/emoticons/js/emojiimages.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/plugins/emoticons/js/emojis.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion public/plugins/emoticons/js/emojis.min.js

Large diffs are not rendered by default.

67 changes: 66 additions & 1 deletion public/skins/content/dark/content.css
Original file line number Diff line number Diff line change
@@ -1 +1,66 @@
body{background-color:#222f3e;color:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;line-height:1.4;margin:1rem}a{color:#4099ff}table{border-collapse:collapse}table:not([cellpadding]) td,table:not([cellpadding]) th{padding:.4rem}table[border]:not([border="0"]):not([style*=border-width]) td,table[border]:not([border="0"]):not([style*=border-width]) th{border-width:1px}table[border]:not([border="0"]):not([style*=border-style]) td,table[border]:not([border="0"]):not([style*=border-style]) th{border-style:solid}table[border]:not([border="0"]):not([style*=border-color]) td,table[border]:not([border="0"]):not([style*=border-color]) th{border-color:#6d737b}figure{display:table;margin:1rem auto}figure figcaption{color:#8a8f97;display:block;margin-top:.25rem;text-align:center}hr{border:solid #6d737b;border-width:1px 0 0}code{background-color:#6d737b;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #6d737b;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #6d737b;margin-right:1.5rem;padding-right:1rem}
body {
background-color: #222f3e;
color: #fff;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
line-height: 1.4;
margin: 1rem;
}
a {
color: #4099ff;
}
table {
border-collapse: collapse;
}
/* Apply a default padding if legacy cellpadding attribute is missing */
table:not([cellpadding]) th,
table:not([cellpadding]) td {
padding: 0.4rem;
}
/* Set default table styles if a table has a positive border attribute
and no inline css */
table[border]:not([border="0"]):not([style*="border-width"]) th,
table[border]:not([border="0"]):not([style*="border-width"]) td {
border-width: 1px;
}
/* Set default table styles if a table has a positive border attribute
and no inline css */
table[border]:not([border="0"]):not([style*="border-style"]) th,
table[border]:not([border="0"]):not([style*="border-style"]) td {
border-style: solid;
}
/* Set default table styles if a table has a positive border attribute
and no inline css */
table[border]:not([border="0"]):not([style*="border-color"]) th,
table[border]:not([border="0"]):not([style*="border-color"]) td {
border-color: #6d737b;
}
figure {
display: table;
margin: 1rem auto;
}
figure figcaption {
color: #8a8f97;
display: block;
margin-top: 0.25rem;
text-align: center;
}
hr {
border-color: #6d737b;
border-style: solid;
border-width: 1px 0 0 0;
}
code {
background-color: #6d737b;
border-radius: 3px;
padding: 0.1rem 0.2rem;
}
.mce-content-body:not([dir=rtl]) blockquote {
border-left: 2px solid #6d737b;
margin-left: 1.5rem;
padding-left: 1rem;
}
.mce-content-body[dir=rtl] blockquote {
border-right: 2px solid #6d737b;
margin-right: 1.5rem;
padding-right: 1rem;
}
2 changes: 1 addition & 1 deletion public/skins/content/dark/content.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 61 additions & 1 deletion public/skins/content/default/content.css
Original file line number Diff line number Diff line change
@@ -1 +1,61 @@
body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;line-height:1.4;margin:1rem}table{border-collapse:collapse}table:not([cellpadding]) td,table:not([cellpadding]) th{padding:.4rem}table[border]:not([border="0"]):not([style*=border-width]) td,table[border]:not([border="0"]):not([style*=border-width]) th{border-width:1px}table[border]:not([border="0"]):not([style*=border-style]) td,table[border]:not([border="0"]):not([style*=border-style]) th{border-style:solid}table[border]:not([border="0"]):not([style*=border-color]) td,table[border]:not([border="0"]):not([style*=border-color]) th{border-color:#ccc}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border:solid #ccc;border-width:1px 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
line-height: 1.4;
margin: 1rem;
}
table {
border-collapse: collapse;
}
/* Apply a default padding if legacy cellpadding attribute is missing */
table:not([cellpadding]) th,
table:not([cellpadding]) td {
padding: 0.4rem;
}
/* Set default table styles if a table has a positive border attribute
and no inline css */
table[border]:not([border="0"]):not([style*="border-width"]) th,
table[border]:not([border="0"]):not([style*="border-width"]) td {
border-width: 1px;
}
/* Set default table styles if a table has a positive border attribute
and no inline css */
table[border]:not([border="0"]):not([style*="border-style"]) th,
table[border]:not([border="0"]):not([style*="border-style"]) td {
border-style: solid;
}
/* Set default table styles if a table has a positive border attribute
and no inline css */
table[border]:not([border="0"]):not([style*="border-color"]) th,
table[border]:not([border="0"]):not([style*="border-color"]) td {
border-color: #ccc;
}
figure {
display: table;
margin: 1rem auto;
}
figure figcaption {
color: #999;
display: block;
margin-top: 0.25rem;
text-align: center;
}
hr {
border-color: #ccc;
border-style: solid;
border-width: 1px 0 0 0;
}
code {
background-color: #e8e8e8;
border-radius: 3px;
padding: 0.1rem 0.2rem;
}
.mce-content-body:not([dir=rtl]) blockquote {
border-left: 2px solid #ccc;
margin-left: 1.5rem;
padding-left: 1rem;
}
.mce-content-body[dir=rtl] blockquote {
border-right: 2px solid #ccc;
margin-right: 1.5rem;
padding-right: 1rem;
}
Loading

0 comments on commit 1ded4e9

Please sign in to comment.