This commit is contained in:
Flatlogic Bot 2026-02-07 15:34:20 +00:00
parent d80d0a04ab
commit 602648171f
5 changed files with 114 additions and 67 deletions

View File

@ -63,25 +63,41 @@ $site_logo = $settings['site_logo'] ?? 'assets/pasted-20260207-134833-7329dc42.j
padding: 40px; padding: 40px;
min-height: 100vh; min-height: 100vh;
} }
@media (max-width: 768px) { @media (max-width: 991px) {
.sidebar { .sidebar {
width: 100%; width: 100%;
height: auto; height: auto;
position: relative; position: fixed;
padding-bottom: 10px; top: 0;
left: 0;
padding: 5px 0;
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
justify-content: flex-start;
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
} }
.main-content { .main-content {
margin-left: 0; margin-left: 0;
padding: 20px; padding: 80px 15px 20px 15px;
} }
.sidebar a { display: inline-block; padding: 10px 15px; } .sidebar a {
.sidebar hr { display: none; } padding: 10px 15px;
white-space: nowrap;
font-size: 0.85rem;
border-left: none !important;
border-bottom: 3px solid transparent;
}
.sidebar a.active {
border-bottom: 3px solid #d4af37;
}
.sidebar hr, .sidebar .text-center { display: none !important; }
} }
</style> </style>
</head> </head>
<body> <body>
<div class="sidebar"> <div class="sidebar">
<div class="text-center mb-4 px-3 d-none d-md-block"> <div class="text-center mb-4 px-3">
<?php if($site_logo): ?> <?php if($site_logo): ?>
<img src="<?php echo htmlspecialchars($site_logo); ?>" alt="Logo" class="img-fluid mb-2" style="max-height: 60px; border-radius: 8px;"> <img src="<?php echo htmlspecialchars($site_logo); ?>" alt="Logo" class="img-fluid mb-2" style="max-height: 60px; border-radius: 8px;">
<?php endif; ?> <?php endif; ?>
@ -89,7 +105,6 @@ $site_logo = $settings['site_logo'] ?? 'assets/pasted-20260207-134833-7329dc42.j
</div> </div>
<a href="admin.php" class="active"><i class="bi bi-gear-fill me-2"></i> 系统设置</a> <a href="admin.php" class="active"><i class="bi bi-gear-fill me-2"></i> 系统设置</a>
<a href="admin_steps.php"><i class="bi bi-chat-dots-fill me-2"></i> 话术管理</a> <a href="admin_steps.php"><i class="bi bi-chat-dots-fill me-2"></i> 话术管理</a>
<hr>
<a href="index.php" target="_blank"><i class="bi bi-eye me-2"></i> 查看前台</a> <a href="index.php" target="_blank"><i class="bi bi-eye me-2"></i> 查看前台</a>
<a href="logout.php"><i class="bi bi-box-arrow-right me-2"></i> 退出登录</a> <a href="logout.php"><i class="bi bi-box-arrow-right me-2"></i> 退出登录</a>
</div> </div>
@ -135,4 +150,4 @@ $site_logo = $settings['site_logo'] ?? 'assets/pasted-20260207-134833-7329dc42.j
</div> </div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -79,26 +79,42 @@ if ($edit_day > 0) {
padding: 40px; padding: 40px;
min-height: 100vh; min-height: 100vh;
} }
@media (max-width: 768px) { @media (max-width: 991px) {
.sidebar { .sidebar {
width: 100%; width: 100%;
height: auto; height: auto;
position: relative; position: fixed;
padding-bottom: 10px; top: 0;
left: 0;
padding: 5px 0;
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
justify-content: flex-start;
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
} }
.main-content { .main-content {
margin-left: 0; margin-left: 0;
padding: 20px; padding: 80px 15px 20px 15px;
} }
.sidebar a { display: inline-block; padding: 10px 15px; } .sidebar a {
.sidebar hr { display: none; } padding: 10px 15px;
white-space: nowrap;
font-size: 0.85rem;
border-left: none !important;
border-bottom: 3px solid transparent;
}
.sidebar a.active {
border-bottom: 3px solid #d4af37;
}
.sidebar hr, .sidebar .text-center { display: none !important; }
} }
.card-header { font-weight: bold; } .card-header { font-weight: bold; }
</style> </style>
</head> </head>
<body> <body>
<div class="sidebar"> <div class="sidebar">
<div class="text-center mb-4 px-3 d-none d-md-block"> <div class="text-center mb-4 px-3">
<?php if($site_logo): ?> <?php if($site_logo): ?>
<img src="<?php echo htmlspecialchars($site_logo); ?>" alt="Logo" class="img-fluid mb-2" style="max-height: 60px; border-radius: 8px;"> <img src="<?php echo htmlspecialchars($site_logo); ?>" alt="Logo" class="img-fluid mb-2" style="max-height: 60px; border-radius: 8px;">
<?php endif; ?> <?php endif; ?>
@ -106,7 +122,6 @@ if ($edit_day > 0) {
</div> </div>
<a href="admin.php"><i class="bi bi-gear-fill me-2"></i> 系统设置</a> <a href="admin.php"><i class="bi bi-gear-fill me-2"></i> 系统设置</a>
<a href="admin_steps.php" class="active"><i class="bi bi-chat-dots-fill me-2"></i> 话术管理</a> <a href="admin_steps.php" class="active"><i class="bi bi-chat-dots-fill me-2"></i> 话术管理</a>
<hr>
<a href="index.php" target="_blank"><i class="bi bi-eye me-2"></i> 查看前台</a> <a href="index.php" target="_blank"><i class="bi bi-eye me-2"></i> 查看前台</a>
<a href="logout.php"><i class="bi bi-box-arrow-right me-2"></i> 退出登录</a> <a href="logout.php"><i class="bi bi-box-arrow-right me-2"></i> 退出登录</a>
</div> </div>
@ -114,7 +129,7 @@ if ($edit_day > 0) {
<div class="main-content"> <div class="main-content">
<div class="container-fluid"> <div class="container-fluid">
<div class="d-flex justify-content-between align-items-center mb-4"> <div class="d-flex justify-content-between align-items-center mb-4">
<h3>话术管理 (1-7天步骤)</h3> <h3>话术管理</h3>
</div> </div>
<?php if($message): ?> <?php if($message): ?>
@ -208,4 +223,4 @@ if ($edit_day > 0) {
</div> </div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -59,24 +59,25 @@ body {
color: #fff; color: #fff;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: fixed; position: fixed;
top: 0;
left: 0;
height: 100vh; height: 100vh;
z-index: 1050; z-index: 1050;
box-shadow: 4px 0 10px rgba(0,0,0,0.1); box-shadow: 4px 0 10px rgba(0,0,0,0.1);
} }
#content { #content {
width: calc(100% - var(--sidebar-width)); width: 100%;
margin-left: var(--sidebar-width);
padding: 40px; padding: 40px;
margin-left: var(--sidebar-width);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
} }
/* Sidebar toggled state (desktop) */ /* Sidebar toggled state (desktop) */
#sidebar.collapsed { #sidebar.collapsed {
margin-left: -var(--sidebar-width); transform: translateX(-100%);
} }
#content.expanded { #content.expanded {
width: 100%;
margin-left: 0; margin-left: 0;
} }
@ -125,7 +126,7 @@ body {
width: 100%; width: 100%;
height: 60px; height: 60px;
background: var(--secondary-color); background: var(--secondary-color);
display: flex; display: none;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 0 15px; padding: 0 15px;
@ -136,7 +137,11 @@ body {
.mobile-logo-text { .mobile-logo-text {
color: var(--primary-color); color: var(--primary-color);
font-weight: bold; font-weight: bold;
font-size: 1.1rem; font-size: 1rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 200px;
} }
#sidebarCollapseMobile { #sidebarCollapseMobile {
@ -159,22 +164,22 @@ body {
/* Floating TG Button */ /* Floating TG Button */
.tg-float { .tg-float {
position: fixed; position: fixed;
right: 25px; right: 20px;
bottom: 100px; bottom: 90px;
z-index: 1001; z-index: 1001;
text-align: center; text-align: center;
} }
.tg-btn { .tg-btn {
width: 55px; width: 50px;
height: 55px; height: 50px;
background-color: #0088cc; background-color: #0088cc;
color: white; color: white;
border-radius: 50%; border-radius: 50%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 28px; font-size: 24px;
box-shadow: 0 4px 15px rgba(0,0,0,0.3); box-shadow: 0 4px 15px rgba(0,0,0,0.3);
text-decoration: none; text-decoration: none;
animation: pulse-tg 2s infinite; animation: pulse-tg 2s infinite;
@ -182,34 +187,33 @@ body {
.tg-btn:hover { .tg-btn:hover {
color: #fff; color: #fff;
transform: scale(1.05);
} }
.tg-text { .tg-text {
display: block; display: block;
font-size: 11px; font-size: 10px;
margin-top: 5px; margin-top: 5px;
background: rgba(0,0,0,0.7); background: rgba(0,0,0,0.7);
color: #fff; color: #fff;
padding: 2px 8px; padding: 2px 6px;
border-radius: 10px; border-radius: 10px;
} }
@keyframes pulse-tg { @keyframes pulse-tg {
0% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.7); } 0% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.7); }
70% { box-shadow: 0 0 0 15px rgba(0, 136, 204, 0); } 70% { box-shadow: 0 0 0 12px rgba(0, 136, 204, 0); }
100% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0); }
} }
/* Back to Top */ /* Back to Top */
#back-to-top { #back-to-top {
position: fixed; position: fixed;
bottom: 25px; bottom: 20px;
right: 25px; right: 20px;
display: none; display: none;
z-index: 1001; z-index: 1001;
width: 45px; width: 40px;
height: 45px; height: 40px;
} }
/* Content Cards */ /* Content Cards */
@ -272,33 +276,44 @@ body {
} }
footer { footer {
padding: 50px 0; padding: 40px 0;
text-align: center; text-align: center;
border-top: 1px solid #eee; border-top: 1px solid #eee;
margin-top: 40px; margin-top: 30px;
} }
/* Responsive Adjustments */ /* Responsive Adjustments */
@media (max-width: 768px) { @media (max-width: 991px) {
#sidebar { #sidebar {
margin-left: -var(--sidebar-width); transform: translateX(-100%);
z-index: 2000;
} }
#sidebar.active { #sidebar.active {
margin-left: 0; transform: translateX(0);
} }
#content { #content {
width: 100%;
margin-left: 0; margin-left: 0;
padding: 80px 15px 20px 15px; padding: 85px 12px 20px 12px;
}
.mobile-nav {
display: flex;
} }
.section-title-container h2 { .section-title-container {
font-size: 1.4rem; flex-direction: column;
align-items: flex-start !important;
margin-bottom: 20px !important;
}
.page-title {
font-size: 1.2rem !important;
font-weight: 800;
line-height: 1.4;
} }
.card-header { .card-header {
padding: 12px 15px; padding: 10px 15px;
font-size: 0.95rem; font-size: 0.85rem;
} }
.card-body { .card-body {
@ -306,26 +321,28 @@ footer {
} }
.text-content { .text-content {
font-size: 0.95rem; font-size: 0.9rem;
} }
.watermark-item { .watermark-item {
padding: 50px; padding: 40px;
font-size: 16px;
} }
.tg-float { .content-card {
right: 15px; border-radius: 10px;
bottom: 80px; margin-bottom: 15px;
} }
#back-to-top { /* Stack columns on mobile */
right: 15px; .row.g-3 > .col-md-6 {
bottom: 20px; flex: 0 0 100%;
max-width: 100%;
} }
} }
/* Desktop Hover Effects */ /* Desktop Hover Effects */
@media (min-width: 769px) { @media (min-width: 992px) {
.content-card { .content-card {
transition: transform 0.2s; transition: transform 0.2s;
} }

View File

@ -16,7 +16,7 @@ document.addEventListener('DOMContentLoaded', function () {
// Sidebar Toggle for Desktop (Content button) // Sidebar Toggle for Desktop (Content button)
if (sidebarCollapse) { if (sidebarCollapse) {
sidebarCollapse.addEventListener('click', function () { sidebarCollapse.addEventListener('click', function () {
if (window.innerWidth > 768) { if (window.innerWidth >= 992) {
sidebar.classList.toggle('collapsed'); sidebar.classList.toggle('collapsed');
content.classList.toggle('expanded'); content.classList.toggle('expanded');
// Change icon // Change icon
@ -72,7 +72,7 @@ document.addEventListener('DOMContentLoaded', function () {
// Resize handler to clean up states // Resize handler to clean up states
window.addEventListener('resize', function() { window.addEventListener('resize', function() {
if (window.innerWidth > 768) { if (window.innerWidth >= 992) {
sidebar.classList.remove('active'); sidebar.classList.remove('active');
if (overlay) overlay.style.display = 'none'; if (overlay) overlay.style.display = 'none';
document.body.style.overflow = 'auto'; document.body.style.overflow = 'auto';
@ -81,4 +81,4 @@ document.addEventListener('DOMContentLoaded', function () {
content.classList.remove('expanded'); content.classList.remove('expanded');
} }
}); });
}); });

View File

@ -64,7 +64,7 @@ if (!$step) {
</div> </div>
<!-- Mobile Top Nav --> <!-- Mobile Top Nav -->
<nav class="mobile-nav d-md-none"> <nav class="mobile-nav d-lg-none">
<button type="button" id="sidebarCollapseMobile" class="btn text-white"> <button type="button" id="sidebarCollapseMobile" class="btn text-white">
<i class="bi bi-list"></i> <i class="bi bi-list"></i>
</button> </button>
@ -116,9 +116,9 @@ if (!$step) {
<div id="content"> <div id="content">
<div class="container-fluid"> <div class="container-fluid">
<div class="d-flex justify-content-between align-items-center mb-4 section-title-container"> <div class="d-flex justify-content-between align-items-center mb-4 section-title-container">
<h2><?php echo htmlspecialchars($step['title']); ?> <span class="step-badge">Day <?php echo $current_day; ?></span></h2> <h2 class="page-title"><?php echo htmlspecialchars($step['title']); ?> <span class="step-badge">Day <?php echo $current_day; ?></span></h2>
<!-- Desktop sidebar collapse (optional) --> <!-- Desktop sidebar collapse -->
<button type="button" id="sidebarCollapse" class="btn btn-outline-dark d-none d-md-block"> <button type="button" id="sidebarCollapse" class="btn btn-outline-dark d-none d-lg-block">
<i class="bi bi-text-indent-left"></i> <i class="bi bi-text-indent-left"></i>
</button> </button>
</div> </div>
@ -210,4 +210,4 @@ if (!$step) {
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script> <script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body> </body>
</html> </html>