Harsh502s commited on
Commit
e51c8c9
·
1 Parent(s): 485e8b4

Update button and image styles

Browse files
Files changed (2) hide show
  1. Pages/Recommender App.py +16 -32
  2. app.py +2 -2
Pages/Recommender App.py CHANGED
@@ -91,22 +91,18 @@ def recommend(anime, genre=None):
91
  def top_animes():
92
  style_for_page = """
93
  <style>
94
- .css-c766yy.ef3psqc11 {
95
  border-radius: 15px;
96
  text-align: center:
97
  }
98
- .css-c766yy.ef3psqc11:hover {
99
  scale: 1.05;
100
  transition-duration: 0.3s;
101
  }
102
- .css-1v0mbdj.e115fcil1>img {
103
  border-radius: 25px;
104
  }
105
- button.css-1rgehwv.ef3psqc11 {
106
- border-radius: 15px;
107
- text-align: center;
108
- }
109
- button.css-1rgehwv.ef3psqc11:hover {
110
  scale: 1.05;
111
  transition-duration: 0.3s;
112
  }
@@ -193,22 +189,18 @@ def top_animes():
193
  def top_animes_genres(genre_select):
194
  style_for_page = """
195
  <style>
196
- .css-c766yy.ef3psqc11 {
197
  border-radius: 15px;
198
  text-align: center:
199
  }
200
- .css-c766yy.ef3psqc11:hover {
201
  scale: 1.05;
202
  transition-duration: 0.3s;
203
  }
204
- .css-1v0mbdj.e115fcil1>img {
205
  border-radius: 25px;
206
  }
207
- button.css-1rgehwv.ef3psqc11 {
208
- border-radius: 15px;
209
- text-align: center;
210
- }
211
- button.css-1rgehwv.ef3psqc11:hover {
212
  scale: 1.05;
213
  transition-duration: 0.3s;
214
  }
@@ -294,22 +286,18 @@ def top_animes_genres(genre_select):
294
  def top_animes_custom(anime_select):
295
  style_for_page = """
296
  <style>
297
- .css-c766yy.ef3psqc11 {
298
  border-radius: 15px;
299
  text-align: center:
300
  }
301
- .css-c766yy.ef3psqc11:hover {
302
  scale: 1.05;
303
  transition-duration: 0.3s;
304
  }
305
- .css-1v0mbdj.e115fcil1>img {
306
  border-radius: 25px;
307
  }
308
- button.css-1rgehwv.ef3psqc11 {
309
- border-radius: 15px;
310
- text-align: center;
311
- }
312
- button.css-1rgehwv.ef3psqc11:hover {
313
  scale: 1.05;
314
  transition-duration: 0.3s;
315
  }
@@ -399,22 +387,18 @@ def top_animes_custom(anime_select):
399
  def top_animes_custom_genres(anime_select, genre_select):
400
  style_for_page = """
401
  <style>
402
- .css-c766yy.ef3psqc11 {
403
  border-radius: 15px;
404
  text-align: center:
405
  }
406
- .css-c766yy.ef3psqc11:hover {
407
  scale: 1.05;
408
  transition-duration: 0.3s;
409
  }
410
- .css-1v0mbdj.e115fcil1>img {
411
  border-radius: 25px;
412
  }
413
- button.css-1rgehwv.ef3psqc11 {
414
- border-radius: 15px;
415
- text-align: center;
416
- }
417
- button.css-1rgehwv.ef3psqc11:hover {
418
  scale: 1.05;
419
  transition-duration: 0.3s;
420
  }
 
91
  def top_animes():
92
  style_for_page = """
93
  <style>
94
+ [data-testid="baseButton-secondary"] {
95
  border-radius: 15px;
96
  text-align: center:
97
  }
98
+ [data-testid="baseButton-secondary"]:hover {
99
  scale: 1.05;
100
  transition-duration: 0.3s;
101
  }
102
+ [data-testid="stImage"] > img {
103
  border-radius: 25px;
104
  }
105
+ [data-testid="stImage"]:hover {
 
 
 
 
106
  scale: 1.05;
107
  transition-duration: 0.3s;
108
  }
 
189
  def top_animes_genres(genre_select):
190
  style_for_page = """
191
  <style>
192
+ [data-testid="baseButton-secondary"] {
193
  border-radius: 15px;
194
  text-align: center:
195
  }
196
+ [data-testid="baseButton-secondary"]:hover {
197
  scale: 1.05;
198
  transition-duration: 0.3s;
199
  }
200
+ [data-testid="stImage"] > img {
201
  border-radius: 25px;
202
  }
203
+ [data-testid="stImage"]:hover {
 
 
 
 
204
  scale: 1.05;
205
  transition-duration: 0.3s;
206
  }
 
286
  def top_animes_custom(anime_select):
287
  style_for_page = """
288
  <style>
289
+ [data-testid="baseButton-secondary"] {
290
  border-radius: 15px;
291
  text-align: center:
292
  }
293
+ [data-testid="baseButton-secondary"]:hover {
294
  scale: 1.05;
295
  transition-duration: 0.3s;
296
  }
297
+ [data-testid="stImage"] > img {
298
  border-radius: 25px;
299
  }
300
+ [data-testid="stImage"]:hover {
 
 
 
 
301
  scale: 1.05;
302
  transition-duration: 0.3s;
303
  }
 
387
  def top_animes_custom_genres(anime_select, genre_select):
388
  style_for_page = """
389
  <style>
390
+ [data-testid="baseButton-secondary"] {
391
  border-radius: 15px;
392
  text-align: center:
393
  }
394
+ [data-testid="baseButton-secondary"]:hover {
395
  scale: 1.05;
396
  transition-duration: 0.3s;
397
  }
398
+ [data-testid="stImage"] > img {
399
  border-radius: 25px;
400
  }
401
+ [data-testid="stImage"]:hover {
 
 
 
 
402
  scale: 1.05;
403
  transition-duration: 0.3s;
404
  }
app.py CHANGED
@@ -27,8 +27,8 @@ show_pages(
27
  def home_page():
28
  style_for_page = """
29
  <style>
30
- .css-1v0mbdj.e115fcil1>img {
31
- border-radius: 50px;
32
  }
33
  </style>
34
  """
 
27
  def home_page():
28
  style_for_page = """
29
  <style>
30
+ [data-testid="stImage"] > img {
31
+ border-radius: 35px;
32
  }
33
  </style>
34
  """