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;
min-height: 100vh;
}
@media (max-width: 768px) {
@media (max-width: 991px) {
.sidebar {
width: 100%;
height: auto;
position: relative;
padding-bottom: 10px;
position: fixed;
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 {
margin-left: 0;
padding: 20px;
padding: 80px 15px 20px 15px;
}
.sidebar a { display: inline-block; padding: 10px 15px; }
.sidebar hr { display: none; }
.sidebar a {
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>
</head>
<body>
<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): ?>
<img src="<?php echo htmlspecialchars($site_logo); ?>" alt="Logo" class="img-fluid mb-2" style="max-height: 60px; border-radius: 8px;">
<?php endif; ?>
@ -89,7 +105,6 @@ $site_logo = $settings['site_logo'] ?? 'assets/pasted-20260207-134833-7329dc42.j
</div>
<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>
<hr>
<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>
</div>
@ -135,4 +150,4 @@ $site_logo = $settings['site_logo'] ?? 'assets/pasted-20260207-134833-7329dc42.j
</div>
</div>
</body>
</html>
</html>

View File

@ -79,26 +79,42 @@ if ($edit_day > 0) {
padding: 40px;
min-height: 100vh;
}
@media (max-width: 768px) {
@media (max-width: 991px) {
.sidebar {
width: 100%;
height: auto;
position: relative;
padding-bottom: 10px;
position: fixed;
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 {
margin-left: 0;
padding: 20px;
padding: 80px 15px 20px 15px;
}
.sidebar a { display: inline-block; padding: 10px 15px; }
.sidebar hr { display: none; }
.sidebar a {
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; }
</style>
</head>
<body>
<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): ?>
<img src="<?php echo htmlspecialchars($site_logo); ?>" alt="Logo" class="img-fluid mb-2" style="max-height: 60px; border-radius: 8px;">
<?php endif; ?>
@ -106,7 +122,6 @@ if ($edit_day > 0) {
</div>
<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>
<hr>
<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>
</div>
@ -114,7 +129,7 @@ if ($edit_day > 0) {
<div class="main-content">
<div class="container-fluid">
<div class="d-flex justify-content-between align-items-center mb-4">
<h3>话术管理 (1-7天步骤)</h3>
<h3>话术管理</h3>
</div>
<?php if($message): ?>
@ -208,4 +223,4 @@ if ($edit_day > 0) {
</div>
</div>
</body>
</html>
</html>

View File

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

View File

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

View File

@ -64,7 +64,7 @@ if (!$step) {
</div>
<!-- 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">
<i class="bi bi-list"></i>
</button>
@ -116,9 +116,9 @@ if (!$step) {
<div id="content">
<div class="container-fluid">
<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>
<!-- Desktop sidebar collapse (optional) -->
<button type="button" id="sidebarCollapse" class="btn btn-outline-dark d-none d-md-block">
<h2 class="page-title"><?php echo htmlspecialchars($step['title']); ?> <span class="step-badge">Day <?php echo $current_day; ?></span></h2>
<!-- Desktop sidebar collapse -->
<button type="button" id="sidebarCollapse" class="btn btn-outline-dark d-none d-lg-block">
<i class="bi bi-text-indent-left"></i>
</button>
</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="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body>
</html>
</html>