-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
103 lines (101 loc) · 3.37 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<head>
<script src="vendor/jQuery/jquery-3.4.1.min.js"></script>
<link href="vendor/cropperjs-1.5.6/cropper.min.css" rel="stylesheet">
<script src="vendor/cropperjs-1.5.6/cropper.min.js"></script>
<script src="js/crop.js"></script>
<link href="css/main.css" rel="stylesheet">
<script>
<?php
include "src/js_generator.php";
generateContext();
generateCategories();
?>
let current_image = {
'name': '<?php echo $context['current_image']['name']?>',
'url': '<?php echo $context['current_image']['url']?>',
'is_copy': <?php echo $context['current_image']['is_copy']?>,
'img_x': <?php echo $context['current_image']['img_x']?>,
'img_y': <?php echo $context['current_image']['img_y']?>,
'file_count':<?php echo $context['current_image']['file_count']?>,
'category': 'none',
'changed': false,
'clear': function () {
this.name = 'none';
this.category = 'none';
this.copy = false;
this.changed = false;
this.url = 'none';
this.img_x = 0;
this.img_y = 0;
}
};
let image_quality = {
'min_x':<?php echo $context['image_quality']['min_x']?>,
'min_y':<?php echo $context['image_quality']['min_y']?>,
'max_x':<?php echo $context['image_quality']['max_x']?>,
'max_y':<?php echo $context['image_quality']['max_y']?>,
}
</script>
<title>Super Simple Image Labeler | SSIL</title>
</head>
<body>
<div class="main_container">
<div class="container_right">
<table>
<tr>
<th>Attribute</th>
<th>Value</th>
</tr>
<tr>
<td>Name</td>
<td id="title_img"></td>
</tr>
<tr>
<td>Resolution</td>
<td id="img_res"></td>
</tr>
<tr>
<td>Copy</td>
<td id="img_copy"></td>
</tr>
<tr>
<td>Crop resolution</td>
<td id="crop_res"></td>
</tr>
<tr>
<td>File count</td>
<td id="file_count"></td>
</tr>
</table>
<p>
<button type="button" class="action_btn" id="save">Save [s]</button>
</p>
<p>
<button type="button" class="action_btn" id="rotate_r">Rotate right [a]</button>
</p>
<p>
<button type="button" class="action_btn" id="rotate_l">Rotate left [d]</button>
</p>
<button type="button" class="action_btn" id="reset">Reset [q]</button>
<p>
<button type="button" class="action_btn" id="duplicate">Duplicate [x]</button>
</p>
</div>
<div class="container_left">
<table style="width:100%" id="catTable">
<tr>
<?php
generateCatTableRows();
?>
</tr>
</table>
<div>
<img id="image" src="<?php echo $context['current_image']['url'] ?>" alt="No picture left">
</div>
<div id="cropped_result"></div>
</div>
<div id="snackbar">Some text some message..</div>
</div>
</body>
</html>