""" Metabolizer CMS - SecuBox Blog Management Main entry point with navigation sidebar """ import streamlit as st st.set_page_config( page_title="Metabolizer CMS", page_icon="📝", layout="wide", initial_sidebar_state="expanded" ) # Cyberpunk styling st.markdown(""" """, unsafe_allow_html=True) # Header st.title("📝 METABOLIZER CMS") st.markdown("### Neural Blog Matrix for SecuBox") # Quick stats in columns col1, col2, col3, col4 = st.columns(4) with col1: st.metric("Status", "ONLINE", delta="Active") with col2: st.metric("Posts", "0", delta=None) with col3: st.metric("Drafts", "0", delta=None) with col4: st.metric("Pipeline", "Ready") st.divider() # Navigation info st.info(""" **Navigation:** Use the sidebar to access different sections: - **Editor** - Create and edit blog posts with live preview - **Posts** - Manage published posts - **Media** - Upload and manage images - **Settings** - Configure Git and Hexo integration """) # Quick actions st.subheader("Quick Actions") col1, col2, col3 = st.columns(3) with col1: if st.button("📝 New Post", use_container_width=True): st.switch_page("pages/1_editor.py") with col2: if st.button("🔄 Sync & Build", use_container_width=True): import subprocess with st.spinner("Building..."): result = subprocess.run( ['/usr/sbin/metabolizerctl', 'build'], capture_output=True, text=True ) if result.returncode == 0: st.success("Build complete!") else: st.error(f"Build failed: {result.stderr}") with col3: if st.button("🌐 View Blog", use_container_width=True): st.markdown("[Open Blog](/blog/)", unsafe_allow_html=True) # Footer st.divider() st.caption("Metabolizer CMS v1.0 | SecuBox Blog Pipeline")