This repository has been archived by the owner on May 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
artists.php
108 lines (94 loc) · 3.95 KB
/
artists.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
require __DIR__ . '/vendor/autoload.php';
require_once(__DIR__ . "/start.php");
$root = "";
checkConnexion();
use AppleMusic\DB as db;
$db = new db;
$artists = json_decode($db->getUsersArtists());
?>
<!DOCTYPE html>
<html>
<head>
<?php include "inc/meta.php"; ?>
<style>
.artist-artwork {
width: 44px;
}
.edit-artist {
color: #da0f47;
}
button.update-artist {
margin-right: 1vw;
}
.table__row__artwork {
width: 1%;
}
</style>
</head>
<body class="<?= $theme ?>">
<div class="main main-artists">
<?php include "inc/nav.php"; ?>
<section class="main-header l-content-width section" style="border-top:none">
<h2 class="section__headline">
Ajouts d'artistes
</h2>
<div class="section-add-artists">
<select class="add-artists" id="artists[]" name="artists[]" multiple="multiple"
style="width: 100%;"></select>
<label for="artists[]" class="add-artists-label --invisible"></label>
<div class="add-artists-label-after">Ajouter</div>
</div>
</section>
<section class="l-content-width section section--bordered">
<div class="l-row">
<div class="l-column small-12">
<h2 class="section__headline">
Mes artistes
</h2>
<table class="table table--see-all my-artists">
<thead class="table__head">
<tr>
<th class="table__head__heading--artwork"></th>
<th class="table__head__heading table__head__heading--artist large-show-tablecell">
ARTISTE
</th>
<th class="table__head__heading table__head__heading--duration"></th>
</tr>
</thead>
<tbody>
<?php foreach ($artists as $artist) : ?>
<tr id="artist-<?= $artist->id ?>"
class="table__row we-selectable-item is-available we-selectable-item--allows-interaction ember-view">
<td class="table__row__artwork">
<picture
class="artist-artwork we-lockup__artwork we-artwork--lockup we-artwork--fullwidth we-artwork--round we-artwork ember-view">
<?= getArtistSVG($artist->name) ?>
</picture>
</td>
<td class="table__row__name">
<a href="//itunes.apple.com/fr/artist/<?= $artist->id ?>" target="_blank"
class="table__row__link targeted-link targeted-link--no-monochrome-underline">
<div class="spread">
<span id="ember995"
class="table__row__headline targeted-link__target we-truncate we-truncate--single-line ember-view">
<?= $artist->name ?>
</span>
</div>
</a>
<div>
</td>
<td class="table__row__duration edit-artist">
<button class="update-artist" data-artist-id="<?= $artist->id ?>" onclick="updateArtist('<?= $artist->id ?>');">UPDATE</button>
<button class="rm-artist" data-artist-id="<?= $artist->id ?>">✕</button>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</section>
</div>
</body>
</html>