File size: 2,091 Bytes
273f76c
 
 
 
 
11254d8
273f76c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0abc6dc
 
273f76c
 
 
 
 
11254d8
273f76c
 
 
 
 
11254d8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from typing import Union, Iterable

from gradio.themes.base import Base
from gradio.themes.utils import colors, fonts, sizes


class Seafoam(Base):
    def __init__(
        self,
        *,
        primary_hue: Union[colors.Color, str] = colors.slate,
        secondary_hue: Union[colors.Color, str] = colors.blue,
        neutral_hue: Union[colors.Color, str] = colors.slate,
        spacing_size: Union[sizes.Size, str] = sizes.spacing_md,
        radius_size: Union[sizes.Size, str] = sizes.radius_md,
        text_size: Union[sizes.Size, str] = sizes.text_lg,
        font: Union[fonts.Font, str, Iterable[Union[fonts.Font, str]]] = (
            fonts.GoogleFont("Noto Sans TC"),
            "ui-sans-serif",
            "sans-serif",
        ),
        font_mono: Union[fonts.Font, str, Iterable[Union[fonts.Font, str]]] = (
            fonts.GoogleFont("IBM Plex Mono"),
            "ui-monospace",
            "monospace",
        ),
    ):
        super().__init__(
            spacing_size=spacing_size,
            radius_size=radius_size,
            text_size=text_size,
            font=font,
            font_mono=font_mono,
        )
        super().set(
            body_background_fill="url('https://storage.googleapis.com/wpassets.junyiacademy.org/1/2023/11/background-scaled.jpg') no-repeat center center / cover",
            body_background_fill_dark="url('https://storage.googleapis.com/wpassets.junyiacademy.org/1/2023/11/background-scaled.jpg') no-repeat center center / cover",
            body_text_color_dark="#333",
            background_fill_primary_dark="rgba(255, 255, 255, 1)",
            background_fill_secondary_dark="rgba(255, 255, 255, 0)",
            block_background_fill_dark="rgba(255, 255, 255, 0.1)",
            block_border_color_dark="rgba(255, 255, 255, 0.1)",
            border_color_primary_dark="trasparent",
            slider_color="*secondary_300",
            slider_color_dark="*secondary_600",
            block_title_text_weight="600",
            block_border_width="3px",
            block_shadow="*shadow_drop_lg",
        )