|
| 1 | +function getRemoteStyle_jblsoundbar(config) { |
| 2 | + const template = config.remote_template; |
| 3 | + const base_url = `/hacsfiles/generic-remote-control-card/remotes/${template}`; |
| 4 | + |
| 5 | + return ` |
| 6 | + ha-card{ |
| 7 | + background-color:transparent; |
| 8 | + box-shadow:var(--paper-material-elevation-0_-_box-shadow); |
| 9 | + } |
| 10 | + body { |
| 11 | + margin: 0; |
| 12 | + padding: 20px; |
| 13 | + font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif |
| 14 | +} |
| 15 | +
|
| 16 | +.container { |
| 17 | + width: 360px; |
| 18 | + margin: 0 auto |
| 19 | +} |
| 20 | +
|
| 21 | +#remote-control-jblsoundbar { |
| 22 | + position: relative; |
| 23 | + background: url(${base_url}/jblsoundbar_remote.png) no-repeat; |
| 24 | + width: 327px; |
| 25 | + height: 692px |
| 26 | +} |
| 27 | +
|
| 28 | +#remote-control-jblsoundbar h2, |
| 29 | +#remote-control-jblsoundbar span { |
| 30 | + position: absolute; |
| 31 | + left: 5000px |
| 32 | +} |
| 33 | +
|
| 34 | +#remote-control-jblsoundbar ul { |
| 35 | + margin: 0; |
| 36 | + padding: 0; |
| 37 | + list-style-type: none |
| 38 | +} |
| 39 | +
|
| 40 | +#power a, |
| 41 | +#bluetooth a, |
| 42 | +#source a, |
| 43 | +#aux a, |
| 44 | +#optical a, |
| 45 | +#feedback a, |
| 46 | +#minus a, |
| 47 | +#mute a, |
| 48 | +#plus a, |
| 49 | +#bassminus a, |
| 50 | +#bassplus a, |
| 51 | +#surround a, |
| 52 | +#stereo a, |
| 53 | +#harman a { |
| 54 | + position: absolute; |
| 55 | + display: block |
| 56 | +} |
| 57 | +
|
| 58 | +#remote-control-jblsoundbar li#power a { |
| 59 | + left: 56px; |
| 60 | + top: 75px; |
| 61 | + width: 38px; |
| 62 | + height: 38px; |
| 63 | + background: url(${base_url}/power.png) no-repeat |
| 64 | +} |
| 65 | +
|
| 66 | +#remote-control-jblsoundbar li#bluetooth a { |
| 67 | + left: 147px; |
| 68 | + top: 74px; |
| 69 | + width: 38px; |
| 70 | + height: 38px; |
| 71 | + background: url(${base_url}/bluetooth.png) no-repeat |
| 72 | +} |
| 73 | +
|
| 74 | +#remote-control-jblsoundbar li#source a { |
| 75 | + left: 240px; |
| 76 | + top: 74px; |
| 77 | + width: 38px; |
| 78 | + height: 38px; |
| 79 | + background: url(${base_url}/source.png) no-repeat |
| 80 | +} |
| 81 | +
|
| 82 | +#remote-control-jblsoundbar li#aux a { |
| 83 | + left: 56px; |
| 84 | + top: 158px; |
| 85 | + width: 38px; |
| 86 | + height: 38px; |
| 87 | + background: url(${base_url}/auxiliar.png) no-repeat |
| 88 | +} |
| 89 | +
|
| 90 | +#remote-control-jblsoundbar li#optical a { |
| 91 | + left: 148px; |
| 92 | + top: 157px; |
| 93 | + width: 38px; |
| 94 | + height: 38px; |
| 95 | + background: url(${base_url}/optical.png) no-repeat |
| 96 | +} |
| 97 | +
|
| 98 | +#remote-control-jblsoundbar li#feedback a { |
| 99 | + left: 233px; |
| 100 | + top: 157px; |
| 101 | + width: 46px; |
| 102 | + height: 38px; |
| 103 | + background: url(${base_url}/feedback.png) no-repeat |
| 104 | +} |
| 105 | +
|
| 106 | +#remote-control-jblsoundbar li#minus a { |
| 107 | + left: 55px; |
| 108 | + top: 239px; |
| 109 | + width: 38px; |
| 110 | + height: 38px; |
| 111 | + background: url(${base_url}/minus.png) no-repeat |
| 112 | +} |
| 113 | +
|
| 114 | +#remote-control-jblsoundbar li#mute a { |
| 115 | + left: 148px; |
| 116 | + top: 239px; |
| 117 | + width: 38px; |
| 118 | + height: 38px; |
| 119 | + background: url(${base_url}/mute.png) no-repeat |
| 120 | +} |
| 121 | +
|
| 122 | +#remote-control-jblsoundbar li#plus a { |
| 123 | + left: 238px; |
| 124 | + top: 239px; |
| 125 | + width: 38px; |
| 126 | + height: 38px; |
| 127 | + background: url(${base_url}/plus.png) no-repeat |
| 128 | +} |
| 129 | +
|
| 130 | +#remote-control-jblsoundbar li#bassminus a { |
| 131 | + left: 55px; |
| 132 | + top: 322px; |
| 133 | + width: 38px; |
| 134 | + height: 38px; |
| 135 | + background: url(${base_url}/minus.png) no-repeat |
| 136 | +} |
| 137 | +
|
| 138 | +#remote-control-jblsoundbar li#bassplus a { |
| 139 | + left: 238px; |
| 140 | + top: 322px; |
| 141 | + width: 38px; |
| 142 | + height: 38px; |
| 143 | + background: url(${base_url}/plus.png) no-repeat |
| 144 | +} |
| 145 | +
|
| 146 | +#remote-control-jblsoundbar li#surround a { |
| 147 | + left: 55px; |
| 148 | + top: 405px; |
| 149 | + width: 38px; |
| 150 | + height: 38px; |
| 151 | + background: url(${base_url}/surround.png) no-repeat |
| 152 | +} |
| 153 | +
|
| 154 | +#remote-control-jblsoundbar li#stereo a { |
| 155 | + left: 147px; |
| 156 | + top: 406px; |
| 157 | + width: 38px; |
| 158 | + height: 38px; |
| 159 | + background: url(${base_url}/stereo.png) no-repeat |
| 160 | +} |
| 161 | +
|
| 162 | +#remote-control-jblsoundbar li#harman a { |
| 163 | + left: 238px; |
| 164 | + top: 406px; |
| 165 | + width: 38px; |
| 166 | + height: 38px; |
| 167 | + background: url(${base_url}/harman.png) no-repeat |
| 168 | +} |
| 169 | +
|
| 170 | +#remote-control-jblsoundbar li#power a:hover { |
| 171 | + background: url(${base_url}/power_over.png) no-repeat 0px 0px |
| 172 | +} |
| 173 | +
|
| 174 | +#remote-control-jblsoundbar li#bluetooth a:hover { |
| 175 | + background: url(${base_url}/bluetooth_over.png) no-repeat 0px 0px |
| 176 | +} |
| 177 | +
|
| 178 | +#remote-control-jblsoundbar li#source a:hover { |
| 179 | + background: url(${base_url}/source_over.png) no-repeat 0px 0px |
| 180 | +} |
| 181 | +
|
| 182 | +#remote-control-jblsoundbar li#aux a:hover { |
| 183 | + background: url(${base_url}/auxiliar_over.png) no-repeat 0px 0px |
| 184 | +} |
| 185 | +
|
| 186 | +#remote-control-jblsoundbar li#optical a:hover { |
| 187 | + background: url(${base_url}/optical_over.png) no-repeat 0px 0px |
| 188 | +} |
| 189 | +
|
| 190 | +#remote-control-jblsoundbar li#feedback a:hover { |
| 191 | + background: url(${base_url}/feedback_over.png) no-repeat 0px 0px |
| 192 | +} |
| 193 | +
|
| 194 | +#remote-control-jblsoundbar li#minus a:hover { |
| 195 | + background: url(${base_url}/minus_over.png) no-repeat 0px 0px |
| 196 | +} |
| 197 | +
|
| 198 | +#remote-control-jblsoundbar li#mute a:hover { |
| 199 | + background: url(${base_url}/mute_over.png) no-repeat 0px 0px |
| 200 | +} |
| 201 | +
|
| 202 | +#remote-control-jblsoundbar li#plus a:hover { |
| 203 | + background: url(${base_url}/plus_over.png) no-repeat 0px 0px |
| 204 | +} |
| 205 | +
|
| 206 | +#remote-control-jblsoundbar li#bassminus a:hover { |
| 207 | + background: url(${base_url}/minus_over.png) no-repeat 0px 0px |
| 208 | +} |
| 209 | +
|
| 210 | +#remote-control-jblsoundbar li#bassplus a:hover { |
| 211 | + background: url(${base_url}/plus_over.png) no-repeat 0px 0px |
| 212 | +} |
| 213 | +
|
| 214 | +#remote-control-jblsoundbar li#surround a:hover { |
| 215 | + background: url(${base_url}/surround_over.png) no-repeat 0px 0px |
| 216 | +} |
| 217 | +
|
| 218 | +#remote-control-jblsoundbar li#stereo a:hover { |
| 219 | + background: url(${base_url}/stereo_over.png) no-repeat 0px 0px |
| 220 | +} |
| 221 | +
|
| 222 | +#remote-control-jblsoundbar li#harman a:hover { |
| 223 | + background: url(${base_url}/harman_over.png) no-repeat 0px 0px |
| 224 | +} |
| 225 | + `; |
| 226 | +} |
| 227 | + |
| 228 | +function getRemoteHtml_jblsoundbar(config){ |
| 229 | + const template = config.remote_template; |
| 230 | + return ` |
| 231 | +
|
| 232 | + <div class="container"> |
| 233 | + <div style="text-align:center"> |
| 234 | + <h1>${config.name}</h1> |
| 235 | + </div> |
| 236 | + <div id="remote-control-jblsoundbar"> |
| 237 | + <h2> |
| 238 | + Main navigation |
| 239 | + </h2> |
| 240 | + <ul> |
| 241 | + <li id="power" class="myButton-${template}"><a href="#" title="Power"><span>Power</span></a></li> |
| 242 | + <li id="bluetooth" class="myButton-${template}"><a href="#" title="Bluetooth"><span>Bluetooth</span></a></li> |
| 243 | + <li id="source" class="myButton-${template}"><a href="#" title="Source"><span>Source</span></a></li> |
| 244 | + <li id="aux" class="myButton-${template}"><a href="#" title="Aux"><span>Aux</span></a></li> |
| 245 | + <li id="optical" class="myButton-${template}"><a href="#" title="Optical"><span>Optical</span></a></li> |
| 246 | + <li id="feedback" class="myButton-${template}"><a href="#" title="Feedback"><span>Feedback</span></a></li> |
| 247 | + <li id="minus" class="myButton-${template}"><a href="#" title="Minus"><span>Minus</span></a></li> |
| 248 | + <li id="mute" class="myButton-${template}"><a href="#" title="Mute"><span>Mute</span></a></li> |
| 249 | + <li id="plus" class="myButton-${template}"><a href="#" title="Plus"><span>Plus</span></a></li> |
| 250 | + <li id="bassminus" class="myButton-${template}"><a href="#" title="Minus"><span>Minus</span></a></li> |
| 251 | + <li id="bassplus" class="myButton-${template}"><a href="#" title="Plus"><span>Plus</span></a></li> |
| 252 | + <li id="surround" class="myButton-${template}"><a href="#" title="Surround"><span>Surround</span></a></li> |
| 253 | + <li id="stereo" class="myButton-${template}"><a href="#" title="Stereo"><span>Stereo</span></a></li> |
| 254 | + <li id="harman" class="myButton-${template}"><a href="#" title="Harman"><span>Harman</span></a></li> |
| 255 | + </ul> |
| 256 | + </div> |
| 257 | + </div> |
| 258 | +
|
| 259 | +`; |
| 260 | +} |
0 commit comments