Spaces:
Sleeping
Sleeping
Kamran Zulfiqar
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -29,4 +29,67 @@ commands = {
|
|
29 |
# You can add up to 200 commands here
|
30 |
}
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
|
|
29 |
# You can add up to 200 commands here
|
30 |
}
|
31 |
|
32 |
+
# App config
|
33 |
+
st.set_page_config(page_title="AutoCAD Command Helper", layout="wide")
|
34 |
+
|
35 |
+
# Custom style
|
36 |
+
st.markdown("""
|
37 |
+
<style>
|
38 |
+
.stApp {
|
39 |
+
background-color: #e6f0ff;
|
40 |
+
}
|
41 |
+
.title {
|
42 |
+
font-size: 36px;
|
43 |
+
color: #003366;
|
44 |
+
text-align: center;
|
45 |
+
font-weight: bold;
|
46 |
+
margin-bottom: 30px;
|
47 |
+
}
|
48 |
+
.desc-box {
|
49 |
+
background-color: white;
|
50 |
+
padding: 20px;
|
51 |
+
border-radius: 10px;
|
52 |
+
box-shadow: 0 4px 10px rgba(0,0,0,0.1);
|
53 |
+
margin-top: 20px;
|
54 |
+
}
|
55 |
+
.desc-title {
|
56 |
+
font-size: 24px;
|
57 |
+
color: #003366;
|
58 |
+
font-weight: bold;
|
59 |
+
margin-bottom: 10px;
|
60 |
+
}
|
61 |
+
.desc-text {
|
62 |
+
font-size: 16px;
|
63 |
+
color: #333333;
|
64 |
+
}
|
65 |
+
.desc-link a {
|
66 |
+
font-size: 15px;
|
67 |
+
color: #0077cc;
|
68 |
+
text-decoration: none;
|
69 |
+
font-weight: bold;
|
70 |
+
}
|
71 |
+
</style>
|
72 |
+
""", unsafe_allow_html=True)
|
73 |
+
|
74 |
+
# Title
|
75 |
+
st.markdown('<div class="title">📘 AutoCAD Command Explorer</div>', unsafe_allow_html=True)
|
76 |
+
|
77 |
+
# Layout: Dropdown on left, Description on right
|
78 |
+
col1, col2 = st.columns([1, 2])
|
79 |
+
|
80 |
+
with col1:
|
81 |
+
selected_cmd = st.selectbox("Choose an AutoCAD Command:", list(commands.keys()), index=0)
|
82 |
+
|
83 |
+
with col2:
|
84 |
+
cmd_data = commands[selected_cmd]
|
85 |
+
st.markdown(f"""
|
86 |
+
<div class="desc-box">
|
87 |
+
<div class="desc-title">🛠️ {selected_cmd}</div>
|
88 |
+
<div class="desc-text">{cmd_data['description']}</div>
|
89 |
+
<div class="desc-link">
|
90 |
+
📺 <a href="{cmd_data['link']}" target="_blank">Watch Tutorial</a>
|
91 |
+
</div>
|
92 |
+
</div>
|
93 |
+
""", unsafe_allow_html=True)
|
94 |
+
|
95 |
|