Spaces:
Sleeping
Sleeping
Commit ·
a276d8e
1
Parent(s): cb82ac3
JSON
Browse files- app.py +16 -2
- icons.json +0 -0
app.py
CHANGED
|
@@ -1,10 +1,24 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from streamlit_option_menu import option_menu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
# Navigasi Sidebar
|
| 5 |
with st.sidebar:
|
| 6 |
-
|
| 7 |
-
|
|
|
|
| 8 |
# horizontal Menu
|
| 9 |
selected2 = option_menu(None, ["Home", "Upload", "Tasks", 'Settings'],
|
| 10 |
icons=['house', 'cloud-upload', "list-task", 'gear'],
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from streamlit_option_menu import option_menu
|
| 3 |
+
import json
|
| 4 |
+
|
| 5 |
+
# Load ikon dari JSON
|
| 6 |
+
with open("icons.json", "r") as file:
|
| 7 |
+
icons_dict = json.load(file)
|
| 8 |
+
|
| 9 |
+
# List opsi menu
|
| 10 |
+
menu_options = ["Series", "NEW Release", "Beranda", "Acak", "Genre", "Uncensored",
|
| 11 |
+
"2D", "L2D", "2D Motion", "3D", "JAV", "JAV Cosplay",
|
| 12 |
+
"JAV Sub Indo", "Streaming", "Ouo"]
|
| 13 |
+
|
| 14 |
+
# Ambil ikon dari JSON sesuai urutan menu
|
| 15 |
+
menu_icons = [icons_dict[option] for option in menu_options]
|
| 16 |
|
| 17 |
# Navigasi Sidebar
|
| 18 |
with st.sidebar:
|
| 19 |
+
# Tampilkan menu dengan ikon dari JSON
|
| 20 |
+
selected = option_menu("Nekopoi", menu_options, icons=menu_icons, menu_icon="cast", default_index=13)
|
| 21 |
+
|
| 22 |
# horizontal Menu
|
| 23 |
selected2 = option_menu(None, ["Home", "Upload", "Tasks", 'Settings'],
|
| 24 |
icons=['house', 'cloud-upload', "list-task", 'gear'],
|
icons.json
ADDED
|
File without changes
|