Omnibus commited on
Commit
49f5e2d
·
verified ·
1 Parent(s): 56000e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -16,13 +16,21 @@ css="""
16
  height: 20000px;
17
  }
18
  .img_class{
19
- background: #ffffff;
20
  max-width: 48%;
21
  font-family: monospace;
22
  border-top: #9300ff;
23
  border-style: inset;
24
  margin-top: 5px;
25
  }
 
 
 
 
 
 
 
 
26
  """
27
  def load_json(url1="",url2="",url3="",url4=""):
28
  get_url=f'{main_directory}{url1}{url2}{url3}{url4}'
@@ -37,7 +45,7 @@ def load_json(url1="",url2="",url3="",url4=""):
37
  return None, feed1.text
38
  elif get_url.endswith(".png") or get_url.endswith(".gif") or get_url.endswith(".jpg"):
39
  html_out=f"<style>{css}</style><div>"
40
- html_out+=f'<div class="img_class"><a href="{get_url}" target="_blank">{get_url}</a><br><img src={get_url}></div></div>'
41
  return html_out, None
42
  return None,None
43
 
 
16
  height: 20000px;
17
  }
18
  .img_class{
19
+ background: #ffffff;
20
  max-width: 48%;
21
  font-family: monospace;
22
  border-top: #9300ff;
23
  border-style: inset;
24
  margin-top: 5px;
25
  }
26
+ .img_class_raw{
27
+ background: #ffffff;
28
+ width: 100%;
29
+ font-family: monospace;
30
+ border-top: #9300ff;
31
+ border-style: inset;
32
+ margin-top: 5px;
33
+ }
34
  """
35
  def load_json(url1="",url2="",url3="",url4=""):
36
  get_url=f'{main_directory}{url1}{url2}{url3}{url4}'
 
45
  return None, feed1.text
46
  elif get_url.endswith(".png") or get_url.endswith(".gif") or get_url.endswith(".jpg"):
47
  html_out=f"<style>{css}</style><div>"
48
+ html_out+=f'<div class="img_class_raw"><a href="{get_url}" target="_blank">{get_url}</a><br><img src={get_url}></div></div>'
49
  return html_out, None
50
  return None,None
51