adds a credits page and tidies up some loose ends
This commit is contained in:
parent
26724e3475
commit
d70b2005b5
28
app.py
28
app.py
@ -12,7 +12,7 @@ app = flask.Flask('songbook')
|
|||||||
|
|
||||||
# db = openbook()
|
# db = openbook()
|
||||||
|
|
||||||
# return flask.render_template('.html',
|
# return flask.render_template('.jinja',
|
||||||
# )
|
# )
|
||||||
|
|
||||||
# HOMEPAGE
|
# HOMEPAGE
|
||||||
@ -25,7 +25,7 @@ def homepage():
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
return flask.render_template('home.html')
|
return flask.render_template('home.jinja')
|
||||||
|
|
||||||
# SEARCH RESULTS
|
# SEARCH RESULTS
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ def searchpage():
|
|||||||
else:
|
else:
|
||||||
searchresult = []
|
searchresult = []
|
||||||
|
|
||||||
return flask.render_template('searchresults.html',
|
return flask.render_template('searchresults.jinja',
|
||||||
searchresult=searchresult
|
searchresult=searchresult
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ def suggestsearchpage():
|
|||||||
else:
|
else:
|
||||||
searchresult = []
|
searchresult = []
|
||||||
|
|
||||||
return flask.render_template('suggestsearchresults.html',
|
return flask.render_template('suggestsearchresults.jinja',
|
||||||
searchresult=searchresult
|
searchresult=searchresult
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ def songindex():
|
|||||||
track
|
track
|
||||||
''').fetchall()
|
''').fetchall()
|
||||||
|
|
||||||
return flask.render_template('songindex.html',
|
return flask.render_template('songindex.jinja',
|
||||||
album_info=album_info,
|
album_info=album_info,
|
||||||
song_info=song_info
|
song_info=song_info
|
||||||
)
|
)
|
||||||
@ -208,7 +208,7 @@ def motifindex():
|
|||||||
min(clip.song_id)
|
min(clip.song_id)
|
||||||
''').fetchall()
|
''').fetchall()
|
||||||
|
|
||||||
return flask.render_template('motifindex.html',
|
return flask.render_template('motifindex.jinja',
|
||||||
category_info = category_info,
|
category_info = category_info,
|
||||||
motif_info = motif_info
|
motif_info = motif_info
|
||||||
)
|
)
|
||||||
@ -246,7 +246,7 @@ def albumpage(id):
|
|||||||
(id,)
|
(id,)
|
||||||
).fetchall()
|
).fetchall()
|
||||||
|
|
||||||
return flask.render_template('album.html',
|
return flask.render_template('album.jinja',
|
||||||
album_info=album_info,
|
album_info=album_info,
|
||||||
song_info=song_info
|
song_info=song_info
|
||||||
)
|
)
|
||||||
@ -312,7 +312,7 @@ def motifpage(id):
|
|||||||
(id,)
|
(id,)
|
||||||
).fetchall()
|
).fetchall()
|
||||||
|
|
||||||
return flask.render_template('motif.html',
|
return flask.render_template('motif.jinja',
|
||||||
name=name,
|
name=name,
|
||||||
clip_info=clip_info,
|
clip_info=clip_info,
|
||||||
album_info=album_info
|
album_info=album_info
|
||||||
@ -400,7 +400,7 @@ def songpage(id):
|
|||||||
(id,)
|
(id,)
|
||||||
).fetchall()
|
).fetchall()
|
||||||
|
|
||||||
return flask.render_template('song.html',
|
return flask.render_template('song.jinja',
|
||||||
song_info=song_info,
|
song_info=song_info,
|
||||||
id=id,
|
id=id,
|
||||||
album_info=album_info,
|
album_info=album_info,
|
||||||
@ -411,7 +411,7 @@ def songpage(id):
|
|||||||
@app.route('/suggest')
|
@app.route('/suggest')
|
||||||
def suggestpage():
|
def suggestpage():
|
||||||
|
|
||||||
return flask.render_template('suggest.html',
|
return flask.render_template('suggest.jinja',
|
||||||
)
|
)
|
||||||
|
|
||||||
@app.route('/sent', methods=['POST'])
|
@app.route('/sent', methods=['POST'])
|
||||||
@ -427,5 +427,11 @@ def sentpage():
|
|||||||
flask.request.form['connection-1-id'][:4],
|
flask.request.form['connection-1-id'][:4],
|
||||||
flask.request.form['suggest-description'][:10_000],
|
flask.request.form['suggest-description'][:10_000],
|
||||||
])
|
])
|
||||||
return flask.render_template('sent.html',
|
return flask.render_template('sent.jinja',
|
||||||
|
)
|
||||||
|
|
||||||
|
@app.route('/credits')
|
||||||
|
def creditpage():
|
||||||
|
|
||||||
|
return flask.render_template('credits.jinja',
|
||||||
)
|
)
|
||||||
@ -2,7 +2,11 @@ import sqlite3
|
|||||||
import os
|
import os
|
||||||
import pyexcel_odsr
|
import pyexcel_odsr
|
||||||
|
|
||||||
os.remove('songbook.sqlite')
|
try:
|
||||||
|
os.remove('songbook.sqlite')
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
|
|
||||||
db = sqlite3.connect("songbook.sqlite")
|
db = sqlite3.connect("songbook.sqlite")
|
||||||
|
|
||||||
cur = db.cursor()
|
cur = db.cursor()
|
||||||
|
|||||||
@ -3,4 +3,4 @@ services:
|
|||||||
build: .
|
build: .
|
||||||
init: true
|
init: true
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:5123:8000"
|
- "127.0.0.1:8000:8000"
|
||||||
|
|||||||
BIN
static/aristide.png
Normal file
BIN
static/aristide.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 212 KiB |
@ -18,7 +18,7 @@
|
|||||||
:root{
|
:root{
|
||||||
--block: lch(20% 0 75);
|
--block: lch(20% 0 75);
|
||||||
--box: lch(40% 2.5 75);
|
--box: lch(40% 2.5 75);
|
||||||
--back: radial-gradient(lch(20% 0 75), black );
|
--back: radial-gradient(lch(10% 0 75) 50%, black );
|
||||||
--search-back: lch(35% 0 75);
|
--search-back: lch(35% 0 75);
|
||||||
--thick-border: lch(60% 10 75);
|
--thick-border: lch(60% 10 75);
|
||||||
--thin-border: lch(60% 10 75);
|
--thin-border: lch(60% 10 75);
|
||||||
@ -202,7 +202,7 @@ header{
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
right: .3rem;
|
right: .3rem;
|
||||||
bottom: .3rem;
|
bottom: .3rem;
|
||||||
font-size: small;
|
/* font-size: small; */
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: lch(80% 50 50);
|
color: lch(80% 50 50);
|
||||||
}
|
}
|
||||||
@ -223,7 +223,7 @@ header{
|
|||||||
|
|
||||||
.home-nav{
|
.home-nav{
|
||||||
display: flex; gap: 1.2rem;
|
display: flex; gap: 1.2rem;
|
||||||
border-style: solid; border-width: 1px; border-color: var(--thin-border); border-left: 0; border-top: 0; border-right: 0;
|
/* border-style: solid; border-width: 1px; border-color: var(--thin-border); border-left: 0; border-top: 0; border-right: 0; */
|
||||||
margin: 1.2rem; margin-bottom: 0;
|
margin: 1.2rem; margin-bottom: 0;
|
||||||
padding-bottom: 1.2rem;
|
padding-bottom: 1.2rem;
|
||||||
}
|
}
|
||||||
@ -232,7 +232,7 @@ header{
|
|||||||
display: flex; flex-direction: column; list-style: none; justify-content: center; align-items: center;
|
display: flex; flex-direction: column; list-style: none; justify-content: center; align-items: center;
|
||||||
flex: auto;
|
flex: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
border-style: outset; border-color: var(--thick-border); border-radius: 1.2rem;
|
border-style: outset; border-color: var(--thick-border); border-radius: 1.2rem; border-width: 0.3rem;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background-color: var(--block);
|
background-color: var(--block);
|
||||||
padding-top: 1.2rem; padding-bottom: 1.2rem;
|
padding-top: 1.2rem; padding-bottom: 1.2rem;
|
||||||
@ -350,7 +350,7 @@ main{
|
|||||||
background-color: var(--block);
|
background-color: var(--block);
|
||||||
max-width: 64rem;
|
max-width: 64rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-left: auto; margin-right: auto;
|
margin-left: auto; margin-right: auto; margin-bottom: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
main ul{
|
main ul{
|
||||||
@ -365,7 +365,7 @@ footer{
|
|||||||
background: linear-gradient(90deg, lch(10% 90 50), lch(35% 90 50) 25%, lch(35% 90 50) 75%, lch(10% 90 50));
|
background: linear-gradient(90deg, lch(10% 90 50), lch(35% 90 50) 25%, lch(35% 90 50) 75%, lch(10% 90 50));
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-top: auto;
|
/* margin-top: auto; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-content{
|
.footer-content{
|
||||||
@ -376,7 +376,7 @@ footer{
|
|||||||
|
|
||||||
.footer-content span{
|
.footer-content span{
|
||||||
font-size: calc(.7rem + .3vw);
|
font-size: calc(.7rem + .3vw);
|
||||||
margin-left: 1.2rem; margin-right: 1.2rem;
|
margin-left: .6rem; margin-right: .6rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: lch(90% 25 85);
|
color: lch(90% 25 85);
|
||||||
}
|
}
|
||||||
@ -698,10 +698,10 @@ footer{
|
|||||||
/* SUGGEST PAGE */
|
/* SUGGEST PAGE */
|
||||||
|
|
||||||
.suggestbox{
|
.suggestbox{
|
||||||
display: flex; flex-wrap: wrap; align-items: center; gap: 2.4rem; flex-direction: column;
|
display: flex; align-items: center; gap: 2.4rem; flex-direction: column;
|
||||||
margin-top: 2.4rem;
|
margin-top: 2.4rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: 36rem;
|
height: 48 rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.suggestbox h2{
|
.suggestbox h2{
|
||||||
@ -746,4 +746,34 @@ footer{
|
|||||||
|
|
||||||
.search-number{
|
.search-number{
|
||||||
display: none;
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* CREDITS */
|
||||||
|
|
||||||
|
.credit-box{
|
||||||
|
display: flex; flex-direction: column;
|
||||||
|
background: radial-gradient(lch(35% 90 50) 50%, lch(10% 90 50));
|
||||||
|
width: 48rem;
|
||||||
|
margin: auto;
|
||||||
|
border-style: outset; border-color: var(--thick-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.credit-text{
|
||||||
|
margin: 1.2rem; margin-bottom: 0;
|
||||||
|
display: flex; justify-content: space-between;
|
||||||
|
color: lch(90% 25 85);
|
||||||
|
}
|
||||||
|
|
||||||
|
.credit-text a{
|
||||||
|
text-decoration: underline;
|
||||||
|
color: lch(90% 25 85);
|
||||||
|
}
|
||||||
|
|
||||||
|
.credit-text img{
|
||||||
|
height: 14.4rem;
|
||||||
|
border-style: outset; border-color: var(--thick-border); border-radius: 1.2rem; border-width: 0.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.credit-text p{
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
@ -25,11 +25,11 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
{% block nav %}{% include 'nav.html' %}{% endblock %}
|
{% block nav %}{% include 'nav.jinja' %}{% endblock %}
|
||||||
{% block main %}<main>{% endblock %}
|
{% block main %}<main>{% endblock %}
|
||||||
{% block content required %}{% endblock %}
|
{% block content required %}{% endblock %}
|
||||||
{% block main2 %}</main>{% endblock %}
|
{% block main2 %}</main>{% endblock %}
|
||||||
{% block footer %}{% include 'footer.html' %}{% endblock %}
|
{% block footer %}{% include 'footer.jinja' %}{% endblock %}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
36
templates/credits.jinja
Normal file
36
templates/credits.jinja
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{% extends 'base.jinja' %}
|
||||||
|
{% block title %}Credits{% endblock %}
|
||||||
|
{% block main %}{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<div class="credit-box">
|
||||||
|
<div class="credit-text">
|
||||||
|
<div>
|
||||||
|
<h3>Developed by Esby</h3>
|
||||||
|
<ul>
|
||||||
|
<li>Aristide Majnheld - Bismarck</li>
|
||||||
|
<li><a href="https://octodon.social/@esbylion">@esbylion@octodon.social</a></li>
|
||||||
|
<li><a href="https://etheirys.masto.host/@esbylion">@esbylion@etheirys.masto.host</a></li>
|
||||||
|
<li><a href="mailto:eorzeasongbook@gmail.com">eorzeasongbook@gmail.com</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<img src="{{ url_for('static', filename='aristide.png') }}" alt="Song Index" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="credit-text">
|
||||||
|
<div>
|
||||||
|
<h3>Made with</h3>
|
||||||
|
<ul>
|
||||||
|
<li>Jinja, Flask, Python, sqlite, VS Code, Gunicorn, Docker, Caddy, HTMX, sox, pyexcel_odsr, LibreOffice Calc, Audacity</li>
|
||||||
|
<li>Osar'a Johve - Bismarck ♥</li>
|
||||||
|
</ul>
|
||||||
|
<p>Shout-outs to No Stress and Rainbow Connection</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
@ -1,6 +1,9 @@
|
|||||||
<footer>
|
<footer>
|
||||||
|
|
||||||
<div class="footer-content">
|
<div class="footer-content">
|
||||||
|
<span>
|
||||||
|
<a href="{{ url_for('creditpage') }}">Credits</a>
|
||||||
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<a href="{{ url_for('suggestpage') }}"> Suggest a new connection </a>
|
<a href="{{ url_for('suggestpage') }}"> Suggest a new connection </a>
|
||||||
</span>
|
</span>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.jinja' %}
|
||||||
{% block title %}Home{% endblock %}
|
{% block title %}Home{% endblock %}
|
||||||
{% block nav %}{% endblock %}
|
{% block nav %}{% endblock %}
|
||||||
{% block main %}{% endblock %}
|
{% block main %}{% endblock %}
|
||||||
@ -9,7 +9,6 @@
|
|||||||
<hgroup class="home-title">
|
<hgroup class="home-title">
|
||||||
<h1>The Eorzea Songbook</h1>
|
<h1>The Eorzea Songbook</h1>
|
||||||
<h3>An unofficial library of motifs in the Final Fantasy XIV soundtrack.</h3>
|
<h3>An unofficial library of motifs in the Final Fantasy XIV soundtrack.</h3>
|
||||||
<!-- <p>Last updated: 26/06/2023</p> -->
|
|
||||||
</hgroup>
|
</hgroup>
|
||||||
|
|
||||||
<div class="home-nav">
|
<div class="home-nav">
|
||||||
@ -1,4 +1,4 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.jinja" %}
|
||||||
|
|
||||||
{% block title %}{{ name }}{% endblock %}
|
{% block title %}{{ name }}{% endblock %}
|
||||||
|
|
||||||
@ -13,13 +13,13 @@
|
|||||||
<div class="entrypage-connections">
|
<div class="entrypage-connections">
|
||||||
<ul>
|
<ul>
|
||||||
{% for song_id, motif_id, song, feature in clip_info if feature %}
|
{% for song_id, motif_id, song, feature in clip_info if feature %}
|
||||||
{% include "motifpageclipget.html" %}
|
{% include "motifpageclipget.jinja" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
<h2>Featured In:</h2>
|
<h2>Featured In:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{% for song_id, motif_id, song, feature in clip_info if not feature %}
|
{% for song_id, motif_id, song, feature in clip_info if not feature %}
|
||||||
{% include "motifpageclipget.html" %}
|
{% include "motifpageclipget.jinja" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.jinja' %}
|
||||||
{% block title %}Motif Index{% endblock %}
|
{% block title %}Motif Index{% endblock %}
|
||||||
|
|
||||||
{% block sheet %}<link rel="stylesheet" href="{{ url_for('static', filename='motifbuttonpressed.css') }}" />{% endblock %}
|
{% block sheet %}<link rel="stylesheet" href="{{ url_for('static', filename='motifbuttonpressed.css') }}" />{% endblock %}
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
<div id="top-search" class="search-bar search-empty">
|
<div id="top-search" class="search-bar search-empty">
|
||||||
<!-- <span class="search-icon"></span> -->
|
<!-- <span class="search-icon"></span> -->
|
||||||
<button id="search-button" class="search-clear hidden" onclick="clearSearch('search-input', 'search-results-header', event)">🗙</button>
|
<button id="search-button" class="search-clear hidden" onclick="clearSearch('search-input', 'search-results-header', event)">✖</button>
|
||||||
<div class="search-items">
|
<div class="search-items">
|
||||||
<input
|
<input
|
||||||
id="search-input"
|
id="search-input"
|
||||||
@ -1,4 +1,4 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.jinja" %}
|
||||||
|
|
||||||
{% block title %}Suggestion sent{% endblock %}
|
{% block title %}Suggestion sent{% endblock %}
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.jinja" %}
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% for name, _, _ in song_info %}{{ name }}{% endfor %}
|
{% for name, _, _ in song_info %}{{ name }}{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -77,7 +77,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
{% for song_id, motif_id, motif in clip_info %}
|
{% for song_id, motif_id, motif in clip_info %}
|
||||||
{% set type = 'motif' %}
|
{% set type = 'motif' %}
|
||||||
{% include "clipget.html" %}
|
{% include "clipget.jinja" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.jinja' %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.jinja" %}
|
||||||
|
|
||||||
{% block title %}Suggest a connection{% endblock %}
|
{% block title %}Suggest a connection{% endblock %}
|
||||||
|
|
||||||
@ -17,7 +17,7 @@
|
|||||||
<div>Nothing selected yet.</div>
|
<div>Nothing selected yet.</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="suggest-bar-{{ i }}" class="search-bar search-empty">
|
<div id="suggest-bar-{{ i }}" class="search-bar search-empty">
|
||||||
<button type="button" id="suggest-button-{{ i }}" class="search-clear hidden" onclick="clearSearch('search-input-suggest-{{ i }}', 'search-results-{{ i }}')">🗙</button>
|
<button type="button" id="suggest-button-{{ i }}" class="search-clear hidden" onclick="clearSearch('search-input-suggest-{{ i }}', 'search-results-{{ i }}')">✖</button>
|
||||||
<div class="search-items">
|
<div class="search-items">
|
||||||
<input
|
<input
|
||||||
id="search-input-suggest-{{ i }}"
|
id="search-input-suggest-{{ i }}"
|
||||||
Loading…
Reference in New Issue
Block a user