Skip to content

Commit

Permalink
Merge pull request #6 from Andrew-McGee/design
Browse files Browse the repository at this point in the history
Design changes merged in to main.
  • Loading branch information
Andrew-McGee authored Aug 29, 2021
2 parents e08df11 + 3eb2df9 commit 84fad8e
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 7 deletions.
2 changes: 1 addition & 1 deletion albums_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<form class="ui form" method="GET" action="albums_view.php">
<div class="field">
<div class="ui small icon input">
<input name="filt" type="text" placeholder="<?php echo $plfilt;?>"><i class="filter icon"></i>
<input name="filt" type="text" placeholder="<?php echo $plfilt;?>" value="<?php echo $filt;?>"><i class="filter icon"></i>
</div>
</div>
</form>
Expand Down
29 changes: 27 additions & 2 deletions artist_albums.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@

$uid = $_GET["uid"];

// Check if we have an offset value passed for pagination
if (!empty($_GET["ofst"])) {
$offset = $_GET["ofst"];
} else {
$offset = 0;
}

//Set up some offset values for our next and prev buttons
if ($offset == 0) {
$poffset = 0;
} else {
$poffset = $offset - 25;
}
$noffset = $offset + 25;

$get_data = handshakeAPI();
$hshake = json_decode($get_data, true);

Expand All @@ -21,9 +36,19 @@

<body style="overflow:hidden">
<div class="ui inverted space segment">
<?php
echo '<h1 class="ui smoke header">' . $artistresults['name'] . '</h1>';
<div class='ui grid'>
<div class="left floated four wide column">
<h1 class="ui smoke header"><?php echo $artistresults['name']; ?></h1>
</div>
<div class="right floated right aligned four wide column">
<?php
if ($offset > 0) echo '<a class="icn" href="playlists_view.php?ofst=' . $poffset . '"><i class="arrow circle left icon"></i></a>&nbsp;&nbsp;&nbsp;';
if ($total == 24) echo '<a class="icn" href="playlists_view.php?ofst=' . $noffset . '"><i class="arrow circle right icon"></i></a>';
?>
</div>
</div>

<?php
$cnt = 0; //Reset our counter to build grid of 24 entries
echo "<div class='ui six column grid container'>";
//Loop 4 rows
Expand Down
4 changes: 2 additions & 2 deletions artists_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
echo '<form class="ui form" method="GET" action="artists_view.php">';
echo '<div class="field">';
echo '<div class="ui small icon input">';
echo '<input name="filt" type="text" placeholder="' . $plfilt . '"><i class="filter icon"></i>';
echo '<input name="filt" type="text" placeholder="' . $plfilt . '" value="' . $filt . '"><i class="filter icon"></i>';
echo '</div>';
echo '</div>';
echo '</form>';
Expand All @@ -93,7 +93,7 @@

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

Expand Down
2 changes: 1 addition & 1 deletion css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
/** icons & labels styling **/
.ui.label.filter {
background-color: var(--colrbgd1) !important;
color: var(--colrfnt1) !important;
color: var(--colrfnt2) !important;
}

.icon {
Expand Down
2 changes: 1 addition & 1 deletion tracks_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
echo '<form class="ui form" method="GET" action="tracks_view.php">' . "\r\n";
echo '<div class="field">' . "\r\n";
echo '<div class="ui small icon input">' . "\r\n";
echo '<input name="filt" type="text" placeholder="' . $plfilt . '"><i class="filter icon"></i>' . "\r\n";
echo '<input name="filt" type="text" placeholder="' . $plfilt . '" value="' . $filt . '"><i class="filter icon"></i>';
echo '</div>' . "\r\n";
echo '</div>' . "\r\n";
echo '</form>' . "\r\n";
Expand Down

0 comments on commit 84fad8e

Please sign in to comment.