www / customcss1.py
Imtaiz's picture
Upload customcss1.py with huggingface_hub
4d07a5a verified
Raw History Blame Contribute Delete
5.91 kB
# Custom CSS for styling
CUSTOM_CSS = """
<style>
/* Hide default elements */
header {visibility: hidden;}
footer {visibility: hidden;}
#MainMenu {visibility: hidden;}
/* Basic resets and container setup */
.reportview-container .main .block-container {
padding-top: 0;
max-width: 700px;
padding-right: 1rem;
padding-left: 1rem;
}
/* Animations */
@keyframes fadeIn {
0% {opacity: 0;}
100% {opacity: 1;}
}
@keyframes slideInDown {
0% {
opacity: 0;
transform: translateY(-10px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pulse {
25% {
box-shadow: 0 0 10px rgba(128, 128, 128, 0.5), 0 0 10px rgba(105, 105, 105, 0.3);
}
20% {
box-shadow: 0 0 15px rgba(105, 105, 105, 0.7), 0 0 30px rgba(80, 80, 80, 0.5);
}
200% {
box-shadow: 0 0 10px rgba(128, 128, 128, 0.5), 0 0 20px rgba(105, 105, 105, 0.3);
}
}
/* Logo and header styling */
.logo-container {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 0;
padding-top: 0.5rem;
}
.round-logo {
width: 120px;
height: 120px;
border-radius: 50%;
margin-top: 0.5rem;
padding: 2px;
opacity: 0;
animation: fadeIn 1.5s ease-out forwards;
object-fit: cover;
aspect-ratio: 1 / 1;
overflow: hidden;
}
.concierge-header {
font-size: 1.25rem;
text-align: center;
margin-top: 0.5rem;
margin-bottom: 0;
font-weight: 500;
}
.concierge-subtitle {
text-align: center;
font-size: 0.9rem;
margin-top: 0.25rem;
margin-bottom: 0.5rem;
padding: 4px 12px;
border-radius: 4px;
animation: highlightText 7s ease-in-out infinite;
display: inline-block;
}
@keyframes highlightText {
0% {
color: rgba(0, 0, 0, 0.6);
background-color: transparent;
}
50% {
color: white;
background-color: #FF7F50;
}
100% {
color: rgba(0, 0, 0, 0.6);
background-color: transparent;
}
}
/* Chat container and messages */
.chat-container {
display: flex;
flex-direction: column;
overflow-y: scroll;
padding-bottom: 70px;
margin-top: 0;
gap: 1rem;
}
.stChatMessage {
background-color: #ffffff;
border-radius: 15px;
padding: 1.5rem !important;
margin-bottom: 1rem;
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
word-wrap: break-word !important;
overflow-wrap: break-word !important;
width: 100% !important;
max-width: 100% !important;
}
.stChatMessage p {
word-wrap: break-word !important;
overflow-wrap: break-word !important;
white-space: pre-wrap !important;
margin-bottom: 1rem !important;
}
.assistant-message {
width: 100% !important;
max-width: 100% !important;
word-break: break-word !important;
white-space: pre-wrap !important;
}
/* Button styling */
.button-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
margin: 0.5rem 0;
}
.stButton > button {
background-color: #ffffff !important;
color: #1E88E5 !important;
border: 1px solid #E3E3E3 !important;
border-radius: 8px !important;
padding: 10px 20px !important;
font-size: 0.9rem !important;
font-weight: normal !important;
width: 90% !important;
margin: 0 auto !important;
box-shadow: none !important;
transition: all 0.2s ease;
}
.stButton > button:hover {
background-color: #FF7F50 !important;
color: white !important;
border-color: #FF7F50 !important;
transform: translateY(-1px);
}
/* Chat input styling */
.stChatInput {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: white;
padding: 1rem;
border-top: none !important;
box-shadow: none !important;
}
div.stChatInputContainer {
box-shadow: none !important;
border: none !important;
background: transparent !important;
}
.stChatInput textarea {
border: 1px solid #E3E3E3 !important;
border-radius: 8px !important;
padding: 10px 15px !important;
font-size: 0.9rem !important;
box-shadow: none !important;
background: white !important;
transition: border-color 0.2s ease;
outline: none !important;
-webkit-appearance: none !important;
}
.stChatInput textarea:focus {
outline: 0 !important;
outline-offset: 0 !important;
border: 1px solid #E3E3E3 !important;
box-shadow: none !important;
-webkit-appearance: none !important;
}
.stChatInput textarea:focus-visible {
outline: none !important;
outline-offset: 0 !important;
box-shadow: none !important;
}
.stChatInput button[kind="primaryFormSubmit"] {
border-radius: 8px !important;
}
/* Utility classes */
.fade-in {
opacity: 0;
animation: fadeIn 1s ease-in forwards;
}
div[data-testid="stVerticalBlock"] > div {
padding: 0;
margin: 0;
}
.typing-indicator {
background-color: #E3E3E3;
padding: 0.5rem 1rem;
border-radius: 20px;
display: inline-block;
animation: pulse 1s infinite;
}
<style>
"""