target system custom
This commit is contained in:
@@ -1,185 +0,0 @@
|
||||
@font-face {
|
||||
font-family: "Circular";
|
||||
src: url("../fonts/Circular-Bold.woff2") format("woff2"),
|
||||
url("../fonts/Circular-Bold.woff") format("woff"),
|
||||
url("../fonts/Circular-Bold.ttf") format("truetype");
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Circular";
|
||||
src: url("../fonts/Circular-Book.woff2") format("woff2"),
|
||||
url("../fonts/Circular-Book.woff") format("woff"),
|
||||
url("../fonts/Circular-Book.ttf") format("truetype");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Circular", sans-serif;
|
||||
font-weight: normal;
|
||||
visibility: hidden;
|
||||
user-select: none;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
user-select: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
* {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: 0;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#eye {
|
||||
text-align: center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 1px solid #ffffff;
|
||||
border-radius: 100%;
|
||||
position: absolute;
|
||||
top: calc(50% - 8px);
|
||||
left: calc(50% - 8px);
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
-o-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
z-index: 200;
|
||||
}
|
||||
|
||||
#eye.active {
|
||||
text-align: center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 1px solid #cc1133;
|
||||
border-radius: 100%;
|
||||
background-color: #cc1133;
|
||||
position: absolute;
|
||||
top: calc(50% - 8px);
|
||||
left: calc(50% - 8px);
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
-o-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
z-index: 200;
|
||||
}
|
||||
|
||||
#eye.active i {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
#eye i {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#options-wrapper {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-ms-flex-line-pack: center;
|
||||
align-content: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
#options-wrapper li {
|
||||
list-style: none;
|
||||
width: 50%;
|
||||
line-height: 20px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#options-wrapper li a {
|
||||
font-size: 20px;
|
||||
display: inline-block;
|
||||
color: white;
|
||||
border-radius: 30px;
|
||||
padding: 10px 20px 10px 18px;
|
||||
margin: 10px 0;
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
-o-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
will-change: transform;
|
||||
text-shadow: 0px 10px 20px #000000;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
#options-wrapper li a:hover, #options-wrapper li a:hover .option-icon{
|
||||
color: #cc1133 !important;
|
||||
text-shadow: 0px 0px 20px #cc1133aa !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#options-wrapper li a .option-icon {
|
||||
font-size: 22px;
|
||||
margin-right: 5px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
-o-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
#options-wrapper li:only-child {
|
||||
text-align: right;
|
||||
left:-60px !important;
|
||||
-webkit-transform-origin: right center !important;
|
||||
-ms-transform-origin: right center !important;
|
||||
transform-origin: right center !important;
|
||||
}
|
||||
|
||||
#options-wrapper li:nth-last-child(n+2):nth-last-child(-n+2):first-child,
|
||||
#options-wrapper li:nth-last-child(n+2):nth-last-child(-n+2):first-child~li:not(:last-child) {
|
||||
left:-60px !important;
|
||||
}
|
||||
|
||||
#options-wrapper li:nth-last-child(n+2):nth-last-child(-n+2):first-child~li:not(:first-child) {
|
||||
left:60px !important;
|
||||
}
|
||||
|
||||
#options-wrapper li:nth-last-child(n+3):nth-last-child(-n+3):first-child~li:last-child {
|
||||
left:-20px;
|
||||
}
|
||||
|
||||
#options-wrapper li:nth-child(odd) {
|
||||
text-align: right;
|
||||
right: 60px;
|
||||
-webkit-transform-origin: right center;
|
||||
-ms-transform-origin: right center;
|
||||
transform-origin: right center;
|
||||
}
|
||||
|
||||
#options-wrapper li:nth-child(even) {
|
||||
left: 60px;
|
||||
-webkit-transform-origin: left center;
|
||||
-ms-transform-origin: left center;
|
||||
transform-origin: left center;
|
||||
}
|
||||
|
||||
#options-wrapper li:nth-child(1),
|
||||
#options-wrapper li:nth-last-child(2) {
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
#options-wrapper li:nth-child(2),
|
||||
#options-wrapper li:nth-last-child(1) {
|
||||
left: 20px;
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,30 +0,0 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<!-- Font Awesome Icons Import -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css">
|
||||
<!-- Material Icons Import -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||
<!-- Material Design Icons Import -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font/css/materialdesignicons.min.css">
|
||||
<!-- Ionicons Import -->
|
||||
<script nomodule="" src="https://cdn.jsdelivr.net/npm/ionicons/dist/esm/ionicons.min.js"></script>
|
||||
<!-- Eva Icons Import -->
|
||||
<script src="https://unpkg.com/eva-icons"></script>
|
||||
<!-- Line Awesome Icons Import -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/line-awesome/dist/line-awesome/css/line-awesome.min.css">
|
||||
<!-- Boostrap Icons -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.min.css">
|
||||
<!-- Quasar CSS Import -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/quasar/dist/quasar.min.css" rel="stylesheet" type="text/css">
|
||||
<!-- CSS File Import -->
|
||||
<link href="css/style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="eye"><i id="eyeicon"></i></div>
|
||||
<ul id="options-wrapper"></ul>
|
||||
<script defer type="module" src="js/app.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,45 +0,0 @@
|
||||
import { createOptions } from './createOptions.js';
|
||||
|
||||
const optionsWrapper = document.getElementById('options-wrapper');
|
||||
const body = document.body;
|
||||
const eye = document.getElementById('eye');
|
||||
const eyeicon = document.getElementById("eyeicon");
|
||||
|
||||
window.addEventListener('message', (event) => {
|
||||
optionsWrapper.innerHTML = '';
|
||||
|
||||
switch (event.data.response) {
|
||||
case 'openTarget': {
|
||||
body.style.visibility = 'visible';
|
||||
return;
|
||||
}
|
||||
case 'closeTarget': {
|
||||
eyeicon.style.visibility = "hidden";
|
||||
body.style.visibility = 'hidden';
|
||||
return;
|
||||
}
|
||||
|
||||
case 'leftTarget': {
|
||||
eyeicon.style.visibility = "hidden";
|
||||
eye.classList.remove("active");
|
||||
return;
|
||||
}
|
||||
|
||||
case 'foundTarget': {
|
||||
eye.classList.add('active');
|
||||
eyeicon.style.visibility = "visible";
|
||||
return;
|
||||
}
|
||||
|
||||
case 'validTarget': {
|
||||
if (event.data.data) {
|
||||
for (let [index, itemData] of Object.entries(event.data.data)) {
|
||||
if (itemData !== null) {
|
||||
index++;
|
||||
createOptions(index, itemData);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1,14 +0,0 @@
|
||||
import { fetchNui } from './fetchNui.js';
|
||||
|
||||
const body = document.body;
|
||||
const optionsWrapper = document.getElementById('options-wrapper');
|
||||
|
||||
export function createOptions(id, data) {
|
||||
const option = document.createElement('li');
|
||||
option.innerHTML = `<a><i class="fa-fw ${data.icon} option-icon" style="color:${data.iconColor || 'white'}"></i>${data.label}</a>`;
|
||||
option.addEventListener('click', () => {
|
||||
fetchNui('selectTarget', id)
|
||||
body.style.visibility = 'hidden';
|
||||
});
|
||||
optionsWrapper.appendChild(option);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
const resource = GetParentResourceName();
|
||||
|
||||
export async function fetchNui(eventName, data) {
|
||||
const resp = await fetch(`https://${resource}/${eventName}`, {
|
||||
method: 'post',
|
||||
headers: {
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
},
|
||||
body: JSON.stringify(data),
|
||||
});
|
||||
|
||||
return await resp.json();
|
||||
}
|
||||
Reference in New Issue
Block a user