@danhachuel/thunderbolt 0.6.91 → 0.6.93
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 +43 -2
- package/package.json +1 -1
package/app/main.py
CHANGED
|
@@ -266,16 +266,36 @@ 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
|
-
|
|
269
|
+
theme_base = (st.get_option("theme.base") or "light").lower()
|
|
270
|
+
|
|
271
|
+
if theme_base == "light":
|
|
270
272
|
st.markdown(
|
|
271
273
|
"""
|
|
272
274
|
<style>
|
|
273
|
-
|
|
275
|
+
html,
|
|
276
|
+
body,
|
|
277
|
+
.stApp,
|
|
278
|
+
[data-testid="stAppViewContainer"],
|
|
279
|
+
[data-testid="stAppViewContainer"] > .main {
|
|
274
280
|
background: linear-gradient(315deg, #4f2991 3%, #7dc4ff 38%, #36cfcc 68%, #a92ed3 98%);
|
|
275
281
|
background-size: 400% 400%;
|
|
282
|
+
background-attachment: fixed;
|
|
276
283
|
animation: thunderbolt-prismatic-gradient 15s ease infinite;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.stApp,
|
|
287
|
+
[data-testid="stAppViewContainer"],
|
|
288
|
+
[data-testid="stAppViewContainer"] > .main {
|
|
277
289
|
min-height: 100vh;
|
|
278
290
|
margin: 0;
|
|
291
|
+
background-color: transparent !important;
|
|
292
|
+
background-image: linear-gradient(315deg, #4f2991 3%, #7dc4ff 38%, #36cfcc 68%, #a92ed3 98%) !important;
|
|
293
|
+
background-size: 400% 400% !important;
|
|
294
|
+
background-attachment: fixed;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
[data-testid="stSidebar"] {
|
|
298
|
+
background: rgba(255, 255, 255, 0.72) !important;
|
|
279
299
|
}
|
|
280
300
|
|
|
281
301
|
@keyframes thunderbolt-prismatic-gradient {
|
|
@@ -284,6 +304,27 @@ if st.get_option("theme.base") == "light":
|
|
|
284
304
|
100% { background-position: 0% 0%; }
|
|
285
305
|
}
|
|
286
306
|
</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>
|
|
287
328
|
""",
|
|
288
329
|
unsafe_allow_html=True,
|
|
289
330
|
)
|
package/package.json
CHANGED