mirror of
https://github.com/NohamR/Manuel.git
synced 2025-05-24 00:49:10 +00:00
155 lines
3.2 KiB
HTML
155 lines
3.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Manuel</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
font-size: 16px;
|
|
line-height: 1.5;
|
|
background-color: #f2f2f2;
|
|
}
|
|
|
|
label {
|
|
display: block;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
input[type="text"] {
|
|
padding: 5px;
|
|
margin-bottom: 10px;
|
|
border: 1px solid #ccc;
|
|
border-radius: 4px;
|
|
font-size: 16px;
|
|
line-height: 1.5;
|
|
width: 300px;
|
|
}
|
|
|
|
button {
|
|
padding: 5px;
|
|
background-color: #4CAF50;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
line-height: 1.5;
|
|
margin-bottom: 10px;
|
|
width: 200px;
|
|
height: 40px;
|
|
}
|
|
|
|
button:hover {
|
|
background-color: #3e8e41;
|
|
}
|
|
|
|
iframe {
|
|
display: block;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
button:last-child {
|
|
margin-right: 10px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 15px;
|
|
}
|
|
</style>
|
|
|
|
<style>
|
|
iframe {
|
|
display: inline-block;
|
|
width: 48%;
|
|
height: 800px;
|
|
border: 1px solid black;
|
|
margin: 5px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div id="firstbutton">
|
|
<div>
|
|
<label for="code">Entrez le code :</label>
|
|
<input type="text" id="code" name="code" value="9782017102106">
|
|
<button onclick="urlachanger()">Changer de livre</button>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="nbpage">Entrez la page :</label>
|
|
<input type="text" id="nbpage" name="nbpage" value="1">
|
|
<button onclick="changerNBpage()">Changer la page du livre</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<h1>Liens rapides :</h1>
|
|
<button onclick="changerURL(9782017102106)"><h1>Declic Maths 1re</h1></button>
|
|
<button onclick="changerURL(9782017102120)"><h1>Physique Chimie 1re</h1></button>
|
|
<button onclick="changerURL(9782017102243)"><h1>Mitreden Allemand 1re</h1></button>
|
|
</div>
|
|
|
|
|
|
<div>
|
|
<iframe id="myframe1" src="404.html"></iframe>
|
|
<iframe id="myframe2" src="404.html"></iframe>
|
|
</div>
|
|
|
|
<div>
|
|
<button onclick="changerPage(-2)"><< Page précédente</button>
|
|
<button onclick="changerPage(2)">Page suivante >></button>
|
|
</div>
|
|
|
|
<script>
|
|
var iframe1 = document.getElementById("myframe1");
|
|
var iframe2 = document.getElementById("myframe2");
|
|
var url1 = iframe1.src;
|
|
var url2 = iframe2.src;
|
|
var page1 = 1;
|
|
var page2 = 2;
|
|
var nbpage = document.getElementById("nbpage");
|
|
|
|
|
|
function urlachanger() {
|
|
var code = document.getElementById("code").value;
|
|
changerURL(code)
|
|
}
|
|
function changerURL(code) {
|
|
var newUrl1 = "https://exobank.hachette-livre.fr/contents/final/" + code + "-fxl/OEBPS/Page_1.html?interface=postMessage";
|
|
var newUrl2 = "https://exobank.hachette-livre.fr/contents/final/" + code + "-fxl/OEBPS/Page_2.html?interface=postMessage";
|
|
iframe1.src = newUrl1;
|
|
iframe2.src = newUrl2;
|
|
url1 = newUrl1;
|
|
url2 = newUrl2;
|
|
page1 = 1;
|
|
page2 = 2;
|
|
}
|
|
|
|
function changerPage(delta) {
|
|
page1 += delta;
|
|
page2 += delta;
|
|
if (page1 < 1) {
|
|
page1 = 1;
|
|
} else if (page1 > 500) {
|
|
page1 = 500;
|
|
}
|
|
if (page2 < 1) {
|
|
page2 = 2;
|
|
} else if (page2 > 500) {
|
|
page2 = 500;
|
|
}
|
|
iframe1.src = url1.replace(/Page_\d+/, "Page_" + page1);
|
|
iframe2.src = url2.replace(/Page_\d+/, "Page_" + page2);
|
|
nbpage.value = page1
|
|
}
|
|
|
|
function changerNBpage() {
|
|
var nbpage = document.getElementById("nbpage").value;
|
|
nbtochange = nbpage - page1
|
|
changerPage(nbtochange)
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|