Spaces:
Running
Running
Commit
·
7a8c299
1
Parent(s):
35e9ce0
Update styling
Browse files- web/static/styles.css +56 -119
- web/templates/index.html +19 -44
web/static/styles.css
CHANGED
@@ -1,58 +1,53 @@
|
|
1 |
body {
|
2 |
font-family: 'Helvetica';
|
3 |
-
margin
|
4 |
-
margin-left: 100px;
|
5 |
-
margin-right: 100px;
|
6 |
padding: 0;
|
7 |
}
|
8 |
|
9 |
.header {
|
10 |
-
margin-top: 40px;
|
11 |
-
margin-bottom: 20px;
|
12 |
-
|
13 |
-
color: #000000;
|
14 |
-
position: absolute;
|
15 |
text-align: center;
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
19 |
}
|
20 |
|
21 |
.container {
|
22 |
-
margin-top: 120px;
|
23 |
-
height: auto;
|
24 |
-
top: 100px;
|
25 |
display: flex;
|
26 |
-
|
27 |
-
|
28 |
-
position: relative;
|
29 |
-
align-items: stretch;
|
30 |
}
|
31 |
|
32 |
-
.
|
33 |
-
width:
|
34 |
-
|
35 |
-
|
|
|
|
|
36 |
align-items: center;
|
37 |
-
|
|
|
38 |
}
|
39 |
|
40 |
.right-container {
|
41 |
-
|
42 |
-
width: 48%;
|
43 |
padding: 20px;
|
44 |
border: 2px solid #000000;
|
45 |
text-align: left;
|
|
|
46 |
}
|
47 |
|
48 |
-
.
|
49 |
-
width:
|
50 |
-
|
51 |
-
|
52 |
-
display: flex;
|
53 |
-
justify-content: center;
|
54 |
align-items: center;
|
55 |
-
|
|
|
56 |
}
|
57 |
|
58 |
#uploaded-image {
|
@@ -62,106 +57,48 @@ body {
|
|
62 |
align-items: center;
|
63 |
}
|
64 |
|
65 |
-
.github-container {
|
66 |
-
display: flex;
|
67 |
-
justify-content: center;
|
68 |
-
margin-top: 100px;
|
69 |
-
}
|
70 |
-
|
71 |
-
.github-container a {
|
72 |
-
display: flex;
|
73 |
-
color:#000000;
|
74 |
-
align-items: center;
|
75 |
-
}
|
76 |
-
|
77 |
-
.feature-select {
|
78 |
-
display: flex;
|
79 |
-
justify-content: center;
|
80 |
-
margin-top: 10px;
|
81 |
-
}
|
82 |
-
|
83 |
-
/* The container for the predicted images */
|
84 |
#predicted-images {
|
|
|
85 |
display: grid;
|
86 |
row-gap: 1%;
|
87 |
column-gap: 1%;
|
88 |
-
|
89 |
-
grid-template-columns: repeat(3, 1fr);
|
90 |
-
grid-template-rows: repeat(3, fr);
|
91 |
-
position: relative; /* Set the container as a relative positioning context */
|
92 |
}
|
93 |
|
94 |
-
/*
|
95 |
-
#predicted-images img {
|
96 |
-
width: 100%;
|
97 |
-
height: auto;
|
98 |
-
display: block;
|
99 |
-
align-items: center;
|
100 |
-
}
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
left: 50%; /* Center the tooltip horizontally */
|
107 |
-
transform: translate(0%, -60%); /* Center both horizontally and vertically */
|
108 |
-
background-color: rgba(0, 0, 0, 0.6);
|
109 |
-
padding-left: 10px;
|
110 |
-
padding-right: 10px;
|
111 |
-
padding-top: 10px;
|
112 |
-
padding-bottom: 20px;
|
113 |
-
color: white;
|
114 |
-
font-size: 12px;
|
115 |
-
pointer-events: none;
|
116 |
-
opacity: 0; /* Initially set the tooltip to be transparent */
|
117 |
-
}
|
118 |
-
|
119 |
-
/* Apply the hover effect */
|
120 |
-
#predicted-images img {
|
121 |
-
/* Set initial transition properties */
|
122 |
-
transition: all 0.3s ease-in-out;
|
123 |
-
transform: scale(1); /* Set the initial scale to 1 (normal size) */
|
124 |
}
|
125 |
|
126 |
-
|
127 |
-
|
128 |
-
|
|
|
129 |
}
|
130 |
|
131 |
-
/*
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
}
|
136 |
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
width: auto;
|
142 |
-
gap: 0%;
|
143 |
-
padding: 10px;
|
144 |
-
align-items: center;
|
145 |
-
text-decoration: none;
|
146 |
-
font-size: 14px;
|
147 |
-
text-align: center;
|
148 |
-
font-weight: normal;
|
149 |
-
pointer-events: none; /* Prevent caption from blocking clicks */
|
150 |
-
}
|
151 |
|
152 |
-
.
|
153 |
-
|
154 |
-
}
|
155 |
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
font-weight: normal;
|
160 |
-
}
|
161 |
|
162 |
-
#predicted-images
|
163 |
-
|
164 |
-
|
165 |
-
transition: 0.5s;
|
166 |
}
|
167 |
-
|
|
|
1 |
body {
|
2 |
font-family: 'Helvetica';
|
3 |
+
margin: 0;
|
|
|
|
|
4 |
padding: 0;
|
5 |
}
|
6 |
|
7 |
.header {
|
|
|
|
|
|
|
|
|
|
|
8 |
text-align: center;
|
9 |
+
margin: 20px 0;
|
10 |
+
color: #000000;
|
11 |
+
}
|
12 |
+
|
13 |
+
.feature-select {
|
14 |
+
display: flex;
|
15 |
+
justify-content: center;
|
16 |
+
margin: 20px 0;
|
17 |
}
|
18 |
|
19 |
.container {
|
|
|
|
|
|
|
20 |
display: flex;
|
21 |
+
flex-direction: column;
|
22 |
+
align-items: center;
|
|
|
|
|
23 |
}
|
24 |
|
25 |
+
.dropzone {
|
26 |
+
width: 90%;
|
27 |
+
min-height: 300px;
|
28 |
+
border: 2px solid #000000;
|
29 |
+
display: flex;
|
30 |
+
justify-content: center;
|
31 |
align-items: center;
|
32 |
+
margin-bottom: 20px;
|
33 |
+
cursor: pointer;
|
34 |
}
|
35 |
|
36 |
.right-container {
|
37 |
+
width: 90%;
|
|
|
38 |
padding: 20px;
|
39 |
border: 2px solid #000000;
|
40 |
text-align: left;
|
41 |
+
margin-bottom: 20px;
|
42 |
}
|
43 |
|
44 |
+
.left-container {
|
45 |
+
width: 90%;
|
46 |
+
padding: 20px;
|
47 |
+
text-align: center;
|
|
|
|
|
48 |
align-items: center;
|
49 |
+
align-content: center;
|
50 |
+
margin-bottom: 20px;
|
51 |
}
|
52 |
|
53 |
#uploaded-image {
|
|
|
57 |
align-items: center;
|
58 |
}
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
#predicted-images {
|
61 |
+
width: 90%;
|
62 |
display: grid;
|
63 |
row-gap: 1%;
|
64 |
column-gap: 1%;
|
65 |
+
grid-template-columns: repeat(1, 1fr);
|
|
|
|
|
|
|
66 |
}
|
67 |
|
68 |
+
/* ... Rest of the styles remain unchanged ... */
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
+
.github-container {
|
71 |
+
display: flex;
|
72 |
+
justify-content: center;
|
73 |
+
margin: 20px 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
75 |
|
76 |
+
.github-container a {
|
77 |
+
display: flex;
|
78 |
+
color: #000000;
|
79 |
+
align-items: center;
|
80 |
}
|
81 |
|
82 |
+
/* For tablets and desktops, add a breakpoint */
|
83 |
+
@media (min-width: 768px) {
|
84 |
+
body {
|
85 |
+
margin: 100px;
|
86 |
+
}
|
87 |
|
88 |
+
.container {
|
89 |
+
flex-direction: row;
|
90 |
+
justify-content: space-around;
|
91 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
+
.left-container, .dropzone {
|
94 |
+
width: 48%;
|
95 |
+
}
|
96 |
|
97 |
+
.right-container {
|
98 |
+
width: 48%;
|
99 |
+
}
|
|
|
|
|
100 |
|
101 |
+
#predicted-images {
|
102 |
+
grid-template-columns: repeat(3, 1fr);
|
103 |
+
}
|
|
|
104 |
}
|
|
web/templates/index.html
CHANGED
@@ -1,52 +1,27 @@
|
|
1 |
-
|
2 |
-
<
|
3 |
-
<
|
4 |
-
|
5 |
-
<link rel="stylesheet" href="static/styles.css">
|
6 |
-
<link rel="icon" type="image/png" href="https://images.squarespace-cdn.com/content/v1/64790f5777b5d772678cce83/6d71eaee-f825-4324-be9b-2def32469eac/Untitled+drawing+%2811%29.png?format=100w">
|
7 |
-
</head>
|
8 |
-
<body>
|
9 |
-
<div class="header">
|
10 |
-
<h1>What Plant is This?</h1>
|
11 |
-
<p> Have a neural net try to identify the plant you found.</p>
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
</div>
|
23 |
|
24 |
-
|
|
|
25 |
<div id="image-dropzone" class="dropzone">
|
26 |
<p>Drop an image</p>
|
27 |
</div>
|
28 |
-
<
|
29 |
-
<div class="
|
30 |
-
<
|
31 |
-
<div class="image-grid">
|
32 |
-
<div id="predicted-images">
|
33 |
-
</div>
|
34 |
</div>
|
35 |
</div>
|
36 |
</div>
|
37 |
-
|
38 |
-
|
39 |
-
<div class="github-container">
|
40 |
-
<a href="https://github.com/brayden1moore/What-Plant-Is-This" target="_blank">
|
41 |
-
<img src="https://upload.wikimedia.org/wikipedia/commons/9/91/Octicons-mark-github.svg" height=20px />
|
42 |
-
<p> See the code</p>
|
43 |
-
</a>
|
44 |
-
</div>
|
45 |
-
|
46 |
-
<div class="spacing">
|
47 |
-
<p><br> <br> <br> </p>
|
48 |
-
</div>
|
49 |
-
<script src="https://cdn.jsdelivr.net/gh/alexcorvi/heic2any/dist/heic2any.js"></script>
|
50 |
-
<script src="static/script.js"></script>
|
51 |
-
</body>
|
52 |
-
</html>
|
|
|
1 |
+
<div class="header">
|
2 |
+
<h1>What Plant is This?</h1>
|
3 |
+
<p> Have a neural net try to identify the plant you found.</p>
|
4 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
+
<div class="feature-select">
|
7 |
+
<label for="feature">This is a picture of a...</label>
|
8 |
+
<select name="feature" id="feature-select">
|
9 |
+
<option value="flower">flower</option>
|
10 |
+
<option value="leaf">leaf</option>
|
11 |
+
<option value="fruit">fruit</option>
|
12 |
+
</select>
|
13 |
+
</div>
|
|
|
|
|
14 |
|
15 |
+
<div class="container">
|
16 |
+
<div class="right-container">
|
17 |
<div id="image-dropzone" class="dropzone">
|
18 |
<p>Drop an image</p>
|
19 |
</div>
|
20 |
+
<h2 id="thinking-text">Suggestions will appear here...</h2>
|
21 |
+
<div class="image-grid">
|
22 |
+
<div id="predicted-images">
|
|
|
|
|
|
|
23 |
</div>
|
24 |
</div>
|
25 |
</div>
|
26 |
+
<img id="uploaded-image" src="#" alt="Uploaded Image" />
|
27 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|