diff --git a/app.py b/app.py index 4da3510..f471fb2 100644 --- a/app.py +++ b/app.py @@ -47,13 +47,17 @@ def songindex(): song_info = db.execute(''' select - song_id, album_id, track, song.name, song.name_jp + song_album.song_id, album_id, track, song.name, song.name_jp, count(clip.song_id) from song_album join song on song_album.song_id=song.id + left join + clip on clip.song_id=song.id + group by + song_album.song_id, album_id, track, song.name, song.name_jp order by album_id, track @@ -73,18 +77,30 @@ def motifindex(): category_info = db.execute(''' select - id, name + category.id, category.name from category + join + motif + on + category.id=motif.category + group by + category.id, category.name order by - id + count(category.id) desc ''').fetchall() motif_info = db.execute(''' select - id, name, category + id, name, category, count(clip.motif_id) from motif + left join + clip + on + clip.motif_id=motif.id + group by + id, name, category order by id ''').fetchall() diff --git a/reference_clips.ods b/reference_clips.ods index 6246d33..9070e7b 100644 Binary files a/reference_clips.ods and b/reference_clips.ods differ diff --git a/static/style.css b/static/style.css index c10a07b..025d43b 100644 --- a/static/style.css +++ b/static/style.css @@ -1,2 +1,171 @@ -body{max-width:50rem;margin-left:auto;margin-right:auto;} -nav{} \ No newline at end of file +/* body{ + max-width:50rem;margin-left:auto;margin-right:auto; +} */ + +body{ + margin: 0; +} + +header{ + background-color: lch(80% 25 79); + margin: 0; + border-style: outset; +} + +.top-buttons{ + display: flex; + padding-left: 0; + margin: 0; + padding: 2rem; + column-gap: 1rem; + +} +.top-buttons li{ + flex: auto; + border-style: outset; + list-style: none; + text-align: center; +} + +.top-buttons li:nth-child(2){ + flex: none; +} + +main{ + background-color: lch(80% 25 79); + max-width: 50rem; + margin-left: auto; + margin-right: auto; +} + +main ul{ + margin: 0; +} + +h1{ + margin: 0; +} + +h2{ + margin: 0; +} + +a{ + text-decoration: none; +} + +.album-list{ + display: flex; + flex-direction: column; + gap: 1rem; +} + +.album-box{ + gap: 1rem; +} + +.album-box h2{ + color: white; + border-style: solid; + border-color: lch(25% 40 45); + margin: 1rem; + margin-bottom: 0px; + position: sticky; + top: 0px; + background: lch(25% 40 45); +} + +.album-box ul{ + display: flex; + flex: auto; + flex-direction: column; + padding-left: 0; +} + +.song-box{ + list-style: none; + min-height: 1.5rem; + margin: 1rem; + margin-bottom: 0; + margin-left: 4rem; + background: lch(25% 40 45); + display: flex; + flex: auto; + flex-wrap: wrap; + justify-content: left; + column-gap: 1rem; + align-content: bottom; + white-space: nowrap; + overflow: hidden; +} + +.song-box span{ + color: white; + text-align: bottom; +} + +.track-name-jp{ + +} + +.clip-count{ + margin-left: auto; + min-width: 2rem; + text-align: right; +} + +.category-list{ + display: flex; + flex-wrap: wrap; + align-content: flex-start; + flex-basis: 51%; + gap: 1rem; +} + +.category-box{ + gap: 1rem; + margin-left: auto; + margin-right: auto; + width: 24rem; +} + +.category-box h2{ + color: white; + border-style: solid; + border-color: lch(25% 40 45); + margin: 1rem; + margin-bottom: 0px; + background: lch(25% 40 45); +} + +.category-box ul{ + display: flex; + flex: initial; + flex-direction: column; + padding-left: 0; +} + +.motif-box{ + list-style: none; + min-height: 1.5rem; + margin: 1rem; + margin-bottom: 0; + background: lch(25% 40 45); + display: flex; + flex: auto; + justify-content: right; +} + +.motif-box span{ + color: white; + vertical-align: middle; + +} + +.motif-name{ + margin: auto; +} + +.motif-count{ + +} \ No newline at end of file diff --git a/templates/album.html b/templates/album.html index 86d0853..52e42b6 100644 --- a/templates/album.html +++ b/templates/album.html @@ -1,4 +1,4 @@ -{% extends "nav.html" %} +{% extends "base.html" %} {% block title %}{{ album_info[0] }}{% endblock %} {% block content %} diff --git a/templates/base.html b/templates/base.html index cf2dc21..0d6ab30 100644 --- a/templates/base.html +++ b/templates/base.html @@ -2,7 +2,7 @@
-Artist:
+Album:
+Clips:
+