Spaces:
Running
Running
imseldrith
commited on
Commit
·
b87bf07
1
Parent(s):
6659ca0
Update templates/output.html
Browse files- templates/output.html +32 -22
templates/output.html
CHANGED
@@ -36,7 +36,26 @@
|
|
36 |
height: auto;
|
37 |
border-radius: 5px;
|
38 |
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
|
42 |
.button-container {
|
@@ -84,11 +103,11 @@
|
|
84 |
.social-icon:hover {
|
85 |
color: #4CAF50;
|
86 |
}
|
87 |
-
|
88 |
-
|
89 |
padding: 20px;
|
90 |
text-align: center;
|
91 |
-
|
92 |
|
93 |
/* Responsive Styles */
|
94 |
@media only screen and (max-width: 500px) {
|
@@ -102,7 +121,9 @@
|
|
102 |
<div class="container">
|
103 |
<h1>Generated Image</h1>
|
104 |
<div class="image-container">
|
105 |
-
<
|
|
|
|
|
106 |
</div>
|
107 |
<div class="button-container">
|
108 |
<a href="/static/example.jpeg" class="btn btn-success" onclick="downloadImage()"><i class="fas fa-download"></i> Download Image</a>
|
@@ -127,17 +148,6 @@
|
|
127 |
</div>
|
128 |
</div>
|
129 |
|
130 |
-
<!-- Modal Popup -->
|
131 |
-
<div id="image-modal" class="modal fade" tabindex="-1" role="dialog">
|
132 |
-
<div class="modal-dialog modal-dialog-centered">
|
133 |
-
<div class="modal-content">
|
134 |
-
<div class="modal-body">
|
135 |
-
<img src="{{ url_for('static', filename='example.jpeg') }}" alt="Generated Image" class="modal-image">
|
136 |
-
</div>
|
137 |
-
</div>
|
138 |
-
</div>
|
139 |
-
</div>
|
140 |
-
|
141 |
<script>
|
142 |
function downloadImage() {
|
143 |
var link = document.createElement('a');
|
@@ -145,15 +155,15 @@
|
|
145 |
link.download = 'generated_image.jpg';
|
146 |
link.click();
|
147 |
}
|
148 |
-
|
149 |
-
function
|
150 |
-
var
|
151 |
-
|
152 |
}
|
153 |
</script>
|
154 |
-
<footer>
|
155 |
<p>Built with ❤️ by <a href="https://codegenius.me" style="color: red;">Ashiq Hussain Mir</a></p>
|
156 |
-
</footer>
|
157 |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.5.0/dist/js/bootstrap.bundle.min.js"></script>
|
158 |
</body>
|
159 |
</html>
|
|
|
36 |
height: auto;
|
37 |
border-radius: 5px;
|
38 |
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
39 |
+
}
|
40 |
+
|
41 |
+
.fullscreen-image {
|
42 |
+
position: fixed;
|
43 |
+
top: 0;
|
44 |
+
left: 0;
|
45 |
+
width: 100%;
|
46 |
+
height: 100%;
|
47 |
+
background-color: rgba(0, 0, 0, 0.9);
|
48 |
+
display: flex;
|
49 |
+
justify-content: center;
|
50 |
+
align-items: center;
|
51 |
+
z-index: 9999;
|
52 |
+
}
|
53 |
+
|
54 |
+
.fullscreen-image img {
|
55 |
+
max-width: 90%;
|
56 |
+
max-height: 90%;
|
57 |
+
border-radius: 5px;
|
58 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
59 |
}
|
60 |
|
61 |
.button-container {
|
|
|
103 |
.social-icon:hover {
|
104 |
color: #4CAF50;
|
105 |
}
|
106 |
+
|
107 |
+
footer {
|
108 |
padding: 20px;
|
109 |
text-align: center;
|
110 |
+
}
|
111 |
|
112 |
/* Responsive Styles */
|
113 |
@media only screen and (max-width: 500px) {
|
|
|
121 |
<div class="container">
|
122 |
<h1>Generated Image</h1>
|
123 |
<div class="image-container">
|
124 |
+
<a href="{{ url_for('static', filename='example.jpeg') }}" target="_blank" onclick="toggleFullScreen()">
|
125 |
+
<img src="{{ url_for('static', filename='example.jpeg') }}" alt="Generated Image">
|
126 |
+
</a>
|
127 |
</div>
|
128 |
<div class="button-container">
|
129 |
<a href="/static/example.jpeg" class="btn btn-success" onclick="downloadImage()"><i class="fas fa-download"></i> Download Image</a>
|
|
|
148 |
</div>
|
149 |
</div>
|
150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
<script>
|
152 |
function downloadImage() {
|
153 |
var link = document.createElement('a');
|
|
|
155 |
link.download = 'generated_image.jpg';
|
156 |
link.click();
|
157 |
}
|
158 |
+
|
159 |
+
function toggleFullScreen() {
|
160 |
+
var imageContainer = document.querySelector('.image-container');
|
161 |
+
imageContainer.classList.toggle('fullscreen-image');
|
162 |
}
|
163 |
</script>
|
164 |
+
<footer>
|
165 |
<p>Built with ❤️ by <a href="https://codegenius.me" style="color: red;">Ashiq Hussain Mir</a></p>
|
166 |
+
</footer>
|
167 |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.5.0/dist/js/bootstrap.bundle.min.js"></script>
|
168 |
</body>
|
169 |
</html>
|