Spaces:
Running
Running
Create styles.py
Browse files
styles.py
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# styles.py
|
2 |
+
|
3 |
+
custom_css = """
|
4 |
+
/* Import Google Fonts */
|
5 |
+
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Open+Sans:wght@400;600&display=swap');
|
6 |
+
|
7 |
+
/* Apply Fonts to the Entire App */
|
8 |
+
body {
|
9 |
+
font-family: 'Open Sans', sans-serif;
|
10 |
+
background-color: #F8F9F9; /* Light Gray Background */
|
11 |
+
color: #2C3E50; /* Dark Slate Gray Text */
|
12 |
+
}
|
13 |
+
|
14 |
+
/* Style Headers */
|
15 |
+
h1, h2, h3, h4, h5, h6 {
|
16 |
+
font-family: 'Roboto', sans-serif;
|
17 |
+
color: #2E86C1; /* Primary Blue */
|
18 |
+
}
|
19 |
+
|
20 |
+
h1 {
|
21 |
+
font-size: 2.5em;
|
22 |
+
margin-bottom: 0.5em;
|
23 |
+
}
|
24 |
+
|
25 |
+
h2 {
|
26 |
+
font-size: 2em;
|
27 |
+
margin-bottom: 0.4em;
|
28 |
+
}
|
29 |
+
|
30 |
+
h3 {
|
31 |
+
font-size: 1.75em;
|
32 |
+
margin-bottom: 0.3em;
|
33 |
+
}
|
34 |
+
|
35 |
+
/* Style Markdown Text */
|
36 |
+
.gr-markdown {
|
37 |
+
font-family: 'Open Sans', sans-serif;
|
38 |
+
line-height: 1.6;
|
39 |
+
}
|
40 |
+
|
41 |
+
/* Style Buttons */
|
42 |
+
.gr-button {
|
43 |
+
background-color: #2E86C1; /* Primary Blue */
|
44 |
+
color: white;
|
45 |
+
border: none;
|
46 |
+
border-radius: 5px;
|
47 |
+
padding: 0.6em 1.2em;
|
48 |
+
font-size: 1em;
|
49 |
+
font-weight: 600;
|
50 |
+
transition: background-color 0.3s ease;
|
51 |
+
}
|
52 |
+
|
53 |
+
.gr-button:hover {
|
54 |
+
background-color: #1B4F72; /* Darker Blue on Hover */
|
55 |
+
}
|
56 |
+
|
57 |
+
/* Style Reset Buttons Differently */
|
58 |
+
.gr-button.reset-button {
|
59 |
+
background-color: #F39C12; /* Accent Yellow */
|
60 |
+
}
|
61 |
+
|
62 |
+
.gr-button.reset-button:hover {
|
63 |
+
background-color: #D68910; /* Darker Yellow on Hover */
|
64 |
+
}
|
65 |
+
|
66 |
+
/* Style Textboxes */
|
67 |
+
.gr-textbox {
|
68 |
+
border: 1px solid #BDC3C7; /* Light Gray Border */
|
69 |
+
border-radius: 5px;
|
70 |
+
padding: 0.5em;
|
71 |
+
font-size: 1em;
|
72 |
+
font-family: 'Open Sans', sans-serif;
|
73 |
+
transition: border-color 0.3s ease;
|
74 |
+
}
|
75 |
+
|
76 |
+
.gr-textbox:focus {
|
77 |
+
border-color: #28B463; /* Secondary Green on Focus */
|
78 |
+
box-shadow: 0 0 5px rgba(40, 180, 99, 0.5); /* Green Glow */
|
79 |
+
}
|
80 |
+
|
81 |
+
/* Style Plots */
|
82 |
+
.gr-plot {
|
83 |
+
background-color: white;
|
84 |
+
border: 1px solid #BDC3C7;
|
85 |
+
border-radius: 5px;
|
86 |
+
padding: 1em;
|
87 |
+
}
|
88 |
+
|
89 |
+
/* Style File Downloads */
|
90 |
+
.gr-file {
|
91 |
+
background-color: #28B463; /* Secondary Green */
|
92 |
+
color: white;
|
93 |
+
border: none;
|
94 |
+
border-radius: 5px;
|
95 |
+
padding: 0.6em 1.2em;
|
96 |
+
font-size: 1em;
|
97 |
+
font-weight: 600;
|
98 |
+
transition: background-color 0.3s ease;
|
99 |
+
margin-top: 0.5em;
|
100 |
+
}
|
101 |
+
|
102 |
+
.gr-file:hover {
|
103 |
+
background-color: #1E8449; /* Darker Green on Hover */
|
104 |
+
}
|
105 |
+
|
106 |
+
/* Style Tabs */
|
107 |
+
.gr-tabs {
|
108 |
+
border-bottom: 2px solid #2E86C1; /* Primary Blue Border */
|
109 |
+
}
|
110 |
+
|
111 |
+
.gr-tab {
|
112 |
+
font-family: 'Roboto', sans-serif;
|
113 |
+
font-weight: 700;
|
114 |
+
color: #2E86C1;
|
115 |
+
padding: 0.5em 1em;
|
116 |
+
border: none;
|
117 |
+
background-color: transparent;
|
118 |
+
cursor: pointer;
|
119 |
+
transition: color 0.3s ease;
|
120 |
+
}
|
121 |
+
|
122 |
+
.gr-tab:hover {
|
123 |
+
color: #1B4F72; /* Darker Blue on Hover */
|
124 |
+
}
|
125 |
+
|
126 |
+
.gr-tab.active {
|
127 |
+
border-bottom: 3px solid #28B463; /* Secondary Green Active Indicator */
|
128 |
+
color: #28B463; /* Secondary Green Active Text */
|
129 |
+
}
|
130 |
+
|
131 |
+
/* Responsive Design */
|
132 |
+
@media (max-width: 768px) {
|
133 |
+
h1 {
|
134 |
+
font-size: 2em;
|
135 |
+
}
|
136 |
+
|
137 |
+
h2 {
|
138 |
+
font-size: 1.75em;
|
139 |
+
}
|
140 |
+
|
141 |
+
h3 {
|
142 |
+
font-size: 1.5em;
|
143 |
+
}
|
144 |
+
|
145 |
+
.gr-button, .gr-file {
|
146 |
+
width: 100%;
|
147 |
+
box-sizing: border-box;
|
148 |
+
}
|
149 |
+
|
150 |
+
.gr-row {
|
151 |
+
flex-direction: column;
|
152 |
+
}
|
153 |
+
|
154 |
+
.gr-column {
|
155 |
+
width: 100%;
|
156 |
+
}
|
157 |
+
|
158 |
+
.gr-plot {
|
159 |
+
padding: 0.5em;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
"""
|