-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
120 lines (101 loc) · 4.56 KB
/
index.html
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Centinela</title>
<link rel="stylesheet" href="https://unpkg.com/@picocss/pico@latest/css/pico.min.css">
<link rel="icon" type="image/x-icon" href="https://github.com/narrietal/centinela/blob/main/images/favicon.jpg?raw=true">
<style>
/* Center content on the page */
/* Apply the background image to the entire body */
body {
background-image: url('images/background_image.jpg');
background-size: cover; /* Ensures the image covers the entire background */
background-position: center; /* Center the image */
background-repeat: no-repeat; /* Prevents the image from repeating */
/*background-attachment: scroll; Allows the background to scroll with the content */
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh; /* Ensure background covers the viewport even with little content */
margin: 0;
text-align: center;
font-family: 'Arial', sans-serif;
}
.main-title {
color:rgba(47, 45, 48, 0.911);
font-size: 4rem;
}
main {
width: 100%;
max-width: 600px;
text-align: center;
}
/* Image preview fixed to 640x640 */
#image-preview {
width: 900px;
height: 320px;
object-fit: cover;
margin-bottom: 1rem;
border-radius: 8px;
background-color: #f3f3f3;
}
.hidden {
display: none;
}
.attributionBackground {
position: fixed; /* Fix the link to a specific location on the page */
bottom: 2rem; /* 1rem from the bottom */
right: 1rem; /* 1rem from the right */
font-size: 0.75rem; /* Reduce the font size (12px equivalent) */
color: rgba(47, 45, 48, 0.911); /* Use Pico's primary color */
text-decoration: none; /* Remove the underline for a clean look */
}
.attributionBackground:hover {
text-decoration: underline; /* Add underline on hover for better UX */
}
.attributionAuthor {
position: fixed; /* Fix the link to a specific location on the page */
bottom: 1rem; /* 1rem from the bottom */
right: 1rem; /* 1rem from the right */
font-size: 0.75rem; /* Reduce the font size (12px equivalent) */
color: rgba(47, 45, 48, 0.911); /* Use Pico's primary color */
text-decoration: none; /* Remove the underline for a clean look */
}
.attributionAuthor:hover {
text-decoration: underline; /* Add underline on hover for better UX */
}
img{border:2px solid rgba(47, 45, 48, 0.911);}
input[type='file'] {
color:rgba(47, 45, 48, 0.911);
font-weight: bold;
}
</style>
</head>
<body>
<main>
<h1 class="main-title">CENTINELA</h1>
<a href="https://github.com/narrietal" class="attributionAuthor">Author: Nicolas Arrieta Larraza (n.arrieta.larraza@gmail.com)</a>
<a href="http://www.freepik.com" class="attributionBackground">Background designed by Freepik</a>
<div id="loading-section">
<h3 id="loading-message" style="color:rgba(47, 45, 48, 0.911);font-weight: bold;">Loading...</h3>
<!-- PicoCSS-styled progress bar -->
<progress id="loading-bar"></progress>
</div>
<div id="upload-section" class="hidden">
<form id="upload-form">
<input type="file" id="image-upload" accept="image/*" required>
<img id="image-preview" class="hidden" alt="Image preview">
<button type="submit" id="submit-button" class="primary hidden">Classify Image</button>
</form>
</div>
<!-- Prediction result section -->
<h4 id="result" class="hidden" style="color:rgba(47, 45, 48, 0.911);font-weight: bold;"></h4>
</main>
<!-- Load TensorFlow.js -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"></script>
<!-- Load external JS file -->
<script src="js/main.js"></script>
</body>
</html>