This commit is contained in:
2024-09-03 02:42:27 +05:30
parent bde2d88ddf
commit a021bfa479
16 changed files with 518 additions and 155 deletions

Binary file not shown.

View File

@@ -4,7 +4,7 @@
<div class="logo">
<img src="assets/images/url.png" alt="Xeorl Logo" class="logo-img">
<span>Xeorl</span>
<span class="version-number">3.0.1</span>
<span class="version-number">3.1.1</span>
</div>
<label class="burger" for="burger">
<input type="checkbox" id="burger">

View File

@@ -110,7 +110,7 @@ main {
.shortened-links h2 {
font-size: 18px;
margin-right: 500px;
margin-bottom: 25px;
margin-bottom: 20px;
font-weight: 550;
color: #A2ABB8;
}
@@ -208,6 +208,123 @@ main {
}
.dashboard-stats {
display: flex;
justify-content: center;
gap: 15px;
}
.stat-item {
background: #ffffff;
padding: 25px; /* Reduce padding for a more compact look */
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.082);
width: 250px; /* Reduce width */
text-align: center;
transition: box-shadow 0.3s ease, transform 0.3s ease;
cursor: pointer;
margin-top: 10px;
margin-bottom: 4em;
}
.stat-item:hover,
.stat-item:focus {
transform: translateY(-3px); /* Slight lift */
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12); /* Adjust shadow strength */
}
.stat-icon {
width: 35px;
height: 35px;
margin-bottom: 15px;
}
.stat-item h3 {
font-size: 16px;
color: #677583;
margin-bottom: 10px;
font-weight: 600;
}
.stat-item p {
font-size: 28px;
font-weight: 700;
color: #171C24;
margin: 0;
}
.stat-item img.links-icon {
width: 35px;
height: auto;
}
.stat-item img.total-icon {
width: 30px;
height: auto;
}.stat-item img.users-icon {
width: 30px;
height: auto;
}
.links-icon{
.user-icon {
width: 20px;
height: 20px;
}
}
.dashboard-stats-section{
margin-top: 6em;
}
.section-heading {
font-size: 30px;
font-weight: 700;
color: #171C24;
margin-bottom: -20px;
text-align: center;
margin-top: 0ex;
}
.section-subheading {
font-size: 30px;
margin-right: 00px;
margin-bottom: 2px;
font-weight: 700;
color: #677583;
text-align: center;
}
.section-paragraph{
color:#3C4B62;
font-size: 18px;
line-height: 30px;
margin-top: 25px;
margin-bottom: 45px;
}
.contact-link {
color: #387FFF;
text-decoration: none;
font-weight: 00;
position: relative;
}
.contact-link::after {
content: "";
display: block;
height: 1px;
background-color: #387FFF;
position: absolute;
bottom: -2px;
left: 0;
right: 0;
transform: scaleX(0);
transition: transform 0.3s ease;
}
.contact-link:hover::after {
transform: scaleX(1);
}
/* For screens 768px and below */
@media (max-width: 768px) {
.shorten-section h1 {

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

@@ -10,7 +10,7 @@ shortenBtn.onclick = () => {
if (xhr.readyState == 4 && xhr.status == 200) {
let data = xhr.response;
if (data.length <= 5) {
let domain = "localhost/url/";
let domain = "xeorl.buzz/";
let shortenURL = domain + data;
let newRow = `
@@ -45,25 +45,41 @@ document.addEventListener('click', function(e) {
console.error('Failed to copy text: ', err);
});
}
});
// Handle delete button clicks
// Handle delete button clicks
/*
document.addEventListener('click', function(e) {
if (e.target.closest('.delete-btn')) {
const linkItem = e.target.closest("li");
const shortenURL = linkItem.querySelector(".short-link").textContent;
let xhr = new XMLHttpRequest();
xhr.open("GET", `core/delete.php?id=${shortenURL.split('/').pop()}`, true);
xhr.onload = () => {
if (xhr.readyState == 4 && xhr.status == 200) {
if (xhr.responseText === "success") {
linkItem.remove();
// Check if the list is empty after deletion
if (linksList.children.length === 0) {
location.reload(); // Reload the page if no links are left
}
} else {
alert("Failed to delete the URL.");
}
}
};
xhr.send();
}
});*/
// Handle members only delete button clicks!!
document.querySelectorAll(".delete-btn").forEach((deleteBtn) => {
deleteBtn.addEventListener("click", function () {
const linkItem = this.closest("li");
const shortenURL = linkItem.querySelector(".short-link").textContent;
let xhr = new XMLHttpRequest();
xhr.open("GET", `core/delete.php?id=${shortenURL.split('/').pop()}`, true);
xhr.onload = () => {
if (xhr.readyState == 4 && xhr.status == 200) {
if (xhr.responseText === "success") {
linkItem.remove();
} else {
alert("Failed to delete the URL.");
}
}
};
xhr.send();
// Alert instead of delete functionality
alert("This feature is available for members only.");
});
});
});
});