Update main.py
Browse files
main.py
CHANGED
@@ -126,12 +126,13 @@ def proxy(path):
|
|
126 |
img['src'] = proxy_url
|
127 |
img['style'] = 'max-width: 100%; height: auto;'
|
128 |
|
129 |
-
# Add
|
130 |
button = soup.new_tag('a')
|
131 |
button['href'] = proxy_url
|
132 |
button['target'] = '_blank'
|
133 |
-
button['
|
134 |
button.string = 'Открыть оригинал изображения'
|
|
|
135 |
img.insert_after(button)
|
136 |
|
137 |
# Create a Flask response object with filtered content
|
|
|
126 |
img['src'] = proxy_url
|
127 |
img['style'] = 'max-width: 100%; height: auto;'
|
128 |
|
129 |
+
# Add "Open Original Image" button next to each image
|
130 |
button = soup.new_tag('a')
|
131 |
button['href'] = proxy_url
|
132 |
button['target'] = '_blank'
|
133 |
+
button['class'] = 'open-image-btn'
|
134 |
button.string = 'Открыть оригинал изображения'
|
135 |
+
button['style'] = 'display: inline-block; margin: 5px; padding: 5px 10px; background-color: #f0f0f0; border: 1px solid #ccc; border-radius: 3px; text-decoration: none; color: #333;'
|
136 |
img.insert_after(button)
|
137 |
|
138 |
# Create a Flask response object with filtered content
|