Changeset - 736784c0db93
[Not reviewed]
default
0 3 0
drewp@bigasterisk.com - 7 years ago 2018-06-10 19:45:36
drewp@bigasterisk.com
ascoltami: Go button, style updates
Ignore-this: df26b8c9e6774055a0196592151adfe8
3 files changed with 39 insertions and 9 deletions:
0 comments (0 inline, 0 general)
light9/ascoltami/index.html
Show inline comments
 
@@ -9,6 +9,9 @@
 
    <script type="text/javascript" src="/lib/jquery-ui/jquery-ui.min.js"></script>
 
    <link rel="Stylesheet" type="text/css" href="/lib/jquery-ui/themes/smoothness/jquery-ui.min.css"/>
 
    <link rel="Stylesheet" type="text/css" href="/style.css"/>
 
    <style>
 
        #cmd-go { min-width: 5em; }
 
    </style>
 
  </head>
 
  <body>
 
    <h1>ascoltami on ${host}</h1>
 
@@ -41,7 +44,7 @@
 
      <button id="cmd-play" class="playMode">Play <div class="key">p</div></button>
 
      <button id="cmd-intro">Skip intro <div class="key">i</div></button>
 
      <button id="cmd-post">Skip to Post <div class="key">t</div></button>
 
      <button id="cmd-go">Go  <div class="key">space</div></button>
 
      <button id="cmd-go">Go  <div class="key">g</div><div id="next"></div></button>
 

	
 
      <button id="cmd-out0">Output 0</button>
 
      <button id="cmd-out1">Output 1</button>
 
@@ -90,6 +93,7 @@
 
		$(data.playing ? "#cmd-play" : "#cmd-stop").addClass("active");
 
		lastPlaying = data.playing;
 
	    }
 
            $("#next").text(data.next);
 
	    doneCallback();
 
	});
 
    }
 
@@ -134,7 +138,10 @@
 
	if (ev.which == 105) { $("#cmd-intro").click(); return false; }
 
	if (ev.which == 116) { $("#cmd-post").click(); return false; }
 

	
 
	if (ev.which == 32) { $("#cmd-go").click(); return false; }
 
	if (ev.key == 'g') {
 
            $("#cmd-go").click();
 
            return false;
 
        }
 
	return true;
 
    });
 

	
light9/ascoltami/webapp.py
Show inline comments
 
@@ -39,6 +39,14 @@ class timeResource(PrettyErrorHandler,cy
 
        player = self.settings.app.player
 
        graph = self.settings.app.graph
 
        self.set_header("Content-Type", "application/json")
 

	
 
        if player.isAutostopped():
 
            nextAction = 'finish'
 
        elif player.isPlaying():
 
            nextAction = 'disabled'
 
        else:
 
            nextAction = 'play'
 

	
 
        self.write(json.dumps({
 
            "song" : playerSongUri(graph, player),
 
            "started" : player.playStartTime,
 
@@ -46,6 +54,7 @@ class timeResource(PrettyErrorHandler,cy
 
            "playing" : player.isPlaying(),
 
            "t" : player.currentTime(),
 
            "state" : player.states(),
 
            "next" : nextAction,
 
            }))
 

	
 
    def post(self):
 
@@ -109,7 +118,9 @@ class goButton(PrettyErrorHandler, cyclo
 
        """
 
        graph, player = self.settings.app.graph, self.settings.app.player
 

	
 
        if player.isPlaying():
 
        if player.isAutostopped():
 
            player.resume()
 
        elif player.isPlaying():
 
            pass
 
        else:
 
            player.resume()
light9/web/style.css
Show inline comments
 
@@ -40,13 +40,19 @@ input[type=text] {
 
}
 
.songs button {
 
    display: inline-block;
 
    width: 200px;
 
    width: 15em;
 
    height: 50px;
 
    text-align: left;
 
    background: black;
 
    color: white;
 
    margin: 2px;
 
    font-size: 115%;
 
    font-size: 130% !important;    
 
    font-weight: bold;
 
    text-shadow: -1px -1px 0 #000,
 
                 1px -1px 0 #000,
 
                 -1px 1px 0 #000,
 
                 1px 1px 0 #000;
 
    white-space: nowrap;
 
}
 
button a {
 
    color: white;
 
@@ -62,13 +68,13 @@ button a {
 
    padding: 20px
 
}
 
.commands button.active {
 
    background: #1C4054;
 
    background: #a90707;
 
}
 
.key {
 
    color: #888;
 
}
 
.currentSong button {
 
    background: #55A5C9;
 
    background: #a90707;
 
}
 
.timeRow {
 
    margin: 14px;
 
@@ -80,7 +86,13 @@ button a {
 
    font-size: 27px;
 
    color: rgb(233, 122, 122);
 
    display: inline-block;
 
    padding: 10px
 
    padding: 10px;
 
    font-size: 200% !important;    
 
    font-weight: bold;
 
    text-shadow: -1px -1px 0 #000,
 
                 1px -1px 0 #000,
 
                 -1px 1px 0 #000,
 
                 1px 1px 0 #000;
 
}
 

	
 
.dropTarget {
 
@@ -122,7 +134,7 @@ button a {
 
/* ascoltami mini mode */
 
@media (max-height: 600px) {
 
    .songs {
 
        -webkit-column-width: 9em;
 
        -webkit-column-width: 12em;
 
    }
 
    .songs button {
 
        font-size: initial;
0 comments (0 inline, 0 general)