Update themes.py
Browse files
themes.py
CHANGED
@@ -3,27 +3,27 @@ from typing import Iterable
|
|
3 |
from gradio.themes.base import Base
|
4 |
from gradio.themes.utils import colors, fonts, sizes
|
5 |
|
6 |
-
class
|
7 |
def __init__(
|
8 |
self,
|
9 |
*,
|
10 |
-
primary_hue: colors.Color | str = colors.
|
11 |
-
secondary_hue: colors.Color | str = colors.gray,
|
12 |
-
neutral_hue: colors.Color | str = colors.gray,
|
13 |
spacing_size: sizes.Size | str = sizes.spacing_md,
|
14 |
radius_size: sizes.Size | str = sizes.radius_md,
|
15 |
text_size: sizes.Size | str = sizes.text_lg,
|
16 |
font: fonts.Font
|
17 |
| str
|
18 |
| Iterable[fonts.Font | str] = (
|
19 |
-
fonts.GoogleFont("Quicksand"),
|
20 |
"ui-sans-serif",
|
21 |
"sans-serif",
|
22 |
),
|
23 |
font_mono: fonts.Font
|
24 |
| str
|
25 |
| Iterable[fonts.Font | str] = (
|
26 |
-
fonts.GoogleFont("IBM Plex Mono"),
|
27 |
"ui-monospace",
|
28 |
"monospace",
|
29 |
),
|
@@ -38,18 +38,17 @@ class IndonesiaDark(Base):
|
|
38 |
font=font,
|
39 |
font_mono=font_mono,
|
40 |
)
|
41 |
-
# Apply dark theme properties
|
42 |
super().set(
|
43 |
-
body_background_fill="#
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
slider_color="
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
)
|
|
|
3 |
from gradio.themes.base import Base
|
4 |
from gradio.themes.utils import colors, fonts, sizes
|
5 |
|
6 |
+
class IndonesiaTheme(Base):
|
7 |
def __init__(
|
8 |
self,
|
9 |
*,
|
10 |
+
primary_hue: colors.Color | str = colors.red,
|
11 |
+
secondary_hue: colors.Color | str = colors.gray,
|
12 |
+
neutral_hue: colors.Color | str = colors.gray,
|
13 |
spacing_size: sizes.Size | str = sizes.spacing_md,
|
14 |
radius_size: sizes.Size | str = sizes.radius_md,
|
15 |
text_size: sizes.Size | str = sizes.text_lg,
|
16 |
font: fonts.Font
|
17 |
| str
|
18 |
| Iterable[fonts.Font | str] = (
|
19 |
+
fonts.GoogleFont("Quicksand"),
|
20 |
"ui-sans-serif",
|
21 |
"sans-serif",
|
22 |
),
|
23 |
font_mono: fonts.Font
|
24 |
| str
|
25 |
| Iterable[fonts.Font | str] = (
|
26 |
+
fonts.GoogleFont("IBM Plex Mono"),
|
27 |
"ui-monospace",
|
28 |
"monospace",
|
29 |
),
|
|
|
38 |
font=font,
|
39 |
font_mono=font_mono,
|
40 |
)
|
|
|
41 |
super().set(
|
42 |
+
body_background_fill="linear-gradient(to bottom, #e0e0e0, #7d7d7d)", # Gradasi abu-abu muda ke abu-abu tua
|
43 |
+
body_background_fill_dark="linear-gradient(to bottom, #7d7d7d, #4a4a4a)", # Gradasi abu-abu tua ke lebih gelap untuk dark mode
|
44 |
+
button_primary_background_fill="linear-gradient(90deg, #d84a4a, #b33030)", # Merah ke merah tua
|
45 |
+
button_primary_background_fill_hover="linear-gradient(90deg, #e85b5b, #cc4b4b)", # Merah lebih terang untuk hover
|
46 |
+
button_primary_text_color="white",
|
47 |
+
button_primary_background_fill_dark="linear-gradient(90deg, #b33030, #8f1f1f)", # Merah tua untuk dark mode
|
48 |
+
slider_color="*secondary_300",
|
49 |
+
slider_color_dark="*secondary_600",
|
50 |
+
block_title_text_weight="600",
|
51 |
+
block_border_width="3px",
|
52 |
+
block_shadow="*shadow_drop_lg",
|
53 |
+
button_large_padding="32px",
|
54 |
+
)
|