File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -337,21 +337,22 @@ progress::-webkit-progress-value {
337337}
338338
339339.song-info {
340- grid-row : 3 ;
341340 display : flex;
342341 justify-content : center;
343342 align-items : center;
344343 color : var (--text-color );
345344 font-size : 0.9em ;
346345}
347346
348- # song-title {
347+ # song-title ,
348+ # song-artist {
349349 float : left;
350+ overflow : hidden;
351+ text-overflow : ellipsis;
352+ white-space : nowrap;
353+ max-width : 50% ;
350354}
351355
352- # song-artist {
353- float : right;
354- }
355356
356357# volume-wrapper {
357358 position : absolute;
@@ -387,10 +388,25 @@ input[type='range']:focus::-webkit-slider-runnable-track {
387388}
388389
389390input [type = 'range' ]::-webkit-slider-thumb {
390- margin-top : -4 px ;
391+ margin-top : -5 px ;
391392 cursor : pointer;
392393}
393394
394395# volume {
395396 background-color : transparent;
396397}
398+
399+ /**
400+ * Because volume slider is positionied absolute,
401+ * we need this ugly rule to adjust song artist
402+ * and song title
403+ */
404+ @media (max-width : 1000px ) {
405+ # song-title {
406+ max-width : 25% ;
407+ }
408+
409+ # song-artist {
410+ max-width : 20% ;
411+ }
412+ }
Original file line number Diff line number Diff line change 4646 < div id ="timer-end "> 0:00</ div >
4747 </ div >
4848 < div class ="song-info ">
49- < div >
50- < div id ="song-title "> Something</ div >
51- by
52- < div id ="song-artist "> Someone</ div >
53- </ div >
49+ < div id ="song-title "> Something</ div >
50+ < div > by </ div >
51+ < div id ="song-artist "> Someone</ div >
5452 < div id ="volume-wrapper ">
5553 < div id ="volume-button "> </ div >
5654 < input type ="range " min ="0 " max ="100 " value ="100 " id ="volume " />
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ module.exports = function() {
100100 require ( 'electron' ) . shell . openExternal ( 'https://codef0x.dev' ) ;
101101 } ) ;
102102
103- volumeSlider . addEventListener ( 'change ' , ( ) => {
103+ volumeSlider . addEventListener ( 'input ' , ( ) => {
104104 player . volume = volumeSlider . value / 100 ;
105105 } ) ;
106106} ;
You can’t perform that action at this time.
0 commit comments