From 0dfd31bb8f454b4944c5c8a54af39d032449a2d6 Mon Sep 17 00:00:00 2001 From: Mark007-R Date: Thu, 17 Sep 2026 15:47:26 +0530 Subject: [PATCH] Restyle the UI to the portfolio design system Moves the interface onto the same visual system as the portfolio site: a warm near-black ground (the dark variant), Fraunces headings, Inter body text, JetBrains Mono labels, pill buttons and card surfaces, with a crimson accent (#F0655A). Presentation only: routes, form fields, element ids and application logic are unchanged. --- .streamlit/config.toml | 9 + app.py | 203 ++------------- pages/1_Predict.py | 129 +--------- pages/2_Performance.py | 161 ++++-------- pages/3_Transactions.py | 175 +++++-------- pages/4_Ops.py | 91 ++----- ui_theme.py | 532 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 692 insertions(+), 608 deletions(-) create mode 100644 .streamlit/config.toml create mode 100644 ui_theme.py diff --git a/.streamlit/config.toml b/.streamlit/config.toml new file mode 100644 index 0000000..05fd5e2 --- /dev/null +++ b/.streamlit/config.toml @@ -0,0 +1,9 @@ +# Native Streamlit widgets share the mark.dev after-dark palette with ui_theme.py +# (MODE = "dark"). Night accent for this project: Crimson. +[theme] +base = "dark" +primaryColor = "#F0655A" +backgroundColor = "#14110f" +secondaryBackgroundColor = "#1f1a17" +textColor = "#f4ede4" +font = "sans serif" diff --git a/app.py b/app.py index 052daaa..150045a 100644 --- a/app.py +++ b/app.py @@ -7,6 +7,8 @@ from pathlib import Path import json +from ui_theme import apply_theme + st.set_page_config( page_title="SENTINEL Fraud Detection", layout="wide", @@ -14,201 +16,24 @@ page_icon="S", ) -# Shared CSS theme -st.markdown(""" - -""", unsafe_allow_html=True) +# Shared mark.dev theme — MODE and accent live in ui_theme.py (tokens, type, widgets, SENTINEL components) +apply_theme() # Sidebar with st.sidebar: st.markdown(""" -
-
S
-

SENTINEL

-

FRAUD DETECTION SYSTEM

+
+
S
+

SENTINEL

+

FRAUD DETECTION SYSTEM

""", unsafe_allow_html=True) st.markdown("---") st.markdown(""" -
-

NAVIGATION

-

+

+
NAVIGATION
+

Home Dashboard
Predict Fraud
Performance Metrics
@@ -219,9 +44,9 @@ st.markdown("---") st.markdown(""" -

-

POWERED BY

-

+

+
POWERED BY
+

XGBoost Classifier
Pandas + scikit-learn
DVC Pipeline diff --git a/pages/1_Predict.py b/pages/1_Predict.py index a80b640..44f7e41 100644 --- a/pages/1_Predict.py +++ b/pages/1_Predict.py @@ -8,132 +8,12 @@ import sys sys.path.insert(0, str(Path(__file__).parent.parent)) from src.predict import predict_dataframe +from ui_theme import apply_theme st.set_page_config(page_title="Predict Fraud - SENTINEL", layout="wide", page_icon="S") -# Dark theme CSS -st.markdown(""" - -""", unsafe_allow_html=True) +# Shared mark.dev theme (MODE and accent live in ui_theme.py) +apply_theme() st.markdown("""