Merge branch 'feat/ui-0.7.0' into 'test'

fix(navbar): Restore the gradient background of the navbar

See merge request opensource/answer!354
This commit is contained in:
Ren Yubin
2022-12-16 10:10:29 +00:00
3 changed files with 8 additions and 4 deletions
+6
View File
@@ -2,6 +2,7 @@
@import 'bootstrap/scss/variables';
#header {
--bs-navbar-padding-y: 0.75rem;
background: linear-gradient(180deg, rgb(var(--bs-primary-rgb)) 0%, rgba(var(--bs-primary-rgb), 0.95) 100%);
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15), 0 0.125rem 0.25rem rgb(0 0 0 / 8%);
.logo {
max-height: 1.75rem;
@@ -49,6 +50,11 @@
}
}
}
// style for colored navbar
&.theme-light {
background: linear-gradient(180deg, rgb(var(--bs-light-rgb)) 0%, rgba(var(--bs-light-rgb), 0.95) 100%);
}
}
+1 -4
View File
@@ -82,10 +82,7 @@ const Header: FC = () => {
<Navbar
variant={themeType === 'theme-colored' ? 'dark' : ''}
expand="lg"
className={classnames('sticky-top', themeType, {
'bg-light': themeType === 'theme-light',
'bg-primary': themeType !== 'theme-light',
})}
className={classnames('sticky-top', themeType)}
id="header">
<Container className="d-flex align-items-center">
<Navbar.Toggle
@@ -82,6 +82,7 @@ const Index: FC<Props> = ({ visible = false, data, callback }) => {
handleSubmit();
};
const handleFocusForTextArea = () => {
setForceType('answer');
setShowEditor(true);
};