diff --git a/elements/mpd.js b/elements/mpd.js index 8bdef70..ff9a839 100644 --- a/elements/mpd.js +++ b/elements/mpd.js @@ -67,6 +67,24 @@ class MPD extends Component { root.removeChild(root.firstChild); } root.appendChild(render()); + const styles = document.createElement('style'); + styles.appendChild(document.createTextNode(` + .artist, .song { + color: #fff; + } + progress { + -webkit-appearance: none; + appearance: none; + width: 40%; + } + progress::-webkit-progress-bar { + background-color: #2e3436; + } + progress[value]::-webkit-progress-value { + background-color: hsl(35, 98%, 46%); + } + `)); + root.appendChild(styles); } render({ data }) { @@ -91,10 +109,10 @@ class MPD extends Component { volume = 0; } el.innerHTML = ` -
${artist}
-
${data.current_song.title}
+
${artist}
+
${data.current_song.title}
${status}
-
🔈 ${volume}
+
volume ${volume}
`; return el; } diff --git a/elements/userlist.js b/elements/userlist.js index 8f1a479..4b03694 100644 --- a/elements/userlist.js +++ b/elements/userlist.js @@ -53,6 +53,12 @@ class UserList extends Component { -webkit-animation-timing-function:ease-in-out; -webkit-animation-direction: alternate; } + span.output { + color: #fff; + } + span.prompt { + color: #a0a0a0; + } `)); root.appendChild(styles); } @@ -61,10 +67,10 @@ class UserList extends Component { const el = document.createElement('div'); el.className = 'terminal'; el.innerHTML = ` -
user@c-beam> #who
-
${data.join(', ')}
-
total: ${data.length}
-
user@c-beam> _
+
user@c-beam> #who
+
${data.join(', ')}
+
total: ${data.length}
+
user@c-beam> _
`; return el; }