school样式

This commit is contained in:
李鹏宇 2026-07-23 18:05:17 +08:00
parent 1fa24f7558
commit 42ab0736d1
5 changed files with 22 additions and 739 deletions

View File

@ -460,7 +460,8 @@ margin-top:10px;
content: "\f00c"; content: "\f00c";
} }
ul.nav li.dropdown:hover ul.dropdown-menu{ display: block; } // 注释掉全局规则会导致 Odoo 导航栏 dropdown 在非 dashboard 页面也被强制显示
// ul.nav li.dropdown:hover ul.dropdown-menu{ display: block; }
.df_selection_text{ .df_selection_text{
display: block; display: block;

View File

@ -56,7 +56,9 @@ const dnMenuIcons = {
export function dnNavBarAddClasses(){ export function dnNavBarAddClasses(){
document.querySelector('body')?.classList.add('ks_body_class'); document.querySelector('body')?.classList.add('ks_body_class');
document.querySelector('.o_main_navbar')?.classList.add('navbar', 'navbar-expand-md'); // 注释掉:给 .o_main_navbar 添加 Bootstrap 的 navbar navbar-expand-md 类
// 会覆盖 udoo_om_ux 主题的导航栏布局,导致样式错乱和搜索下拉框错位
// document.querySelector('.o_main_navbar')?.classList.add('navbar', 'navbar-expand-md');
document.querySelector('.ks-mobile-burger-menu')?.classList.remove('d-none'); document.querySelector('.ks-mobile-burger-menu')?.classList.remove('d-none');
document.querySelector('.mobile-burger-menu-default')?.classList.add('d-none'); document.querySelector('.mobile-burger-menu-default')?.classList.add('d-none');
} }
@ -65,7 +67,8 @@ export function dnNavBarAddClasses(){
export function dnNavBarRemoveClasses(){ export function dnNavBarRemoveClasses(){
document.querySelector('body')?.classList.remove('ks_body_class'); document.querySelector('body')?.classList.remove('ks_body_class');
document.querySelector('.o_main_navbar')?.classList.remove('navbar', 'navbar-expand-md'); // 注释掉:对应上面的添加操作
// document.querySelector('.o_main_navbar')?.classList.remove('navbar', 'navbar-expand-md');
document.querySelector('.ks-mobile-burger-menu')?.classList.add('d-none'); document.querySelector('.ks-mobile-burger-menu')?.classList.add('d-none');
document.querySelector('.mobile-burger-menu-default')?.classList.remove('d-none'); document.querySelector('.mobile-burger-menu-default')?.classList.remove('d-none');
} }

View File

@ -1,6 +1,7 @@
// @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); // @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
* { // 全局通配符重置限定在 dashboard 页面作用域内避免影响其他页面 udoo_om_ux 主题的深色 dropdown
body.ks_body_class * {
margin: 0; margin: 0;
padding: 0; padding: 0;
box-sizing: border-box; box-sizing: border-box;
@ -64,207 +65,7 @@ body.ks_body_class {
} }
} }
// .ks_body_class .dash-dd,
.ks_body_class .o_menu_sections {
border-radius: 8px;
padding: 4px 12px;
&.show {
.o-dropdown--menu {
// transform: translateY(0px);
// top: 60px !important;
animation: fadeInSlideDown 0.4s ease forwards;
}
}
&.header-img-dd {
.dropdown-toggle {
&::after {
display: none;
}
}
}
&:hover {
background-color: $color-white;
}
&.show {
.dropdown-toggle {
&::after {
transform: rotate(-180deg);
}
}
}
@include max-768 {
padding: 16px 0 0 0;
}
.dropdown-toggle {
// padding: 0 !important;
color: $color-black !important;
font-size: $font-16 !important;
border: none;
font-weight: $f-w-400 !important;
background: $color-white !important;
line-height: 20px !important;
// &:hover {
// &+.o-dropdown--menu {
// display: block !important;
// }
// }
@include max-992 {
font-size: $font-14 !important;
border-top: none !important;
}
@include max-768 {
padding: 0 12px !important;
}
}
.dropdown-toggle::after {
content: url(/ks_dashboard_ninja/static/images/dashboardOverview/down-arrow.svg);
display: inline-block;
margin-left: .4em;
vertical-align: 2px;
border: none !important;
transition: all 0.4s ease-in-out;
@include max-768 {
display: none;
}
}
.dropdown-toggle {
&.show {
&::after {
transform: rotate(-180deg);
}
}
}
}
.ks_body_class .ks-dropdown-menu,
.ks_body_class .o-dropdown--menu {
border-radius: 8px;
box-shadow: 0px 4px 12px 0px #00000040;
border: none !important;
width: max-content;
background-color: $color-white !important;
// overflow: hidden;
@include custom-scrollbar
@include max-768 {
box-shadow: none;
display: block !important;
width: 100%;
padding-bottom: 0 !important;
}
.ks_dn_navbar_dd_item {
padding: 8px 16px;
font-size: $font-14;
font-weight: $f-w-400;
line-height: 16px;
text-align: left;
color: $color-paragraph;
&.focus {
background-color: $color-white;
}
@include max-768 {
line-height: 20px;
color: $color-black;
padding: 12px 8px 12px 28px;
}
&:hover {
background-color: $color-FFF5F5 !important;
color: $color-6789C6 !important;
.dash-dd-icons {
svg {
path {
fill: $color-6789C6;
}
}
&.import-svg {
svg {
path {
stroke: $color-6789C6;
fill: none;
}
}
}
}
}
&.active {
background-color: $color-FFF5F5;
color: $color-6789C6;
.dash-dd-icons {
svg {
path {
fill: $color-6789C6;
}
}
&.import-svg {
svg {
path {
stroke: $color-6789C6;
fill: none;
}
}
}
}
// .dash-dd-icons {
// svg {
// path {
// fill: #04A9CC;
// }
// }
// }
}
.dash-dd-icons {
svg {
path {
fill: $color-4B5563;
}
}
&.import-svg {
svg {
path {
stroke: $color-4B5563;
fill: none;
}
}
}
}
.dash-dd-inbox {
svg {
path {
fill: #292D32;
}
}
}
}
}
// //
// .ks_body_class .modal-body .img-bg { // .ks_body_class .modal-body .img-bg {
@ -744,21 +545,6 @@ body.ks_body_class {
row-gap: 16px; row-gap: 16px;
} }
.ks_body_class .o_dropdown_button {
visibility: visible !important;
&::after {
content: url(/ks_dashboard_ninja/static/images/dashboardOverview/down-arrow.svg) !important;
display: inline-block !important;
margin-left: .255em;
vertical-align: 2px !important;
border: none !important;
transition: transform 0.4s ease-in-out; // Updated transition property
position: absolute;
top: 7px;
left: -21px;
}
}
.border-none { .border-none {
border: none !important; border: none !important;
@ -1056,8 +842,8 @@ body.ks_body_class {
border-radius: 8px; border-radius: 8px;
box-shadow: 0px 4px 12px 0px #00000040; box-shadow: 0px 4px 12px 0px #00000040;
border: none !important; border: none !important;
width: max-content; // 注释掉强制白色背景会覆盖 udoo_om_ux 主题的深色下拉框背景
background-color: $color-white !important; // background-color: $color-white !important;
.dropdown-item { .dropdown-item {
padding: 8px 16px !important; padding: 8px 16px !important;
@ -1073,11 +859,11 @@ body.ks_body_class {
max-width: 240px; max-width: 240px;
&.ui-state-active { &.ui-state-active {
background-color: $color-white !important; // background-color: $color-white !important;
} }
&:hover { &:hover {
background-color: $color-FFF5F5 !important; // background-color: $color-FFF5F5 !important;
} }
} }
} }
@ -1364,31 +1150,6 @@ body.ks_body_class {
// auto-complete-css-start // auto-complete-css-start
.ks_body_class .ui-autocomplete {
border-radius: 8px !important;
box-shadow: 0px 4px 12px 0px #00000040 !important;
border: none !important;
width: max-content !important;
.ui-menu-item {
background-color: $color-white !important;
>div {
background-color: $color-white !important;
padding: 8px 16px;
font-size: 14px;
font-weight: 400;
line-height: 16px;
text-align: left;
color: #4b5563;
&:hover {
background-color: #FFF5F5 !important;
}
}
}
}
// chat-inbox // chat-inbox
@ -1447,31 +1208,6 @@ body.ks_body_class {
// auto-complete-css-start // auto-complete-css-start
.ks_body_class .ui-autocomplete {
border-radius: 8px !important;
box-shadow: 0px 4px 12px 0px #00000040 !important;
border: none !important;
width: max-content !important;
.ui-menu-item {
background-color: $color-white !important;
>div {
background-color: $color-white !important;
padding: 8px 16px;
font-size: 14px;
font-weight: 400;
line-height: 16px;
text-align: left;
color: #4b5563;
&:hover {
background-color: #FFF5F5 !important;
}
}
}
}
// input-common // input-common
@ -1756,43 +1492,8 @@ body.ks_body_class {
} }
.ks_body_class {
.o_main_navbar {
.o-mail-DiscussSystray-class,
.o_user_menu,
.o_navbar_apps_menu,
.o-dropdown {
.fa-clock-o,
.fa-comments,
.o_user_avatar,
.oi-apps {
display: none !important;
}
}
.ks-comments-systray,
.ks-mail-systray,
.ks_user_avatar,
.o_navbar_apps_menu .ks-apps-menu-icon {
display: flex !important;
}
}
}
.ks_body_class .o-dropdown--menu {
// transform: translateY(0px);
// top: 60px !important;
animation: fadeInSlideDown 0.4s ease forwards;
}
// focus-class-overided
.ks_body_class .o-dropdown--menu .dropdown-item.focus,
.ks_body_class .o-dropdown--menu .dropdown-toggle.focus {
background-color: transparent;
}
// company-name-css // company-name-css
.encapsulated-dropdown { .encapsulated-dropdown {
@ -1957,23 +1658,6 @@ body.ks_body_class {
} }
} }
.ks_body_class .o_menu_sections .o-dropdown-item.o_nav_entry {
padding: 4px 12px !important;
color: $color-black !important;
font-size: $font-16 !important;
font-weight: $f-w-400 !important;
background: $color-white !important;
line-height: 20px !important;
@include max-992 {
font-size: $font-14 !important;
border-top: none !important;
}
@include max-768 {
padding: 0 12px !important;
}
}
.w-fit-content { .w-fit-content {
width: fit-content !important; width: fit-content !important;
@ -2168,17 +1852,6 @@ body.ks_body_class {
} }
} }
.ks_body_class {
.o_menu_sections_more {
button {
background-color: $color-white !important;
.fa-plus {
color: $color-black !important;
}
}
}
}
.ks_body_class .encapsulated-kpi-tile { .ks_body_class .encapsulated-kpi-tile {
@ -2806,13 +2479,6 @@ body.ks_body_class {
border-radius: 16px 16px !important; border-radius: 16px 16px !important;
} }
.ks_body_class .o_searchview_facet_label {
span {
display: flex;
align-items: center;
justify-content: center;
}
}
.ks_body_class .ks_chart_card_body { .ks_body_class .ks_chart_card_body {
top: 65px !important; top: 65px !important;

View File

@ -1,393 +1,9 @@
.ks_body_class header { // =============================================================
position: sticky; // ks_dashboard_ninja / static / src / scss / header.scss
top: 0; // -------------------------------------------------------------
z-index: 10; // 该文件原本定义了顶部导航栏.o_main_navbar和头部相关全局样式
width: 100%; // 与主题模块 udoo_om_ux 严重冲突导致顶部菜单按钮搜索框
// 下拉框用户头像样式错乱
.o_menu_systray { //
align-items: center; // 已清空相关样式由 udoo_om_ux 主题模块统一控制
} // =============================================================
.o_menu_systray {
align-items: center;
}
.o_main_navbar {
padding: 0px 40px;
min-height: 66px;
@include min-1600 {
min-height: 76px;
}
/* 与主题模块冲突ks_dashboard_ninja 将顶部导航栏设为白色,会覆盖主题深色模式下的背景色,故注释掉 (@image#1:Clipboard_Screenshot.png) */
// background: white;
display: flex;
justify-content: space-between;
/* 与主题模块冲突:白色底部边框在深色模式下会显示为白线,故注释掉 (@image#1:Clipboard_Screenshot.png) */
// border-bottom: 1px solid $color-E5E7EB !important;
.o_menu_sections {
justify-content: center;
align-items: center;
}
// .ks-navbar-toggler {
// background-color: $color-D9F1FD;
// border-radius: 5px;
// width: 30px;
// display: flex;
// justify-content: center;
// align-items: center;
//
// &[aria-expanded="true"] {
// .hamburger {
// display: none;
// }
//
// .cross {
// display: block !important;
// }
// }
//
// &:focus {
// box-shadow: none;
// }
// }
@include max-992 {
padding: 0px 20px;
}
@include max-768 {
.navbar-collapse {
position: fixed;
top: 62px;
right: -100%;
height: 100%;
width: 80%;
transition: right 0.3s ease-in-out;
background-color: $color-white;
&.show {
right: 0;
}
}
}
@include max-575 {
padding: 0 10px;
}
.o_menu_brand {
/* 与主题模块冲突:强制黑色文字会覆盖主题深色模式下的导航文字颜色 (@image#1:Clipboard_Screenshot.png) */
// color: $color-black;
font-size: $font-22;
font-weight: $f-w-400;
line-height: 30.8px;
@include max-992 {
font-size: $font-18;
}
@include max-575 {
font-size: $font-12;
line-height: 16px;
margin-left: 4px !important;
}
}
.user-mobile-details {
background-color: $color-bg-main;
padding: 16px 12px;
h3 {
font-size: $font-16;
font-weight: $f-w-400;
color: $color-black;
margin-bottom: 0;
}
.user-box {
background-color: $color-white;
border-radius: 5px;
border: 0.5px solid $color-E5E7EB;
font-size: $font-10;
font-weight: $f-w-400;
color: $color-black;
}
}
}
}
.ks_body_class .user-name {
font-size: $font-20;
font-weight: $f-w-500;
line-height: 32px;
min-width: 52px;
/* 与主题模块冲突:强制黑字浅蓝背景会覆盖主题深色模式下头像/用户名样式 (@image#1:Clipboard_Screenshot.png) */
// color: $color-black;
border-radius: 10px;
// background-color: $color-D9F1FD;
padding: 7px 11px;
@include max-768 {
border-radius: 5px;
border: 0.5px solid var(--Border-Color, #E5E7EB);
/* 与主题模块冲突:强制白色背景会覆盖主题深色模式下头像样式 (@image#1:Clipboard_Screenshot.png) */
// background-color: $color-white;
font-size: $font-12;
font-weight: $f-w-400;
line-height: 14px;
width: 23px !important;
height: 23px;
min-width: 23px;
display: flex;
justify-content: center;
align-items: center;
padding: 7px 14px;
}
}
.ks_body_class .o_burger_menu {
width: 69% !important;
}
.ks_body_class .modal-backdrop.show {
opacity: 0.2;
}
.ks_body_class .cross {
padding-left: 16px;
padding-right: 16px;
}
// company-name-css
.ks_body_class .o_switch_company_menu {
border-radius: 50px;
border: 1px solid $color-E5E7EB;
justify-content: center;
align-items: center;
min-height: 44px;
padding: 8px 10px 8px 10px !important;
display: flex !important;
@include max-768 {
display: none !important;
}
.dropdown-toggle::after {
content: url(/ks_dashboard_ninja/static/images/dashboardOverview/down-arrow.svg);
display: inline-block;
margin-left: .4em;
vertical-align: 2px;
border: none !important;
transition: all 0.4s ease-in-out;
line-height: normal !important;
@include max-768 {
display: none;
}
}
.dropdown-toggle {
&.show {
&::after {
transform: rotate(-180deg);
}
}
}
.dropdown-toggle {
height: fit-content;
.oe_topbar_name {
font-size: $font-12;
height: 100%;
padding-right: 6px;
line-height: normal !important;
}
}
.ks-dropdown-menu {
.border-end {
border: none !important;
}
}
.fa-check-square {
color: $color-E7495E !important;
}
}
.ks_body_class .o_debug_manager {
button {
/* 与主题模块冲突:强制深色文字会覆盖主题深色模式下的图标/文字颜色 (@image#1:Clipboard_Screenshot.png) */
// color: #241C1D !important;
}
}
.ks_body_class .oe_topbar_name {
/* 与主题模块冲突:强制深色文字会覆盖主题深色模式下的顶部用户名颜色 (@image#1:Clipboard_Screenshot.png) */
// color: #241C1D !important;
}
.ks_body_class .o_switch_company_menu_dropdown {
.fa-check-square {
color: $color-E7495E !important;
}
.o_switch_company_item {
height: auto !important;
&.focus>* {
background-color: transparent;
}
.border-end {
border: none !important;
}
}
}
.ks_body_class {
.screen-info {
background-color: $color-nav-bg;
height: 56px;
display: flex;
align-items: center;
padding: 0 40px;
@include max-992 {
padding: 0 20px;
}
@include max-575 {
padding: 0 16px;
}
// .ks_dashboard_top_menu-new {}
.user-template-title {
.ks_body_class .ks_am_element.dash-dd-2 {
font-size: $font-16;
color: $color-black;
font-weight: $f-w-400;
line-height: 20px;
}
span {
position: relative;
}
// &::after {
// content: '';
// display: block;
// position: absolute;
// height: 20px;
// width: 20px;
// right: 2px;
// background-image: url(../../images/icons/down-arrow.svg);
// background-repeat: no-repeat;
// top: 43%;
// transition: all 350ms ease-in-out;
// }
}
}
}
.custom-dash-collapse{
.o_input{
border: none;
}
.dropdown-toggle.d-flex.encapsulated-link{
overflow: auto;
max-height: 75px;
}
.dash-default-btn{
svg{
fill: transparent !important;
}
}
.table-dlt-btn{
&:hover{
border-color: #E7495E !important;
svg{
stroke: #E7495E !important;
}
}
}
.o-dropdown{
.ks-nav-link{
button{
min-width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: left;
}
}
}
.ks-nav-link{
button{
background-color: transparent;
border: none;
}
}
.dash-dd-2{
.selcted-opt.opted{
background-color: #F5F8FB;
padding-right: 22px;
}
.dropdown-toggle{
&:after{
display: none;
}
}
}
.encapsulated-cross {
position: absolute;
top: 2px;
}
}
@media only screen and (max-width: 1600px) {
.custom-dash-collapse{
.o-dropdown{
.ks-nav-link{
button{
min-width: 80px;
}
}
}
}
}
@media only screen and (max-width: 1600px) {
.custom-dash-collapse{
.o-dropdown{
.ks-nav-link{
button{
min-width: 60px;
}
}
}
}
}

View File

@ -471,6 +471,3 @@
opacity: 0.5; opacity: 0.5;
} }
.ks_body_class .o_main_navbar .badge {
background-color: $color-E7495E;
}