Spaces:
Sleeping
Sleeping
francis-ogbuagu
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,20 +1,23 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
-
# Set page configuration
|
4 |
-
st.set_page_config(page_title="Federal University Lokoja AI Community", page_icon=":sparkles:", layout="
|
5 |
|
6 |
-
# Custom CSS for styling the cards with navy/dark-night blue theme
|
7 |
-
|
8 |
<style>
|
9 |
-
.
|
10 |
display: flex;
|
11 |
justify-content: center;
|
|
|
12 |
gap: 20px;
|
|
|
13 |
margin-top: 20px;
|
14 |
flex-wrap: wrap;
|
15 |
}
|
16 |
.card {
|
17 |
-
|
|
|
18 |
border-radius: 12px;
|
19 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
|
20 |
transition: transform 0.3s, box-shadow 0.3s;
|
@@ -22,9 +25,10 @@ custom_css = """
|
|
22 |
background: linear-gradient(135deg, #1b2a49, #27476e);
|
23 |
color: white;
|
24 |
text-align: center;
|
|
|
25 |
}
|
26 |
.card:hover {
|
27 |
-
transform:
|
28 |
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
|
29 |
}
|
30 |
.card-image img {
|
@@ -32,12 +36,12 @@ custom_css = """
|
|
32 |
height: auto;
|
33 |
}
|
34 |
.card-title {
|
35 |
-
font-size: 1.
|
36 |
-
margin: 15px
|
37 |
}
|
38 |
.card-description {
|
39 |
-
font-size: 1em;
|
40 |
padding: 10px 15px;
|
|
|
41 |
}
|
42 |
.card-button a {
|
43 |
display: inline-block;
|
@@ -57,42 +61,44 @@ custom_css = """
|
|
57 |
"""
|
58 |
|
59 |
# Inject the custom CSS
|
60 |
-
st.markdown(
|
61 |
|
62 |
-
# Display the
|
63 |
st.markdown("""
|
64 |
-
<div class="
|
65 |
<div class="card">
|
66 |
<div class="card-image">
|
67 |
-
<img src="https://via.placeholder.com/
|
68 |
</div>
|
69 |
<div class="card-title">Federal University Lokoja AI Community</div>
|
70 |
<div class="card-description">
|
71 |
-
|
72 |
</div>
|
73 |
<div class="card-button">
|
74 |
<a href="https://huggingface.co/Federal-University-Lokoja" target="_blank">Join Us Now</a>
|
75 |
</div>
|
76 |
</div>
|
|
|
77 |
<div class="card">
|
78 |
<div class="card-image">
|
79 |
-
<img src="https://via.placeholder.com/
|
80 |
</div>
|
81 |
-
<div class="card-title">
|
82 |
<div class="card-description">
|
83 |
-
Participate in
|
84 |
</div>
|
85 |
<div class="card-button">
|
86 |
-
<a href="https://events.example.com" target="_blank">
|
87 |
</div>
|
88 |
</div>
|
|
|
89 |
<div class="card">
|
90 |
<div class="card-image">
|
91 |
-
<img src="https://via.placeholder.com/
|
92 |
</div>
|
93 |
<div class="card-title">Resources & Tools</div>
|
94 |
<div class="card-description">
|
95 |
-
Access
|
96 |
</div>
|
97 |
<div class="card-button">
|
98 |
<a href="https://resources.example.com" target="_blank">View Resources</a>
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
# Set page configuration for a wide layout
|
4 |
+
st.set_page_config(page_title="Federal University Lokoja AI Community", page_icon=":sparkles:", layout="wide")
|
5 |
|
6 |
+
# Custom CSS for styling the cards with a navy/dark-night blue theme
|
7 |
+
row_css = """
|
8 |
<style>
|
9 |
+
.row-container {
|
10 |
display: flex;
|
11 |
justify-content: center;
|
12 |
+
align-items: stretch;
|
13 |
gap: 20px;
|
14 |
+
padding: 20px;
|
15 |
margin-top: 20px;
|
16 |
flex-wrap: wrap;
|
17 |
}
|
18 |
.card {
|
19 |
+
flex: 1;
|
20 |
+
max-width: 300px;
|
21 |
border-radius: 12px;
|
22 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
|
23 |
transition: transform 0.3s, box-shadow 0.3s;
|
|
|
25 |
background: linear-gradient(135deg, #1b2a49, #27476e);
|
26 |
color: white;
|
27 |
text-align: center;
|
28 |
+
margin: 10px;
|
29 |
}
|
30 |
.card:hover {
|
31 |
+
transform: scale(1.05);
|
32 |
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
|
33 |
}
|
34 |
.card-image img {
|
|
|
36 |
height: auto;
|
37 |
}
|
38 |
.card-title {
|
39 |
+
font-size: 1.6em;
|
40 |
+
margin-top: 15px;
|
41 |
}
|
42 |
.card-description {
|
|
|
43 |
padding: 10px 15px;
|
44 |
+
font-size: 1em;
|
45 |
}
|
46 |
.card-button a {
|
47 |
display: inline-block;
|
|
|
61 |
"""
|
62 |
|
63 |
# Inject the custom CSS
|
64 |
+
st.markdown(row_css, unsafe_allow_html=True)
|
65 |
|
66 |
+
# Display the three cards in a single row
|
67 |
st.markdown("""
|
68 |
+
<div class="row-container">
|
69 |
<div class="card">
|
70 |
<div class="card-image">
|
71 |
+
<img src="https://via.placeholder.com/300x150" alt="AI Innovation Image">
|
72 |
</div>
|
73 |
<div class="card-title">Federal University Lokoja AI Community</div>
|
74 |
<div class="card-description">
|
75 |
+
Join our vibrant AI community to connect with researchers and enthusiasts in machine learning and AI.
|
76 |
</div>
|
77 |
<div class="card-button">
|
78 |
<a href="https://huggingface.co/Federal-University-Lokoja" target="_blank">Join Us Now</a>
|
79 |
</div>
|
80 |
</div>
|
81 |
+
|
82 |
<div class="card">
|
83 |
<div class="card-image">
|
84 |
+
<img src="https://via.placeholder.com/300x150" alt="Workshops and Events">
|
85 |
</div>
|
86 |
+
<div class="card-title">Workshops & Events</div>
|
87 |
<div class="card-description">
|
88 |
+
Participate in AI workshops, hackathons, and networking events to hone your skills and connect with others.
|
89 |
</div>
|
90 |
<div class="card-button">
|
91 |
+
<a href="https://events.example.com" target="_blank">Learn More</a>
|
92 |
</div>
|
93 |
</div>
|
94 |
+
|
95 |
<div class="card">
|
96 |
<div class="card-image">
|
97 |
+
<img src="https://via.placeholder.com/300x150" alt="Resources">
|
98 |
</div>
|
99 |
<div class="card-title">Resources & Tools</div>
|
100 |
<div class="card-description">
|
101 |
+
Access state-of-the-art AI tools, datasets, and resources curated for your learning and projects.
|
102 |
</div>
|
103 |
<div class="card-button">
|
104 |
<a href="https://resources.example.com" target="_blank">View Resources</a>
|