Browse Source

Add a placeholder for the archive

main
Luke Murphy 4 years ago
parent
commit
4808f049f9
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 6
      vocoder/server.py
  2. 8
      vocoder/static/vocoder.js
  3. 16
      vocoder/templates/archive.html
  4. 7
      vocoder/templates/index.html

6
vocoder/server.py

@ -18,3 +18,9 @@ def add_to_archive():
# I can't seem to get the file to send but the basic
# plumbing is in place
return ("faking it till we make it", 201)
@app.route("/archive/")
def archive():
"""Serve the archive listing."""
return render_template("archive.html")

8
vocoder/static/vocoder.js

@ -54,19 +54,19 @@ function setupRecording(){
// TODO: we'll probably want something more glam than
// some default buttons but that's fine for experimenting
recordButton = createButton('record');
recordButton.position(10, 10);
recordButton.position(10, 90);
recordButton.mousePressed(doRecording);
stopButton = createButton('stop');
stopButton.position(120, 10);
stopButton.position(120, 90);
stopButton.mousePressed(doStopping);
playButton = createButton('play');
playButton.position(210, 10);
playButton.position(210, 90);
playButton.mousePressed(doPlaying);
playButton = createButton('archive');
playButton.position(300, 10);
playButton.position(300, 90);
playButton.mousePressed(doArchiving);
}

16
vocoder/templates/archive.html

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>vocoder.org: archive</title>
</head>
<body>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/archive/">Archive</a></li>
</ul>
<p>Coming Soon TM.</p>
</body>
</html>

7
vocoder/templates/index.html

@ -3,10 +3,15 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>vocoder.org</title>
<title>vocoder.org: home</title>
<link rel="stylesheet" href="/static/leaflet/leaflet.css" type="text/css" media="screen" title="leaflet" charset="utf-8">
</head>
<body>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/archive/">Archive</a></li>
</ul>
<script src="/static/leaflet/leaflet-src.js" charset="utf-8"></script>
<script src="/static/mappajs/mappa.min.js" charset="utf-8"></script>
<script src="/static/p5js/p5.min.js" charset="utf-8"></script>

Loading…
Cancel
Save