Add font support, start support for genres.
This commit is contained in:
parent
5fe1a21b8e
commit
9a3d58fc83
2142 changed files with 373269 additions and 29 deletions
117
dj.php
117
dj.php
|
@ -14,7 +14,7 @@ $locale = loadLocale($lang);
|
|||
// if there's a query parameter named 'dj', load the DJ class
|
||||
$db = new Database($config);
|
||||
$djFound = false;
|
||||
if (isset($_GET['dj'])) {
|
||||
if (isset($_GET['dj']) && $_GET['dj'] != "") {
|
||||
$dj = new DJ($_GET['dj'], $db);
|
||||
if ($dj->get_name() != "") {
|
||||
$djFound = true;
|
||||
|
@ -30,9 +30,11 @@ if (isset($_GET['dj'])) {
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?php echo $config['app']['name']; ?></title>
|
||||
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="fontawesome/css/all.css" rel="stylesheet" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<body style="background-color: #eee;">
|
||||
<?php require 'navbar.php'; ?>
|
||||
<section style="background-color: #eee;">
|
||||
<div class="container py-5">
|
||||
|
@ -43,7 +45,14 @@ if (isset($_GET['dj'])) {
|
|||
<li class="breadcrumb-item"><a href="#"><?php echo $locale['home']; ?></a></li>
|
||||
<li class="breadcrumb-item"><a href="#"><?php echo $locale['djs']; ?></a></li>
|
||||
<li class="breadcrumb-item active"
|
||||
aria-current="page"><?php echo $dj->get_name(); ?></li>
|
||||
aria-current="page"><?php
|
||||
if ($dj && $dj->get_name() != ""){
|
||||
echo $dj->get_name();
|
||||
|
||||
} else {
|
||||
echo $locale['notfound'];
|
||||
}
|
||||
?></li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
|
@ -57,8 +66,18 @@ if (isset($_GET['dj'])) {
|
|||
<img src="<?php echo $dj->get_img(); ?>"
|
||||
alt="avatar"
|
||||
class="rounded-circle img-fluid" style="width: 150px;">
|
||||
<h5 class="my-3"><?php echo $dj->get_name(); ?></h5>
|
||||
<p class="text-muted mb-1">$desc1</p>
|
||||
<h5 class="my-3"><?php echo $dj->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">
|
||||
|
@ -73,26 +92,73 @@ if (isset($_GET['dj'])) {
|
|||
<div class="card mb-4 mb-lg-0">
|
||||
<div class="card-body p-0">
|
||||
<ul class="list-group list-group-flush rounded-3">
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center p-3">
|
||||
<i class="fas fa-globe fa-lg text-warning"></i>
|
||||
<p class="mb-0">https://mdbootstrap.com</p>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center p-3">
|
||||
<i class="fab fa-github fa-lg" style="color: #333333;"></i>
|
||||
<p class="mb-0">mdbootstrap</p>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center p-3">
|
||||
<i class="fab fa-twitter fa-lg" style="color: #55acee;"></i>
|
||||
<p class="mb-0">@mdbootstrap</p>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center p-3">
|
||||
<i class="fab fa-instagram fa-lg" style="color: #ac2bac;"></i>
|
||||
<p class="mb-0">mdbootstrap</p>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center p-3">
|
||||
<i class="fab fa-facebook-f fa-lg" style="color: #3b5998;"></i>
|
||||
<p class="mb-0">mdbootstrap</p>
|
||||
</li>
|
||||
<?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>
|
||||
|
@ -242,5 +308,6 @@ if (isset($_GET['dj'])) {
|
|||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue