Skip to content

Commit

Permalink
Added links for GitHub, contact, and Buy Me a Coffee
Browse files Browse the repository at this point in the history
  • Loading branch information
bklaing2 committed Jul 2, 2022
1 parent ad47401 commit 688f493
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 16 deletions.
5 changes: 3 additions & 2 deletions app/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ h1 {
}


form {
form, .card {
max-width: 750px;
max-height: 90%;

Expand Down Expand Up @@ -311,14 +311,15 @@ input[type="text"]:focus-visible {
}

.button:hover {
color: var(--primary-color);
background-color: var(--secondary-color);
}

.button:active,
input[type="radio"]:checked+.button,
input[type="checkbox"]:checked+.button {
color: var(--accent-color);
background-color: var(--secondary-color);
filter: brightness(140%);
}


Expand Down
10 changes: 5 additions & 5 deletions app/static/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function submitForm(event) {
form = document.getElementById('create-playlist-form')
addPlaylist(new FormData(form))

hideOverlay()
hideOverlay('create-playlist-overlay')
}


Expand Down Expand Up @@ -36,13 +36,13 @@ function searchArtists(input) {


// Showing/hiding elements //////////////////////
function showOverlay() {
overlay = document.getElementById('create-playlist-overlay')
function showOverlay(id) {
overlay = document.getElementById(id)
overlay.removeAttribute('hidden')
}

function hideOverlay() {
overlay = document.getElementById('create-playlist-overlay')
function hideOverlay(id) {
overlay = document.getElementById(id)
overlay.setAttribute('hidden', '')

hideAdvancedOptions()
Expand Down
2 changes: 1 addition & 1 deletion app/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE>
<html lang="en" class="container column">
<html lang="en" class="container column" style="margin-bottom: 4rem; gap: 0;">

<head>
<meta charset="UTF-8">
Expand Down
13 changes: 13 additions & 0 deletions app/templates/components/emailOverlay.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div id="email-overlay" class="overlay" onclick="hideOverlay('email-overlay')" hidden>
<div class="card body" onclick="event.stopPropagation()">
<h2 class="header">Contact</h2>

<p class="main column" style="gap: 3rem;">
If you have any questions or would like to leave some feedback, please email <a href="mailto: [email protected]" class="accent">[email protected]</a>
</p>

<div class="footer row" style="justify-content: space-between;">
<button class="button" onclick="hideOverlay('email-overlay')">Cancel</button>
</div>
</div>
</div>
31 changes: 26 additions & 5 deletions app/templates/components/footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
{% if auth_url is not defined %}
<footer class="row">
<a href="/sign_out" class="button">Sign Out</a>
</footer>
{% endif %}
<footer class="row">
<a href="https://github.com/bklaing2/autofy" class="button secondary">GitHub</a>

<a href="https://www.buymeacoffee.com/autofy" class="button secondary" target="_blank">Support the Site</a>
<script
data-name="BMC-Widget"
data-cfasync="false"
src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js"
data-id="autofy"
data-description="Support me on Buy me a coffee!"
data-message="If you want to show support and keep this site ad-free, click here!"
data-color="#4ECCA3"
data-position="Right"
data-x_margin="18"
data-y_margin="18"></script>

<button class="button secondary" onclick="showOverlay('email-overlay')">Contact</button>

{% if auth_url is not defined %}
<a href="/sign_out" class="button secondary">Sign Out</a>
{% endif %}

</footer>


{% include 'components/emailOverlay.html' %}
4 changes: 2 additions & 2 deletions app/templates/components/overlay.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="create-playlist-overlay" class="overlay" onclick="hideOverlay()" hidden>
<div id="create-playlist-overlay" class="overlay" onclick="hideOverlay('create-playlist-overlay')" hidden>
<form id="create-playlist-form" class="body" action="#" method="post" onclick="event.stopPropagation()">

<h2 class="header">Create Mega Playlist!</h2>
Expand All @@ -12,7 +12,7 @@ <h2 class="header">Create Mega Playlist!</h2>
</div>

<div class="footer row" style="justify-content: space-between;">
<button type="reset" class="button" onclick="hideOverlay()">Cancel</button>
<button type="reset" class="button" onclick="hideOverlay('create-playlist-overlay')">Cancel</button>
<input type="submit" value="Create Playlist" class="button accent" onclick="submitForm(event)">
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<main class="column" style="justify-content: flex-start;">
<div class="row">
<h2 style="color: var(--primary-color);">My Playlists</h2>
<button class="add-button" onclick="showOverlay()">+</button>
<button class="add-button" onclick="showOverlay('create-playlist-overlay')">+</button>
</div>

<div id="my-playlists"></div>
Expand Down

0 comments on commit 688f493

Please sign in to comment.