@danhachuel/thunderbolt 0.6.93 → 0.6.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/main.py +9 -42
- package/package.json +1 -1
package/app/main.py
CHANGED
|
@@ -266,65 +266,32 @@ SUBTITLE_POSITION_OPTIONS = ["Bottom (Recommended)", "Top", "Center"]
|
|
|
266
266
|
ensure_storage()
|
|
267
267
|
st.set_page_config(page_title="Thunderbolt", page_icon="T", layout="wide", initial_sidebar_state="expanded")
|
|
268
268
|
|
|
269
|
-
theme_base = (st.get_option("theme.base") or "
|
|
269
|
+
theme_base = (st.get_option("theme.base") or "dark").lower()
|
|
270
270
|
|
|
271
271
|
if theme_base == "light":
|
|
272
272
|
st.markdown(
|
|
273
273
|
"""
|
|
274
274
|
<style>
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
.stApp,
|
|
278
|
-
[data-testid="stAppViewContainer"],
|
|
279
|
-
[data-testid="stAppViewContainer"] > .main {
|
|
280
|
-
background: linear-gradient(315deg, #4f2991 3%, #7dc4ff 38%, #36cfcc 68%, #a92ed3 98%);
|
|
281
|
-
background-size: 400% 400%;
|
|
282
|
-
background-attachment: fixed;
|
|
283
|
-
animation: thunderbolt-prismatic-gradient 15s ease infinite;
|
|
275
|
+
:root {
|
|
276
|
+
--primary-bg-color: #7A6FE4;
|
|
284
277
|
}
|
|
285
278
|
|
|
279
|
+
html,
|
|
280
|
+
body,
|
|
286
281
|
.stApp,
|
|
287
282
|
[data-testid="stAppViewContainer"],
|
|
288
283
|
[data-testid="stAppViewContainer"] > .main {
|
|
289
284
|
min-height: 100vh;
|
|
290
285
|
margin: 0;
|
|
291
|
-
background-color
|
|
292
|
-
background-image:
|
|
293
|
-
background-size: 400% 400% !important;
|
|
294
|
-
background-attachment: fixed;
|
|
286
|
+
background: var(--primary-bg-color) !important;
|
|
287
|
+
background-image: none !important;
|
|
295
288
|
}
|
|
296
289
|
|
|
297
290
|
[data-testid="stSidebar"] {
|
|
298
|
-
background:
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
@keyframes thunderbolt-prismatic-gradient {
|
|
302
|
-
0% { background-position: 0% 0%; }
|
|
303
|
-
50% { background-position: 100% 100%; }
|
|
304
|
-
100% { background-position: 0% 0%; }
|
|
291
|
+
background: var(--primary-bg-color) !important;
|
|
292
|
+
background-image: none !important;
|
|
305
293
|
}
|
|
306
294
|
</style>
|
|
307
|
-
<script>
|
|
308
|
-
(function () {
|
|
309
|
-
const gradient = 'linear-gradient(315deg, #4f2991 3%, #7dc4ff 38%, #36cfcc 68%, #a92ed3 98%)';
|
|
310
|
-
const selectors = [
|
|
311
|
-
'html',
|
|
312
|
-
'body',
|
|
313
|
-
'.stApp',
|
|
314
|
-
'[data-testid="stAppViewContainer"]',
|
|
315
|
-
'[data-testid="stAppViewContainer"] > .main'
|
|
316
|
-
];
|
|
317
|
-
const applyGradient = () => selectors.forEach((selector) => {
|
|
318
|
-
document.querySelectorAll(selector).forEach((element) => {
|
|
319
|
-
element.style.setProperty('background-image', gradient, 'important');
|
|
320
|
-
element.style.setProperty('background-size', '400% 400%', 'important');
|
|
321
|
-
element.style.setProperty('background-attachment', 'fixed');
|
|
322
|
-
});
|
|
323
|
-
};
|
|
324
|
-
applyGradient();
|
|
325
|
-
new MutationObserver(applyGradient).observe(document.documentElement, { childList: true, subtree: true });
|
|
326
|
-
})();
|
|
327
|
-
</script>
|
|
328
295
|
""",
|
|
329
296
|
unsafe_allow_html=True,
|
|
330
297
|
)
|
package/package.json
CHANGED