Test
(custom)
<style>
@import url("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css");
.container {
border-radius: 15px;
border:1px solid #444;
padding: 10px;
background-color:rgba(0, 0, 0, 0.3);
}
.left_top {
float: right;
font-size: 120%;
}
.left_top div {
border-radius: 5px;
border:1px solid #444;
padding: 2px;
display:inline-block;
}
.name {
font-size: 140%;
}
.devices {
font-size: 200%;
margin-bottom: 5px;
padding-top: 5px;
}
.time {
font-size: 60%;
color:grey;
}
//animations
.blinker {
-webkit-animation: blink 2s linear infinite;
animation: blink 2s linear infinite;
}
@-webkit-keyframes blink {
50% { color: rgb(34, 34, 34); }
51% { color: rgba(34, 34, 34, 0); }
100% { color: rgba(34, 34, 34, 0); }
}
@keyframes blink {
50% { color: rgb(34, 34, 34); }
51% { color: rgba(34, 34, 34, 0); }
100% { color: rgba(34, 34, 34, 0); }
}
.spiner {
animation-name: spin;
animation-duration: 2000ms;
animation-iteration-count: infinite;
animation-timing-function: linear;
z-index: 100;
}
@keyframes spin {
from {
transform:rotate(0deg);
}
to {
transform:rotate(360deg);
}
}
</style>
<div class="container" onclick="view('hidden1'); return false">
<div class="left_top">
<div style='display:%.temperature|"none;block"%'><i class="fa fa-thermometer" aria-hidden="true"></i> %.temperature%°C</div>
<div style='display:%.humidity|"none;block"%'><i class="fa fa-tint" aria-hidden="true"></i> %.humidity%%</div> </div>
<div class="info">
<div class="name">%.object_description%</div>
<div class="devices">
%.deviceString%
</div>
<div class="loc" style='display:%.RoomMsg|"none;block"%'><i class="fa fa-podcast" aria-hidden="true"></i> %.RoomMsg%</div>
<div class="time" style='display:%.LatestActivityTime|"none;block"%'><i class="fa fa-refresh"></i> %.LatestActivityTime%</div>
</div>
<div style="clear:both;"></div>
<div id="hidden1" style="display: none;">
<div class="TT" > 1111
</div>
</div>
</div>
<script>
function view(n)
{
style = document.getElementById(n).style;
style.display = (style.display == 'block') ? 'none' : 'block';
}
</script>