Spaces:
Running
Running
| from __future__ import annotations | |
| from typing import Iterable | |
| from gradio.themes.base import Base | |
| from gradio.themes.utils import colors, fonts, sizes | |
| class IndonesiaTheme(Base): | |
| def __init__( | |
| self, | |
| *, | |
| primary_hue: colors.Color | str = colors.red, | |
| secondary_hue: colors.Color | str = colors.gray, | |
| neutral_hue: colors.Color | str = colors.gray, | |
| spacing_size: sizes.Size | str = sizes.spacing_md, | |
| radius_size: sizes.Size | str = sizes.radius_md, | |
| text_size: sizes.Size | str = sizes.text_lg, | |
| font: fonts.Font | |
| | str | |
| | Iterable[fonts.Font | str] = ( | |
| fonts.GoogleFont("Quicksand"), | |
| "ui-sans-serif", | |
| "sans-serif", | |
| ), | |
| font_mono: fonts.Font | |
| | str | |
| | Iterable[fonts.Font | str] = ( | |
| fonts.GoogleFont("IBM Plex Mono"), | |
| "ui-monospace", | |
| "monospace", | |
| ), | |
| ): | |
| super().__init__( | |
| primary_hue=primary_hue, | |
| secondary_hue=secondary_hue, | |
| neutral_hue=neutral_hue, | |
| spacing_size=spacing_size, | |
| radius_size=radius_size, | |
| text_size=text_size, | |
| font=font, | |
| font_mono=font_mono, | |
| ) | |
| super().set( | |
| body_background_fill="linear-gradient(to bottom, #FF7F50, #FFD700, #00FF7F, #00BFFF, #8A2BE2)", # Gradasi dari coral ke gold ke spring green ke deep sky blue ke blue violet | |
| body_background_fill_dark="linear-gradient(to bottom, #8B0000, #FF4500, #FF8C00, #FFD700, #00FF00)", # Gradasi dari dark red ke orange red ke dark orange ke gold ke lime | |
| button_primary_background_fill="linear-gradient(90deg, #FF69B4, #FF1493)", # Hot pink ke deep pink | |
| button_primary_background_fill_hover="linear-gradient(90deg, #FFB6C1, #FF69B4)", # Light pink ke hot pink | |
| button_primary_text_color="white", | |
| button_primary_background_fill_dark="linear-gradient(90deg, #C71585, #FF1493)", # Medium violet red ke deep pink | |
| slider_color="*secondary_300", | |
| slider_color_dark="*secondary_600", | |
| block_title_text_weight="600", | |
| block_border_width="3px", | |
| block_shadow="*shadow_drop_lg", | |
| button_shadow="*shadow_drop_lg", | |
| button_large_padding="32px", | |
| ) | |