File size: 2,562 Bytes
f1b3e73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
51
52
53
54
from __future__ import annotations
from typing import Iterable
from gradio.themes.base import Base
from gradio.themes.utils import colors, fonts, sizes

class ClassicMinimalTheme(Base):
    def __init__(
        self,
        *,
        primary_hue: colors.Color | str = colors.slate,
        secondary_hue: colors.Color | str = colors.gray,
        neutral_hue: colors.Color | str = colors.stone,
        spacing_size: sizes.Size | str = sizes.spacing_md,
        radius_size: sizes.Size | str = sizes.radius_none,  # Tidak ada radius untuk kesan minimalis
        text_size: sizes.Size | str = sizes.text_md,
        font: fonts.Font
        | str
        | Iterable[fonts.Font | str] = (
            fonts.GoogleFont("Merriweather"),  # Font klasik, serupa dengan buku-buku lama
            "serif",
        ),
        font_mono: fonts.Font
        | str
        | Iterable[fonts.Font | str] = (
            fonts.GoogleFont("Courier Prime"),  # Font monospace untuk teks yang terlihat klasik
            "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, #f5f5dc, #d2b48c)",  # Warna latar belakang beige ke coklat muda untuk kesan kuno
            body_background_fill_dark="linear-gradient(to bottom, #3e2723, #1b1b1b)",  # Warna lebih gelap untuk dark mode
            button_primary_background_fill="linear-gradient(90deg, #8b4513, #a0522d)",  # Warna coklat tua untuk tombol utama
            button_primary_background_fill_hover="linear-gradient(90deg, #a0522d, #cd853f)",  # Warna coklat lebih terang saat hover
            button_primary_text_color="white",
            button_primary_background_fill_dark="linear-gradient(90deg, #3e2723, #5d4037)",  # Warna coklat tua untuk dark mode
            slider_color="*secondary_300",
            slider_color_dark="*secondary_600",
            block_title_text_weight="700",  # Teks judul tebal
            block_border_width="2px",  # Garis perbatasan yang sederhana
            block_shadow="none",  # Tidak ada bayangan untuk gaya minimalis
            button_shadow="none",  # Tombol tanpa bayangan, memberi kesan bersih
            button_large_padding="16px",  # Ukuran padding tombol lebih kecil dan sederhana
        )