Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Apr 15, 2024
0 parents commit 70fd751
Show file tree
Hide file tree
Showing 23 changed files with 482 additions and 0 deletions.
9 changes: 9 additions & 0 deletions assets/css/bootstrap-rtl.min.css

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions assets/css/bootstrap.min.css

Large diffs are not rendered by default.

263 changes: 263 additions & 0 deletions assets/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
body {
font: 14px vazir;
padding: 85px 0 0 0;
}
input,
select,
textarea {
direction: rtl;
text-align: right;
margin: 10px 0;
width: 100%;
resize: none;
}
button {
width: 100%;
}

p {
font-size: 15px;
line-height: 27px;
}
ul li {
font-size: 15px;
line-height: 27px;
}

.navbar {
float: right;
width: 100%;
border-radius: 0;
background-color: #ff7900;
border: none;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
padding: 22px 0;
margin: 0 0 30px 0;
position: fixed;
top: 0;
right: 0;
z-index: 100;
}
.navbar img {
float: right;
width: 32px;
height: 15px;
margin: 0 0 0 15px;
}
.navbar h1 {
float: right;
margin: 0;
color: #ffffff;
font-size: 17px;
padding: 0;
}

.col-centered {
float: none;
margin: 0 auto;
}
.col-centered h3 {
font-size: 22px;
margin: 20px 0;
}

.dirLeft {
direction: ltr;
text-align: left;
}

.alert {
margin: 20px 0;
}
.alert em {
font-style: normal;
}

.table {
margin: 0;
}
.table tr:first-child td {
border-top: none;
}
.table td em {
font-style: normal;
}

.nav-pills {
margin: 0 0 12px 0;
}
.nav-pills>li a {
padding: 0 7px;
font-size: 12px;
border-radius: 25px;
color: #454545;
}
.nav-pills>li a:focus,
.nav-pills>li a:hover,
.nav-pills>li.active a,
.nav-pills>li.active a:focus,
.nav-pills>li.active a:hover {
background-color: #939393;
color: #fff;
}

.modal-header .close {
float: right;
width: auto;
margin: 0px 0 -7px 0;
font-size: 30px;
}
.modal-footer button {
float: right;
width: 50%;
margin-right: 0!important;
margin-bottom: 5px!important;
}
.modal-footer button:nth-child(odd) {
margin-left: 5px!important;
}
.modal-footer button:nth-child(even) {
width: calc(50% - 5px)
}
.modal-body .alert {
margin: 0;
}
.qrcode img {
width: 100%;
height: auto;
}

.modalBodyOverflow {
max-height: 63vh;
overflow: hidden;
overflow-y: auto;
}

img[alt="loader"] {
width: 15px;
height: 10px;
transform: rotate(180deg);
}

.none {
display: none;
}

.grid {
float: right;
width: 100%;
margin-bottom: 10px;
}
.box {
height: 34px;
width: 100%;
float: right;
border-radius: 7px;
margin: 0 0 10px 0;
}
.shimmerBG {
animation-duration: 2.2s;
animation-fill-mode: forwards;
animation-iteration-count: infinite;
animation-name: shimmer;
animation-timing-function: linear;
background: #ddd;
background: linear-gradient(to right, #f6f6f6 8%, #f0f0f0 18%, #f6f6f6 33%);
background-size: 1200px 100%;
}
@keyframes shimmer {
0% {
background-position: -1200px 0;
}

100% {
background-position: 1200px 0;
}
}

.myList {
float: right;
width: 100%;
}
.myList .input-group {
float: right;
width: 100%;
margin-bottom: 7px;
}
.myList .input-group .form-control {
float: left;
border-radius: 3px 0 0 3px;
margin: 0;
background: #fff;
direction: ltr;
text-align: left;
}
.myList .input-group .input-group-btn button {
float: right;
border-radius: 0 3px 3px 0;
width: 100%;
margin: 0;
border-left: 0;
}
.myList p {
float: right;
width: 100%;
text-align: center;
direction: rtl;
font-size: 13px;
opacity: 0.6;
}

footer {
padding: 10px 0;
/*position: fixed;
bottom: 0;
right: 0;*/
float: right;
width: 100%;
line-height: 20px;
}
footer p {
float: right;
width: 100%;
text-align: center;
font-size: 13px;
}

@media(max-width:700px) {
body,
.container {
padding-right: 0;
padding-left: 0;
}
.fullBox .rightSide {
width: 50%;
padding-left: 10px;
}
.fullBox .leftSide {
width: 50%;
}
.fullBox .leftSide textarea {
height: 255px;
}
.box {
height: 70px;
}
}

@media(max-width:500px) {
.fullBox .rightSide {
width: 100%;
padding-left: 0;
}
.fullBox .leftSide {
width: 100%;
}
.fullBox .leftSide textarea {
margin-top: 10px;
height: 70px;
}
.box {
height: 50px;
}
}
17 changes: 17 additions & 0 deletions assets/css/vazir.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@font-face {
font-family: vazir;
src: url('../font/vazir/Vazir.eot');
src: url('../font/vazir/Vazir.eot?#iefix') format('embedded-opentype'),
url('../font/vazir/Vazir.woff') format('woff'),
url('../font/vazir/Vazir.ttf') format('truetype');
font-weight: normal;
}

@font-face {
font-family: vazir;
src: url('../font/vazir/Vazir-Bold.eot');
src: url('../font/vazir/Vazir-Bold.eot?#iefix') format('embedded-opentype'),
url('../font/vazir/Vazir-Bold.woff') format('woff'),
url('../font/vazir/Vazir-Bold.ttf') format('truetype');
font-weight: bold;
}
Binary file added assets/favicon.ico
Binary file not shown.
Binary file added assets/font/vazir/Vazir-Bold.eot
Binary file not shown.
Binary file added assets/font/vazir/Vazir-Bold.ttf
Binary file not shown.
Binary file added assets/font/vazir/Vazir-Bold.woff
Binary file not shown.
Binary file added assets/font/vazir/Vazir-Bold.woff2
Binary file not shown.
Binary file added assets/font/vazir/Vazir-Light.eot
Binary file not shown.
Binary file added assets/font/vazir/Vazir-Light.ttf
Binary file not shown.
Binary file added assets/font/vazir/Vazir-Light.woff
Binary file not shown.
Binary file added assets/font/vazir/Vazir-Light.woff2
Binary file not shown.
Binary file added assets/font/vazir/Vazir.eot
Binary file not shown.
Binary file added assets/font/vazir/Vazir.ttf
Binary file not shown.
Binary file added assets/font/vazir/Vazir.woff
Binary file not shown.
Binary file added assets/font/vazir/Vazir.woff2
Binary file not shown.
Binary file added assets/img/cflogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/loader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions assets/js/bootstrap.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions assets/js/jquery.min.js

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions assets/js/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
function copyToClipboard(text) {
navigator.clipboard.writeText(text).then(() => {
alert("کلیک کپی شد!");
}).catch(() => {
//
});
}

function renderData(dataArray) {
let html = '';
if (typeof dataArray === "undefined" || dataArray.length < 1) {
return false;
}
dataArray.forEach(function(element) {
if ( element !== "" ) {
html += '<div class="input-group">';
html += '<input type="text" class="form-control" placeholder="Key" readonly value="'+element+'" />';
html += '<div class="input-group-btn">';
html += '<button class="btn btn-default" onclick="copyToClipboard(\'' + element + '\')">';
html += '📋';
html += '</button>';
html += '</div>';
html += '</div>';
}
});
$('#setContent').html(html);
}

window.addEventListener('load', function() {
const cachedData = localStorage.getItem('warpData');
const cachedTime = localStorage.getItem('warpDataTime');
if (cachedData !== "undefined" && cachedTime !== "undefined" && (Date.now() - cachedTime < 15 * 60 * 1000)) {
renderData(cachedData);
} else {
fetch('https://raw.githubusercontent.com/ircfspace/warpkey/main/plus/lite')
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.text();
})
.then(data => {
const dataArray = data.split('\n');
if (dataArray.length > 0) {
renderData(dataArray);
}
else {
renderData(cachedData);
}
})
.catch(error => {
renderData(cachedData);
});
}
});
Loading

0 comments on commit 70fd751

Please sign in to comment.