Add mix lookup, genre support, DJ enhancements.
This commit is contained in:
parent
2957dc0e46
commit
db1d26e122
11 changed files with 741 additions and 181 deletions
127
genre.php
127
genre.php
|
@ -45,8 +45,8 @@ if (isset($_GET['genre']) && $_GET['genre'] != "") {
|
|||
<div class="col">
|
||||
<nav aria-label="breadcrumb" class="bg-body-tertiary rounded-3 p-3 mb-4">
|
||||
<ol class="breadcrumb mb-0">
|
||||
<li class="breadcrumb-item"><a href="#"><?php echo $locale['home']; ?></a></li>
|
||||
<li class="breadcrumb-item"><a href="#"><?php echo $locale['genres']; ?></a></li>
|
||||
<li class="breadcrumb-item"><a href="/"><?php echo $locale['home']; ?></a></li>
|
||||
<li class="breadcrumb-item"><a href="/genres.php"><?php echo $locale['genres']; ?></a></li>
|
||||
<li class="breadcrumb-item active"
|
||||
aria-current="page"><?php
|
||||
if ($genre && $genre->get_name() != "") {
|
||||
|
@ -59,120 +59,36 @@ if (isset($_GET['genre']) && $_GET['genre'] != "") {
|
|||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($genreNotFound): ?>
|
||||
<?php if ($genreFound): ?>
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="card mb-4">
|
||||
<div class="card-body text-center">
|
||||
<img src="<?php echo $dj->get_img(); ?>"
|
||||
<img src="<?php echo $genre->get_img(); ?>"
|
||||
alt="avatar"
|
||||
class="rounded-circle img-fluid" style="width: 150px;">
|
||||
<h5 class="my-3"><?php echo $dj->get_name();
|
||||
<h5 class="my-3"><?php echo $genre->get_name();
|
||||
?></h5>
|
||||
<?php
|
||||
|
||||
if ($dj->get_claimed()) {
|
||||
echo '<p class="text-muted mb-1">';
|
||||
echo "<i class='fa fa-user-shield' style='color: gold'>Claimed</i>";
|
||||
echo "</p>";
|
||||
}
|
||||
|
||||
?>
|
||||
</p>
|
||||
<p class="text-muted mb-4">$location1</p>
|
||||
<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>
|
||||
<div class="card mb-4 mb-lg-0">
|
||||
<div class="card-body p-0">
|
||||
<ul class="list-group list-group-flush rounded-3">
|
||||
<?php
|
||||
function social_line($social, $value): string
|
||||
{
|
||||
$icon = "";
|
||||
$url = "";
|
||||
$color = "#000000";
|
||||
|
||||
switch ($social) {
|
||||
case "facebook":
|
||||
$icon = "fa-brands fa-facebook";
|
||||
$url = "https://www.facebook.com/$value";
|
||||
$color = "#3b5998";
|
||||
$name = "Facebook";
|
||||
break;
|
||||
case "instagram":
|
||||
$icon = "fa-brands fa-instagram";
|
||||
$url = "https://www.instagram.com/$value";
|
||||
$color = "#ac2bac";
|
||||
$name = "Instagram";
|
||||
break;
|
||||
case "twitter":
|
||||
$icon = "fa-brands fa-twitter";
|
||||
$url = "https://www.twitter.com/$value";
|
||||
$color = "#55acee";
|
||||
$name = "Twitter";
|
||||
break;
|
||||
case "myspace":
|
||||
$icon = "fa-brands fa-myspace";
|
||||
$url = "https://www.myspace.com/$value";
|
||||
$color = "#000000";
|
||||
$name = "Myspace";
|
||||
break;
|
||||
case "soundcloud":
|
||||
$icon = "fa-brands fa-soundcloud";
|
||||
$url = "https://www.soundcloud.com/$value";
|
||||
$color = "#ff8800";
|
||||
$name = "Soundcloud";
|
||||
break;
|
||||
case "mixcloud":
|
||||
$icon = "fa-brands fa-mixcloud";
|
||||
$url = "https://www.mixcloud.com/$value";
|
||||
$color = "#00c7f7";
|
||||
$name = "Mixcloud";
|
||||
break;
|
||||
case "spotify":
|
||||
$icon = "fa-brands fa-spotify";
|
||||
$url = "https://www.spotify.com/$value";
|
||||
$color = "#1DB954";
|
||||
$name = "Spotify";
|
||||
break;
|
||||
}
|
||||
|
||||
return "
|
||||
<li class='list-group-item d-flex justify-content-between align-items-center p-3'>
|
||||
<i class='fa $icon fa-lg' style='color: $color;'></i>
|
||||
<p class='mb-0'><a href='$url'>$value</a>
|
||||
</p>
|
||||
</li>";
|
||||
}
|
||||
$socials = $dj->get_socials();
|
||||
|
||||
foreach ($socials as $key => $value) {
|
||||
echo social_line($key, $value);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<p class="mb-0">Full Name</p>
|
||||
<p class="mb-0"><?php echo $locale['mix-count']; ?></p>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<p class="text-muted mb-0">Johnatan Smith</p>
|
||||
<p class="text-muted mb-0"><?php echo $genre->get_count(); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
@ -184,33 +100,6 @@ if (isset($_GET['genre']) && $_GET['genre'] != "") {
|
|||
<p class="text-muted mb-0">example@example.com</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<p class="mb-0">Phone</p>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<p class="text-muted mb-0">(097) 234-5678</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<p class="mb-0">Mobile</p>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<p class="text-muted mb-0">(098) 765-4321</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<p class="mb-0">Address</p>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<p class="text-muted mb-0">Bay Area, San Francisco, CA</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue