headmin 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.nvmrc +1 -0
- data/.rubocop.yml +13 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +43 -0
- data/LICENSE.txt +21 -0
- data/README.md +166 -0
- data/Rakefile +16 -0
- data/app/assets/images/avatar.jpg +0 -0
- data/app/controllers/admin/users/confirmations_controller.rb +31 -0
- data/app/controllers/admin/users/omniauth_callbacks_controller.rb +31 -0
- data/app/controllers/admin/users/passwords_controller.rb +35 -0
- data/app/controllers/admin/users/registrations_controller.rb +63 -0
- data/app/controllers/admin/users/sessions_controller.rb +28 -0
- data/app/controllers/admin/users/unlocks_controller.rb +31 -0
- data/app/controllers/concerns/headmin/acts_as_list.rb +16 -0
- data/app/controllers/concerns/headmin/authentication.rb +17 -0
- data/app/controllers/concerns/headmin/ckeditor.rb +27 -0
- data/app/controllers/concerns/headmin/filter.rb +5 -0
- data/app/controllers/concerns/headmin/pagination.rb +23 -0
- data/app/controllers/concerns/headmin/searchable.rb +15 -0
- data/app/controllers/concerns/headmin/sortable.rb +44 -0
- data/app/helpers/headmin/admin_helper.rb +65 -0
- data/app/helpers/headmin/filter_helper.rb +12 -0
- data/app/helpers/headmin/notification_helper.rb +31 -0
- data/app/views/admin/users/confirmations/new.html.erb +9 -0
- data/app/views/admin/users/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/admin/users/mailer/email_changed.html.erb +7 -0
- data/app/views/admin/users/mailer/password_change.html.erb +3 -0
- data/app/views/admin/users/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/admin/users/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/admin/users/passwords/edit.html.erb +12 -0
- data/app/views/admin/users/passwords/new.html.erb +9 -0
- data/app/views/admin/users/registrations/edit.html.erb +24 -0
- data/app/views/admin/users/registrations/new.html.erb +11 -0
- data/app/views/admin/users/sessions/new.html.erb +13 -0
- data/app/views/admin/users/shared/_error_messages.html.erb +7 -0
- data/app/views/admin/users/shared/_links.html.erb +27 -0
- data/app/views/admin/users/unlocks/new.html.erb +10 -0
- data/app/views/headmin/_breadcrumbs.html.erb +23 -0
- data/app/views/headmin/_filters.html.erb +47 -0
- data/app/views/headmin/_form.html.erb +11 -0
- data/app/views/headmin/_heading.html.erb +9 -0
- data/app/views/headmin/_index.html.erb +12 -0
- data/app/views/headmin/_notifications.html.erb +12 -0
- data/app/views/headmin/_pagination.html.erb +13 -0
- data/app/views/headmin/_table.html.erb +13 -0
- data/app/views/headmin/filters/_date.html.erb +46 -0
- data/app/views/headmin/filters/_search.html.erb +22 -0
- data/app/views/headmin/filters/_select.html.erb +39 -0
- data/app/views/headmin/filters/filter/_button.html.erb +22 -0
- data/app/views/headmin/filters/filter/_menu_item.html.erb +12 -0
- data/app/views/headmin/filters/filter/_template.html.erb +13 -0
- data/app/views/headmin/forms/_actions.html.erb +32 -0
- data/app/views/headmin/forms/_errors.html.erb +20 -0
- data/app/views/headmin/forms/_group.html.erb +36 -0
- data/app/views/headmin/forms/fields/_checkbox.html.erb +23 -0
- data/app/views/headmin/forms/fields/_ckeditor.html.erb +28 -0
- data/app/views/headmin/forms/fields/_currency.html.erb +24 -0
- data/app/views/headmin/forms/fields/_date.html.erb +36 -0
- data/app/views/headmin/forms/fields/_email.html.erb +39 -0
- data/app/views/headmin/forms/fields/_file.html.erb +24 -0
- data/app/views/headmin/forms/fields/_image.html.erb +37 -0
- data/app/views/headmin/forms/fields/_label.html.erb +9 -0
- data/app/views/headmin/forms/fields/_multiple_select.html.erb +37 -0
- data/app/views/headmin/forms/fields/_password.html.erb +39 -0
- data/app/views/headmin/forms/fields/_repeater.html.erb +48 -0
- data/app/views/headmin/forms/fields/_select.html.erb +36 -0
- data/app/views/headmin/forms/fields/_select_tags.html.erb +32 -0
- data/app/views/headmin/forms/fields/_text.html.erb +39 -0
- data/app/views/headmin/forms/fields/_textarea.html.erb +29 -0
- data/app/views/headmin/forms/fields/_url.html.erb +38 -0
- data/app/views/headmin/forms/fields/_validation.html.erb +12 -0
- data/app/views/headmin/forms/fields/repeater/_row.html.erb +16 -0
- data/app/views/headmin/heading/_title.html.erb +24 -0
- data/app/views/headmin/kaminari/_first_page.html.erb +11 -0
- data/app/views/headmin/kaminari/_gap.html.erb +12 -0
- data/app/views/headmin/kaminari/_last_page.html.erb +12 -0
- data/app/views/headmin/kaminari/_next_page.html.erb +13 -0
- data/app/views/headmin/kaminari/_page.html.erb +12 -0
- data/app/views/headmin/kaminari/_paginator.html.erb +25 -0
- data/app/views/headmin/kaminari/_prev_page.html.erb +11 -0
- data/app/views/headmin/layout/_body.html.erb +9 -0
- data/app/views/headmin/layout/_content.html.erb +9 -0
- data/app/views/headmin/layout/_footer.html.erb +17 -0
- data/app/views/headmin/layout/_header.html.erb +13 -0
- data/app/views/headmin/layout/_main.html.erb +13 -0
- data/app/views/headmin/layout/_sidebar.html.erb +20 -0
- data/app/views/headmin/layout/dropdown/_divider.html.erb +9 -0
- data/app/views/headmin/layout/dropdown/_item.html.erb +17 -0
- data/app/views/headmin/layout/header/_account.html.erb +25 -0
- data/app/views/headmin/layout/header/_locale.html.erb +19 -0
- data/app/views/headmin/layout/sidebar/_bottom.html.erb +4 -0
- data/app/views/headmin/layout/sidebar/_menu.html.erb +9 -0
- data/app/views/headmin/layout/sidebar/menu/_account.html.erb +25 -0
- data/app/views/headmin/layout/sidebar/menu/_item.html.erb +16 -0
- data/app/views/headmin/layout/sidebar/menu/_locale.html.erb +18 -0
- data/app/views/headmin/table/_actions.html.erb +19 -0
- data/app/views/headmin/table/_body.html.erb +19 -0
- data/app/views/headmin/table/_foot.html.erb +15 -0
- data/app/views/headmin/table/_footer.html.erb +13 -0
- data/app/views/headmin/table/_head.html.erb +15 -0
- data/app/views/headmin/table/_header.html.erb +13 -0
- data/app/views/headmin/table/actions/_action.html.erb +10 -0
- data/app/views/headmin/table/actions/_delete.html.erb +8 -0
- data/app/views/headmin/table/actions/_export.html.erb +8 -0
- data/app/views/headmin/table/body/_association.html.erb +11 -0
- data/app/views/headmin/table/body/_boolean.erb +16 -0
- data/app/views/headmin/table/body/_currency.html.erb +10 -0
- data/app/views/headmin/table/body/_date.html.erb +11 -0
- data/app/views/headmin/table/body/_id.html.erb +3 -0
- data/app/views/headmin/table/body/_row.html.erb +9 -0
- data/app/views/headmin/table/body/_sort.html.erb +3 -0
- data/app/views/headmin/table/body/_string.html.erb +16 -0
- data/app/views/headmin/table/body/_text.html.erb +10 -0
- data/app/views/headmin/table/foot/_cell.html.erb +10 -0
- data/app/views/headmin/table/foot/_id.html.erb +9 -0
- data/app/views/headmin/table/head/_cell.html.erb +13 -0
- data/app/views/headmin/table/head/_empty.html.erb +1 -0
- data/app/views/headmin/table/head/_id.html.erb +9 -0
- data/app/views/headmin/table/head/_sort.html.erb +3 -0
- data/app/views/headmin/table/head/cell/_asc.html.erb +4 -0
- data/app/views/headmin/table/head/cell/_default.html.erb +7 -0
- data/app/views/headmin/table/head/cell/_desc.html.erb +4 -0
- data/app/views/layouts/admin/auth.html.erb +20 -0
- data/app/views/layouts/admin.html.erb +42 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/config/locales/defaults/en.yml +215 -0
- data/config/locales/defaults/nl.yml +213 -0
- data/config/locales/devise/nl.yml +85 -0
- data/config/locales/en.yml +137 -0
- data/config/locales/nl.yml +138 -0
- data/dist/css/headmin.css +9874 -0
- data/dist/js/headmin.js +852 -0
- data/docs/README.md +4 -0
- data/docs/blocks.md +116 -0
- data/docs/devise.md +62 -0
- data/headmin.gemspec +35 -0
- data/lib/headmin/engine.rb +10 -0
- data/lib/headmin/version.rb +5 -0
- data/lib/headmin.rb +4 -0
- data/package.json +62 -0
- data/src/js/headmin/controllers/filter_controller.js +47 -0
- data/src/js/headmin/controllers/filters_controller.js +53 -0
- data/src/js/headmin/controllers/index_controller.js +79 -0
- data/src/js/headmin/controllers/repeater_controller.js +35 -0
- data/src/js/headmin/controllers/repeater_row_controller.js +54 -0
- data/src/js/headmin/controllers/table_actions_controller.js +22 -0
- data/src/js/headmin/controllers/table_controller.js +36 -0
- data/src/js/headmin/headmin.js +168 -0
- data/src/js/headmin.js +1 -0
- data/src/scss/headmin/filter.scss +33 -0
- data/src/scss/headmin/filters.scss +14 -0
- data/src/scss/headmin/form.scss +39 -0
- data/src/scss/headmin/general.scss +3 -0
- data/src/scss/headmin/layout/body.scss +6 -0
- data/src/scss/headmin/layout/sidebar.scss +22 -0
- data/src/scss/headmin/layout.scss +2 -0
- data/src/scss/headmin/login.scss +35 -0
- data/src/scss/headmin/table.scss +32 -0
- data/src/scss/headmin/utilities.scss +19 -0
- data/src/scss/headmin.scss +58 -0
- data/src/scss/vendor/bootstrap/variables.scss +71 -0
- data/src/scss/vendor/choices/cross-inverse.svg +6 -0
- data/src/scss/vendor/choices/cross.svg +6 -0
- data/src/scss/vendor/choices/custom.scss +28 -0
- data/src/scss/vendor/choices/variables.scss +16 -0
- data/webpack.config.js +30 -0
- data/yarn.lock +7512 -0
- metadata +220 -0
@@ -0,0 +1,168 @@
|
|
1
|
+
import 'ckeditor5-build-classic-simple-upload-adapter-image-resize';
|
2
|
+
import Choices from "choices.js";
|
3
|
+
import Sortable from 'sortablejs';
|
4
|
+
import flatpickr from "flatpickr";
|
5
|
+
import bootstrap from "bootstrap/dist/js/bootstrap.bundle";
|
6
|
+
import Rails from "@rails/ujs";
|
7
|
+
|
8
|
+
import {Application} from "stimulus";
|
9
|
+
import {definitionsFromContext} from "stimulus/webpack-helpers";
|
10
|
+
|
11
|
+
export class Headmin {
|
12
|
+
static start() {
|
13
|
+
// Init Rails UJS
|
14
|
+
Rails.start()
|
15
|
+
|
16
|
+
// Init Stimulus
|
17
|
+
const application = Application.start()
|
18
|
+
const context = require.context("./controllers", true, /\.js$/)
|
19
|
+
application.load(definitionsFromContext(context))
|
20
|
+
|
21
|
+
// Init Plugins
|
22
|
+
this.initPlugins()
|
23
|
+
}
|
24
|
+
|
25
|
+
static initPlugins() {
|
26
|
+
this.initChoices()
|
27
|
+
this.initFlatpickrs()
|
28
|
+
this.initToasts()
|
29
|
+
this.initPopovers()
|
30
|
+
this.initCKEditors()
|
31
|
+
}
|
32
|
+
|
33
|
+
static initFlatpickrs() {
|
34
|
+
document.querySelectorAll('.flatpickr').forEach((element) => {
|
35
|
+
this.initFlatpickr(element)
|
36
|
+
})
|
37
|
+
}
|
38
|
+
|
39
|
+
static initFlatpickr(element) {
|
40
|
+
flatpickr(element, {
|
41
|
+
allowInput: true,
|
42
|
+
altInput: true,
|
43
|
+
altFormat: 'd/m/Y',
|
44
|
+
});
|
45
|
+
}
|
46
|
+
|
47
|
+
static initCKEditors() {
|
48
|
+
document.querySelectorAll('.ckeditor').forEach((element) => {
|
49
|
+
this.initCKEditor(element)
|
50
|
+
})
|
51
|
+
}
|
52
|
+
|
53
|
+
static csrfToken() {
|
54
|
+
return document.querySelector('meta[name="csrf-token"]').content
|
55
|
+
}
|
56
|
+
|
57
|
+
static initCKEditor(element) {
|
58
|
+
const defaultToolbarItems = [
|
59
|
+
'heading', '|', 'bold', 'italic', 'bulletedList', 'numberedList', '|', 'outdent',
|
60
|
+
'indent', '|', 'link', 'imageUpload', 'blockQuote', 'insertTable', 'mediaEmbed', '|', 'undo', 'redo'
|
61
|
+
]
|
62
|
+
const requestedToolbarItems = element.dataset.ckeditorToolbar ? JSON.parse(element.dataset.ckeditorToolbar) : undefined
|
63
|
+
const toolbarItems = requestedToolbarItems ? requestedToolbarItems : defaultToolbarItems
|
64
|
+
const uploadPath = element.dataset.ckeditorUploadPath
|
65
|
+
|
66
|
+
ClassicEditor.create(
|
67
|
+
element,
|
68
|
+
{
|
69
|
+
toolbar: {
|
70
|
+
items: toolbarItems
|
71
|
+
},
|
72
|
+
language: 'en',
|
73
|
+
image: {
|
74
|
+
toolbar: [
|
75
|
+
'imageTextAlternative',
|
76
|
+
'imageStyle:full',
|
77
|
+
'imageStyle:side'
|
78
|
+
]
|
79
|
+
},
|
80
|
+
table: {
|
81
|
+
contentToolbar: [
|
82
|
+
'tableColumn',
|
83
|
+
'tableRow',
|
84
|
+
'mergeTableCells'
|
85
|
+
]
|
86
|
+
},
|
87
|
+
|
88
|
+
simpleUpload: {
|
89
|
+
uploadUrl: uploadPath,
|
90
|
+
withCredentials: true,
|
91
|
+
headers: {
|
92
|
+
'X-CSRF-TOKEN': this.csrfToken(),
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
})
|
97
|
+
}
|
98
|
+
|
99
|
+
static initChoices() {
|
100
|
+
this.initChoicesSelectTags()
|
101
|
+
this.initChoicesMultipleSelect()
|
102
|
+
}
|
103
|
+
|
104
|
+
static initChoicesSelectTags() {
|
105
|
+
document.querySelectorAll('.select-tags').forEach((select) => {
|
106
|
+
|
107
|
+
// Skip if already initialized
|
108
|
+
if (select.dataset.choice === 'active') {
|
109
|
+
return
|
110
|
+
}
|
111
|
+
|
112
|
+
// Create a new instance
|
113
|
+
new Choices(select, {
|
114
|
+
removeItemButton: true,
|
115
|
+
loadingText: 'Loading...',
|
116
|
+
noResultsText: 'No results found',
|
117
|
+
noChoicesText: 'No choices to choose from',
|
118
|
+
itemSelectText: 'Press to select',
|
119
|
+
addItems: true,
|
120
|
+
addItemText: (value) => {
|
121
|
+
return `Press Enter to add <b>"${value}"</b>`;
|
122
|
+
},
|
123
|
+
maxItemText: (maxItemCount) => {
|
124
|
+
return `Only ${maxItemCount} values can be added`;
|
125
|
+
},
|
126
|
+
});
|
127
|
+
})
|
128
|
+
}
|
129
|
+
|
130
|
+
static initChoicesMultipleSelect() {
|
131
|
+
document.querySelectorAll('.multiple-select').forEach((select) => {
|
132
|
+
|
133
|
+
// Skip if already initialized
|
134
|
+
if (select.dataset.choice === 'active') {
|
135
|
+
return
|
136
|
+
}
|
137
|
+
|
138
|
+
// Create a new instance
|
139
|
+
new Choices(select, {
|
140
|
+
removeItemButton: true,
|
141
|
+
loadingText: 'Loading...',
|
142
|
+
noResultsText: 'No results found',
|
143
|
+
noChoicesText: 'No choices to choose from',
|
144
|
+
itemSelectText: 'Press to select',
|
145
|
+
addItems: true,
|
146
|
+
addItemText: (value) => {
|
147
|
+
return `Press Enter to add <b>"${value}"</b>`;
|
148
|
+
},
|
149
|
+
maxItemText: (maxItemCount) => {
|
150
|
+
return `Only ${maxItemCount} values can be added`;
|
151
|
+
},
|
152
|
+
});
|
153
|
+
})
|
154
|
+
}
|
155
|
+
|
156
|
+
static initToasts() {
|
157
|
+
document.querySelectorAll('.toast').forEach((toast) => {
|
158
|
+
new bootstrap.Toast(toast, {})
|
159
|
+
})
|
160
|
+
}
|
161
|
+
|
162
|
+
static initPopovers() {
|
163
|
+
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
|
164
|
+
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
|
165
|
+
return new bootstrap.Popover(popoverTriggerEl, {sanitize: false})
|
166
|
+
})
|
167
|
+
}
|
168
|
+
}
|
data/src/js/headmin.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export {Headmin} from "./headmin/headmin"
|
@@ -0,0 +1,33 @@
|
|
1
|
+
.h-filter {
|
2
|
+
position: relative;
|
3
|
+
}
|
4
|
+
|
5
|
+
.h-filter-popup {
|
6
|
+
position: absolute;
|
7
|
+
top: calc(100% + 4px);
|
8
|
+
left: 2px;
|
9
|
+
padding: 10px;
|
10
|
+
background: $white;
|
11
|
+
z-index: $zindex-popover;
|
12
|
+
width: $popover-max-width;
|
13
|
+
@include reset-text();
|
14
|
+
@include font-size($popover-font-size);
|
15
|
+
word-wrap: break-word;
|
16
|
+
background-color: $popover-bg;
|
17
|
+
background-clip: padding-box;
|
18
|
+
@include border-radius($popover-border-radius);
|
19
|
+
@include box-shadow($popover-box-shadow);
|
20
|
+
|
21
|
+
&.closed {
|
22
|
+
display: none;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
.h-filter-remove {
|
27
|
+
border-left: 1px solid $gray-300;
|
28
|
+
padding-left: 8px;
|
29
|
+
margin-left: 2px;
|
30
|
+
i::before {
|
31
|
+
font-size: 0.8em;
|
32
|
+
}
|
33
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
.forms-group {
|
2
|
+
.card-footer {
|
3
|
+
border-top: none;
|
4
|
+
}
|
5
|
+
}
|
6
|
+
|
7
|
+
.repeater {
|
8
|
+
position: relative;
|
9
|
+
}
|
10
|
+
|
11
|
+
.repeater-row {
|
12
|
+
position: relative;
|
13
|
+
|
14
|
+
&:hover {
|
15
|
+
& > .repeater-row-remove {
|
16
|
+
visibility: visible;
|
17
|
+
}
|
18
|
+
|
19
|
+
& > .repeater-row-add {
|
20
|
+
visibility: visible;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
.repeater-row-remove {
|
26
|
+
position: absolute;
|
27
|
+
top: calc(50% - 18px);
|
28
|
+
right: -22px;
|
29
|
+
z-index: 2;
|
30
|
+
visibility: hidden;
|
31
|
+
}
|
32
|
+
|
33
|
+
.repeater-row-add {
|
34
|
+
position: absolute;
|
35
|
+
top: calc(100% - 19px);
|
36
|
+
right: calc(50% - 18px);
|
37
|
+
z-index: 2;
|
38
|
+
visibility: hidden;
|
39
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
.sidebar {
|
2
|
+
font-size: $font-size-base * 1.1;
|
3
|
+
a, button {
|
4
|
+
color: $gray-400;
|
5
|
+
}
|
6
|
+
.nav-pills .nav-link.active {
|
7
|
+
background: $gray-900;
|
8
|
+
}
|
9
|
+
.dropdown-menu {
|
10
|
+
background: $gray-900;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
14
|
+
.nav-brand {
|
15
|
+
svg, img {
|
16
|
+
max-width: 100%;
|
17
|
+
height: 30px;
|
18
|
+
}
|
19
|
+
svg {
|
20
|
+
fill: $white;
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
body.empty {
|
2
|
+
height: 100%;
|
3
|
+
display: flex;
|
4
|
+
align-items: center;
|
5
|
+
padding-top: 40px;
|
6
|
+
padding-bottom: 40px;
|
7
|
+
background-color: #f5f5f5;
|
8
|
+
}
|
9
|
+
|
10
|
+
.form-signin {
|
11
|
+
width: 100%;
|
12
|
+
max-width: 330px;
|
13
|
+
padding: 15px;
|
14
|
+
margin: auto;
|
15
|
+
}
|
16
|
+
|
17
|
+
.form-signin .checkbox {
|
18
|
+
font-weight: 400;
|
19
|
+
}
|
20
|
+
|
21
|
+
.form-signin .form-floating:focus-within {
|
22
|
+
z-index: 2;
|
23
|
+
}
|
24
|
+
|
25
|
+
.form-signin input[type="email"] {
|
26
|
+
margin-bottom: -1px;
|
27
|
+
border-bottom-right-radius: 0;
|
28
|
+
border-bottom-left-radius: 0;
|
29
|
+
}
|
30
|
+
|
31
|
+
.form-signin input[type="password"] {
|
32
|
+
margin-bottom: 10px;
|
33
|
+
border-top-left-radius: 0;
|
34
|
+
border-top-right-radius: 0;
|
35
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
.h-table {
|
2
|
+
thead, tfoot {
|
3
|
+
text-transform: uppercase;
|
4
|
+
color: $table-color;
|
5
|
+
letter-spacing: 0.05em;
|
6
|
+
font-size: $font-size-base * 0.85;
|
7
|
+
}
|
8
|
+
|
9
|
+
a {
|
10
|
+
color: $body-color;
|
11
|
+
text-decoration: none;
|
12
|
+
font-weight: $font-weight-medium;
|
13
|
+
|
14
|
+
&:hover {
|
15
|
+
text-decoration: underline;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
.table-drag-sort-handle {
|
19
|
+
cursor: move;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
.h-table-actions {
|
24
|
+
width: 100%;
|
25
|
+
@include media-breakpoint-up(md) {
|
26
|
+
width: auto;
|
27
|
+
}
|
28
|
+
|
29
|
+
select {
|
30
|
+
min-width: 100%;
|
31
|
+
}
|
32
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.btn-link {
|
2
|
+
text-decoration: none;
|
3
|
+
}
|
4
|
+
|
5
|
+
.h-btn-light {
|
6
|
+
color: $form-text-color;
|
7
|
+
background-color: $gray-200;
|
8
|
+
}
|
9
|
+
|
10
|
+
.h-btn-outline-light {
|
11
|
+
background-color: $white;
|
12
|
+
color: $form-text-color;
|
13
|
+
border-color: $input-border-color;
|
14
|
+
}
|
15
|
+
|
16
|
+
.h-btn-outline-transparent {
|
17
|
+
color: $form-text-color;
|
18
|
+
border: 1px solid $input-border-color;
|
19
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
// Vendor
|
2
|
+
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css");
|
3
|
+
|
4
|
+
// Bootstrap
|
5
|
+
@import "~bootstrap/scss/functions.scss";
|
6
|
+
@import "~bootstrap/scss/variables.scss";
|
7
|
+
@import "~bootstrap/scss/mixins.scss";
|
8
|
+
@import "~bootstrap/scss/utilities.scss";
|
9
|
+
@import "vendor/bootstrap/variables"; // Bootstrap overrides
|
10
|
+
@import "~bootstrap/scss/root.scss";
|
11
|
+
@import "~bootstrap/scss/reboot.scss";
|
12
|
+
@import "~bootstrap/scss/type.scss";
|
13
|
+
@import "~bootstrap/scss/images.scss";
|
14
|
+
@import "~bootstrap/scss/containers.scss";
|
15
|
+
@import "~bootstrap/scss/grid.scss";
|
16
|
+
@import "~bootstrap/scss/tables.scss";
|
17
|
+
@import "~bootstrap/scss/forms.scss";
|
18
|
+
@import "~bootstrap/scss/buttons.scss";
|
19
|
+
@import "~bootstrap/scss/transitions.scss";
|
20
|
+
@import "~bootstrap/scss/dropdown.scss";
|
21
|
+
@import "~bootstrap/scss/button-group.scss";
|
22
|
+
@import "~bootstrap/scss/nav.scss";
|
23
|
+
@import "~bootstrap/scss/navbar.scss";
|
24
|
+
@import "~bootstrap/scss/card.scss";
|
25
|
+
@import "~bootstrap/scss/accordion.scss";
|
26
|
+
@import "~bootstrap/scss/breadcrumb.scss";
|
27
|
+
@import "~bootstrap/scss/pagination.scss";
|
28
|
+
@import "~bootstrap/scss/badge.scss";
|
29
|
+
@import "~bootstrap/scss/alert.scss";
|
30
|
+
@import "~bootstrap/scss/progress.scss";
|
31
|
+
@import "~bootstrap/scss/list-group.scss";
|
32
|
+
@import "~bootstrap/scss/close.scss";
|
33
|
+
@import "~bootstrap/scss/toasts.scss";
|
34
|
+
@import "~bootstrap/scss/modal.scss";
|
35
|
+
@import "~bootstrap/scss/tooltip.scss";
|
36
|
+
@import "~bootstrap/scss/popover.scss";
|
37
|
+
@import "~bootstrap/scss/carousel.scss";
|
38
|
+
@import "~bootstrap/scss/spinners.scss";
|
39
|
+
@import "~bootstrap/scss/helpers.scss";
|
40
|
+
@import "~bootstrap/scss/utilities/api.scss";
|
41
|
+
|
42
|
+
// Choices
|
43
|
+
@import "vendor/choices/variables"; // Choices overrides
|
44
|
+
@import "~choices.js/src/styles/choices.scss";
|
45
|
+
@import "vendor/choices/custom"; // Choices custom styling
|
46
|
+
|
47
|
+
// Flatpickr
|
48
|
+
@import "~flatpickr/dist/flatpickr";
|
49
|
+
|
50
|
+
// Headmin
|
51
|
+
@import "headmin/filters";
|
52
|
+
@import "headmin/form";
|
53
|
+
@import "headmin/general";
|
54
|
+
@import "headmin/layout";
|
55
|
+
@import "headmin/login";
|
56
|
+
@import "headmin/table";
|
57
|
+
@import "headmin/utilities";
|
58
|
+
@import "headmin/filter";
|
@@ -0,0 +1,71 @@
|
|
1
|
+
// Colors
|
2
|
+
$white: #ffffff;
|
3
|
+
$gray-50: #f9fafb;
|
4
|
+
$gray-100: #f8f9fa;
|
5
|
+
$gray-200: #e5e7eb;
|
6
|
+
$gray-300: #d1d5db;
|
7
|
+
$gray-400: #9ca3af;
|
8
|
+
$gray-500: #6b7280;
|
9
|
+
$gray-600: #4b5563;
|
10
|
+
$gray-700: #374151;
|
11
|
+
$gray-800: #1f2937;
|
12
|
+
$gray-900: #14171b;
|
13
|
+
$black: #000000;
|
14
|
+
|
15
|
+
// General
|
16
|
+
$enable-shadows: true;
|
17
|
+
|
18
|
+
// Typography
|
19
|
+
$font-size-base: 0.9rem;
|
20
|
+
$font-size-xs: $font-size-base * .75;
|
21
|
+
$font-weight-medium: 500;
|
22
|
+
$input-font-size: $font-size-base;
|
23
|
+
$form-select-font-size: $font-size-base;
|
24
|
+
$btn-font-size: $font-size-base;
|
25
|
+
|
26
|
+
// Tables
|
27
|
+
$table-striped-bg: $gray-100;
|
28
|
+
$table-border-color: $gray-200;
|
29
|
+
$table-group-separator-color: $gray-200;
|
30
|
+
$table-hover-bg: $gray-100;
|
31
|
+
$table-color: $gray-500;
|
32
|
+
$table-th-font-weight: $font-weight-medium;
|
33
|
+
$table-cell-padding-x: 1rem;
|
34
|
+
$table-cell-padding-y: 0.8rem;
|
35
|
+
|
36
|
+
// Breadcrumbs
|
37
|
+
$breadcrumb-margin-bottom: 0.3rem;
|
38
|
+
$breadcrumb-font-size: $font-size-sm;
|
39
|
+
$breadcrumb-divider-color: $gray-300;
|
40
|
+
$breadcrumb-active-color: $gray-300;
|
41
|
+
|
42
|
+
// Pagination
|
43
|
+
$pagination-color: $body-color;
|
44
|
+
$pagination-active-bg: $gray-100;
|
45
|
+
$pagination-active-color: $black;
|
46
|
+
$pagination-active-border-color: $gray-400;
|
47
|
+
$pagination-hover-color: $black;
|
48
|
+
$pagination-focus-color: $black;
|
49
|
+
|
50
|
+
// Buttons
|
51
|
+
$btn-link-color: $gray-500;
|
52
|
+
|
53
|
+
// Form
|
54
|
+
$input-group-addon-bg: $gray-100;
|
55
|
+
|
56
|
+
// Utilities
|
57
|
+
$custom-utilities: (
|
58
|
+
"font-weight": (
|
59
|
+
property: font-weight,
|
60
|
+
class: fw,
|
61
|
+
values: (
|
62
|
+
medium: $font-weight-medium,
|
63
|
+
light: $font-weight-light,
|
64
|
+
lighter: $font-weight-lighter,
|
65
|
+
normal: $font-weight-normal,
|
66
|
+
bold: $font-weight-bold,
|
67
|
+
bolder: $font-weight-bolder
|
68
|
+
)
|
69
|
+
),
|
70
|
+
);
|
71
|
+
$utilities: map-merge($utilities, $custom-utilities);
|
@@ -0,0 +1,28 @@
|
|
1
|
+
.choices__inner {
|
2
|
+
padding: 3px;
|
3
|
+
min-height: auto;
|
4
|
+
}
|
5
|
+
|
6
|
+
.choices__input {
|
7
|
+
margin: 2px;
|
8
|
+
display: inline-block;
|
9
|
+
vertical-align: middle;
|
10
|
+
padding: 2px 8px;
|
11
|
+
}
|
12
|
+
|
13
|
+
.choices__list--multiple, .choices__list--single {
|
14
|
+
.choices__item {
|
15
|
+
background: white;
|
16
|
+
color: $input-color;
|
17
|
+
border-color: $input-border-color;
|
18
|
+
font-weight: $input-font-weight;
|
19
|
+
padding: 2px 8px;
|
20
|
+
margin: 2px;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
.choices[data-type*='select-one'] {
|
25
|
+
.choices__inner {
|
26
|
+
padding: 0;
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
$choices-font-size-lg: $input-font-size-lg;
|
2
|
+
$choices-font-size-md: $input-font-size;
|
3
|
+
$choices-font-size-sm: $input-font-size-sm;
|
4
|
+
$choices-guttering: $grid-gutter-width;
|
5
|
+
$choices-border-radius: $input-border-radius;
|
6
|
+
$choices-border-radius-item: $input-border-radius;
|
7
|
+
$choices-bg-color: $input-bg;
|
8
|
+
$choices-bg-color-disabled: $input-disabled-bg;
|
9
|
+
$choices-bg-color-dropdown: $input-bg;
|
10
|
+
$choices-text-color: $input-color;
|
11
|
+
$choices-keyline-color: $input-border-color;
|
12
|
+
$choices-primary-color: $light;
|
13
|
+
$choices-disabled-color: $input-disabled-bg;
|
14
|
+
$choices-highlight-color: $primary;
|
15
|
+
$choices-icon-cross: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==) !default;
|
16
|
+
$choices-icon-cross-inverse: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==) !default;
|
data/webpack.config.js
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
const path = require("path");
|
2
|
+
|
3
|
+
module.exports = {
|
4
|
+
mode: 'development',
|
5
|
+
entry: `./src/js/headmin.js`,
|
6
|
+
output: {
|
7
|
+
path: path.join(__dirname, 'dist/js'),
|
8
|
+
filename: 'headmin.js'
|
9
|
+
},
|
10
|
+
module: {
|
11
|
+
rules: [
|
12
|
+
{
|
13
|
+
test:/\.css$/,
|
14
|
+
use:['style-loader','css-loader']
|
15
|
+
},
|
16
|
+
{
|
17
|
+
test: /\.js$/,
|
18
|
+
exclude: /node_modules\/(?!bullets-js)/,
|
19
|
+
use: {
|
20
|
+
loader: 'babel-loader',
|
21
|
+
options: {
|
22
|
+
presets: [
|
23
|
+
['@babel/preset-env', { targets: "defaults" }]
|
24
|
+
]
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
]
|
29
|
+
}
|
30
|
+
};
|