15/01/2024

This commit is contained in:
2024-01-15 15:54:17 +07:00
commit 0c562989d3
24 changed files with 2880 additions and 0 deletions

106
README.md Normal file
View File

@@ -0,0 +1,106 @@
<h1 style="text-align: center;">Hướng dẫn</h1>
<p> Trong file giao diện, để hiển thị thanh công cụ chỉnh sửa cần có <b>class="js-hura-edit" và data-hura-type="{{type}}"</b> tương ứng. Trường hợp chỉ có 1 trong 2 yêu cầu trên sẽ không hiển thị thanh công cụ </p>
<p> Kỹ thuật khi cắt HTML + CSS đặt class và type cho thẻ muốn chỉnh sửa </p>
<h2>1. Cài đặt</h2>
<code>
<!-- // 1. index.html -->
<iframe class="hura-main-content" id="js-hura-iframe" src="{// Url giao diện \\}"></iframe>
<script src="js/hura_edit.js"></script> => // code edit template
<script src="js/jscolor.js"></script> => // Bảng mã màu
<script>
Hura_Edit.install(); // => Cài đặt
</script>
<!-- // 2. file giao diện. Các file dưới sẽ được thêm vào iframe. Function cài đặt Hura_Edit.Iframe.iframe_Setup() -->
<link rel="stylesheet" href="css/style.css"/>
<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.min.js"> </script> => // Thư viện kéo/thả
</code>
<h2>2. Quy định </h2>
<p>Danh sách Class, Attribute được sử dụng</p>
<ul>
<li>
<b> class="js-hura-edit"</b>:
Khi Hover, Click, dbclick thẻ HTML nào chứa class này sẽ kiểm tra thuộc tính <u style="font-weight: bold;">data-hura-type="{{ type }}"</u> và hiển thị thanh công cụ (toolbar) tương ứng
</li>
<li>
<b>data-hura-type="{{ type }}" :</b>
Kiểu giao diện được edit. Dưới đây là danh sách type được sử dụng cho giao diện <a href="https://app.adman.vn/api/preview/minigame.php?id=O4z25JLzP9" target="_blank" style="font-weight:bold;">Mini Game </a>
<ul>
<li>file : Dùng thay thế file logo, banner</li>
<li>text : Dùng chỉnh sửa HTML là text (Nếu thẻ được chọn là thẻ <a> thì sẽ có thêm lựa chọn: sửa URL, Mở tab mới)</li>
<li>wheel : Dùng cài đặt vòng quay (Thêm, sửa, xóa)</li>
<li>reward : Dùng cho mục khách trúng thưởng (Ẩn/Hiện các cột trong bảng)</li>
</ul>
</li>
<li>
<b>class="js-hura-drag" :</b>
Dùng để kéo/thả. Đặt ở thẻ HTML ngoài, các thành phần con gần nhất bên trong class này sẽ cho phép đổi vị trí của thành phần khác
</li>
</ul>
<p> VD 1: Đổi ảnh hoặc banner sẽ dùng <b>data-hura-type="file"</b> </p>
<code>
<!-- // Logo -->
<a href="" class="js-hura-edit" data-hura-type="file">
<img src="https://aman.gleecdn.com/file/1/tl/TL1MzbLUhPQoaGI.png" alt="logo">
</a>
<!-- // Banner -->
<div class="js-hura-edit" data-hura-type="file">
<img src="https://aman.gleecdn.com/file/1/fo/fOE3m0gpFuzy7LU.jpg" alt="banner">
</div>
</code>
<p> VD 2: Sửa Text sẽ dùng <b>data-hura-type="text"</b> </p>
<code>
<!-- Text -->
<div class="js-hura-edit" data-hura-type="text">
<a target="_blank" href="https://demxanh.com/">Trang chủ</a>
<a target="_blank" href="https://demxanh.com/chinh-sach-bao-hanh.html"><span>Bảo hành</span></a>
<a target="_blank" href="https://demxanh.com/lien-he.html">Liên hệ</a>
</div>
<div class="js-hura-edit" data-hura-type="text">
<p>1. Quý khách cần đăng nhập Thông tin chính xác để quay thưởng.</p>
<p>2. Mỗi khách hàng được quay 5 lần và chỉ được chọn 1 phần quà.</p>
<p>3. Mã giảm giá sử dụng trong vòng 15 ngày kể từ ngày nhận thưởng.</p>
<p>4. Voucher được phát hành và áp dụng đến khi hết số lượng.</p>
</div>
</code>
<p> VD 3: Sửa Vòng quay sẽ dùng <b>data-hura-type="wheel"</b> </p>
<code>
<div class="js-hura-edit" data-hura-type="wheel">
<canvas id="canvas"></canvas>
</div>
</code>
<p> VD 4: Sửa Bảng trúng thưởng sẽ dùng <b>data-hura-type="reward"</b> </p>
<code>
<div class="js-hura-edit" data-hura-type="reward" style="padding: 4px;">
<div id="js-recent-winners"><table class="text-14 text-12-mb w-100"><thead><tr><th>STT</th><th>Khách hàng</th><th>Giải thưởng</th><th>Thời gian</th></tr></thead><tbody><tr><td>1</td><td>***ngoc@gmail.com</td><td>Voucher 100K</td><td>15-Mar-2023 9:43</td></tr></table></div>
</div>
</code>

578
css/style.css Normal file
View File

@@ -0,0 +1,578 @@
::-webkit-scrollbar-track {
background: #343434;
}
::-webkit-scrollbar-thumb {
background: #5d5d5d;
border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
background: #5d5d5d;
}
::-webkit-scrollbar {
width: 8px;
height: 10px;
}
iframe {
width: 100%;
height: 100%;
border: 0;
display: block;
}
#js-hura-edit-container {
overflow-x: hidden;
}
.hura-scroll::-webkit-scrollbar-track, .hura-edit-popup-container .hura-edit-content::-webkit-scrollbar-track, .hura-edit-popup-container .hura-edit-popup-group::-webkit-scrollbar-track, .hura-edit-body .hura-toolbar-right::-webkit-scrollbar-track {
background: transparent;
}
.hura-scroll::-webkit-scrollbar-thumb, .hura-edit-popup-container .hura-edit-content::-webkit-scrollbar-thumb, .hura-edit-popup-container .hura-edit-popup-group::-webkit-scrollbar-thumb, .hura-edit-body .hura-toolbar-right::-webkit-scrollbar-thumb {
background: #D9D9D9;
border-radius: 5px;
}
.hura-scroll::-webkit-scrollbar-thumb:hover, .hura-edit-popup-container .hura-edit-content::-webkit-scrollbar-thumb:hover, .hura-edit-popup-container .hura-edit-popup-group::-webkit-scrollbar-thumb:hover, .hura-edit-body .hura-toolbar-right::-webkit-scrollbar-thumb:hover {
background: #5d5d5d;
}
.hura-scroll::-webkit-scrollbar, .hura-edit-popup-container .hura-edit-content::-webkit-scrollbar, .hura-edit-popup-container .hura-edit-popup-group::-webkit-scrollbar, .hura-edit-body .hura-toolbar-right::-webkit-scrollbar {
width: 10px;
height: 10px;
}
.hura-hide {
display: none;
}
.hura-style-italic {
font-style: italic !important;
}
.hura-style-under {
text-decoration: underline !important;
}
.hura-style-line-through {
text-decoration: line-through !important;
}
.hura-edit-body {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
background: #444;
}
.hura-edit-body .hura-toolbar-top {
width: 100%;
background: #24375C;
height: 40px;
border: 1px solid rgba(0, 0, 0, 0.15);
}
.hura-edit-body .hura-toolbar-right {
background: #24375C;
width: 320px;
height: calc(100% - 40px);
overflow: auto;
position: relative;
padding: 0 10px 10px;
color: #fff;
}
.hura-edit-body .hura-main-content {
width: calc(100% - 320px);
height: calc(100% - 40px);
overflow: auto;
transition: 0.3s all;
margin: auto;
border: 0;
}
.hura-edit-body .hura-main-content::-webkit-scrollbar-track {
background: #343434;
}
.hura-edit-body .hura-main-content::-webkit-scrollbar-thumb {
background: #5d5d5d;
border-radius: 0;
}
.hura-edit-body .hura-main-content::-webkit-scrollbar-thumb:hover {
background: #5d5d5d;
}
.hura-edit-body .hura-main-content::-webkit-scrollbar {
width: 8px;
height: 10px;
}
.hura-edit-body .hura-toolbar-holder {
width: calc(100% - 320px);
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.hura-edit-body .hura-toolbar-holder a {
margin: 0 10px;
}
.hura-edit-body .hura-toolbar-holder a:hover * {
fill: #4AC9FF;
}
.hura-edit-body .hura-btn-tab {
position: absolute;
top: 8px;
right: 16px;
}
.hura-edit-body .hura-panel-options {
border: 1px solid #374868;
background: #1E3053;
}
.hura-edit-body .hura-panel-options .hura-group-title {
padding: 0 10px;
line-height: 40px;
margin: 0;
color: #7D8FB1;
font-size: 16px;
}
.hura-edit-body .hura-option-list {
border-top: 1px solid #374868;
padding: 16px 10px;
}
.hura-edit-body .hura-option-list a {
display: table;
font-size: 14px;
margin-bottom: 10px;
line-height: 18px;
position: relative;
padding-left: 30px;
color: #fff !important;
}
.hura-edit-body .hura-option-list a::before {
content: "";
border-radius: 2px;
border: 1px solid #7D8FB1;
width: 18px;
height: 18px;
background: #1E3053;
position: absolute;
left: 0;
}
.hura-edit-body .hura-option-list .current::before {
background: #2989F9;
border-color: transparent;
}
.hura-edit-body .hura-option-list .current::after {
content: "";
width: 11px;
height: 8px;
border: 2px solid #fff;
border-top: 0;
border-right: 0;
position: absolute;
left: 4px;
transform: rotate(-45deg);
margin-top: 2px;
}
.hura-toolbar-list {
background: #2989F9;
box-shadow: 0px 2px 1px 0px rgba(0, 0, 0, 0.15);
line-height: 30px;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
right: 0;
z-index: 9;
}
.hura-toolbar-list a {
width: 30px;
height: 30px;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
outline: unset !important;
}
.hura-toolbar-table {
border: 1px solid #374868;
padding: 18px 10px;
margin-bottom: 10px;
}
.hura-toolbar-table table {
width: 100%;
}
.hura-toolbar-table table * {
color: #fff;
}
.hura-toolbar-table td {
padding: 6px 0;
}
.hura-toolbar-table td:nth-child(1) {
font-size: 13px;
font-weight: 300;
min-width: 75px;
}
.hura-toolbar-table select, .hura-toolbar-table input {
display: block;
width: 100%;
border-radius: 4px;
background: #07132B;
height: 36px;
color: #fff;
border: 0;
padding: 0 10px;
}
.js-hura-edit {
outline: 2px solid transparent;
}
.js-hura-edit:hover {
outline: 2px solid #2989F9;
}
.js-hura-edit *:hover {
outline: 2px solid #2989F9;
}
.js-hura-edit img:hover {
outline: 2px solid #2989F9;
}
.hura-selected {
outline: 2px solid #2989F9;
position: relative;
}
.hura-edit-popup-container table {
width: 100%;
}
.hura-edit-popup-container .hura-popup-bg {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 999;
}
.hura-edit-popup-container .hura-edit-popup-group {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #fff;
z-index: 1000;
max-width: 930px;
width: 100%;
height: 600px;
overflow: auto;
border-radius: 12px;
}
.hura-edit-popup-container .hura-popup-title {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px 12px;
border-bottom: 1px solid #F5F5F5;
line-height: 24px;
font-size: 20px;
font-weight: 500;
margin-bottom: 10px;
}
.hura-edit-popup-container .hura-popup-btn {
border-top: 1px solid #F5F5F5;
padding: 10px;
display: flex;
align-items: center;
justify-content: center;
line-height: 36px;
margin-top: 10px;
}
.hura-edit-popup-container .hura-popup-btn a {
color: #2989F9;
border-radius: 4px;
padding: 0 24px;
margin: 0 5px;
font-size: 14px;
}
.hura-edit-popup-container .hura-popup-btn a:last-child {
color: #fff;
background: #2989F9;
}
.hura-edit-popup-container .hura-edit-content {
height: calc(100% - 130px);
overflow: auto;
padding: 0 20px;
}
.hura-edit-popup-container .hura-edit-content thead {
background: #F5F5F5;
font-weight: 600;
}
.hura-edit-popup-container .hura-edit-content td {
font-size: 14px;
text-align: center;
border: 1px solid #ECECEC;
padding: 8px;
}
.hura-edit-popup-container .hura-edit-content td:nth-child(1) {
min-width: 50px;
}
.hura-edit-popup-container .hura-edit-content td:nth-child(2) {
min-width: 65px;
}
.hura-edit-popup-container .hura-edit-content td:nth-child(3) {
min-width: 150px;
}
.hura-edit-popup-container .hura-edit-content td:nth-child(5) input, .hura-edit-popup-container .hura-edit-content td:nth-child(6) input {
width: 100px;
text-align: center;
}
.hura-edit-popup-container .hura-edit-content td:nth-child(7) {
min-width: 90px;
}
.hura-edit-popup-container .hura-edit-content input, .hura-edit-popup-container .hura-edit-content select {
display: block;
border-radius: 4px;
border: 1px solid #E7E7E7;
background: #FFF;
height: 36px;
padding: 0 8px;
max-width: 250px;
}
.hura-edit-popup-container .hura-edit-content select {
padding: 0;
width: 100%;
}
.hura-edit-popup-container .hura-edit-content img {
display: block;
margin: auto auto 4px;
width: 42px;
}
.hura-sectors-container {
border: 1px solid #374868;
background: #1E3053;
}
.hura-sectors-container .hura-sectors-title {
background: #162541;
border-bottom: 1px solid #374868;
line-height: 20px;
padding: 10px;
color: #7D8FB1;
font-size: 16px;
display: flex;
align-items: center;
cursor: pointer;
}
.hura-sectors-container .hura-sectors-title svg {
margin-right: 10px;
}
.hura-sectors-container .hura-sectors-title p {
margin: 0;
}
.hura-sectors-container .hura-properties-list {
padding: 12px 10px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.hura-sectors-container .hura-style-item {
margin-bottom: 15px;
width: calc(50% - 15px);
}
.hura-sectors-container .hura-style-item input, .hura-sectors-container .hura-style-item select {
width: 100%;
height: 36px;
display: block;
color: #FFF;
border-radius: 4px;
background: #07132B;
border: 0;
padding: 0 5px;
}
.hura-sectors-container .hura-style-item input {
padding: 0 10px;
}
.hura-sectors-container .hura-style-item select {
-webkit-appearance: none;
background: #07132B url(../images/hura-icon-down.png) no-repeat right 10px center;
}
.hura-sectors-container .hura-style-title {
font-size: 14px;
margin: 0 0 8px;
}
.hura-sectors-container input[type=number]::-webkit-outer-spin-button,
.hura-sectors-container input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none;
background: transparent url(../images/hura-icon-direction.png) no-repeat center center;
width: 8px;
position: absolute;
top: 0;
right: 10px;
bottom: 0;
opacity: 1;
}
.hura-sectors-container .hura-text-align {
display: flex;
align-items: center;
text-align: center;
border-radius: 4px;
overflow: hidden;
}
.hura-sectors-container .hura-text-align label {
margin: 0;
width: 25%;
text-align: center;
background: #07132B;
border-right: 1px solid #000;
position: relative;
height: 36px;
}
.hura-sectors-container .hura-text-align label input {
-webkit-appearance: none;
height: 36px;
width: 100%;
display: block;
cursor: pointer;
}
.hura-sectors-container .hura-text-align label input:checked {
background: #475E8A;
}
.hura-sectors-container .hura-text-align label input:checked ~ svg {
background: #475E8A;
}
.hura-sectors-container .hura-text-align label svg {
position: absolute;
top: 9px;
left: 50%;
transform: translateX(-50%);
cursor: pointer;
}
.hura-sectors-container .hura-text-align button {
margin: 0;
width: 25%;
text-align: center;
background: #07132B;
border: 0;
border-right: 1px solid #000;
position: relative;
height: 36px;
line-height: 36px;
color: #fff;
cursor: pointer;
}
.hura-sectors-container .hura-text-align button svg * {
fill: #fff;
}
.hura-sectors-container .hura-text-align .current {
background: #475E8A;
}
.hura-sectors-container .hura-color-holder input {
background-position: right top, right top !important;
}
.hura-sectors-container .hura-input-number {
position: relative;
}
.hura-sectors-container .hura-input-number input {
padding-right: 45px;
}
.hura-sectors-container .hura-input-number span {
line-height: 36px;
font-size: 14px;
position: absolute;
top: 0;
right: 27px;
}
.hura-sectors-container .hura-button {
height: 36px;
line-height: 36px;
color: #fff;
border-radius: 4px;
border: 0;
background: #334566;
padding: 0 20px;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.hura-sectors-container .hura-button svg {
margin-right: 5px;
}
.hura-sectors-container .hura-rotation-button {
text-align: center;
padding: 10px 10px 18px;
}
.hura-sectors-container .hura-rotation-button button {
color: #4AC9FF;
background: transparent;
border: 0;
padding: 0;
margin: 0;
cursor: pointer;
height: 20px;
}
.hura-show-preview {
display: block;
}
.hura-show-preview .hura-toolbar-right, .hura-show-preview .hura-toolbar-list, .hura-show-preview .hura-btn-tab {
display: none;
}
.hura-show-preview .hura-main-content {
transition: unset;
width: 100% !important;
height: 100%;
}
.hura-show-preview .hura-toolbar-top {
position: fixed;
top: 0;
left: 0;
z-index: 1;
width: auto;
}
.hura-show-preview .hura-toolbar-holder {
width: auto;
}
.hura-show-preview .hura-toolbar-holder a {
display: none;
}
.hura-show-preview .hura-selected, .hura-show-preview .js-hura-edit, .hura-show-preview .js-hura-edit *:hover {
outline: none !important;
}
.hura-rotation-list {
font-size: 14px;
line-height: 16px;
padding: 10px 10px 0;
}
.hura-rotation-list p {
margin: 0;
}
.hura-rotation-list summary {
font-weight: 500;
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
padding: 10px;
}
.hura-rotation-list summary::marker {
content: none;
}
.hura-rotation-list .hura-rotation {
border: 1px solid #374868;
}
.hura-rotation-list .hura-rotation-detail {
padding: 0 10px 10px;
}
.hura-rotation-list .hura-rotation-box {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
margin-bottom: 13px;
}
.hura-rotation-list .hura-rotation-box img {
margin-top: 7px;
max-height: 58px;
}
.hura-rotation-list .hura-rotation-box p {
width: 100%;
}/*# sourceMappingURL=style.css.map */

1
css/style.css.map Normal file
View File

@@ -0,0 +1 @@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;EACA,UAAA;EACA,WAAA;ACAR;ADEI;EACI,WAAA;ACAR;ADCQ;EACI,aAAA;ACCZ;ADEI;EACI,wBAAA;ACAR;;ADGA;EACI,eAAA;EACA,iBAAA;EACA,oBAAA;ACAJ;ADCI;EACI,SAAA;ACCR;ADCI;EACI,gBAAA;EACA,eAAA;EACA,aAAA;EACA,mBAAA;EACA,8BAAA;EACA,eAAA;EACA,aAAA;ACCR;ADAQ;EACI,aAAA;ACEZ;ADCI;EACI,yBAAA;ACCR;ADCI;EACI,oBAAA;ACCR;ADCI;EACI,aAAA;EACA,eAAA;EACA,mBAAA;EACA,8BAAA;EACA,mBAAA;ACCR;ADAQ;EACI,eAAA;EACA,gBAAA;ACEZ;ADAQ;EACI,WAAA;ACEZ","file":"style.css"}

579
css/style.scss Normal file
View File

@@ -0,0 +1,579 @@
::-webkit-scrollbar-track {
background: #343434;
}
::-webkit-scrollbar-thumb {
background: #5d5d5d;
border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
background: #5d5d5d;
}
::-webkit-scrollbar {
width: 8px;
height: 10px;
}
iframe{
width: 100%;
height: 100%;
border: 0;
display: block;
}
#js-hura-edit-container {
overflow-x: hidden;
}
.hura-scroll {
&::-webkit-scrollbar-track {
background: transparent;
}
&::-webkit-scrollbar-thumb {
background: #D9D9D9;
border-radius: 5px;
}
&::-webkit-scrollbar-thumb:hover {
background: #5d5d5d;
}
&::-webkit-scrollbar {
width: 10px;
height: 10px;
}
}
.hura-hide{
display: none;
}
.hura-style-italic {
font-style: italic !important;
}
.hura-style-under {
text-decoration: underline !important;
}
.hura-style-line-through {
text-decoration: line-through !important;
}
.hura-edit-body {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
background: #444;
.hura-toolbar-top {
width: 100%;
background: #24375C;
height: 40px;
border: 1px solid rgba(0, 0, 0, 0.15);
}
.hura-toolbar-right {
@extend .hura-scroll;
background: #24375C;
width: 320px;
height: calc(100% - 40px);
overflow: auto;
position: relative;
padding: 0 10px 10px;
color: #fff;
}
.hura-main-content {
width: calc(100% - 320px);
height: calc(100% - 40px);
overflow: auto;
transition: .3s all;
margin: auto;
border: 0;
&::-webkit-scrollbar-track {
background: #343434;
}
&::-webkit-scrollbar-thumb {
background: #5d5d5d;
border-radius: 0;
}
&::-webkit-scrollbar-thumb:hover {
background: #5d5d5d;
}
&::-webkit-scrollbar {
width: 8px;
height: 10px;
}
}
.hura-toolbar-holder {
width: calc(100% - 320px);
height: 100%;
display: flex;
align-items: center;
justify-content: center;
a{
margin: 0 10px;
&:hover{
*{
fill: #4AC9FF;
}
}
}
}
.hura-btn-tab {
position: absolute;
top: 8px;
right: 16px;
}
.hura-panel-options {
border: 1px solid #374868;
background: #1E3053;
.hura-group-title {
padding: 0 10px;
line-height: 40px;
margin: 0;
color: #7D8FB1;
font-size: 16px;
}
}
.hura-option-list {
border-top: 1px solid #374868;
padding: 16px 10px;
a {
display: table;
font-size: 14px;
margin-bottom: 10px;
line-height: 18px;
position: relative;
padding-left: 30px;
color: #fff !important;
&::before {
content: '';
border-radius: 2px;
border: 1px solid #7D8FB1;
width: 18px;
height: 18px;
background: #1E3053;
position: absolute;
left: 0;
}
}
.current {
&::before {
background: #2989F9;
border-color: transparent;
}
&::after{
content: "";
width: 11px;
height: 8px;
border: 2px solid #fff;
border-top: 0;
border-right: 0;
position: absolute;
left: 4px;
transform: rotate(-45deg);
margin-top: 2px;
}
}
}
}
.hura-toolbar-list {
background: #2989F9;
box-shadow: 0px 2px 1px 0px rgba(0, 0, 0, 0.15);
line-height: 30px;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
right: 0;
z-index: 9;
a {
width: 30px;
height: 30px;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
outline: unset !important;
}
}
.hura-toolbar-table {
border: 1px solid #374868;
padding: 18px 10px;
margin-bottom: 10px;
table{
width: 100%;
*{
color: #fff;
}
}
td{
padding: 6px 0;
&:nth-child(1){
font-size: 13px;
font-weight: 300;
min-width: 75px;
}
}
select, input{
display: block;
width: 100%;
border-radius: 4px;
background: #07132B;
height: 36px;
color: #fff;
border: 0;
padding: 0 10px;
}
}
.js-hura-edit{
outline: 2px solid transparent;
&:hover{
outline: 2px solid #2989F9;
}
*:hover{
outline: 2px solid #2989F9;
}
img{
&:hover{
outline: 2px solid #2989F9;
}
}
}
.hura-selected {
outline: 2px solid #2989F9;
position: relative;
}
.hura-edit-popup-container {
table{
width: 100%;
}
.hura-popup-bg {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.50);
z-index: 999;
}
.hura-edit-popup-group{
@extend .hura-scroll;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
background: #fff;
z-index: 1000;
max-width: 930px;
width: 100%;
height: 600px;
overflow: auto;
border-radius: 12px;
}
.hura-popup-title{
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px 12px;
border-bottom: 1px solid #F5F5F5;
line-height: 24px;
font-size: 20px;
font-weight: 500;
margin-bottom: 10px;
}
.hura-popup-btn {
border-top: 1px solid #F5F5F5;
padding: 10px;
display: flex;
align-items: center;
justify-content: center;
line-height: 36px;
margin-top: 10px;
a{
color: #2989F9;
border-radius: 4px;
padding: 0 24px;
margin: 0 5px;
font-size: 14px;
&:last-child{
color: #fff;
background: #2989F9;
}
}
}
.hura-edit-content {
@extend .hura-scroll;
height: calc(100% - 130px);
overflow: auto;
padding: 0 20px;
thead {
background: #F5F5F5;
font-weight: 600;
}
td {
font-size: 14px;
text-align: center;
border: 1px solid #ECECEC;
padding: 8px;
&:nth-child(1){
min-width: 50px;
}
&:nth-child(2){
min-width: 65px;
}
&:nth-child(3){
min-width: 150px;
}
&:nth-child(5), &:nth-child(6){
input {
width: 100px;
text-align: center;
}
}
&:nth-child(7){
min-width: 90px;
}
}
input, select {
display: block;
border-radius: 4px;
border: 1px solid #E7E7E7;
background: #FFF;
height: 36px;
padding: 0 8px;
max-width: 250px;
}
select{
padding: 0;
width: 100%;
}
img{
display: block;
margin: auto auto 4px;
width: 42px;
}
}
}
.hura-sectors-container {
border: 1px solid #374868;
background: #1E3053;
.hura-sectors-title {
background: #162541;
border-bottom: 1px solid #374868;
line-height: 20px;
padding: 10px;
color: #7D8FB1;
font-size: 16px;
display: flex;
align-items: center;
cursor: pointer;
svg {
margin-right: 10px;
}
p{
margin: 0;
}
}
.hura-properties-list {
padding: 12px 10px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.hura-style-item {
margin-bottom: 15px;
width: calc(50% - 15px);
input, select {
width: 100%;
height: 36px;
display: block;
color: #FFF;
border-radius: 4px;
background: #07132B;
border: 0;
padding: 0 5px;
}
input{
padding: 0 10px;
}
select {
-webkit-appearance: none;
background: #07132B url(../images/hura-icon-down.png) no-repeat right 10px center;
}
}
.hura-style-title {
font-size: 14px;
margin: 0 0 8px;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
background: transparent url(../images/hura-icon-direction.png) no-repeat center center;
width: 8px;
position: absolute;
top: 0;
right: 10px;
bottom: 0;
opacity: 1;
}
.hura-text-align {
display: flex;
align-items: center;
text-align: center;
border-radius: 4px;
overflow: hidden;
label {
margin: 0;
width: calc(100% / 4);
text-align: center;
background: #07132B;
border-right: 1px solid #000;
position: relative;
height: 36px;
input {
-webkit-appearance: none;
height: 36px;
width: 100%;
display: block;
cursor: pointer;
&:checked{
background: #475E8A;
~svg {
background: #475E8A;
}
}
}
svg {
position: absolute;
top: 9px;
left: 50%;
transform: translateX(-50%);
cursor: pointer;
}
}
button {
margin: 0;
width: calc(100% / 4);
text-align: center;
background: #07132B;
border: 0;
border-right: 1px solid #000;
position: relative;
height: 36px;
line-height: 36px;
color: #fff;
cursor: pointer;
svg{
*{
fill: #fff;
}
}
}
.current {
background: #475E8A;
}
}
.hura-color-holder{
input {
background-position: right top, right top !important;
}
}
.hura-input-number {
position: relative;
input {
padding-right: 45px;
}
span {
line-height: 36px;
font-size: 14px;
position: absolute;
top: 0;
right: 27px;
}
}
.hura-button {
height: 36px;
line-height: 36px;
color: #fff;
border-radius: 4px;
border: 0;
background: #334566;
padding: 0 20px;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
svg{
margin-right: 5px;
}
}
.hura-rotation-button {
text-align: center;
padding: 10px 10px 18px;
button {
color: #4AC9FF;
background: transparent;
border: 0;
padding: 0;
margin: 0;
cursor: pointer;
height: 20px;
}
}
}
.hura-show-preview{
display: block;
.hura-toolbar-right, .hura-toolbar-list, .hura-btn-tab {
display: none;
}
.hura-main-content {
transition: unset;
width: 100% !important;
height: 100%;
}
.hura-toolbar-top {
position: fixed;
top: 0;
left: 0;
z-index: 1;
width: auto;
}
.hura-toolbar-holder{
width: auto;
a{
display: none;
}
}
.hura-selected, .js-hura-edit, .js-hura-edit *:hover {
outline: none !important;
}
}
.hura-rotation-list {
font-size: 14px;
line-height: 16px;
padding: 10px 10px 0;
p{
margin: 0;
}
summary {
font-weight: 500;
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
padding: 10px;
&::marker{
content: none;
}
}
.hura-rotation {
border: 1px solid #374868;
}
.hura-rotation-detail {
padding: 0 10px 10px;
}
.hura-rotation-box {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
margin-bottom: 13px;
img{
margin-top: 7px;
max-height: 58px;
}
p{
width: 100%;
}
}
}

310
html-giao-dien.html Normal file

File diff suppressed because one or more lines are too long

BIN
images/banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
images/fOE3m0gpFuzy7LU.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

BIN
images/hura-icon-down.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

BIN
images/logo-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
images/logo-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/logo-3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
images/no_image.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
images/wheel-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
images/wheel-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
images/wheel-3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
images/wheel-4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
images/wheel-5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
images/wheel-6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
images/wheel-7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
images/wheel-8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

52
index.html Normal file
View File

@@ -0,0 +1,52 @@
<html lang="vn"><head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>Local</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/style.css"/>
<style>
*, ::after, ::before {box-sizing: border-box;}
body {
margin: 0;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
background-color: #fff;
}
a{text-decoration:none}
a:hover{text-decoration:none !important}
img{display: block;max-width: 100%;height: auto;}
button,input,select{outline:none!important;color:#000;border-radius:0}
button, input {overflow: visible;}
button, input, optgroup, select, textarea {margin: 0;font-family: inherit;font-size: inherit;line-height: inherit;border-radius: 0;}
table{width:100%;-webkit-overflow-scrolling:touch;border: unset;border-color: transparent}
</style>
</head>
<body>
<iframe class="hura-main-content" id="js-hura-iframe" src="html-giao-dien.html"></iframe>
<!-- Edit giao dien -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="js/hura_edit.js"></script>
<script src="js/jscolor.js"></script>
<script>
Hura_Edit.install();
</script>
</body>
</html>

1253
js/hura_edit.js Normal file

File diff suppressed because it is too large Load Diff

1
js/jscolor.js Normal file

File diff suppressed because one or more lines are too long