Compare commits
9 commits
Author | SHA1 | Date | |
---|---|---|---|
d5c6cc8ec4 | |||
13518d3ee0 | |||
4b6d6662e7 | |||
2fd5fb1cff | |||
b43587d85f | |||
46499df049 | |||
c208c96d46 | |||
97f6ded68e | |||
3c72552f49 |
2 changed files with 110 additions and 40 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1 @@
|
||||||
./conf.js
|
/conf.js
|
||||||
|
|
148
index.html
148
index.html
|
@ -5,7 +5,7 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
|
||||||
<title>Free Telec</title>
|
<title>Free Telec</title>
|
||||||
|
|
||||||
<!-- Bootstrap -->
|
<!-- Bootstrap -->
|
||||||
|
@ -21,23 +21,56 @@
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.btn-group .col-md-4,
|
header{
|
||||||
.btn-group .col-md-12 {
|
padding-left: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group .col-md-4, .btn-group .col-md-12 {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.freeHome {
|
.clear {
|
||||||
max-width: 100%;
|
clear: both;
|
||||||
max-height: 100%;
|
}
|
||||||
|
|
||||||
|
.bs-callout {
|
||||||
|
padding: 20px;
|
||||||
|
margin: 20px 0;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
border-left-color: rgb(238, 238, 238);
|
||||||
|
border-left-width: 1px;
|
||||||
|
border-left-width: 5px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bs-callout-info {
|
||||||
|
border-left-color: #2aabd2;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
height: 100px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 640px) {
|
||||||
|
ul {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h1>Free Telec <small>v0.2</small></h1>
|
<h1>Free Telec <small>v0.2.3</small></h1>
|
||||||
</header>
|
</header>
|
||||||
``
|
|
||||||
<section>
|
<section>
|
||||||
<div class="row col-xs-12">
|
<div class="row col-xs-12">
|
||||||
<div class="col-md-4 col-xs-12 btn-group">
|
<div class="col-md-4 col-xs-12 btn-group">
|
||||||
|
@ -114,7 +147,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="col-xs-12 btn btn-default btn-lg btn-free" data-key="home"><img src="img/free.png" class="freeHome" /></div>
|
<div class="col-xs-12 btn btn-default btn-lg btn-free" data-key="home"><img src="img/free.png" /></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-xs-12 btn-group">
|
<div class="col-md-4 col-xs-12 btn-group">
|
||||||
|
@ -157,44 +190,81 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="bs-callout bs-callout-info clear">
|
||||||
|
<h4>Raccourcis clavier</h4>
|
||||||
|
<p>
|
||||||
|
Certaines fonctionnalités de la télécommande peuvent être directement utilisée avec votre clavier.
|
||||||
|
<br />
|
||||||
|
En voici la liste :
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>Entrée : ok</li>
|
||||||
|
<li>Flèche haut: haut</li>
|
||||||
|
<li>Flèche bas: bas</li>
|
||||||
|
<li>Flèche droite: droite</li>
|
||||||
|
<li>Flèche gauche: gauche</li>
|
||||||
|
<li>Echap: retour (touche rouge)</li>
|
||||||
|
<li>f: Free</li>
|
||||||
|
<li>m: Menu (touche verte)</li>
|
||||||
|
<li>i: Info (touche jaune)</li>
|
||||||
|
<li>s: Recherche (touche bleue)</li>
|
||||||
|
<li>a: A/V</li>
|
||||||
|
<li>1-0: touche 1-0</li>
|
||||||
|
<li>+: Programme +</li>
|
||||||
|
<li>-: Programme -</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
||||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||||
<script src="./conf.js" text="text/JavaScript"></script>
|
<script src="./conf.js" text="text/JavaScript"></script>
|
||||||
<script type="text/JavaScript">
|
<script type="text/JavaScript">
|
||||||
$(function() {
|
let callApi = function(code)
|
||||||
$('.btn').on('click',function(){
|
{
|
||||||
callApi($(this).data('key'));
|
$.get("http://hd1.freebox.fr/pub/remote_control?code="+codeTelec+"&key="+code);
|
||||||
});
|
};
|
||||||
$('body').on('keypress', function(e){
|
|
||||||
const codes = {
|
|
||||||
13: 'ok',
|
|
||||||
38: 'up',
|
|
||||||
40: 'down',
|
|
||||||
37: 'left',
|
|
||||||
39: 'right',
|
|
||||||
109: 'green', //m -> Menu
|
|
||||||
105: 'yellow', //i -> Info
|
|
||||||
115: 'blue', //s -> Search
|
|
||||||
97: 'tv', //a -> A/V
|
|
||||||
49: 1,
|
|
||||||
50: 2,
|
|
||||||
51: 3,
|
|
||||||
52: 4,
|
|
||||||
53: 5,
|
|
||||||
54: 6,
|
|
||||||
55: 7,
|
|
||||||
56: 8,
|
|
||||||
57: 9,
|
|
||||||
48: 0
|
|
||||||
};
|
|
||||||
let code = (e.keyCode ? e.keyCode : e.which);
|
|
||||||
|
|
||||||
callApi(codes[code]);
|
$(function() {
|
||||||
});
|
$('.btn').on('click',function(){
|
||||||
});
|
callApi($(this).data('key'));
|
||||||
|
});
|
||||||
|
|
||||||
|
$('body').on('keypress', function(e){
|
||||||
|
const codes = {
|
||||||
|
13: 'ok',
|
||||||
|
38: 'up',
|
||||||
|
40: 'down',
|
||||||
|
37: 'left',
|
||||||
|
39: 'right',
|
||||||
|
27: 'red', //Esc/back
|
||||||
|
102: 'home', //Free
|
||||||
|
109: 'green', //m -> Menu
|
||||||
|
105: 'yellow', //i -> Info
|
||||||
|
115: 'blue', //s -> Search
|
||||||
|
97: 'tv', //a -> A/V
|
||||||
|
49: 1,
|
||||||
|
50: 2,
|
||||||
|
51: 3,
|
||||||
|
52: 4,
|
||||||
|
53: 5,
|
||||||
|
54: 6,
|
||||||
|
55: 7,
|
||||||
|
56: 8,
|
||||||
|
57: 9,
|
||||||
|
48: 0,
|
||||||
|
45: 'prgm_dec',
|
||||||
|
43: 'prgm_inc'
|
||||||
|
};
|
||||||
|
let code = (e.keyCode ? e.keyCode : e.which);
|
||||||
|
|
||||||
|
callApi(codes[code]);
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue