Files
web-test/app.py
T
2026-08-09 05:46:30 +02:00

44 lines
1.4 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import streamlit as st
st.set_page_config(page_title="Sidebar Örneği", page_icon="🎛️", layout="wide")
# ==================== SOL MENÜ (SIDEBAR) ====================
with st.sidebar:
st.title("🎛️ Kontrol Paneli")
st.write("Buradan site ayarlarını yapabilirsiniz.")
st.divider() # İnce çizgi
# Sidebar içine girdi elemanları ekleme
kullanici_adi = st.text_input("Kullanıcı Adı", value="iontalp")
sayfa_secimi = st.selectbox(
"Gidilecek Sayfa",
["Ana Sayfa", "İstatistikler", "Ayarlar"]
)
tema_koyu = st.toggle("Karanlık Mod", value=True)
st.divider()
if st.button("Çıkış Yap"):
st.toast("Oturum kapatıldı!", icon="🚪")
# ==================== ANA SAYFA İÇERİĞİ ====================
st.title(f"Hoş Geldin, {kullanici_adi}! 👋")
if sayfa_secimi == "Ana Sayfa":
st.header("🏠 Ana Sayfa")
st.write("Şu anda ana sayfadasınız. Sol taraftaki menüden seçim yapabilirsiniz.")
st.info(f"Seçili Tema: {'Karanlık' if tema_koyu else 'Aydınlık'}")
elif sayfa_secimi == "İstatistikler":
st.header("📊 İstatistikler")
col1, col2 = st.columns(2)
col1.metric("Toplam Ziyaretçi", "1,245", "+12%")
col2.metric("Aktif Kullanıcı", "42", "-2%")
elif sayfa_secimi == "Ayarlar":
st.header("⚙️ Ayarlar")
st.write("Sistem ve profil ayarlarınızı buradan değiştirebilirsiniz.")