[UI] add file custom style for theme
This commit is contained in:
parent
a3e575ef41
commit
ea625d6661
@ -18,6 +18,13 @@ def dev_users() -> list[dict]:
|
|||||||
"is_admin": True,
|
"is_admin": True,
|
||||||
"is_lock": False,
|
"is_lock": False,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"username": "duy",
|
||||||
|
"password": "admin",
|
||||||
|
"name": "Duy",
|
||||||
|
"is_admin": True,
|
||||||
|
"is_lock": False,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"username": "sam1",
|
"username": "sam1",
|
||||||
"password": "admin",
|
"password": "admin",
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
"lint-staged": "15.2.2",
|
"lint-staged": "15.2.2",
|
||||||
"postcss": "^8.4.38",
|
"postcss": "^8.4.38",
|
||||||
"prettier": "3.2.5",
|
"prettier": "3.2.5",
|
||||||
|
"sass": "^1.77.4",
|
||||||
"tailwindcss": "^3.4.3",
|
"tailwindcss": "^3.4.3",
|
||||||
"vite": "^5.2.0",
|
"vite": "^5.2.0",
|
||||||
"vite-plugin-mkcert": "^1.17.5",
|
"vite-plugin-mkcert": "^1.17.5",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { MetaProvider } from '@solidjs/meta'
|
import { MetaProvider } from '@solidjs/meta'
|
||||||
import { Toaster } from 'solid-toast'
|
import { Toaster } from 'solid-toast'
|
||||||
import './App.css'
|
// import './App.css'
|
||||||
import { SiteContextProvider } from './context/SiteContext'
|
import { SiteContextProvider } from './context/SiteContext'
|
||||||
|
|
||||||
function App(props) {
|
function App(props) {
|
||||||
|
@ -49,7 +49,7 @@ export default function Navbar() {
|
|||||||
<IconTriangle size={30} />
|
<IconTriangle size={30} />
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
<ul class="menu p-4 w-80 text-base-content">
|
<ul class="scrollnavbar menu p-4 w-80 text-base-content bg-transparent py-6 px-4">
|
||||||
<For each={NAV_ROUTES}>
|
<For each={NAV_ROUTES}>
|
||||||
{(item) =>
|
{(item) =>
|
||||||
item.show && (
|
item.show && (
|
||||||
|
@ -5,6 +5,7 @@ import { render } from 'solid-js/web'
|
|||||||
import App from './App'
|
import App from './App'
|
||||||
import './index.css'
|
import './index.css'
|
||||||
import { ROUTES } from './routes'
|
import { ROUTES } from './routes'
|
||||||
|
import './styles/fuware.scss'
|
||||||
|
|
||||||
const root = document.getElementById('root')
|
const root = document.getElementById('root')
|
||||||
|
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
"login": "Đăng Nhập",
|
"login": "Đăng Nhập",
|
||||||
"logout": "Đăng xuất",
|
"logout": "Đăng xuất",
|
||||||
"dashboard": "Bảng điều khiển",
|
"dashboard": "Bảng điều khiển",
|
||||||
"profile": "Hồ sơ"
|
"profile": "Hồ sơ",
|
||||||
|
"houses": "Kho"
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"CREATED_USER": "Username already registered!",
|
"CREATED_USER": "Username already registered!",
|
||||||
|
14
frontend/src/pages/WareHouse.jsx
Normal file
14
frontend/src/pages/WareHouse.jsx
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import { NAV_ROUTES } from '@routes/routes'
|
||||||
|
import { useNavigate } from '@solidjs/router'
|
||||||
|
import { onMount } from 'solid-js'
|
||||||
|
|
||||||
|
export default function WareHouse() {
|
||||||
|
const navigate = useNavigate()
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
const first = NAV_ROUTES.filter((item) => item.show)[0]?.path || '/me'
|
||||||
|
navigate(first, { replace: true })
|
||||||
|
})
|
||||||
|
|
||||||
|
return <></>
|
||||||
|
}
|
@ -25,6 +25,14 @@ export const NAV_ROUTES = [
|
|||||||
icon: IconDashboard,
|
icon: IconDashboard,
|
||||||
text: language?.ui.profile,
|
text: language?.ui.profile,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/ware-house',
|
||||||
|
components: lazy(() => import('@pages/WareHouse')),
|
||||||
|
filter: {},
|
||||||
|
show: true,
|
||||||
|
icon: IconDashboard,
|
||||||
|
text: language?.ui.houses,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
export const ROUTES = [
|
export const ROUTES = [
|
||||||
|
22
frontend/src/styles/fuware.scss
Normal file
22
frontend/src/styles/fuware.scss
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
$color-white: #fff;
|
||||||
|
$color-black: #212121;
|
||||||
|
$primary: #03c9d7;
|
||||||
|
|
||||||
|
.menu {
|
||||||
|
li {
|
||||||
|
a {
|
||||||
|
color: $color-black;
|
||||||
|
font-weight: normal;
|
||||||
|
|
||||||
|
&:not(ul, .menu-title, details, .btn).active {
|
||||||
|
background-color: $primary;
|
||||||
|
color: $color-white;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba($primary, 0.05);
|
||||||
|
color: $primary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -7,4 +7,16 @@ export default {
|
|||||||
extend: {},
|
extend: {},
|
||||||
},
|
},
|
||||||
plugins: [daisyui],
|
plugins: [daisyui],
|
||||||
|
daisyui: {
|
||||||
|
themes: [
|
||||||
|
{
|
||||||
|
light: {
|
||||||
|
primary: '#03c9d7',
|
||||||
|
'primary-content': '#ffff',
|
||||||
|
secondary: '#fb9678',
|
||||||
|
'secondary-content': '#ffff',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user