hoodcms 5.0.4 → 5.0.8
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.
- package/dist/css/admin.css +1 -1
- package/dist/css/app.css +1 -1
- package/dist/css/button.css +1 -1
- package/dist/css/editor.css +1 -1
- package/dist/css/install.css +1 -0
- package/dist/css/login.css +1 -1
- package/dist/js/admin.js +8 -6
- package/dist/js/app.js +13 -6
- package/dist/js/core/Alerts.d.ts +22 -0
- package/dist/js/core/Alerts.js +151 -0
- package/dist/js/core/BaseSite.d.ts +6 -0
- package/dist/js/core/BaseSite.js +14 -0
- package/dist/js/core/ColorPicker.d.ts +5 -0
- package/dist/js/core/ColorPicker.js +71 -0
- package/dist/js/core/DataList.d.ts +35 -0
- package/dist/js/core/DataList.js +56 -0
- package/dist/js/core/Editors.d.ts +16 -0
- package/dist/js/core/Editors.js +137 -0
- package/dist/js/core/Handlers.d.ts +47 -0
- package/dist/js/core/Handlers.js +160 -0
- package/dist/js/core/HoodApi.d.ts +25 -0
- package/dist/js/core/HoodApi.js +22 -0
- package/dist/js/core/Inline.d.ts +27 -0
- package/dist/js/core/Inline.js +63 -0
- package/dist/js/core/Loader.d.ts +5 -0
- package/dist/js/core/Loader.js +13 -0
- package/dist/js/core/Media.d.ts +113 -0
- package/dist/js/core/Media.js +363 -0
- package/dist/js/core/Modal.d.ts +35 -0
- package/dist/js/core/Modal.js +69 -0
- package/dist/js/core/RandomStringGenerator.d.ts +11 -0
- package/dist/js/core/RandomStringGenerator.js +23 -0
- package/dist/js/core/Response.d.ts +20 -0
- package/dist/js/core/Response.js +13 -0
- package/dist/js/core/Uploader.d.ts +7 -0
- package/dist/js/core/Uploader.js +134 -0
- package/dist/js/core/Validator.d.ts +27 -0
- package/dist/js/core/Validator.js +80 -0
- package/dist/js/extensions/jqueryExtensions.d.ts +11 -0
- package/dist/js/extensions/jqueryExtensions.js +99 -0
- package/dist/js/extensions/numberExtensions.d.ts +8 -0
- package/dist/js/extensions/numberExtensions.js +19 -0
- package/dist/js/extensions/stringExtensions.d.ts +12 -0
- package/dist/js/extensions/stringExtensions.js +49 -0
- package/dist/js/index.d.ts +22 -0
- package/dist/js/index.js +22 -0
- package/dist/js/interfaces/KeyValue.d.ts +4 -0
- package/dist/js/interfaces/KeyValue.js +1 -0
- package/dist/js/login.js +4 -3
- package/dist/js/models/Content.d.ts +50 -0
- package/dist/js/models/Content.js +1 -0
- package/dist/js/models/Property.d.ts +9 -0
- package/dist/js/models/Property.js +2 -0
- package/dist/js/models/Users.d.ts +7 -0
- package/dist/js/models/Users.js +2 -0
- package/package.json +8 -3
- package/src/css/admin.css +647 -1269
- package/src/css/admin.css.map +1 -1
- package/src/css/app.css +643 -1265
- package/src/css/app.css.map +1 -1
- package/src/css/button.css +0 -3
- package/src/css/button.css.map +1 -1
- package/src/css/editor.css +576 -183
- package/src/css/editor.css.map +1 -1
- package/src/css/install.css +11471 -0
- package/src/css/install.css.map +1 -0
- package/src/css/login.css +640 -1263
- package/src/css/login.css.map +1 -1
- package/src/js/admin.js +717 -699
- package/src/js/admin.js.map +1 -1
- package/src/js/app.js +30463 -348
- package/src/js/app.js.map +1 -1
- package/src/js/login.js +8 -7
- package/src/js/login.js.map +1 -1
- package/src/scss/admin/layout/content/footer.scss +3 -4
- package/src/scss/admin/layout/content/title.scss +3 -6
- package/src/scss/admin/layout/content.scss +3 -5
- package/src/scss/admin/media.scss +13 -22
- package/src/scss/admin.scss +2 -6
- package/src/scss/button.scss +1 -14
- package/src/scss/editor.scss +2 -3
- package/src/scss/login.scss +2 -16
- package/src/ts/admin.ts +7 -8
- package/src/ts/app.ts +0 -2
- package/src/ts/core/BaseSite.ts +21 -0
- package/src/ts/core/ColorPicker.ts +5 -1
- package/src/ts/core/Editors.ts +6 -7
- package/src/ts/core/HoodApi.ts +5 -0
- package/src/ts/core/Media.ts +4 -0
- package/src/ts/core/alerts.ts +1 -1
- package/src/ts/index.ts +25 -0
- package/src/ts/hood.ts +0 -5
package/src/js/login.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* hoodcms v5.0.
|
|
2
|
+
* hoodcms v5.0.8
|
|
3
|
+
* A fully customisable content management system built in ASP.NET Core 5 & Bootstrap 5.
|
|
4
|
+
* Written by George Whysall, 2021
|
|
3
5
|
* Released under the GPL-3.0 License.
|
|
4
6
|
*/
|
|
5
7
|
(function (factory) {
|
|
6
8
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
7
9
|
factory();
|
|
8
|
-
}((function () { 'use strict';
|
|
10
|
+
})((function () { 'use strict';
|
|
9
11
|
|
|
10
12
|
var Login = /** @class */ (function () {
|
|
11
13
|
function Login() {
|
|
@@ -20,14 +22,14 @@
|
|
|
20
22
|
};
|
|
21
23
|
Login.prototype.renderImage = function (images) {
|
|
22
24
|
if (typeof images == "string") {
|
|
23
|
-
$('#image-container').css({ 'background-image': "url("
|
|
25
|
+
$('#image-container').css({ 'background-image': "url(".concat(images, ")") });
|
|
24
26
|
$('#image-credit').hide();
|
|
25
27
|
}
|
|
26
28
|
else {
|
|
27
29
|
if (images.length > 0) {
|
|
28
30
|
$('#image-container').attr('title', images[0].description);
|
|
29
|
-
$('#image-container').css({ 'background-image': "url("
|
|
30
|
-
$('#image-credit').html("Image by <a href='"
|
|
31
|
+
$('#image-container').css({ 'background-image': "url(".concat(images[0].urls.regular, ")") });
|
|
32
|
+
$('#image-credit').html("Image by <a href='".concat(images[0].user.links.html, "?utm_source=Hood%20CMS&utm_medium=referral'>").concat(images[0].user.name, "</a> on <a href='https://unsplash.com/?utm_source=Hood%20CMS&utm_medium=referral'>Unsplash</a>"));
|
|
31
33
|
}
|
|
32
34
|
else {
|
|
33
35
|
$('#image-credit').hide();
|
|
@@ -38,6 +40,5 @@
|
|
|
38
40
|
}());
|
|
39
41
|
new Login();
|
|
40
42
|
|
|
41
|
-
}))
|
|
42
|
-
if (typeof this !== 'undefined' && this.hood){ this.hoodCMS = this.Hood = this.hoodCMS = this.HoodCMS = this.hood}
|
|
43
|
+
}));
|
|
43
44
|
//# sourceMappingURL=login.js.map
|
package/src/js/login.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sources":["../../../../src/ts/login.ts"],"sourcesContent":["class Login {\r\n constructor() {\r\n this.loadBackground();\r\n\r\n \r\n }\r\n\r\n loginPage() {\r\n\r\n }\r\n\r\n loadBackground() {\r\n\r\n if ($('#image-container').length > 0) {\r\n $.get($('#image-container').data('imageUrl'), this.renderImage.bind(this))\r\n }\r\n\r\n }\r\n\r\n renderImage(images: any) {\r\n if (typeof images == \"string\") {\r\n $('#image-container').css({ 'background-image': `url(${images})` });\r\n $('#image-credit').hide();\r\n } else {\r\n if (images.length > 0) {\r\n $('#image-container').attr('title', images[0].description);\r\n $('#image-container').css({ 'background-image': `url(${images[0].urls.regular})` });\r\n $('#image-credit').html(`Image by <a href='${images[0].user.links.html}?utm_source=Hood%20CMS&utm_medium=referral'>${images[0].user.name}</a> on <a href='https://unsplash.com/?utm_source=Hood%20CMS&utm_medium=referral'>Unsplash</a>`)\r\n } else {\r\n $('#image-credit').hide();\r\n }\r\n }\r\n }\r\n}\r\n\r\nnew Login();"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"login.js","sources":["../../../../src/ts/login.ts"],"sourcesContent":["class Login {\r\n constructor() {\r\n this.loadBackground();\r\n\r\n \r\n }\r\n\r\n loginPage() {\r\n\r\n }\r\n\r\n loadBackground() {\r\n\r\n if ($('#image-container').length > 0) {\r\n $.get($('#image-container').data('imageUrl'), this.renderImage.bind(this))\r\n }\r\n\r\n }\r\n\r\n renderImage(images: any) {\r\n if (typeof images == \"string\") {\r\n $('#image-container').css({ 'background-image': `url(${images})` });\r\n $('#image-credit').hide();\r\n } else {\r\n if (images.length > 0) {\r\n $('#image-container').attr('title', images[0].description);\r\n $('#image-container').css({ 'background-image': `url(${images[0].urls.regular})` });\r\n $('#image-credit').html(`Image by <a href='${images[0].user.links.html}?utm_source=Hood%20CMS&utm_medium=referral'>${images[0].user.name}</a> on <a href='https://unsplash.com/?utm_source=Hood%20CMS&utm_medium=referral'>Unsplash</a>`)\r\n } else {\r\n $('#image-credit').hide();\r\n }\r\n }\r\n }\r\n}\r\n\r\nnew Login();"],"names":[],"mappings":";;;;;;;;;;;IAAA;QACI;YACI,IAAI,CAAC,cAAc,EAAE,CAAC;SAGzB;QAED,yBAAS,GAAT;SAEC;QAED,8BAAc,GAAd;YAEI,IAAI,CAAC,CAAC,kBAAkB,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;gBAClC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;aAC7E;SAEJ;QAED,2BAAW,GAAX,UAAY,MAAW;YACnB,IAAI,OAAO,MAAM,IAAI,QAAQ,EAAE;gBAC3B,CAAC,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,EAAE,kBAAkB,EAAE,cAAO,MAAM,MAAG,EAAE,CAAC,CAAC;gBACpE,CAAC,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,CAAC;aAC7B;iBAAM;gBACH,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;oBACnB,CAAC,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;oBAC3D,CAAC,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,EAAE,kBAAkB,EAAE,cAAO,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,MAAG,EAAE,CAAC,CAAC;oBACpF,CAAC,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,4BAAqB,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,yDAA+C,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,mGAAgG,CAAC,CAAA;iBAC5O;qBAAM;oBACH,CAAC,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,CAAC;iBAC7B;aACJ;SACJ;QACL,YAAC;IAAD,CAAC,IAAA;IAED,IAAI,KAAK,EAAE;;;;;;"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
footer.footer {
|
|
2
2
|
position: relative;
|
|
3
|
-
padding-top: $grid-gutter-width
|
|
4
|
-
margin-top: $grid-gutter-width
|
|
3
|
+
padding-top: math.div($grid-gutter-width, 2);
|
|
4
|
+
margin-top: math.div($grid-gutter-width, 2);
|
|
5
5
|
border: 0;
|
|
6
6
|
border-top: 1px solid $gray-200;
|
|
7
|
-
|
|
8
7
|
@media (min-width: 768px) {
|
|
9
8
|
padding-top: $grid-gutter-width;
|
|
10
9
|
margin-top: $grid-gutter-width;
|
|
11
10
|
}
|
|
12
|
-
}
|
|
11
|
+
}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
div.title {
|
|
2
2
|
position: relative;
|
|
3
|
-
padding-bottom: $grid-gutter-width
|
|
4
|
-
margin-bottom: $grid-gutter-width
|
|
3
|
+
padding-bottom: math.div($grid-gutter-width, 2);
|
|
4
|
+
margin-bottom: math.div($grid-gutter-width, 2);
|
|
5
5
|
border: 0;
|
|
6
6
|
border-bottom: 1px solid $gray-200;
|
|
7
|
-
|
|
8
7
|
@media (min-width: 768px) {
|
|
9
8
|
padding-bottom: $grid-gutter-width;
|
|
10
9
|
margin-bottom: $grid-gutter-width;
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
ul.dropdown-menu {
|
|
14
12
|
right: 0;
|
|
15
13
|
left: auto;
|
|
16
14
|
}
|
|
17
|
-
|
|
18
15
|
h1 {
|
|
19
16
|
font-size: 2rem;
|
|
20
17
|
font-weight: bold;
|
|
@@ -24,4 +21,4 @@ div.title {
|
|
|
24
21
|
-moz-osx-font-smoothing: grayscale;
|
|
25
22
|
text-rendering: optimizeLegibility;
|
|
26
23
|
}
|
|
27
|
-
}
|
|
24
|
+
}
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
1
2
|
div.content {
|
|
2
3
|
position: absolute;
|
|
3
4
|
top: 59px;
|
|
4
5
|
right: 0;
|
|
5
6
|
bottom: 0;
|
|
6
7
|
left: 0;
|
|
7
|
-
padding: $grid-gutter-width
|
|
8
|
+
padding: math.div($grid-gutter-width, 2);
|
|
8
9
|
overflow: scroll;
|
|
9
10
|
overflow-x: hidden;
|
|
10
|
-
|
|
11
11
|
@media (min-width: 768px) {
|
|
12
12
|
padding: $grid-gutter-width;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
14
|
@media (min-width: 768px) {
|
|
16
15
|
top: 0;
|
|
17
16
|
left: $sidebar-width;
|
|
18
17
|
}
|
|
19
|
-
|
|
20
18
|
@import "content/title";
|
|
21
19
|
@import "content/footer";
|
|
22
20
|
@import "content/breadcrumb";
|
|
23
21
|
@import "content/body";
|
|
24
|
-
}
|
|
22
|
+
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
1
2
|
.media-list {
|
|
2
3
|
padding-top: $grid-gutter-width;
|
|
3
|
-
padding-right: $grid-gutter-width
|
|
4
|
-
padding-left: $grid-gutter-width
|
|
4
|
+
padding-right: math.div($grid-gutter-width, 2);
|
|
5
|
+
padding-left: math.div($grid-gutter-width, 2);
|
|
5
6
|
background-color: $gray-200;
|
|
6
7
|
border-radius: $border-radius;
|
|
7
|
-
|
|
8
8
|
figure.attach-media-select {
|
|
9
9
|
cursor: pointer;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
11
|
.thumbnail {
|
|
13
12
|
display: block;
|
|
14
13
|
padding: $thumbnail-padding;
|
|
@@ -19,14 +18,12 @@
|
|
|
19
18
|
border: 0;
|
|
20
19
|
border-radius: $thumbnail-border-radius;
|
|
21
20
|
@include transition(border .2s ease-in-out);
|
|
22
|
-
|
|
23
21
|
&:hover {
|
|
24
22
|
background-color: #f6f6f6;
|
|
25
23
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
>
|
|
29
|
-
a > img {
|
|
24
|
+
>img,
|
|
25
|
+
>.img,
|
|
26
|
+
a>img {
|
|
30
27
|
width: auto !important;
|
|
31
28
|
max-width: none !important;
|
|
32
29
|
margin-top: -$thumbnail-padding;
|
|
@@ -36,16 +33,15 @@
|
|
|
36
33
|
}
|
|
37
34
|
// Image captions
|
|
38
35
|
.caption {
|
|
39
|
-
padding: $grid-gutter-width
|
|
36
|
+
padding: math.div($grid-gutter-width, 2);
|
|
40
37
|
}
|
|
41
38
|
}
|
|
42
|
-
|
|
43
39
|
.k-loading-mask {
|
|
44
40
|
position: relative;
|
|
45
41
|
display: block;
|
|
46
42
|
width: auto !important;
|
|
47
|
-
padding: $grid-gutter-width
|
|
48
|
-
margin: $grid-gutter-width
|
|
43
|
+
padding: math.div($grid-gutter-width, 2) $grid-gutter-width;
|
|
44
|
+
margin: math.div($grid-gutter-width, 2);
|
|
49
45
|
margin-top: 0;
|
|
50
46
|
margin-bottom: $grid-gutter-width;
|
|
51
47
|
color: #000;
|
|
@@ -53,13 +49,11 @@
|
|
|
53
49
|
border: 1px solid $primary;
|
|
54
50
|
border-radius: $border-radius;
|
|
55
51
|
}
|
|
56
|
-
|
|
57
52
|
&::before,
|
|
58
53
|
&::after {
|
|
59
54
|
display: table;
|
|
60
55
|
content: " ";
|
|
61
56
|
}
|
|
62
|
-
|
|
63
57
|
&::after {
|
|
64
58
|
clear: both;
|
|
65
59
|
}
|
|
@@ -74,22 +68,19 @@ span.no-items {
|
|
|
74
68
|
|
|
75
69
|
.directories {
|
|
76
70
|
.nav-pills {
|
|
77
|
-
>
|
|
78
|
-
>
|
|
71
|
+
>li {
|
|
72
|
+
>a {
|
|
79
73
|
background-color: #ccc;
|
|
80
74
|
border-radius: $nav-pills-border-radius;
|
|
81
|
-
|
|
82
75
|
&:hover,
|
|
83
76
|
&:focus {
|
|
84
77
|
color: black;
|
|
85
78
|
background-color: #bbb;
|
|
86
79
|
}
|
|
87
80
|
}
|
|
88
|
-
|
|
89
|
-
&.active > a {
|
|
81
|
+
&.active>a {
|
|
90
82
|
color: white;
|
|
91
83
|
background-color: $primary;
|
|
92
|
-
|
|
93
84
|
&:hover,
|
|
94
85
|
&:focus {
|
|
95
86
|
color: white;
|
|
@@ -98,4 +89,4 @@ span.no-items {
|
|
|
98
89
|
}
|
|
99
90
|
}
|
|
100
91
|
}
|
|
101
|
-
}
|
|
92
|
+
}
|
package/src/scss/admin.scss
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
@import url("https://cdn.jsdelivr.net/npm/chart.js@2.9.2/dist/Chart.min.css");
|
|
2
2
|
@import "admin/variables";
|
|
3
|
-
@import "
|
|
4
|
-
|
|
3
|
+
@import "~bootstrap/scss/bootstrap";
|
|
5
4
|
@import "core/all";
|
|
6
|
-
|
|
7
5
|
@import "admin/nav-tabs";
|
|
8
6
|
@import "admin/media";
|
|
9
7
|
@import "admin/hood-inline";
|
|
10
8
|
@import "admin/cards";
|
|
11
9
|
@import "admin/code-viewer";
|
|
12
|
-
|
|
13
|
-
@import "admin/layout";
|
|
14
|
-
|
|
10
|
+
@import "admin/layout";
|
package/src/scss/button.scss
CHANGED
|
@@ -3,28 +3,22 @@
|
|
|
3
3
|
bottom: 15px;
|
|
4
4
|
left: 25px;
|
|
5
5
|
z-index: 99998;
|
|
6
|
-
|
|
7
6
|
button.dropdown-toggle {
|
|
8
7
|
width: 65px;
|
|
9
8
|
height: 65px;
|
|
10
9
|
text-align: center;
|
|
11
10
|
text-indent: 10000px;
|
|
12
11
|
background: #f0f0f0;
|
|
13
|
-
background: radial-gradient(center, ellipse cover, #f0f0f0 13%, #dcd8d8 100%);
|
|
14
|
-
background: radial-gradient(center, ellipse cover, #f0f0f0 13%, #dcd8d8 100%);
|
|
15
12
|
background: radial-gradient(ellipse at center, #f0f0f0 13%, #dcd8d8 100%);
|
|
16
|
-
filter: progid:dximagetransform.microsoft.gradient(startColorstr="#f0f0f0", endColorstr="#dcd8d8", GradientType=1);
|
|
17
13
|
background-repeat: no-repeat;
|
|
18
14
|
background-position: center;
|
|
19
15
|
border: 1px solid #dcd8d8;
|
|
20
16
|
border-radius: 50%;
|
|
21
17
|
box-shadow: 2px 3px 25px rgba(0, 0, 0, .2);
|
|
22
18
|
box-shadow: 2px 3px 25px rgba(0, 0, 0, .2);
|
|
23
|
-
|
|
24
19
|
&::after {
|
|
25
20
|
display: none;
|
|
26
21
|
}
|
|
27
|
-
|
|
28
22
|
img {
|
|
29
23
|
display: block;
|
|
30
24
|
width: 35px;
|
|
@@ -32,32 +26,26 @@
|
|
|
32
26
|
margin: auto;
|
|
33
27
|
}
|
|
34
28
|
}
|
|
35
|
-
|
|
36
29
|
.dropdown-menu {
|
|
37
30
|
margin-bottom: 10px;
|
|
38
|
-
|
|
39
31
|
a {
|
|
40
32
|
padding: 8px 20px;
|
|
41
33
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;
|
|
42
34
|
font-size: 13px;
|
|
43
|
-
|
|
44
35
|
&:hover {
|
|
45
36
|
background-color: #ececec;
|
|
46
37
|
}
|
|
47
|
-
|
|
48
38
|
&.active {
|
|
49
39
|
color: white;
|
|
50
40
|
text-decoration: none;
|
|
51
41
|
background-color: #ababab;
|
|
52
42
|
}
|
|
53
|
-
|
|
54
43
|
i {
|
|
55
44
|
width: 10px;
|
|
56
45
|
margin-right: 25px;
|
|
57
46
|
text-align: center;
|
|
58
47
|
}
|
|
59
48
|
}
|
|
60
|
-
|
|
61
49
|
&::before {
|
|
62
50
|
position: absolute;
|
|
63
51
|
bottom: -7px;
|
|
@@ -69,7 +57,6 @@
|
|
|
69
57
|
border-right: 7px solid transparent;
|
|
70
58
|
border-left: 7px solid transparent;
|
|
71
59
|
}
|
|
72
|
-
|
|
73
60
|
&::after {
|
|
74
61
|
position: absolute;
|
|
75
62
|
bottom: -6px;
|
|
@@ -81,4 +68,4 @@
|
|
|
81
68
|
border-left: 6px solid transparent;
|
|
82
69
|
}
|
|
83
70
|
}
|
|
84
|
-
}
|
|
71
|
+
}
|
package/src/scss/editor.scss
CHANGED
package/src/scss/login.scss
CHANGED
|
@@ -1,40 +1,31 @@
|
|
|
1
|
-
@import "
|
|
2
|
-
|
|
1
|
+
@import "~bootstrap/scss/bootstrap";
|
|
3
2
|
@import "core/_alerts.scss";
|
|
4
3
|
@import "core/_forms.scss";
|
|
5
|
-
|
|
6
4
|
body {
|
|
7
|
-
|
|
8
5
|
.login-container {
|
|
9
6
|
flex-shrink: 0;
|
|
10
7
|
max-width: 42rem;
|
|
11
8
|
overflow-y: auto;
|
|
12
|
-
|
|
13
9
|
.login-content {
|
|
14
10
|
width: 100%;
|
|
15
11
|
max-width: 22.5rem;
|
|
16
12
|
margin: auto;
|
|
17
13
|
}
|
|
18
14
|
}
|
|
19
|
-
|
|
20
15
|
#image-container {
|
|
21
16
|
background-position: center;
|
|
22
17
|
background-size: cover;
|
|
23
|
-
|
|
24
18
|
#image-credit {
|
|
25
19
|
color: $white;
|
|
26
20
|
background-color: rgba(0, 0, 0, .5);
|
|
27
|
-
|
|
28
21
|
a {
|
|
29
22
|
color: $white;
|
|
30
|
-
|
|
31
23
|
&:hover {
|
|
32
24
|
color: $gray-200;
|
|
33
25
|
}
|
|
34
26
|
}
|
|
35
27
|
}
|
|
36
28
|
}
|
|
37
|
-
|
|
38
29
|
header {
|
|
39
30
|
img {
|
|
40
31
|
display: block;
|
|
@@ -43,19 +34,15 @@ body {
|
|
|
43
34
|
margin: 25px auto;
|
|
44
35
|
}
|
|
45
36
|
}
|
|
46
|
-
|
|
47
37
|
.header {
|
|
48
38
|
text-align: center;
|
|
49
|
-
|
|
50
39
|
h2 {
|
|
51
40
|
margin-bottom: .5em;
|
|
52
41
|
font-size: 1.5rem;
|
|
53
42
|
}
|
|
54
43
|
}
|
|
55
|
-
|
|
56
44
|
footer {
|
|
57
45
|
text-align: center;
|
|
58
|
-
|
|
59
46
|
small {
|
|
60
47
|
a {
|
|
61
48
|
font-weight: normal;
|
|
@@ -64,10 +51,9 @@ body {
|
|
|
64
51
|
}
|
|
65
52
|
}
|
|
66
53
|
}
|
|
67
|
-
|
|
68
54
|
&.install {
|
|
69
55
|
.login-block {
|
|
70
56
|
max-width: 996px;
|
|
71
57
|
}
|
|
72
58
|
}
|
|
73
|
-
}
|
|
59
|
+
}
|
package/src/ts/admin.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/// <reference types="jquery.slimscroll" />
|
|
2
|
-
|
|
3
|
-
export * from "./hood";
|
|
4
|
-
|
|
5
2
|
import * as bootstrap from 'bootstrap';
|
|
6
3
|
|
|
7
|
-
import
|
|
4
|
+
import './index';
|
|
8
5
|
|
|
9
6
|
import { HomeController } from "./admin/HomeController";
|
|
10
7
|
import { MediaController } from './admin/MediaController';
|
|
@@ -15,8 +12,7 @@ import { ThemesController } from './admin/ThemesController';
|
|
|
15
12
|
import { ContentTypeController } from './admin/ContentTypeController';
|
|
16
13
|
import { LogsController } from './admin/LogsController';
|
|
17
14
|
import { PropertyImporter } from './admin/PropertyImporter';
|
|
18
|
-
import {
|
|
19
|
-
import { ColorPickers } from './core/ColorPicker';
|
|
15
|
+
import { HoodApi } from './core/HoodApi';
|
|
20
16
|
|
|
21
17
|
class Admin extends HoodApi {
|
|
22
18
|
|
|
@@ -47,8 +43,11 @@ class Admin extends HoodApi {
|
|
|
47
43
|
this.themes = new ThemesController();
|
|
48
44
|
this.users = new UsersController();
|
|
49
45
|
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
// Hook up rich text editors
|
|
47
|
+
this.editors.richTextEditors();
|
|
48
|
+
|
|
49
|
+
// Hook up colour pickers
|
|
50
|
+
this.colorPickers.loadColorPickers();
|
|
52
51
|
|
|
53
52
|
if ($('#page-tabs').length > 0) {
|
|
54
53
|
this.checkAndLoadTabs('#page-tabs');
|
package/src/ts/app.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class BaseSite {
|
|
2
|
+
|
|
3
|
+
constructor() {
|
|
4
|
+
|
|
5
|
+
// Initialise
|
|
6
|
+
this.initialise();
|
|
7
|
+
|
|
8
|
+
$(window).on('load', this.onLoad.bind(this));
|
|
9
|
+
$(window).on('resize', this.onResize.bind(this));
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
initialise() {
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
onLoad() {
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
onResize() {
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
import '@simonwep/pickr';
|
|
3
3
|
|
|
4
4
|
export class ColorPickers {
|
|
5
|
-
constructor(
|
|
5
|
+
constructor() {
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
loadColorPickers(tag: string = '.color-picker') {
|
|
6
10
|
|
|
7
11
|
let updateColorFieldValue = function (color: Pickr.HSVaColor, eventSource: any, instance: any) {
|
|
8
12
|
let elemId = $(instance._root.button).parent().data('target');
|
package/src/ts/core/Editors.ts
CHANGED
|
@@ -40,7 +40,6 @@ export class Editors {
|
|
|
40
40
|
|
|
41
41
|
constructor(options?: EditorOptions) {
|
|
42
42
|
this.options = { ...this.options, ...options };
|
|
43
|
-
this.richTextEditors();
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
richTextEditors() {
|
|
@@ -53,9 +52,9 @@ export class Editors {
|
|
|
53
52
|
plugins: [
|
|
54
53
|
'advlist autolink lists link image charmap print preview anchor media',
|
|
55
54
|
'searchreplace visualblocks code fullscreen',
|
|
56
|
-
'insertdatetime media contextmenu paste code'
|
|
55
|
+
'insertdatetime media contextmenu paste code textcolor'
|
|
57
56
|
],
|
|
58
|
-
toolbar:
|
|
57
|
+
toolbar: "fullscreen | styleselect forecolor backcolor | hoodimage link media image | bold italic | alignleft aligncenter alignright | bullist numlist | table | undo redo",
|
|
59
58
|
link_class_list: this.options.linkClasses,
|
|
60
59
|
image_class_list: this.options.imageClasses,
|
|
61
60
|
setup: this.setupCommands.bind(this),
|
|
@@ -75,7 +74,7 @@ export class Editors {
|
|
|
75
74
|
'insertdatetime media contextmenu paste code'
|
|
76
75
|
],
|
|
77
76
|
menubar: false,
|
|
78
|
-
toolbar: 'bold italic | bullist numlist | undo redo | link',
|
|
77
|
+
toolbar: 'fullscreen | bold italic | bullist numlist | undo redo | link',
|
|
79
78
|
link_class_list: this.options.linkClasses,
|
|
80
79
|
image_class_list: this.options.imageClasses,
|
|
81
80
|
setup: this.setupCommands.bind(this),
|
|
@@ -89,9 +88,9 @@ export class Editors {
|
|
|
89
88
|
plugins: [
|
|
90
89
|
'advlist autolink lists link image charmap print preview anchor media',
|
|
91
90
|
'searchreplace visualblocks code fullscreen',
|
|
92
|
-
'insertdatetime media contextmenu paste code'
|
|
91
|
+
'insertdatetime media contextmenu paste code textcolor'
|
|
93
92
|
],
|
|
94
|
-
toolbar:
|
|
93
|
+
toolbar: "fullscreen | styleselect forecolor backcolor | hoodimage link media image | bold italic | alignleft aligncenter alignright | bullist numlist | table | undo redo",
|
|
95
94
|
link_class_list: this.options.linkClasses,
|
|
96
95
|
image_class_list: this.options.imageClasses,
|
|
97
96
|
setup: this.setupCommands.bind(this),
|
|
@@ -107,7 +106,7 @@ export class Editors {
|
|
|
107
106
|
'insertdatetime media contextmenu paste code'
|
|
108
107
|
],
|
|
109
108
|
menubar: false,
|
|
110
|
-
toolbar: 'bold italic | bullist numlist | undo redo | link',
|
|
109
|
+
toolbar: 'fullscreen | bold italic | bullist numlist | undo redo | link',
|
|
111
110
|
link_class_list: this.options.linkClasses,
|
|
112
111
|
image_class_list: this.options.imageClasses,
|
|
113
112
|
image_dimensions: false
|
package/src/ts/core/HoodApi.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Alerts } from "./Alerts";
|
|
2
|
+
import { ColorPickers } from "./ColorPicker";
|
|
3
|
+
import { Editors } from "./Editors";
|
|
2
4
|
import { Handlers } from "./Handlers";
|
|
3
5
|
import { MediaModal } from "./Media";
|
|
4
6
|
import { Uploader } from "./Uploader";
|
|
@@ -19,6 +21,9 @@ export class HoodApi implements Hood {
|
|
|
19
21
|
alerts: Alerts = new Alerts();
|
|
20
22
|
uploader: Uploader = new Uploader();
|
|
21
23
|
handlers: Handlers = new Handlers();
|
|
24
|
+
editors: Editors = new Editors();
|
|
25
|
+
colorPickers: ColorPickers = new ColorPickers();
|
|
26
|
+
|
|
22
27
|
private mediaModal: MediaModal = new MediaModal();
|
|
23
28
|
|
|
24
29
|
constructor() {
|
package/src/ts/core/Media.ts
CHANGED
|
@@ -185,6 +185,10 @@ export class MediaService {
|
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
187
|
|
|
188
|
+
dz.on("error", function (this: MediaService, file: Dropzone.DropzoneFile, errormessage: any) {
|
|
189
|
+
Alerts.warning(errormessage);
|
|
190
|
+
}.bind(this));
|
|
191
|
+
|
|
188
192
|
dz.on("success", function (this: MediaService, file: Dropzone.DropzoneFile, data: Response) {
|
|
189
193
|
Response.process(data);
|
|
190
194
|
}.bind(this));
|
package/src/ts/core/alerts.ts
CHANGED
|
@@ -11,7 +11,7 @@ const BootstrapSwal = Swal.mixin({
|
|
|
11
11
|
|
|
12
12
|
export class Alerts {
|
|
13
13
|
|
|
14
|
-
static log(message:
|
|
14
|
+
static log(message: any, type: 'message' | 'error' | 'warning' | 'info' = 'message') {
|
|
15
15
|
if (!document.body.classList.contains('dev-mode')) {
|
|
16
16
|
return;
|
|
17
17
|
}
|
package/src/ts/index.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from './interfaces/KeyValue'
|
|
2
|
+
|
|
3
|
+
export * from './models/Content'
|
|
4
|
+
export * from './models/Property'
|
|
5
|
+
export * from './models/Users'
|
|
6
|
+
|
|
7
|
+
export * from './core/Alerts'
|
|
8
|
+
export * from './core/BaseSite'
|
|
9
|
+
export * from './core/ColorPicker'
|
|
10
|
+
export * from './core/DataList'
|
|
11
|
+
export * from './core/Editors'
|
|
12
|
+
export * from './core/Handlers'
|
|
13
|
+
export * from './core/HoodApi'
|
|
14
|
+
export * from './core/Inline'
|
|
15
|
+
export * from './core/Loader'
|
|
16
|
+
export * from './core/Media'
|
|
17
|
+
export * from './core/Modal'
|
|
18
|
+
export * from './core/RandomStringGenerator'
|
|
19
|
+
export * from './core/Response'
|
|
20
|
+
export * from './core/Uploader'
|
|
21
|
+
export * from './core/Validator'
|
|
22
|
+
|
|
23
|
+
export * from './extensions/jqueryExtensions'
|
|
24
|
+
export * from './extensions/numberExtensions'
|
|
25
|
+
export * from './extensions/stringExtensions'
|