TOPSInfosol
commited on
Commit
•
757ba2d
1
Parent(s):
e414fc2
Create seafoam.py
Browse files- seafoam.py +55 -0
seafoam.py
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Iterable
|
2 |
+
from gradio.themes.base import Base
|
3 |
+
from gradio.themes.utils import colors, fonts, sizes
|
4 |
+
|
5 |
+
class Seafoam(Base):
|
6 |
+
def __init__(
|
7 |
+
self,
|
8 |
+
*,
|
9 |
+
primary_hue: colors.Color | str = colors.emerald,
|
10 |
+
secondary_hue: colors.Color | str = colors.blue,
|
11 |
+
neutral_hue: colors.Color | str = colors.blue,
|
12 |
+
spacing_size: sizes.Size | str = sizes.spacing_md,
|
13 |
+
radius_size: sizes.Size | str = sizes.radius_md,
|
14 |
+
text_size: sizes.Size | str = sizes.text_lg,
|
15 |
+
font: fonts.Font
|
16 |
+
| str
|
17 |
+
| Iterable[fonts.Font | str] = (
|
18 |
+
fonts.GoogleFont("Quicksand"),
|
19 |
+
"ui-sans-serif",
|
20 |
+
"sans-serif",
|
21 |
+
),
|
22 |
+
font_mono: fonts.Font
|
23 |
+
| str
|
24 |
+
| Iterable[fonts.Font | str] = (
|
25 |
+
fonts.GoogleFont("IBM Plex Mono"),
|
26 |
+
"ui-monospace",
|
27 |
+
"monospace",
|
28 |
+
),
|
29 |
+
):
|
30 |
+
super().__init__(
|
31 |
+
primary_hue=primary_hue,
|
32 |
+
secondary_hue=secondary_hue,
|
33 |
+
neutral_hue=neutral_hue,
|
34 |
+
spacing_size=spacing_size,
|
35 |
+
radius_size=radius_size,
|
36 |
+
text_size=text_size,
|
37 |
+
font=font,
|
38 |
+
font_mono=font_mono,
|
39 |
+
)
|
40 |
+
super().set(
|
41 |
+
body_background_fill="repeating-linear-gradient(45deg, *primary_200, *primary_200 10px, *primary_50 10px, *primary_50 20px)",
|
42 |
+
body_background_fill_dark="repeating-linear-gradient(45deg, *primary_800, *primary_800 10px, *primary_900 10px, *primary_900 20px)",
|
43 |
+
button_primary_background_fill="linear-gradient(90deg, *primary_300, *secondary_400)",
|
44 |
+
button_primary_background_fill_hover="linear-gradient(90deg, *primary_200, *secondary_300)",
|
45 |
+
button_primary_text_color="white",
|
46 |
+
button_primary_background_fill_dark="linear-gradient(90deg, *primary_600, *secondary_800)",
|
47 |
+
slider_color="*secondary_300",
|
48 |
+
slider_color_dark="*secondary_600",
|
49 |
+
block_title_text_weight="600",
|
50 |
+
block_border_width="3px",
|
51 |
+
block_shadow="*shadow_drop_lg",
|
52 |
+
button_primary_shadow="*shadow_drop_lg",
|
53 |
+
button_large_padding="32px",
|
54 |
+
)
|
55 |
+
|