aboutsummaryrefslogtreecommitdiff
path: root/src/templates
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/search_results.html34
-rw-r--r--src/templates/submit_song_new.html29
-rw-r--r--src/templates/submit_song_picklist.html15
3 files changed, 78 insertions, 0 deletions
diff --git a/src/templates/search_results.html b/src/templates/search_results.html
new file mode 100644
index 0000000..9bac74f
--- /dev/null
+++ b/src/templates/search_results.html
@@ -0,0 +1,34 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <title>Solfege search results - {{original_query}}</title>
+ </head>
+ <body>
+ <!-- Normalized: {{normalized_query}} -->
+ <!-- Denormalized: {{denormalized_query}} -->
+
+ <h1>Solfege search results</h1>
+ <p>
+ <form action="/search" method="get">
+ <input type="text" name="q" value="{{original_query}}">
+ <input type="submit" value="Search">
+ </form>
+ </p>
+
+ <ol>
+ {{#each results}}
+ <li><b>{{title}} - {{artist_name}}</b></li>
+ {{/each}}
+ </ol>
+
+ <h2>None of these right? Remebered the song?</h2>
+ <p>Submit the song this phrase is from!</p>
+ <p>
+ <form action="/submit_song">
+ <input type="hidden" name="phrase" value="{{denormalized_query}}">
+ <input type="text" name="title" placeholder="Song title">
+ <input type="submit" value="Improve the world">
+ </form>
+ </p>
+ </body>
+</html>
diff --git a/src/templates/submit_song_new.html b/src/templates/submit_song_new.html
new file mode 100644
index 0000000..29d7529
--- /dev/null
+++ b/src/templates/submit_song_new.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<html>
+ <head>
+ <title>Submit a new song</title>
+ </head>
+ <body>
+ <h1>Submit a new song</h1>
+ <p>Tell us about the song (all fields required):</p>
+ <form action="/submit_song" method="post">
+ <table>
+ <tr>
+ <td>Title:</td>
+ <td><input type="text" name="title" value="{{title}}"></td>
+ </tr>
+ <tr>
+ <td>Artist:</td>
+ <td><input type="text" name="artist" value="{{artist}}"></td>
+ </tr>
+ <tr>
+ <td>Phrase:</td>
+ <td><input type="text" name="phrase" value="{{phrase}}"></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit" value="Win at life"></td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
diff --git a/src/templates/submit_song_picklist.html b/src/templates/submit_song_picklist.html
new file mode 100644
index 0000000..b56c43f
--- /dev/null
+++ b/src/templates/submit_song_picklist.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <title>Submit a song</title>
+ </head>
+ <body>
+ <h1>Did you mean one of these?</h1>
+ <ol>
+ {{#each songs}}
+ <li><a href="/add_phrase?phrase={{../phrase}}&amp;id={{song_id}}">{{title}} by {{artist_name}}</a></li>
+ {{/each}}
+ </ol>
+ <a href="/submit_song?phrase={{phrase}}&amp;title={{title}}&amp;new=1">Nope, it's none of these</a>
+ </body>
+</html>