added icons to hosts

This commit is contained in:
Abdallah Soliman 2016-07-12 19:36:23 -05:00
parent 2167a8d94d
commit 83a4deb3b1
5 changed files with 18 additions and 45 deletions

View File

@ -41,8 +41,9 @@
<div id="hostSettings"> <div id="hostSettings">
<div class="mdl-grid" id='host-grid'> <div class="mdl-grid" id='host-grid'>
<div class='mdl-cell mdl-cell--3-col' id='addHostCell'> <div class='mdl-cell mdl-cell--3-col host-cell' id='addHostCell'>
<img src="static/res/ic_add_circle_white_24px.svg" id='addHostIcon'></img> <img src="static/res/ic_add_circle_white_24px.svg" id='addHostIcon'></img>
Add Host
</div> </div>
</div> </div>
</div> </div>

BIN
static/css/.style.css.swp Normal file

Binary file not shown.

View File

@ -1,36 +1,3 @@
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: local('Material Icons'),
local('MaterialIcons-Regular'),
url('../fonts/MaterialIcons-Regular.woff') format('woff'),
}
.material-icons {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 24px; /* Preferred icon size */
display: inline-block;
line-height: 1;
text-transform: none;
letter-spacing: normal;
word-wrap: normal;
white-space: nowrap;
direction: ltr;
/* Support for all WebKit browsers. */
-webkit-font-smoothing: antialiased;
/* Support for Safari and Chrome. */
text-rendering: optimizeLegibility;
/* Support for Firefox. */
-moz-osx-font-smoothing: grayscale;
/* Support for IE. */
font-feature-settings: 'liga';
}
.mdl-layout__header-row { .mdl-layout__header-row {
color: #fff; color: #fff;
} }
@ -46,22 +13,12 @@
color:#fff; color:#fff;
padding:25px; padding:25px;
} }
#addHostIcon {
width:64px;
height:64px;
margin:auto;
display:block;
}
#backIcon { #backIcon {
height: 32px; height: 32px;
width: 32px; width: 32px;
margin-left: -20px; margin-left: -20px;
padding-right: 20px; padding-right: 20px;
} }
#addHostCell {
padding-top:3px;
padding-bottom:3px;
}
.mdl-dialog { .mdl-dialog {
border: none; border: none;
box-shadow: 0 9px 46px 8px rgba(0, 0, 0, 0.14), 0 11px 15px -7px rgba(0, 0, 0, 0.12), 0 24px 38px 3px rgba(0, 0, 0, 0.2); box-shadow: 0 9px 46px 8px rgba(0, 0, 0, 0.14), 0 11px 15px -7px rgba(0, 0, 0, 0.12), 0 24px 38px 3px rgba(0, 0, 0, 0.2);
@ -184,3 +141,13 @@ main {
color: #000; color: #000;
font-weight: bold; font-weight: bold;
} }
.host-cell {
display: inline-block;
width: 150px !important;
height: 150px !important;
background-color: #000;
}
.host-cell img {
width: 80px;;
margin-bottom: 10px;
}

View File

@ -510,9 +510,10 @@ function onWindowLoad(){
hosts = previousValue.hosts != null ? previousValue.hosts : []; hosts = previousValue.hosts != null ? previousValue.hosts : [];
for(var i = 0; i < hosts.length; i++) { // programmatically add each new host. for(var i = 0; i < hosts.length; i++) { // programmatically add each new host.
var cell = document.createElement('div'); var cell = document.createElement('div');
cell.className += 'mdl-cell mdl-cell--3-col'; cell.className += 'mdl-cell mdl-cell--3-col host-cell';
cell.id = 'hostgrid-' + hosts[i]; cell.id = 'hostgrid-' + hosts[i];
cell.innerHTML = hosts[i]; cell.innerHTML = hosts[i];
$(cell).prepend($("<img>", {src: "static/res/ic_desktop_windows_white_24px.svg"}));
$('#host-grid').append(cell); $('#host-grid').append(cell);
cell.onclick = hostChosen; cell.onclick = hostChosen;
} }

View File

@ -0,0 +1,4 @@
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H3V4h18v12z"/>
</svg>

After

Width:  |  Height:  |  Size: 274 B