freddyaboulton HF staff commited on
Commit
87f172c
1 Parent(s): 1275c85

Updating theme

Browse files
Files changed (3) hide show
  1. app.py +7 -6
  2. theme_dropdown.py +4 -2
  3. themes/theme_schema@0.3.0.json +1 -0
app.py CHANGED
@@ -1,20 +1,22 @@
1
  import time
2
 
3
- import gradio as gr
4
-
5
  from theme_dropdown import create_theme_dropdown
6
 
 
 
7
  dropdown, js = create_theme_dropdown()
8
 
9
- with gr.Blocks(theme="freddyaboulton/dracula_revamped") as demo:
10
  with gr.Row().style(equal_height=True):
11
  with gr.Column(scale=10):
12
- gr.Markdown("""
 
13
  # Theme preview: `dracula_revamped`
14
  To use this theme, set `theme='freddyaboulton/dracula_revamped'` in `gr.Blocks()` or `gr.Interface()`.
15
  You can append an `@` and a semantic version expression, e.g. @>=1.0.0,<2.0.0 to pin to a given version
16
  of this theme.
17
- """)
 
18
  with gr.Column(scale=3):
19
  with gr.Box():
20
  dropdown.render()
@@ -31,7 +33,6 @@ with gr.Blocks(theme="freddyaboulton/dracula_revamped") as demo:
31
  """,
32
  )
33
 
34
-
35
  name = gr.Textbox(
36
  label="Name",
37
  info="Full name, including middle name. No special characters.",
 
1
  import time
2
 
 
 
3
  from theme_dropdown import create_theme_dropdown
4
 
5
+ import gradio as gr
6
+
7
  dropdown, js = create_theme_dropdown()
8
 
9
+ with gr.Blocks(theme='freddyaboulton/dracula_revamped') as demo:
10
  with gr.Row().style(equal_height=True):
11
  with gr.Column(scale=10):
12
+ gr.Markdown(
13
+ """
14
  # Theme preview: `dracula_revamped`
15
  To use this theme, set `theme='freddyaboulton/dracula_revamped'` in `gr.Blocks()` or `gr.Interface()`.
16
  You can append an `@` and a semantic version expression, e.g. @>=1.0.0,<2.0.0 to pin to a given version
17
  of this theme.
18
+ """
19
+ )
20
  with gr.Column(scale=3):
21
  with gr.Box():
22
  dropdown.render()
 
33
  """,
34
  )
35
 
 
36
  name = gr.Textbox(
37
  label="Name",
38
  info="Full name, including middle name. No special characters.",
theme_dropdown.py CHANGED
@@ -33,8 +33,10 @@ def create_theme_dropdown():
33
  latest_to_oldest = [str(t.version) for t in latest_to_oldest]
34
 
35
  component = gr.Dropdown(
36
- choices=latest_to_oldest, value=latest_to_oldest[0], render=False,
37
- label="Select Version"
 
 
38
  ).style(container=False)
39
 
40
  return (
 
33
  latest_to_oldest = [str(t.version) for t in latest_to_oldest]
34
 
35
  component = gr.Dropdown(
36
+ choices=latest_to_oldest,
37
+ value=latest_to_oldest[0],
38
+ render=False,
39
+ label="Select Version",
40
  ).style(container=False)
41
 
42
  return (
themes/theme_schema@0.3.0.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"theme": {"background_accent": "*primary_500", "background_accent_soft": "#919cbf", "background_accent_soft_dark": "*neutral_700", "background_primary": "#586794", "background_primary_dark": "*neutral_950", "background_secondary": "#586794", "background_secondary_dark": "*neutral_900", "block_background": "#7280ad", "block_background_dark": "#31395294", "block_border_color": "*border_color_primary", "block_border_color_dark": "*border_color_primary", "block_border_width": "1px", "block_info_color": "#f8f8f2", "block_info_color_dark": "#f8f8f2", "block_info_text_size": "*text_sm", "block_info_text_weight": "400", "block_label_background": "*background_primary", "block_label_background_dark": "*background_secondary", "block_label_border_color": "*border_color_primary", "block_label_border_color_dark": "*border_color_primary", "block_label_border_width": "1px", "block_label_icon_color": "*block_label_text_color", "block_label_margin": "0", "block_label_padding": "*spacing_sm *spacing_lg", "block_label_radius": "calc(*radius_lg - 1px) 0 calc(*radius_lg - 1px) 0", "block_label_right_radius": "0 calc(*radius_lg - 1px) 0 calc(*radius_lg - 1px)", "block_label_text_color": "#f8f8f2", "block_label_text_color_dark": "#f8f8f2", "block_label_text_size": "*text_sm", "block_label_text_weight": "400", "block_padding": "*spacing_xl calc(*spacing_xl + 2px)", "block_radius": "*radius_lg", "block_shadow": "none", "block_title_background": "none", "block_title_border_color": "none", "block_title_border_width": "0px", "block_title_padding": "0", "block_title_radius": "none", "block_title_text_color": "#f8f8f2", "block_title_text_color_dark": "#f8f8f2", "block_title_text_size": "*text_md", "block_title_text_weight": "400", "body_background": "#586794", "body_background_dark": "*background_primary", "body_text_color": "#f8f8f2", "body_text_color_dark": "#f8f8f2", "body_text_color_subdued": "#f8f8f2", "body_text_color_subdued_dark": "*neutral_400", "body_text_size": "*text_md", "body_text_weight": "400", "border_color_accent": "#818eb6", "border_color_accent_dark": "*neutral_600", "border_color_primary": "*neutral_200", "border_color_primary_dark": "*neutral_700", "button_border_width": "*input_border_width", "button_cancel_background": "*button_secondary_background", "button_cancel_background_dark": "*button_secondary_background", "button_cancel_background_hover": "*button_cancel_background", "button_cancel_background_hover_dark": "*button_cancel_background", "button_cancel_border_color": "*button_secondary_border_color", "button_cancel_border_color_dark": "*button_secondary_border_color", "button_cancel_border_color_hover": "*button_cancel_border_color", "button_cancel_border_color_hover_dark": "*button_cancel_border_color", "button_cancel_text_color": "*button_secondary_text_color", "button_cancel_text_color_dark": "*button_secondary_text_color", "button_cancel_text_color_hover": "*button_cancel_text_color", "button_cancel_text_color_hover_dark": "*button_cancel_text_color", "button_large_padding": "*spacing_lg calc(2 * *spacing_lg)", "button_large_radius": "*radius_lg", "button_large_text_size": "*text_lg", "button_large_text_weight": "600", "button_primary_background": "#ffa1d7", "button_primary_background_dark": "#ff79c6", "button_primary_background_hover": "*button_primary_background", "button_primary_background_hover_dark": "*button_primary_background", "button_primary_border_color": "*primary_200", "button_primary_border_color_dark": "*primary_600", "button_primary_border_color_hover": "*button_primary_border_color", "button_primary_border_color_hover_dark": "*button_primary_border_color", "button_primary_text_color": "*primary_600", "button_primary_text_color_dark": "white", "button_primary_text_color_hover": "*button_primary_text_color", "button_primary_text_color_hover_dark": "*button_primary_text_color", "button_secondary_background": "*neutral_200", "button_secondary_background_dark": "*neutral_600", "button_secondary_background_hover": "*button_secondary_background", "button_secondary_background_hover_dark": "*button_secondary_background", "button_secondary_border_color": "*neutral_200", "button_secondary_border_color_dark": "*neutral_600", "button_secondary_border_color_hover": "*button_secondary_border_color", "button_secondary_border_color_hover_dark": "*button_secondary_border_color", "button_secondary_text_color": "#f8f8f2", "button_secondary_text_color_dark": "white", "button_secondary_text_color_hover": "*button_secondary_text_color", "button_secondary_text_color_hover_dark": "*button_secondary_text_color", "button_shadow": "none", "button_shadow_active": "none", "button_shadow_hover": "none", "button_small_padding": "*spacing_sm calc(2 * *spacing_sm)", "button_small_radius": "*radius_lg", "button_small_text_size": "*text_md", "button_small_text_weight": "400", "button_transition": "background-color 0.2s ease", "checkbox_background": "*background_primary", "checkbox_background_dark": "*neutral_800", "checkbox_background_focus": "*checkbox_background", "checkbox_background_focus_dark": "*checkbox_background", "checkbox_background_hover": "*checkbox_background", "checkbox_background_hover_dark": "*checkbox_background", "checkbox_background_selected": "#ff79c6", "checkbox_background_selected_dark": "#ff79c6", "checkbox_border_color": "*neutral_300", "checkbox_border_color_dark": "*neutral_700", "checkbox_border_color_focus": "*secondary_500", "checkbox_border_color_focus_dark": "*secondary_500", "checkbox_border_color_hover": "*neutral_300", "checkbox_border_color_hover_dark": "*neutral_600", "checkbox_border_color_selected": "*secondary_600", "checkbox_border_color_selected_dark": "*secondary_600", "checkbox_border_radius": "*radius_sm", "checkbox_border_width": "*input_border_width", "checkbox_label_background": "*button_secondary_background", "checkbox_label_background_dark": "*button_secondary_background", "checkbox_label_background_hover": "*button_secondary_background_hover", "checkbox_label_background_hover_dark": "*button_secondary_background_hover", "checkbox_label_background_selected": "*checkbox_label_background", "checkbox_label_background_selected_dark": "*checkbox_label_background", "checkbox_label_border_color": "*border_color_primary", "checkbox_label_border_color_dark": "*border_color_primary", "checkbox_label_border_color_hover": "*checkbox_label_border_color", "checkbox_label_border_color_hover_dark": "*checkbox_label_border_color", "checkbox_label_border_width": "*input_border_width", "checkbox_label_gap": "*spacing_lg", "checkbox_label_padding": "*spacing_md calc(2 * *spacing_md)", "checkbox_label_shadow": "none", "checkbox_label_text_size": "*text_md", "checkbox_label_text_weight": "400", "checkbox_shadow": "*input_shadow", "checkbox_text_color": "*body_text_color", "checkbox_text_color_dark": "*body_text_color", "checkbox_text_color_selected": "*checkbox_text_color", "checkbox_text_color_selected_dark": "*checkbox_text_color", "container_radius": "*radius_lg", "embed_radius": "*radius_lg", "error_background": "#fee2e2", "error_background_dark": "*background_primary", "error_border_color": "#fecaca", "error_border_color_dark": "*border_color_primary", "error_border_width": "1px", "error_color": "#ef4444", "error_color_dark": "#ef4444", "font": "'Poppins'", "font_mono": "'IBM Plex Mono', 'ui-monospace', 'Consolas', monospace", "form_gap_width": "0px", "header_text_weight": "600", "input_background": "*neutral_100", "input_background_dark": "*neutral_700", "input_background_focus": "*secondary_500", "input_background_focus_dark": "*secondary_600", "input_background_hover": "*input_background", "input_background_hover_dark": "*input_background", "input_border_color": "*border_color_primary", "input_border_color_dark": "*border_color_primary", "input_border_color_focus": "*secondary_300", "input_border_color_focus_dark": "*neutral_700", "input_border_color_hover": "*input_border_color", "input_border_color_hover_dark": "*input_border_color", "input_border_width": "0px", "input_padding": "*spacing_xl", "input_placeholder_color": "*neutral_400", "input_placeholder_color_dark": "*neutral_500", "input_radius": "*radius_lg", "input_shadow": "none", "input_shadow_focus": "*input_shadow", "input_text_size": "*text_md", "input_text_weight": "400", "layout_gap": "*spacing_xxl", "link_text_color": "*secondary_600", "link_text_color_active": "*secondary_600", "link_text_color_active_dark": "*secondary_500", "link_text_color_dark": "*secondary_500", "link_text_color_hover": "*secondary_700", "link_text_color_hover_dark": "*secondary_400", "link_text_color_visited": "*secondary_500", "link_text_color_visited_dark": "*secondary_600", "loader_color": "*background_accent", "neutral_100": "#919cbf", "neutral_200": "#818eb6", "neutral_300": "#7280ad", "neutral_400": "#6272a4", "neutral_50": "#a1aac8", "neutral_500": "#586794", "neutral_600": "#4e5b83", "neutral_700": "#455073", "neutral_800": "#3b4462", "neutral_900": "#313952", "neutral_950": "#272e42", "panel_background": "*background_secondary", "panel_background_dark": "#31395294", "panel_border_color": "*border_color_primary", "panel_border_color_dark": "*border_color_primary", "panel_border_width": "0", "primary_100": "#fce7f3", "primary_200": "#fbcfe8", "primary_300": "#f9a8d4", "primary_400": "#f472b6", "primary_50": "#fdf2f8", "primary_500": "#ec4899", "primary_600": "#db2777", "primary_700": "#be185d", "primary_800": "#9d174d", "primary_900": "#831843", "primary_950": "#6e1a3d", "prose_text_size": "*text_md", "prose_text_weight": "400", "radius_lg": "8px", "radius_md": "6px", "radius_sm": "4px", "radius_xl": "12px", "radius_xs": "2px", "radius_xxl": "22px", "radius_xxs": "1px", "secondary_100": "#dbeafe", "secondary_200": "#bfdbfe", "secondary_300": "#93c5fd", "secondary_400": "#60a5fa", "secondary_50": "#eff6ff", "secondary_500": "#3b82f6", "secondary_600": "#2563eb", "secondary_700": "#1d4ed8", "secondary_800": "#1e40af", "secondary_900": "#1e3a8a", "secondary_950": "#1d3660", "section_header_text_size": "*text_md", "section_header_text_weight": "400", "shadow_drop": "rgba(0,0,0,0.05) 0px 1px 2px 0px", "shadow_drop_lg": "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)", "shadow_inset": "rgba(0,0,0,0.05) 0px 2px 4px 0px inset", "shadow_spread": "3px", "shadow_spread_dark": "1px", "slider_color": "#ffa1d7", "slider_color_dark": "#ff79c6", "spacing_lg": "8px", "spacing_md": "6px", "spacing_sm": "4px", "spacing_xl": "10px", "spacing_xs": "2px", "spacing_xxl": "16px", "spacing_xxs": "1px", "stat_color_background": "*primary_300", "stat_color_background_dark": "*primary_500", "table_border_color": "*neutral_300", "table_border_color_dark": "*neutral_700", "table_even_background": "#7280ad", "table_even_background_dark": "*neutral_950", "table_odd_background": "*neutral_50", "table_odd_background_dark": "*neutral_900", "table_radius": "*radius_lg", "table_row_focus": "*background_accent_soft", "table_row_focus_dark": "*background_accent_soft", "text_lg": "16px", "text_md": "14px", "text_sm": "12px", "text_xl": "22px", "text_xs": "10px", "text_xxl": "26px", "text_xxs": "9px"}, "version": "0.3.0"}