The current status is not final. I’ve started modifying yesterday and I’m currently not really happy. If you need additional Buttons at the top I can try to create them for you. Also if you didn’t want the control Buttons under the direction buttons.
I’m not allowed to upload the .json file here for importing it to HABPanel because I’m a new user. You have to create any configuration parameter by youself. If you want the .json contact me direct (if this is possible here).
Here is the code (the stop button is currently commented out if you want to use it you have to adjust the width of the buttons in the second row “nav.table .button2 { width: 48%;” to “(nav.table .button2 { width: 23%;)”:
Edit: Now the upload is working Entertainment Control.widget.json (10.4 KB)
<style>
nav.directions {
--bg-color: transparent;
--btn-color: {{config.btn_color || '#fff'}};
--btn-active: #ccc;
--text-color: #222;
--size: {{ (ngModel.sizeY > ngModel.sizeX) ? (ngModel.sizeX * 45) : (ngModel.sizeY * 45) }}px
}
nav.directions {
width: var(--size);
height: var(--size);
background: var(--bg-color);
border-radius: 50%;
padding: 20px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
transform: rotate(45deg);
box-shadow: inset 12px 0 12px -6px var(--btn-color), inset 0 0 0 12px var(--btn-color);
box-sizing: border-box;
position: relative;
margin: 10px auto;
}
nav.directions button {
background: var(--btn-color);
color: var(--text-color);
text-decoration: none;
outline: none;
display: block;
border: none;
-webkit-transition: .1s background, .2s box-shadow;
}
nav.directions button:active {
background: var(--btn-active);
box-shadow: inset 2px 4px rgba(0, 0, 0, 0.2);
}
nav.directions .center-button {
height: 38%;
width: 38%;
position: absolute;
top: 31%;
left: 31%;
border-radius: 50%;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
transform: rotate(-45deg);
font-size: 1.250em;
font-weight: 500;
text-transform: uppercase;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .33), inset -2px -4px rgba(0, 0, 0, 0.2);
}
nav.directions .center-button:active {
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .33), inset 2px 4px rgba(0, 0, 0, 0.2);
}
nav.directions .back-button {
height: 30%;
width: 30%;
position: absolute;
top: 100%;
left: 33%;
border-radius: 50%;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .33), inset 0px 0px rgba(0, 0, 0, 0.2);
}
nav.directions .back-button:active {
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .33), inset 2px 4px rgba(0, 0, 0, 0.2);
}
nav.directions .menu-button {
height: 30%;
width: 30%;
position: absolute;
top: 33%;
left: 100%;
border-radius: 50%;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .33), inset 0px 0px rgba(0, 0, 0, 0.2);
}
nav.directions .menu-button:active {
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .33), inset 2px 4px rgba(0, 0, 0, 0.2);
}
nav.directions .button {
width: 46%;
height: 46%;
margin: 2%;
position: relative;
float: left;
}
nav.directions .button::after {
content: "";
width: 0;
position: absolute;
border-radius: initial;
}
nav.directions button.top {
border-radius: 100% 0 0 0;
}
nav.directions button.top::after {
bottom: 0;
right: 0;
}
nav.directions button.right {
border-radius: 0 100% 0 0;
}
nav.directions button.right::after {
bottom: 0;
left: 0;
}
nav.directions button.left {
border-radius: 0 0 0 100%;
}
nav.directions button.left::after {
top: 0;
right: 0;
}
nav.directions button.bottom {
border-radius: 0 0 100% 0;
}
nav.directions button.bottom::after {
top: 0;
left: 0;
box-shadow: inset -2px -3px 2px -2px rgba(0, 0, 0, 0.4), -10px -10px 0 10px var(--bg-color);
}
nav.directions i {
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
transform: rotate(-45deg);
position: absolute;
font-size: calc(var(--size)/10);
top: 36%;
left: 39%;
text-shadow: 1px 1px 4px var(--btn-color), 0px 0px 0px rgba(0, 0, 0, 0.5);
color: rgba(0, 0, 0, 0.15);
}
nav.directions .button:active i {
color: var(--text-color);
text-shadow: none;
}
nav.directions .top i {
top: 35%;
left: 41%;
}
nav.directions .left i {
top: 41%;
left: 35%;
}
nav.directions .right i {
top: 35%;
left: 41%;
}
nav.directions .bottom i {
top: 39%;
left: 42%;
}
nav.table {
--bg-color: transparent;
--btn-color: {{config.btn_color || '#fff'}};
--btn-active: #ccc;
--text-color: #222;
--size: {{ (ngModel.sizeY > ngModel.sizeX> ngModel.sizeX) ? (ngModel.sizeX * 100) : (ngModel.sizeY * 100) }}px
}
nav.table {
width: var(--size);
height: var(--size);
background: var(--bg-color);
border-radius: 0%;
padding: 20px;
box-sizing: border-box;
position: relative;
margin: 50px auto;
}
nav.table button {
background: var(--btn-color);
color: var(--text-color);
text-decoration: none;
outline: none;
display: block;
border: none;
-webkit-transition: .1s background, .2s box-shadow;
}
nav.table button:active {
background: var(--btn-active);
box-shadow: inset 2px 4px rgba(0, 0, 0, 0.2);
}
nav.table .button {
width: 23%;
height: 15%;
margin: 1%;
position: relative;
float: left;
}
nav.table .button::after {
content: "";
width: 0;
position: absolute;
border-radius: initial;
}
nav.table button2 {
background: var(--btn-color);
color: var(--text-color);
text-decoration: none;
outline: none;
display: block;
border: none;
-webkit-transition: .1s background, .2s box-shadow;
}
nav.table button2:active {
background: var(--btn-active);
box-shadow: inset 2px 4px rgba(0, 0, 0, 0.2);
}
nav.table .button2 {
width: 48%;
height: 15%;
margin: 1%;
position: relative;
float: left;
}
nav.table .button2::after {
content: "";
width: 0;
position: absolute;
border-radius: initial;
}
nav.table i {
position: absolute;
font-size: calc(var(--size)/30);
top: 36%;
left: 39%;
text-shadow: 1px 1px 4px var(--btn-color), 0px 0px 0px rgba(0, 0, 0, 0.5);
color: rgba(0, 0, 0, 0.15);
}
nav.table .button:active i {
color: var(--text-color);
text-shadow: none;
}
</style>
<nav class="directions">
<button class="button top" ng-click="sendCmd(config.direction_button, config.up_command)"><i class="glyphicon glyphicon-chevron-up"></i></button>
<button class="button right" ng-click="sendCmd(config.direction_button, config.right_command)"><i class="glyphicon glyphicon-chevron-right"></i></button>
<button class="button left" ng-click="sendCmd(config.direction_button, config.left_command)"><i class="glyphicon glyphicon-chevron-left"></i></button>
<button class="button bottom" ng-click="sendCmd(config.direction_button, config.down_command)"><i class="glyphicon glyphicon-chevron-down"></i></button>
<button class="center-button" ng-click="sendCmd(config.center_button, config.center_command)">{{config.center_label}}</button>
<button class="back-button" ng-click="sendCmd(config.back_button, config.back_command)"> <i class="glyphicon glyphicon-arrow-left"></i></button>
<button class="menu-button" ng-click="sendCmd(config.menu_button, config.menu_command)"> <i class="glyphicon glyphicon-menu-hamburger"></i></button>
</nav>
<nav class="table">
<button class="button" ng-click="sendCmd(config.playback_button, config.stepbackward_command)"> <i class="glyphicon glyphicon-step-backward"></i></button>
<button class="button" ng-click="sendCmd(config.playback_button, config.backward_command)"> <i class="glyphicon glyphicon-backward"></i></button>
<button class="button" ng-click="sendCmd(config.playback_button, config.forward_command)"> <i class="glyphicon glyphicon-forward"></i></button>
<button class="button" ng-click="sendCmd(config.playback_button, config.stepforward_command)"> <i class="glyphicon glyphicon-step-forward"></i></button>
<!--<button class="button" ng-click="sendCmd(config.playback_button, config.stop_command)"> <i class="glyphicon glyphicon-stop"></i></button> -->
<button class="button2" ng-click="sendCmd(config.playback_button, config.pause_command)"> <i class="glyphicon glyphicon-pause"></i></button>
<button class="button2" ng-click="sendCmd(config.playback_button, config.play_command)"> <i class="glyphicon glyphicon-play"></i></button>
</nav>
Regards from Germany