Skip to content

Commit

Permalink
WIP on master
Browse files Browse the repository at this point in the history
  • Loading branch information
kyledoesdev committed Nov 20, 2024
1 parent e66ab7e commit 5abcf1c
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 24 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@

### Log in with your spotify account to rank your favorite artists' albums, singles & more.

- Welcome to Kyle's Spotify Discography Ranker. This application will allow you to log in with your
- Welcome to songrank.dev. This application will allow you to log in with your
spotify account and rank your favorite artists' entire discography. This is not a bracket style ranking system.
We use a merge-sort type algorithm to rank every possible combination of tracks as efficently as possible.
- This application isn't limited to an artists' entire discography either, you can rank indivdual albums, a set
of albums, just singles, etc. You can filter down your favorite artists' songs to just the ones you want to rank.
- After you've finished a ranking, feel free to share your finalized list with friends, download the list & more.

### TODO
- monitize it somehow
- loader for when artist has a lot of songs
6 changes: 0 additions & 6 deletions bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
$middleware->throttleApi();
})
->withSchedule(function (Schedule $schedule) {
$schedule
->call(fn() => new RankingReminderCommand())
->timezone('America/New_York')
->weeklyOn(1, '12:00')
->emailOutputOnFailure(env("FAILURE_EMAIL"));
})
->withExceptions(function (Exceptions $exceptions) {
//
})->create();
2 changes: 2 additions & 0 deletions resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import SongListItem from './components/RankSetup/SongListItem.vue';
import Profile from './components/Profile.vue';
import EditRanking from './components/RankSetup/EditRanking.vue';
import Logo from './components/Spotify/Logo.vue';
import Share from './components/Share.vue';

import Explorer from './components/Explore/Explorer.vue';
import ExploreItem from './components/Explore/ExploreItem.vue';
Expand Down Expand Up @@ -46,6 +47,7 @@ app.component('songlistitem', SongListItem);
app.component('profile', Profile);
app.component('editranking', EditRanking);
app.component('spotify-logo', Logo);
app.component('share', Share);
app.component('explorer', Explorer);
app.component('exploreitem', ExploreItem);
app.component('explore-artist-name', ArtistName);
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/About.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="bg-white border border-zinc-800 rounded-lg p-4">
<p class="p-2">
Welcome to Kyle's Spotify Discography Ranker. This application will allow you to log in with your
Welcome to songrank.dev. This application will allow you to log in with your
spotify account and rank your favorite artists' entire discography. This is not a bracket style ranking system.
I've built a user-driven merge-sort algorithm to rank every possible combination of tracks as efficently as possible.
</p>
Expand All @@ -14,7 +14,7 @@
</p>
<hr />
<p class="p-2 italic text-xs mt-2">
For best experience, use this website on your computer.
While completly functional on mobile devices, for the best experience, use this website on your computer.
</p>
</div>

Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/Explore/Explorer.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="p-2 mb-2 md:pb-4" v-auto-animate>
<div class="flex flex-col sm:flex-row items-center w-full space-y-2 sm:space-y-0 sm:space-x-2">
<div class="flex justify-center p-2 mb-2 md:pb-4" v-auto-animate>
<div class="flex flex-col sm:flex-row items-center w-full md:w-1/2 space-y-2 sm:space-y-0 sm:space-x-2">
<input
class="w-full sm:flex-1 p-2 border border-zinc-800 rounded-md"
type="text"
Expand Down
2 changes: 0 additions & 2 deletions resources/js/components/RankSetup/RankingSetup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@
:src="cover"
@click="loadSongs"
:alt="this.name"
width="272"
height="272"
>
<h5 class="mt-1">{{ this.name }}</h5>
<spotify-logo :artistLink="this.id" />
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/RankSetup/SpotifySearch.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="border border-zinc-800 rounded-lg p-2 mb-2 md:pb-4" v-auto-animate>
<div class="p-2 mb-2 md:pb-4" v-auto-animate>
<div>
<h5 class="md:text-xl mt-2 mb-4">
Search for an artist to rank to get started.
Expand Down
25 changes: 25 additions & 0 deletions resources/js/components/Share.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<template>
<a class="btn-primary p-2 m-2" @click="share" title="Share this list with your friends!">
<i class="fa fa-solid fa-share-from-square"></i>
</a>
</template>
<script>
export default {
methods: {
share() {
navigator.clipboard.writeText(window.location.href)
.then(() => {
this.flash('Success', 'Copied to clipboard!');
})
.catch(err => {
chis.flash("Something went wrong.", 'Could not copy to your clipbaord, try copy & pasting the URL manually.', 'error');
});
}
}
}
</script>
<style>
a {
cursor: pointer;
}
</style>
5 changes: 3 additions & 2 deletions resources/views/emails/email-blast.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
@endif

<p>
This email is to notify you that <a href="{{ env("APP_URL") }}">Song Rank</a> is now at version 1.3!
This email is to notify you that <a href="{{ env("APP_URL") }}">Song Rank</a> is now at version 1.4!
</p>

<p>
Hey everyone, we fixed a major bug on song rank that was not allowing you to save your rankings. it should be fixed now. Sorry for the issue!
song-rank.com has now moved to <a href="https://songrank.dev">songrank.dev!</a> You will still be able to access song rank at song-rank.com, but I highly recommend moving over to using the new url. <br>
I've added a share button and back button to the rankings page to easily share a ranking with friends & to be able to navigate back to the previous page you were at.
</p>

<p>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/explore/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@extends('layouts.app')

@section('content')
<div>
<div class="mb-2">
@include('layouts.nav', ['title' => title(false) . ' Feed.'])
</div>
<div class="bg-white border border-zinc-800 rounded-lg mt-4">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/home.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="mb-4">
@include('layouts.nav')
</div>
<div class="bg-white rounded-lg">
<div class="border border-zinc-800 bg-white rounded-lg">
<spotifysearch></spotifysearch>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/layouts/partials/footer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div class="flex items-center text-white justify-center lg:justify-end space-x-4">
<a target="_blank" href="https://discord.gg/zXe9kqyFEJ" class="text-gray-400 hover:text-white">Discord</a>
<a target="_blank" href="https://github.com/kyledoesdev" class="text-gray-400 hover:text-white">Github</a>
<a target="_blank" href="https://x.com/kyledoesdev" class="text-gray-400 hover:text-white">X</a>
<a target="_blank" href="https://bsky.app/profile/kyledoesdev.bsky.social" class="text-gray-400 hover:text-white">Bluesky</a>
</div>
</div>
</div>
Expand Down
11 changes: 11 additions & 0 deletions resources/views/rank/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@
@include('layouts.nav')

<div class="pl-4 pr-4 bg-white border border-zinc-800 rounded-lg mt-4">
@if ($ranking->is_ranked)
<div class="flex justify-end">
<a onclick="history.back()" class="btn-secondary p-2 m-2">
<i class="fa fa-solid fa-arrow-left"></i>
</a>
<share />
</div>

<hr>
@endif

@if (!$ranking->is_ranked)
<div class="flex justify-center bg-white p-4">
<div class="text-center w-full">
Expand Down
2 changes: 1 addition & 1 deletion routes/console.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Schedule;

Schedule::command('backup:clean')->daily()->at('12:00');
Schedule::command('backup:clean')->timezone('America/New_York')->daily()->at('12:00');
Schedule::command('backup:run')
->timezone('America/New_York')
->daily()
Expand Down

0 comments on commit 5abcf1c

Please sign in to comment.