biblio_theorie.md
... ...
@@ -2,7 +2,6 @@
2 2
title: Bibliographie - Théorie et Pensées
3 3
---
4 4
5
-<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
6 5
<script src="/javascript.js" language="JavaScript"></script>
7 6
8 7
<div class="tooltipPin">Version Mobile - Lorsque &#9749; apparait, vous pouvez cliquer sur le titre/texte et accéder à des commentaires anonymes.</div>
custom.js
... ...
@@ -0,0 +1,48 @@
1
+
2
+var img_ele = null,
3
+x_cursor = 0,
4
+y_cursor = 0,
5
+x_img_ele = 0,
6
+y_img_ele = 0;
7
+
8
+function zoom(zoomincrement) {
9
+img_ele = document.getElementById('drag-img');
10
+var pre_width = img_ele.getBoundingClientRect().width, pre_height = img_ele.getBoundingClientRect().height;
11
+img_ele.style.width = (pre_width * zoomincrement) + 'px';
12
+img_ele.style.height = (pre_height * zoomincrement) + 'px';
13
+img_ele = null;
14
+}
15
+
16
+document.getElementById('zoomout').addEventListener('click', function() {
17
+zoom(0.5);
18
+});
19
+document.getElementById('zoomin').addEventListener('click', function() {
20
+zoom(1.5);
21
+});
22
+
23
+function start_drag() {
24
+img_ele = this;
25
+x_img_ele = window.event.clientX - document.getElementById('drag-img').offsetLeft;
26
+y_img_ele = window.event.clientY - document.getElementById('drag-img').offsetTop;
27
+
28
+}
29
+
30
+function stop_drag() {
31
+img_ele = null;
32
+}
33
+
34
+function while_drag() {
35
+var x_cursor = window.event.clientX;
36
+var y_cursor = window.event.clientY;
37
+if (img_ele !== null) {
38
+ img_ele.style.left = (x_cursor - x_img_ele) + 'px';
39
+ img_ele.style.top = ( window.event.clientY - y_img_ele) + 'px';
40
+
41
+ console.log(img_ele.style.left+' - '+img_ele.style.top);
42
+
43
+}
44
+}
45
+
46
+document.getElementById('drag-img').addEventListener('mousedown', start_drag);
47
+document.getElementById('container').addEventListener('mousemove', while_drag);
48
+document.getElementById('container').addEventListener('mouseup', stop_drag);
javascript.js
... ...
@@ -1,48 +0,0 @@
1
-
2
-var img_ele = null,
3
-x_cursor = 0,
4
-y_cursor = 0,
5
-x_img_ele = 0,
6
-y_img_ele = 0;
7
-
8
-function zoom(zoomincrement) {
9
-img_ele = document.getElementById('drag-img');
10
-var pre_width = img_ele.getBoundingClientRect().width, pre_height = img_ele.getBoundingClientRect().height;
11
-img_ele.style.width = (pre_width * zoomincrement) + 'px';
12
-img_ele.style.height = (pre_height * zoomincrement) + 'px';
13
-img_ele = null;
14
-}
15
-
16
-document.getElementById('zoomout').addEventListener('click', function() {
17
-zoom(0.5);
18
-});
19
-document.getElementById('zoomin').addEventListener('click', function() {
20
-zoom(1.5);
21
-});
22
-
23
-function start_drag() {
24
-img_ele = this;
25
-x_img_ele = window.event.clientX - document.getElementById('drag-img').offsetLeft;
26
-y_img_ele = window.event.clientY - document.getElementById('drag-img').offsetTop;
27
-
28
-}
29
-
30
-function stop_drag() {
31
-img_ele = null;
32
-}
33
-
34
-function while_drag() {
35
-var x_cursor = window.event.clientX;
36
-var y_cursor = window.event.clientY;
37
-if (img_ele !== null) {
38
- img_ele.style.left = (x_cursor - x_img_ele) + 'px';
39
- img_ele.style.top = ( window.event.clientY - y_img_ele) + 'px';
40
-
41
- console.log(img_ele.style.left+' - '+img_ele.style.top);
42
-
43
-}
44
-}
45
-
46
-document.getElementById('drag-img').addEventListener('mousedown', start_drag);
47
-document.getElementById('container').addEventListener('mousemove', while_drag);
48
-document.getElementById('container').addEventListener('mouseup', stop_drag);