Kamran Zulfiqar
Update app.py
ab80863 verified
raw
history blame
2.71 kB
import streamlit as st
# Page setup
st.set_page_config(page_title="AutoCAD Command Guide", layout="wide")
# Custom style
custom_css = """
<style>
body {
background-color: #e0f0ff;
}
.stApp {
background-color: #e0f0ff;
}
.title {
text-align: center;
font-size: 40px;
color: #003366;
font-weight: bold;
margin-bottom: 30px;
}
.command-box {
background-color: #ffffff;
border-left: 6px solid #3399ff;
border-radius: 10px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.command-name {
font-size: 24px;
color: #003366;
margin-bottom: 10px;
font-weight: 600;
}
.description {
font-size: 16px;
color: #333333;
}
.youtube-link {
margin-top: 10px;
font-size: 15px;
}
.youtube-link a {
color: #0077cc;
text-decoration: none;
font-weight: bold;
}
</style>
"""
st.markdown(custom_css, unsafe_allow_html=True)
# Title
st.markdown('<div class="title">📘 AutoCAD Commands Reference</div>', unsafe_allow_html=True)
# Command data
commands = [
{
"Command": "LINE",
"Description": "Creates straight line segments between two points.",
"YouTube": "https://www.youtube.com/watch?v=4Hsb5j5JH7A"
},
{
"Command": "CIRCLE",
"Description": "Creates a circle based on center point and radius.",
"YouTube": "https://www.youtube.com/watch?v=ZFbP13bU5Ck"
},
{
"Command": "TRIM",
"Description": "Trims objects to meet the edges of other objects.",
"YouTube": "https://www.youtube.com/watch?v=8QULwXuHEjM"
},
{
"Command": "EXTEND",
"Description": "Extends objects to reach the edges of other objects.",
"YouTube": "https://www.youtube.com/watch?v=EYYJSXruK4k"
},
{
"Command": "OFFSET",
"Description": "Creates concentric circles, parallel lines, and parallel curves.",
"YouTube": "https://www.youtube.com/watch?v=3AwYIjvQqek"
}
]
# Display in two columns
col1, col2 = st.columns(2)
for idx, cmd in enumerate(commands):
with (col1 if idx % 2 == 0 else col2):
st.markdown(f"""
<div class="command-box">
<div class="command-name">🛠️ {cmd['Command']}</div>
<div class="description">{cmd['Description']}</div>
<div class="youtube-link">
▶️ <a href="{cmd['YouTube']}" target="_blank">Watch on YouTube</a>
</div>
</div>
""", unsafe_allow_html=True)
``