关于皮肤是浮动菜单 给 Login页面撑间距
:root{
--SpecialPageTopSpacing:calc( var(--headerHeight) + 30px );
}
@media only screen and (max-width:991.98px) {
:root{
--SpecialPageTopSpacing: 30px;
}
}
#dng-wrapper:has(.header-replace.header-position.sticky-fixed) #dnn_content:has(#dnn_ctr_Login_DNN),
#dng-wrapper:has(.header-replace.header-position.sticky-fixed) #dnn_content:has(#dnn_ctr_Privacy_lblPrivacy),
#dng-wrapper:has(.header-replace.header-position.sticky-fixed) #dnn_content:has(#dnn_ctr_Terms_lblTerms),
#dng-wrapper:has(.header-replace.header-position.sticky-fixed) #dnn_content:has(dnn-resource-manager.hydrated){
padding-top: var(--SpecialPageTopSpacing);
}
.header-replace.header-position.sticky-fixed:has( ~ #dnn_content #dnn_ctr_Login_DNN),
.header-replace.header-position.sticky-fixed:has( ~ #dnn_content #dnn_ctr_Privacy_lblPrivacy),
.header-replace.header-position.sticky-fixed:has( ~ #dnn_content #dnn_ctr_Terms_lblTerms),
.header-replace.header-position.sticky-fixed:has( ~ #dnn_content dnn-resource-manager.hydrated){
background-color: rgba(0,0,0,0.64);
}
@-moz-document url-prefix() {
#Form[action="/Privacy" i] #dnn_content,
#Form[action="/Privacy/" i] #dnn_content{
padding-top: var(--SpecialPageTopSpacing);
}
#Form[action="/Terms" i] #dnn_content,
#Form[action="/Terms/" i] #dnn_content{
padding-top: var(--SpecialPageTopSpacing);
}
#Form[action="/login" i] #dnn_content,
#Form[action="/login/" i] #dnn_content,
#Form[action^="/login?" i] #dnn_content{
padding-top: var(--SpecialPageTopSpacing);
}
#Form[action^="/Host/Global-Assets/portalid/" i] #dnn_content{
padding-top: var(--SpecialPageTopSpacing);
}
#Form[action="/Admin/File-Management" i] #dnn_content{
padding-top: var(--SpecialPageTopSpacing);
}
#Form[action="/Privacy" i] .header-replace.header-position.sticky-fixed,
#Form[action="/Privacy/" i] .header-replace.header-position.sticky-fixed,
#Form[action="/Terms" i] .header-replace.header-position.sticky-fixed,
#Form[action="/Terms/" i] .header-replace.header-position.sticky-fixed,
#Form[action="/login" i] .header-replace.header-position.sticky-fixed,
#Form[action="/login/" i] .header-replace.header-position.sticky-fixed,
#Form[action^="/login?" i] .header-replace.header-position.sticky-fixed,
#Form[action^="/Host/Global-Assets/portalid/" i] .header-replace.header-position.sticky-fixed,
#Form[action="/Admin/File-Management" i] .header-replace.header-position.sticky-fixed{
background-color: rgba(0,0,0,0.64);
}
}
其中headerHeight的值需要修改模板才能生成
resource\vendor\themeplugin\shortcode\shortcode-snippets.js
if (attr.height) {
style += `
:root{
--${attr.areaname}-height: ${attr.height}px;
}
`;
}
if (attr.styheight) {
style += `
:root{
--floating-${attr.areaname}-height: ${attr.styheight}px;
}
`;
}
if (attr.height) {
style += `
:root{
--${attr.areaname}-height: ${attr.height}px;
}
`;
}
template\template.global.css
:root{
--headerHeight: calc( var(--header-top-height,0px) + var(--header-center-height,0px) + var(--header-bottom-height,0px) );
--mobileHeaderHeight: calc( var(--header-mobile-top-height,0px) + var(--header-mobile-height,0px) + var(--header-mobile-bottom-height,0px) );
--floatingHeaderHeight: calc( var(--floating-header-top-height,0px) + var(--floating-header-center-height,0px) + var(--floating-header-bottom-height,0px) );
}