Skip to content

Commit 84fad8e

Browse files
authored
Merge pull request #6 from Andrew-McGee/design
Design changes merged in to main.
2 parents e08df11 + 3eb2df9 commit 84fad8e

5 files changed

Lines changed: 32 additions & 7 deletions

File tree

albums_view.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<form class="ui form" method="GET" action="albums_view.php">
5858
<div class="field">
5959
<div class="ui small icon input">
60-
<input name="filt" type="text" placeholder="<?php echo $plfilt;?>"><i class="filter icon"></i>
60+
<input name="filt" type="text" placeholder="<?php echo $plfilt;?>" value="<?php echo $filt;?>"><i class="filter icon"></i>
6161
</div>
6262
</div>
6363
</form>

artist_albums.php

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33

44
$uid = $_GET["uid"];
55

6+
// Check if we have an offset value passed for pagination
7+
if (!empty($_GET["ofst"])) {
8+
$offset = $_GET["ofst"];
9+
} else {
10+
$offset = 0;
11+
}
12+
13+
//Set up some offset values for our next and prev buttons
14+
if ($offset == 0) {
15+
$poffset = 0;
16+
} else {
17+
$poffset = $offset - 25;
18+
}
19+
$noffset = $offset + 25;
20+
621
$get_data = handshakeAPI();
722
$hshake = json_decode($get_data, true);
823

@@ -21,9 +36,19 @@
2136

2237
<body style="overflow:hidden">
2338
<div class="ui inverted space segment">
24-
<?php
25-
echo '<h1 class="ui smoke header">' . $artistresults['name'] . '</h1>';
39+
<div class='ui grid'>
40+
<div class="left floated four wide column">
41+
<h1 class="ui smoke header"><?php echo $artistresults['name']; ?></h1>
42+
</div>
43+
<div class="right floated right aligned four wide column">
44+
<?php
45+
if ($offset > 0) echo '<a class="icn" href="playlists_view.php?ofst=' . $poffset . '"><i class="arrow circle left icon"></i></a>&nbsp;&nbsp;&nbsp;';
46+
if ($total == 24) echo '<a class="icn" href="playlists_view.php?ofst=' . $noffset . '"><i class="arrow circle right icon"></i></a>';
47+
?>
48+
</div>
49+
</div>
2650

51+
<?php
2752
$cnt = 0; //Reset our counter to build grid of 24 entries
2853
echo "<div class='ui six column grid container'>";
2954
//Loop 4 rows

artists_view.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
echo '<form class="ui form" method="GET" action="artists_view.php">';
7272
echo '<div class="field">';
7373
echo '<div class="ui small icon input">';
74-
echo '<input name="filt" type="text" placeholder="' . $plfilt . '"><i class="filter icon"></i>';
74+
echo '<input name="filt" type="text" placeholder="' . $plfilt . '" value="' . $filt . '"><i class="filter icon"></i>';
7575
echo '</div>';
7676
echo '</div>';
7777
echo '</form>';
@@ -93,7 +93,7 @@
9393

9494
//Loop through the artists to display each on a table row
9595
for ($i = 0; $i < $cnt; $i++){
96-
echo '<tr id="row' . $i . '">'; // Start of the artist listing row
96+
echo '<tr class="albm-row" id="row' . $i . '">'; // Start of the artist listing row
9797
echo '<td><a href="artist_albums.php?uid=' . $artist_results['artist'][$i]['id'] . '">';
9898
echo $artist_results['artist'][$i]['name'] . '</a></td>';
9999

css/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
/** icons & labels styling **/
6666
.ui.label.filter {
6767
background-color: var(--colrbgd1) !important;
68-
color: var(--colrfnt1) !important;
68+
color: var(--colrfnt2) !important;
6969
}
7070

7171
.icon {

tracks_view.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
echo '<form class="ui form" method="GET" action="tracks_view.php">' . "\r\n";
7878
echo '<div class="field">' . "\r\n";
7979
echo '<div class="ui small icon input">' . "\r\n";
80-
echo '<input name="filt" type="text" placeholder="' . $plfilt . '"><i class="filter icon"></i>' . "\r\n";
80+
echo '<input name="filt" type="text" placeholder="' . $plfilt . '" value="' . $filt . '"><i class="filter icon"></i>';
8181
echo '</div>' . "\r\n";
8282
echo '</div>' . "\r\n";
8383
echo '</form>' . "\r\n";

0 commit comments

Comments
 (0)