Add icon font for buttons
This commit is contained in:
parent
d433f40469
commit
b702bec1ec
@ -26,6 +26,9 @@
|
|||||||
<!-- Web Fonts -->
|
<!-- Web Fonts -->
|
||||||
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italics,300,300italics,200' rel='stylesheet' type='text/css'>
|
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italics,300,300italics,200' rel='stylesheet' type='text/css'>
|
||||||
|
|
||||||
|
<!-- Icon Fonts -->
|
||||||
|
<link rel="stylesheet" href="/css/ionicons.min.css">
|
||||||
|
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link rel="shortcut icon" href="/favicon.png" />
|
<link rel="shortcut icon" href="/favicon.png" />
|
||||||
|
|
||||||
|
11
css/ionicons.min.css
vendored
Normal file
11
css/ionicons.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -439,6 +439,11 @@ a.no-decoration:hover {
|
|||||||
/*
|
/*
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
i.icon {
|
||||||
|
padding-left: 0.25rem;
|
||||||
|
padding-right: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
div.options-panel {
|
div.options-panel {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
BIN
fonts/ionicons.eot
Normal file
BIN
fonts/ionicons.eot
Normal file
Binary file not shown.
2232
fonts/ionicons.svg
Normal file
2232
fonts/ionicons.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 326 KiB |
BIN
fonts/ionicons.ttf
Normal file
BIN
fonts/ionicons.ttf
Normal file
Binary file not shown.
BIN
fonts/ionicons.woff
Normal file
BIN
fonts/ionicons.woff
Normal file
Binary file not shown.
@ -16,24 +16,33 @@ title: Tyler Hallada
|
|||||||
magicObj[key] = value;
|
magicObj[key] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function findParentWithId(el, id) {
|
||||||
|
while (el.getAttribute('id') !== id) {
|
||||||
|
el = el.parentElement;
|
||||||
|
}
|
||||||
|
return el;
|
||||||
|
}
|
||||||
|
|
||||||
function togglePanel(event) {
|
function togglePanel(event) {
|
||||||
var options = document.getElementById("options");
|
var options = document.getElementById("options");
|
||||||
|
var button = findParentWithId(event.target, "hide-show");
|
||||||
if (options.style.display === "none") { // hidden
|
if (options.style.display === "none") { // hidden
|
||||||
options.style.display = "block";
|
options.style.display = "block";
|
||||||
event.target.innerHTML = "Hide";
|
button.innerHTML = "<i class=\"icon ion-chevron-down\"></i>";
|
||||||
} else { // shown
|
} else { // shown
|
||||||
options.style.display = "none";
|
options.style.display = "none";
|
||||||
event.target.innerHTML = "Show";
|
button.innerHTML = "<i class=\"icon ion-chevron-up\"></i>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function togglePlay(event) {
|
function togglePlay(event) {
|
||||||
|
var button = findParentWithId(event.target, "play-pause");
|
||||||
if (magicObj.paused) {
|
if (magicObj.paused) {
|
||||||
magicObj.paused = false;
|
magicObj.paused = false;
|
||||||
event.target.innerHTML = "Pause";
|
button.innerHTML = "<i class=\"icon ion-pause\"></i>";
|
||||||
} else {
|
} else {
|
||||||
magicObj.paused = true;
|
magicObj.paused = true;
|
||||||
event.target.innerHTML = "Play";
|
button.innerHTML = "<i class=\"icon ion-play\"></i>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,9 +53,9 @@ title: Tyler Hallada
|
|||||||
<div class="options-panel">
|
<div class="options-panel">
|
||||||
<div class="controls-tab">
|
<div class="controls-tab">
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<button id="play-pause">Pause</button>
|
<button id="play-pause"><i class="icon ion-pause"></i></button>
|
||||||
<button id="clear">Clear</button>
|
<button id="clear"><i class="icon ion-refresh"></i></button>
|
||||||
<button id="hide-show">Hide</button>
|
<button id="hide-show"><i class="icon ion-chevron-down"></i></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="options" class="container-full" style="display:block;">
|
<div id="options" class="container-full" style="display:block;">
|
||||||
|
Loading…
Reference in New Issue
Block a user