You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
< ? php
/**
* Template Name: 弹窗模板
*/
?>
<?php get_header();?>
<div class="page-full-width">
<!-- 拟态框组件 -->
<div class="neumorphism-modal-container">
<div class="neumorphism-modal">
<div class="modal-content">
<?php echo do_shortcode('[fluentform id="4"]'); ?>
</div>
</div>
</div>
<style>
.neumorphism-modal-container {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
pointer-events: auto;
overflow: hidden;
}
.neumorphism-modal {
background: #e0e5ec;
border-radius: 20px;
padding: 30px;
max-width: 600px;
width: 90%;
max-height: 80vh;
overflow-y: auto;
position: relative;
}
.modal-content {
color: #333;
line-height: 1.6;
}
/* 移除所有可能的关闭按钮样式 */
.neumorphism-modal .close,
.neumorphism-modal .modal-close,
.neumorphism-modal [data-dismiss],
.neumorphism-modal .dismiss {
display: none !important;
}
/* 防止点击背景关闭,但保持遮罩可交互 */
.neumorphism-modal-container {
pointer-events: auto;
cursor: default;
}
.neumorphism-modal {
pointer-events: auto;
cursor: auto;
}
/* 防止背景滚动 */
body.modal-open {
overflow: hidden;
height: 100vh;
}
/* 响应式设计 */
@media (max-width: 768px) {
.neumorphism-modal {
padding: 20px;
width: 95%;
border-radius: 15px;
box-shadow:
6px 6px 12px #a3b1c6,
-6px -6px 12px #ffffff;
}
}
</style>
<script>
// 页面加载时添加modal-open类, 防止背景滚动
document.addEventListener('DOMContentLoaded', function() {
document.body.classList.add('modal-open');
});
// 防止ESC键关闭弹窗
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape') {
e.preventDefault();
e.stopPropagation();
return false;
}
});
// 防止右键菜单
document.querySelector('.neumorphism-modal-container').addEventListener('contextmenu', function(e) {
e.preventDefault();
});
</script>
</div>
<?php get_footer();?>