Starchik1 commited on
Commit
4bc87d2
·
verified ·
1 Parent(s): 54b396c

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -2
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 a button next to each image
130
  button = soup.new_tag('a')
131
  button['href'] = proxy_url
132
  button['target'] = '_blank'
133
- button['style'] = 'display: block; margin: 5px 0; padding: 5px 10px; background-color: #f0f0f0; border: 1px solid #ccc; border-radius: 3px; text-decoration: none; color: #333; text-align: center;'
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