Time to do an update.
This commit is contained in:
parent
70c8a87e15
commit
0b0697bb42
22 changed files with 4352 additions and 268 deletions
105
dj.php
105
dj.php
|
@ -64,20 +64,14 @@ require_once 'includes/header.php';
|
|||
}
|
||||
|
||||
?>
|
||||
<div class="d-flex justify-content-center mb-2">
|
||||
<button type="button" data-mdb-button-init data-mdb-ripple-init class="btn btn-primary">
|
||||
<?php echo $locale['follow']; ?>
|
||||
</button>
|
||||
<button type="button" data-mdb-button-init data-mdb-ripple-init
|
||||
class="btn btn-outline-primary ms-1"><?php echo $locale['message']; ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ($dj->getSocials() != []) {
|
||||
?>
|
||||
<div class="card mb-4 mb-lg-0">
|
||||
<div class="card mb-4">
|
||||
<div class="card-body p-0 ">
|
||||
<ul class="list-group list-group-flush rounded-3">
|
||||
<?php
|
||||
|
@ -89,8 +83,33 @@ require_once 'includes/header.php';
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-body bg-body-secondary text-center">
|
||||
<?php
|
||||
if ($dj->getClaimed()) {
|
||||
?>
|
||||
<button type="button"
|
||||
class="btn w-100 mb-2 btn btn-secondary w-100 mb-2"><?php echo $locale['message']; ?>
|
||||
</button><?php
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<button type="button" id="shareBtn" class="w-100 mb-2 btn btn-secondary"
|
||||
data-bs-toggle="modal" data-bs-target="#shareModal">
|
||||
<?php echo $locale['share']; ?>
|
||||
</button>
|
||||
<button type="button" id="rss" class="btn btn-secondary w-100 mb-2">
|
||||
<?php echo $locale['rss']; ?>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8">
|
||||
<div class="card mb-4">
|
||||
<div class="card-body bg-body-secondary">
|
||||
|
@ -117,6 +136,17 @@ require_once 'includes/header.php';
|
|||
<div class="card-body bg-body-secondary">
|
||||
<?php
|
||||
$mixes = $dj->getDJMixes();
|
||||
if (!empty($mixes)) {
|
||||
// Add header row for the table-like layout
|
||||
echo '<div class="row font-weight-bold mb-2">';
|
||||
echo '<div class="col-md text-truncate">' . $locale['mixName'] . '</div>';
|
||||
echo '<div class="col-md">' . $locale['genres'] . '</div>';
|
||||
echo '<div class="col-md">' . $locale['duration'] . '</div>';
|
||||
echo '<div class="col-md">' . $locale['year'] . '</div>';
|
||||
echo '</div>';
|
||||
echo '<hr class="my-2">'; // Optional horizontal rule for separation
|
||||
}
|
||||
|
||||
$count = 0;
|
||||
|
||||
foreach ($mixes as $mix) {
|
||||
|
@ -165,7 +195,7 @@ require_once 'includes/header.php';
|
|||
echo '<p class="mb-0">';
|
||||
// date format should just be year
|
||||
$date = $output->get_recorded();
|
||||
if ($date == "") {
|
||||
if (is_null($date) || empty(trim($date))) {
|
||||
$date = $output->get_created();
|
||||
}
|
||||
echo date('Y', strtotime($date));
|
||||
|
@ -188,6 +218,61 @@ require_once 'includes/header.php';
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="shareModal" tabindex="-1" aria-labelledby="shareModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="shareModalLabel"><?php echo $locale['share']; ?></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"
|
||||
aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php
|
||||
$url = 'https://utahsdjs.com/dj/' . $_GET['dj'];
|
||||
$utm_params = '?utm_source=website&utm_medium=share_modal&utm_campaign=sharing';
|
||||
$share_url = urlencode($url . $utm_params);
|
||||
?>
|
||||
<a href="#" id="copyLinkBtn" class="btn btn-secondary w-100 mb-2">Copy URL</a>
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $share_url; ?>"
|
||||
target="_blank" class="btn btn-primary w-100 mb-2" onclick="hideModal()">Share to
|
||||
Facebook</a>
|
||||
<a href="https://twitter.com/intent/tweet?url=<?php echo $share_url; ?>"
|
||||
target="_blank" class="btn btn-info w-100 mb-2" onclick="hideModal()">Share to
|
||||
Twitter</a>
|
||||
<a href="https://www.instagram.com/" target="_blank" class="btn btn-danger w-100"
|
||||
onclick="hideModal()">Share to Instagram</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var shareBtn = document.getElementById('shareBtn');
|
||||
var shareModal = new bootstrap.Modal(document.getElementById('shareModal'));
|
||||
var copyLinkBtn = document.getElementById("copyLinkBtn");
|
||||
var urlToCopy = window.location.href + '?utm_source=website&utm_medium=share_modal&utm_campaign=sharing';
|
||||
|
||||
shareBtn.addEventListener('click', function () {
|
||||
shareModal.show();
|
||||
});
|
||||
|
||||
copyLinkBtn.onclick = function () {
|
||||
navigator.clipboard.writeText(urlToCopy).then(function () {
|
||||
alert('URL copied to clipboard');
|
||||
shareModal.hide();
|
||||
}, function (err) {
|
||||
alert('Failed to copy URL: ' + err);
|
||||
});
|
||||
}
|
||||
|
||||
window.hideModal = function () {
|
||||
shareModal.hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php else: ?>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue