Skip to content

Commit fa60c7d

Browse files
committed
Disable horizontal scrolling and some UI fixes for mobile. Increase queue size to 100. closes #3
1 parent 4e0fb59 commit fa60c7d

4 files changed

Lines changed: 54 additions & 12 deletions

File tree

app/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,21 @@ <h1 class="header-text">
5555
<div class="events-remaining">
5656
<span class="events-remaining-value odometer"></span>&nbsp;
5757
<span class="events-remaining-text">events remaining in queue</span>&nbsp;
58-
<img id="cmdMute" src="/static/public/images/speaker.svg" style="width:32px;height:32px;cursor:pointer;" alt="mute/unmute"/>
5958
</div>
59+
<img id="cmdMute" src="/static/public/images/speaker.svg" alt="mute/unmute"/>
6060
</header>
6161
<div id="area">
6262
<div class="online-users-div">
6363
<h2 class="online-users-text"><span class="possibly-text">possibly</span>&nbsp;<span class="odometer online-users-count"></span> people listening</h2>
6464
</div>
6565
</div>
6666
<footer>
67-
<div style="float:left;line-height:1.3em;">
67+
<div class="footer-left-text-block">
6868
this project is open source, you can view it on <a href="https://github.com/debugger22/github-audio" target="_blank">GitHub</a><br/>
6969
developed by <a href="https://github.com/debugger22" target="_blank">@debugger22</a><br/><br/>
7070
ProTip: It's nice to keep it open in the background
7171
</div>
72-
<div style="float:right;margin-right:3%;text-align:right;line-height:1.3em;">
72+
<div class="footer-right-text-block">
7373
inspired by <a href="http://hatnote.com" target="_blank">hatnote</a><br/>
7474
<div>icons made by <a href="http://www.flaticon.com/authors/freepik" target="_blank" title="Freepik">Freepik</a></div>
7575
</div>

app/public/css/main.css

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ a{
5050
}
5151

5252
html,body{
53-
background-color: white;
53+
background-color: #0288D1;
5454
font-family: 'Source Sans Pro', sans-serif;
5555
font-size: 16px;
56+
overflow-y: scroll;
57+
overflow-x: hidden;
5658
}
5759

5860
header{
@@ -79,18 +81,22 @@ header{
7981

8082
.events-remaining{
8183
float:right;
82-
margin-right: 3%;
84+
margin-right: 5%;
8385
}
8486

8587
.events-remaining-text, .events-remaining-value{
8688
font-size: 0.8em;
8789
visibility: visible;
8890
}
8991

90-
.active-nerds{
91-
float:right;
92-
line-height: 2em;
93-
margin-right: 70px;
92+
93+
#cmdMute{
94+
width:28px;
95+
height:28px;
96+
cursor:pointer;
97+
position: absolute;
98+
top: 20px;
99+
right: 40px;
94100
}
95101

96102
#area{
@@ -144,9 +150,45 @@ footer{
144150
font-size: 0.9em;
145151
}
146152

153+
.footer-left-text-block{
154+
float:left;
155+
line-height:1.3em;
156+
}
157+
158+
.footer-right-text-block{
159+
float:right;
160+
margin-right:3%;
161+
text-align:right;
162+
line-height:1.3em;
163+
}
164+
147165
.social-buttons{
148166
position: fixed;
149167
bottom:20px;
150168
right:20px;
151169
z-index: 2;
152170
}
171+
172+
173+
@media only screen and (max-device-width: 480px) {
174+
175+
.footer-left-text-block{
176+
width: 100%;
177+
margin: 0 auto;
178+
line-height:1.3em;
179+
}
180+
181+
.footer-right-text-block{
182+
width: 100%;
183+
margin: 0 auto;
184+
line-height:1.3em;
185+
float: left;
186+
text-align: left;
187+
margin-top: 20px;
188+
}
189+
190+
.online-users-div{
191+
text-align: left;
192+
}
193+
194+
}

app/public/js/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ socket.on('github', function (data) {
3939
eventQueue.push(event);
4040
}
4141
});
42-
// Don't let the eventQueue grow more than 50
43-
if (eventQueue.length > 50) eventQueue = eventQueue.slice(0, 50);
42+
// Don't let the eventQueue grow more than 100
43+
if (eventQueue.length > 100) eventQueue = eventQueue.slice(0, 100);
4444
});
4545

4646
socket.on('connect', function(){

server/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function fetchDataFromGithub(){
8181
if(socket != null && socket.connected == true){
8282
redis_client.get('connected_users', function(err, count) {
8383
if(!err && count != null){
84-
socket.json.emit('github', {data: stripedData, connected_users: count});
84+
socket.volatile.json.emit('github', {data: stripedData, connected_users: count});
8585
}else{
8686
logger.error(err.message);
8787
}

0 commit comments

Comments
 (0)