diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ diff --git a/Backoffice/src/main/resources/frontend/addObject.html b/Backoffice/src/main/resources/frontend/addObject.html new file mode 100644 index 0000000..1cbd1b9 --- /dev/null +++ b/Backoffice/src/main/resources/frontend/addObject.html @@ -0,0 +1,128 @@ + + + + + + + Adminka + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+ + +
+ + + +
+ + +
+ +
+ +
+ + + + \ No newline at end of file diff --git a/Backoffice/src/main/resources/frontend/admin.html b/Backoffice/src/main/resources/frontend/admin.html new file mode 100644 index 0000000..adf2f14 --- /dev/null +++ b/Backoffice/src/main/resources/frontend/admin.html @@ -0,0 +1,92 @@ + + + + + + + Adminka + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Backoffice/src/main/resources/frontend/css/addObject.css b/Backoffice/src/main/resources/frontend/css/addObject.css new file mode 100644 index 0000000..f4c1e83 --- /dev/null +++ b/Backoffice/src/main/resources/frontend/css/addObject.css @@ -0,0 +1,77 @@ +.preview-images-zone { + width: 100%; + border: 1px solid #ddd; + min-height: 180px; + /*display: flex;*/ + padding: 5px 5px 0 5px; + position: relative; + overflow: auto; +} + +.preview-images-zone > .preview-image:first-child { + height: 185px; + width: 185px; + position: relative; + margin-right: 5px; +} + +.preview-images-zone > .preview-image { + height: 185px; + width: 185px; + position: relative; + margin-right: 5px; + float: left; + margin-bottom: 5px; +} + +.preview-images-zone > .preview-image > .image-zone { + width: 100%; + height: 100%; +} + +.preview-images-zone > .preview-image > .image-zone > img { + width: 100%; + height: 100%; +} + +.preview-images-zone > .preview-image > .tools-edit-image { + position: absolute; + z-index: 100; + color: #fff; + bottom: 0; + width: 100%; + text-align: center; + margin-bottom: 10px; + display: none; +} + +.preview-images-zone > .preview-image > .image-cancel { + font-size: 18px; + position: absolute; + top: 0; + right: 0; + font-weight: bold; + margin-right: 10px; + cursor: pointer; + display: none; + z-index: 100; +} + +.preview-image:hover > .image-zone { + cursor: move; + opacity: .5; +} + +.preview-image:hover > .tools-edit-image, +.preview-image:hover > .image-cancel { + display: block; +} + +.ui-sortable-helper { + width: 90px !important; + height: 90px !important; +} + +#images { + display: none; +} \ No newline at end of file diff --git a/Backoffice/src/main/resources/frontend/css/main.css b/Backoffice/src/main/resources/frontend/css/main.css new file mode 100644 index 0000000..d93b6ab --- /dev/null +++ b/Backoffice/src/main/resources/frontend/css/main.css @@ -0,0 +1,6 @@ +@import url(http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css); + +.container { + padding: 1rem; +} + diff --git a/Backoffice/src/main/resources/frontend/index.html b/Backoffice/src/main/resources/frontend/index.html new file mode 100644 index 0000000..4e16353 --- /dev/null +++ b/Backoffice/src/main/resources/frontend/index.html @@ -0,0 +1,63 @@ + + + + + + + Admin Panel + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ + + +
+
+ + +
+
+ + +
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/Backoffice/src/main/resources/frontend/js/addObject.js b/Backoffice/src/main/resources/frontend/js/addObject.js new file mode 100644 index 0000000..18f7b5e --- /dev/null +++ b/Backoffice/src/main/resources/frontend/js/addObject.js @@ -0,0 +1,40 @@ +$(document).ready(function () { + document.getElementById('images').addEventListener('change', readImage, false); + + $(".preview-images-zone").sortable(); + + $(document).on('click', '.image-cancel', function () { + let no = $(this).data('no'); + $(".preview-image.preview-show-" + no).remove(); + }); +}); + + +function readImage() { + let num = 0; + if (window.File && window.FileList && window.FileReader) { + let files = event.target.files; //FileList object + let output = $(".preview-images-zone"); + for (let i = 0; i < files.length; i++) { + let file = files[i]; + if (!file.type.match('image')) continue; + + let picReader = new FileReader(); + + picReader.addEventListener('load', function (event) { + let picFile = event.target; + let html = '
' + + '
x
' + + '
' + + '
'; + output.append(html); + num = num + 1; + }); + + picReader.readAsDataURL(file); + } + $("#images").val(''); + } else { + console.log('Browser not support'); + } +} \ No newline at end of file diff --git a/README.md b/README.md index 1e684b9..bbb38ab 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# Kharkitecture +# Kharkitecture frontend