diff --git a/app.py b/app.py index ccd5e43..fca2e09 100644 --- a/app.py +++ b/app.py @@ -259,16 +259,16 @@ def songpage(id): # query song name - name, = db.execute(''' + song_info = db.execute(''' select - name + name, name_jp from song where id = ? ''', (id,) - ).fetchone() + ).fetchall() # query album info @@ -333,7 +333,7 @@ def songpage(id): ).fetchall() return flask.render_template('song.html', - name=name, + song_info=song_info, id=id, album_info=album_info, clip_info=clip_info, diff --git a/static/motificon.png b/static/motificon.png new file mode 100644 index 0000000..d50714c Binary files /dev/null and b/static/motificon.png differ diff --git a/static/songbook.png b/static/songbook.png new file mode 100644 index 0000000..8701cc1 Binary files /dev/null and b/static/songbook.png differ diff --git a/static/songicon.png b/static/songicon.png new file mode 100644 index 0000000..3c3ebeb Binary files /dev/null and b/static/songicon.png differ diff --git a/static/style.css b/static/style.css index 0c7623f..3687229 100644 --- a/static/style.css +++ b/static/style.css @@ -38,22 +38,47 @@ footer{ .top-buttons{ display: flex; - padding-left: 0; margin: 0; - padding: 2rem; + padding: 1rem; column-gap: 1rem; + max-height: fit-content; } -.top-buttons li{ +.top-buttons a{ flex: auto; + display: flex; + list-style: none; + justify-content: center; + align-items: center; + position: relative; +} + +.top-buttons a:nth-child(2){ + flex: none; + +} + +.top-buttons a::before{ + content: ""; + position: absolute; + bottom: 0; + right: 0; border-style: outset; border-color: var(--light-border); - list-style: none; - text-align: center; + border-radius: 1rem; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 100%; + height: 100%; } -.top-buttons li:nth-child(2){ - flex: none; +.top-buttons li{ + vertical-align: center; +} + +.top-buttons img{ + display: block; } .search-bar{ @@ -129,6 +154,10 @@ h2{ margin: 0; } +h3{ + margin: 0; +} + a{ text-decoration: none; } @@ -136,7 +165,6 @@ a{ .album-list{ display: flex; flex-direction: column; - gap: 1rem; } .category-list{ @@ -144,14 +172,13 @@ a{ flex-wrap: wrap; align-content: flex-start; flex-basis: 51%; - row-gap: 1rem; } .album-info{ display: flex; align-items: baseline; - border-style: solid; - border-color: var(--light-box); + /* border-style: solid; + border-top: 0; border-left: 0; border-right: 0; */ margin: 1rem; margin-bottom: 0.5rem; background: var(--light-box); @@ -165,13 +192,15 @@ a{ } .sort-box.album{ - gap: 1rem; + margin-bottom: 1rem; + } .sort-box.category{ gap: 1rem; margin-left: auto; margin-right: auto; width: 24rem; + margin-bottom: 1rem; } .sort-box.category h2{ @@ -186,17 +215,19 @@ a{ list-style: none; min-height: 1.5rem; display: flex; + border-radius: 1rem 0% 0% 1rem; + background: linear-gradient(90deg, var(--light-box) 90%, rgba(255, 255, 255, 0) 100%); } .entry-box.song{ - margin-top: 0.5rem; margin-bottom: 0.5rem; margin-left: 4rem; margin-right: 1rem; + margin-top: 0.5rem; margin-bottom: 0.5rem; margin-left: 1rem; margin-right: 1rem; } .entry-box.motif{ margin: 1rem; margin-bottom: 0; - background: var(--light-box); justify-content: center; + align-items: baseline; } .entry-box.song li{ @@ -215,12 +246,9 @@ a{ align-self: center; } -.entry-box.song.full{ - background: var(--light-box); -} - .entry-box.song.empty{ margin-top: 0; margin-bottom: 0; + background: none; } .entry-box.song.full li span{ @@ -239,7 +267,7 @@ a{ .entry-box.motif::before{ content: "b"; - min-width: 2rem; + min-width: 4rem; visibility: hidden; margin-right: auto; } @@ -252,11 +280,17 @@ a{ color: black; flex-wrap: nowrap; display: inline; - border-left-style: solid; align-self: center; - margin-left: auto; - min-width: 2rem; text-align: right; + min-width: 1.5rem; + margin-right: 1rem; +} + +.count-icon{ + width: 1rem; height: 1rem; + margin-left: auto; margin-right: 0.2rem; + display: block; + align-self: center; } .sort-box.album label{ @@ -277,22 +311,36 @@ a{ .title-box{ margin: 1rem; - margin-bottom: 0px; border-style: solid; border-color: var(--light-box); background: var(--light-box); display: flex; - align-items: baseline; + align-items: center; +} + +.title-box img{ + vertical-align: bottom; } .title-box h1{ - padding: 0; + margin-left: .5rem; + max-width: 65%; +} + +.title-jp{ + margin-left: 2rem; + max-width: 65%; +} + +.title-album{ + margin-left: auto; + min-width: 2rem; } .track-info{ - margin-top: 1rem; display: flex; flex-wrap: wrap; + justify-content: center; row-gap: 1rem; } @@ -304,49 +352,57 @@ a{ display: flex; flex-direction: column; width: 23rem; - margin-left: 2rem; margin-right: auto; + +} + +.songpage-artist ul{ + gap: 0.5rem; +} + +.songpage-artist h2{ + text-align: center; + margin-bottom: 1rem; } .songpage-album{ display: flex; flex-direction: column; width: 23rem; - margin-left: 2rem; margin-right: auto; + } -.songpage-motifs{ +.songpage-album ul{ + gap: 0.5rem; +} + +.songpage-album h2{ + text-align: center; + margin-bottom: 1rem; +} + +.entrypage-connections{ display: flex; flex-direction: column; width: 100%; justify-content: center; } -.songpage-motifs h2{ +.entrypage-connections h2{ text-align: center; + margin-bottom: 1rem; } -.songpage-clip{ - margin-top: 1rem; +.entrypage-clip{ + margin-bottom: 1rem; display: flex; flex-wrap: wrap-reverse; column-gap: 2rem; justify-content: center; align-items: center; - flex-shrink: 0; - flex-grow: 1; } -.songpage-clip audio{ - -} - -.songpage-clip::before{ - /* content: ""; - visibility: hidden; - width: 15%; */ -} - -.motif-pointer{ +.clip-pointer{ width: 12rem; white-space: nowrap; text-align: center; -} \ No newline at end of file +} + diff --git a/templates/motif.html b/templates/motif.html index c7e065c..b69635b 100644 --- a/templates/motif.html +++ b/templates/motif.html @@ -3,21 +3,23 @@ {% block title %}{{ name }}{% endblock %} {% block content %} -
Clips:
-