Spaces:
Sleeping
Sleeping
Milind Kamat
commited on
Commit
·
72b7f53
1
Parent(s):
2e28542
new version
Browse filesSigned-off-by: Milind Kamat <[email protected]>
- app.py +22 -32
- appmaster.py +87 -0
app.py
CHANGED
@@ -7,45 +7,46 @@ st.markdown("""
|
|
7 |
header {visibility: hidden;}
|
8 |
footer {visibility: hidden;}
|
9 |
|
10 |
-
/* Navigation
|
11 |
.nav-container {
|
12 |
-
position: fixed;
|
13 |
-
top: 0;
|
14 |
-
left: 0;
|
15 |
-
right: 0;
|
16 |
display: flex;
|
17 |
justify-content: space-between;
|
18 |
align-items: center;
|
19 |
-
padding: 0.8rem
|
20 |
background-color: white;
|
21 |
-
box-shadow: 0
|
22 |
-
z-index: 1000;
|
23 |
}
|
24 |
|
25 |
/* Logo */
|
26 |
.logo {
|
27 |
color: #1a73e8;
|
28 |
-
font-size: 1.
|
29 |
font-weight: 600;
|
30 |
text-decoration: none;
|
|
|
31 |
}
|
32 |
|
33 |
/* Search box */
|
34 |
-
.search-
|
35 |
flex: 1;
|
36 |
-
max-width:
|
37 |
-
margin: 0
|
38 |
-
|
|
|
|
|
|
|
|
|
39 |
border: 1px solid #ddd;
|
40 |
-
border-radius:
|
41 |
font-size: 0.9rem;
|
|
|
42 |
}
|
43 |
|
44 |
/* Navigation links */
|
45 |
.nav-links {
|
46 |
display: flex;
|
47 |
-
gap:
|
48 |
-
|
49 |
}
|
50 |
|
51 |
.nav-link {
|
@@ -53,35 +54,24 @@ st.markdown("""
|
|
53 |
text-decoration: none;
|
54 |
font-size: 0.9rem;
|
55 |
font-weight: 500;
|
56 |
-
padding: 0.
|
57 |
-
|
58 |
-
transition: all 0.2s ease;
|
59 |
}
|
60 |
|
61 |
.nav-link:hover {
|
62 |
color: #1a73e8;
|
63 |
-
background-color: rgba(26, 115, 232, 0.1);
|
64 |
-
}
|
65 |
-
|
66 |
-
/* Add margin to main content to prevent overlap */
|
67 |
-
.main-content {
|
68 |
-
margin-top: 4rem;
|
69 |
}
|
70 |
</style>
|
71 |
|
72 |
<div class="nav-container">
|
73 |
<a href="/" class="logo">SCISPACE</a>
|
74 |
-
<
|
|
|
|
|
75 |
<div class="nav-links">
|
76 |
-
<a href="https://github.com" target="_blank" class="nav-link">GitHub</a>
|
77 |
-
<a href="https://scholar.google.com" target="_blank" class="nav-link">Google Scholar</a>
|
78 |
-
<a href="https://openai.com" target="_blank" class="nav-link">OpenAI</a>
|
79 |
<a href="/streamlit" class="nav-link">Streamlit</a>
|
80 |
<a href="/pricing" class="nav-link">Pricing</a>
|
81 |
<a href="/library" class="nav-link">My Library</a>
|
82 |
</div>
|
83 |
</div>
|
84 |
-
|
85 |
-
<div class="main-content">
|
86 |
-
</div>
|
87 |
""", unsafe_allow_html=True)
|
|
|
7 |
header {visibility: hidden;}
|
8 |
footer {visibility: hidden;}
|
9 |
|
10 |
+
/* Navigation container */
|
11 |
.nav-container {
|
|
|
|
|
|
|
|
|
12 |
display: flex;
|
13 |
justify-content: space-between;
|
14 |
align-items: center;
|
15 |
+
padding: 0.8rem 1rem; /* Reduced padding */
|
16 |
background-color: white;
|
17 |
+
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
|
|
18 |
}
|
19 |
|
20 |
/* Logo */
|
21 |
.logo {
|
22 |
color: #1a73e8;
|
23 |
+
font-size: 1.1rem; /* Reduced font size */
|
24 |
font-weight: 600;
|
25 |
text-decoration: none;
|
26 |
+
margin-right: 1rem; /* Added margin */
|
27 |
}
|
28 |
|
29 |
/* Search box */
|
30 |
+
.search-container {
|
31 |
flex: 1;
|
32 |
+
max-width: 450px; /* Reduced width */
|
33 |
+
margin: 0 1rem;
|
34 |
+
}
|
35 |
+
|
36 |
+
.search-box {
|
37 |
+
width: 100%;
|
38 |
+
padding: 0.5rem 0.8rem; /* Reduced padding */
|
39 |
border: 1px solid #ddd;
|
40 |
+
border-radius: 6px;
|
41 |
font-size: 0.9rem;
|
42 |
+
outline: none;
|
43 |
}
|
44 |
|
45 |
/* Navigation links */
|
46 |
.nav-links {
|
47 |
display: flex;
|
48 |
+
gap: 1rem; /* Reduced gap */
|
49 |
+
margin-left: 1rem;
|
50 |
}
|
51 |
|
52 |
.nav-link {
|
|
|
54 |
text-decoration: none;
|
55 |
font-size: 0.9rem;
|
56 |
font-weight: 500;
|
57 |
+
padding: 0.4rem 0.6rem; /* Reduced padding */
|
58 |
+
white-space: nowrap;
|
|
|
59 |
}
|
60 |
|
61 |
.nav-link:hover {
|
62 |
color: #1a73e8;
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
}
|
64 |
</style>
|
65 |
|
66 |
<div class="nav-container">
|
67 |
<a href="/" class="logo">SCISPACE</a>
|
68 |
+
<div class="search-container">
|
69 |
+
<input type="text" class="search-box" placeholder="Search or ask a question">
|
70 |
+
</div>
|
71 |
<div class="nav-links">
|
|
|
|
|
|
|
72 |
<a href="/streamlit" class="nav-link">Streamlit</a>
|
73 |
<a href="/pricing" class="nav-link">Pricing</a>
|
74 |
<a href="/library" class="nav-link">My Library</a>
|
75 |
</div>
|
76 |
</div>
|
|
|
|
|
|
|
77 |
""", unsafe_allow_html=True)
|
appmaster.py
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
st.markdown("""
|
4 |
+
<style>
|
5 |
+
/* Hide default Streamlit elements */
|
6 |
+
#MainMenu {visibility: hidden;}
|
7 |
+
header {visibility: hidden;}
|
8 |
+
footer {visibility: hidden;}
|
9 |
+
|
10 |
+
/* Navigation bar container */
|
11 |
+
.nav-container {
|
12 |
+
position: fixed;
|
13 |
+
top: 0;
|
14 |
+
left: 0;
|
15 |
+
right: 0;
|
16 |
+
display: flex;
|
17 |
+
justify-content: space-between;
|
18 |
+
align-items: center;
|
19 |
+
padding: 0.8rem 2rem;
|
20 |
+
background-color: white;
|
21 |
+
box-shadow: 0 2px 4px rgba(0,0,0,0.08);
|
22 |
+
z-index: 1000;
|
23 |
+
}
|
24 |
+
|
25 |
+
/* Logo */
|
26 |
+
.logo {
|
27 |
+
color: #1a73e8;
|
28 |
+
font-size: 1.2rem;
|
29 |
+
font-weight: 600;
|
30 |
+
text-decoration: none;
|
31 |
+
}
|
32 |
+
|
33 |
+
/* Search box */
|
34 |
+
.search-box {
|
35 |
+
flex: 1;
|
36 |
+
max-width: 500px;
|
37 |
+
margin: 0 2rem;
|
38 |
+
padding: 0.6rem 1rem;
|
39 |
+
border: 1px solid #ddd;
|
40 |
+
border-radius: 8px;
|
41 |
+
font-size: 0.9rem;
|
42 |
+
}
|
43 |
+
|
44 |
+
/* Navigation links */
|
45 |
+
.nav-links {
|
46 |
+
display: flex;
|
47 |
+
gap: 1.2rem;
|
48 |
+
align-items: center;
|
49 |
+
}
|
50 |
+
|
51 |
+
.nav-link {
|
52 |
+
color: #5f6368;
|
53 |
+
text-decoration: none;
|
54 |
+
font-size: 0.9rem;
|
55 |
+
font-weight: 500;
|
56 |
+
padding: 0.5rem 0.8rem;
|
57 |
+
border-radius: 4px;
|
58 |
+
transition: all 0.2s ease;
|
59 |
+
}
|
60 |
+
|
61 |
+
.nav-link:hover {
|
62 |
+
color: #1a73e8;
|
63 |
+
background-color: rgba(26, 115, 232, 0.1);
|
64 |
+
}
|
65 |
+
|
66 |
+
/* Add margin to main content to prevent overlap */
|
67 |
+
.main-content {
|
68 |
+
margin-top: 4rem;
|
69 |
+
}
|
70 |
+
</style>
|
71 |
+
|
72 |
+
<div class="nav-container">
|
73 |
+
<a href="/" class="logo">SCISPACE</a>
|
74 |
+
<input type="text" class="search-box" placeholder="Search or ask a question">
|
75 |
+
<div class="nav-links">
|
76 |
+
<a href="https://github.com" target="_blank" class="nav-link">GitHub</a>
|
77 |
+
<a href="https://scholar.google.com" target="_blank" class="nav-link">Google Scholar</a>
|
78 |
+
<a href="https://openai.com" target="_blank" class="nav-link">OpenAI</a>
|
79 |
+
<a href="/streamlit" class="nav-link">Streamlit</a>
|
80 |
+
<a href="/pricing" class="nav-link">Pricing</a>
|
81 |
+
<a href="/library" class="nav-link">My Library</a>
|
82 |
+
</div>
|
83 |
+
</div>
|
84 |
+
|
85 |
+
<div class="main-content">
|
86 |
+
</div>
|
87 |
+
""", unsafe_allow_html=True)
|