356 lines
11 KiB
HTML
356 lines
11 KiB
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<html lang="zh-CN">
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
|
<title>[ISS] Filelist</title>
|
||
|
|
<style>
|
||
|
|
* {
|
||
|
|
margin: 0;
|
||
|
|
padding: 0;
|
||
|
|
box-sizing: border-box;
|
||
|
|
font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
|
||
|
|
}
|
||
|
|
|
||
|
|
body {
|
||
|
|
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
|
||
|
|
color: #fff;
|
||
|
|
min-height: 100vh;
|
||
|
|
padding: 20px;
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
align-items: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.container {
|
||
|
|
max-width: 1000px;
|
||
|
|
width: 100%;
|
||
|
|
padding: 20px;
|
||
|
|
}
|
||
|
|
|
||
|
|
header {
|
||
|
|
text-align: center;
|
||
|
|
margin-bottom: 40px;
|
||
|
|
}
|
||
|
|
|
||
|
|
h1 {
|
||
|
|
font-size: 2.5rem;
|
||
|
|
margin-bottom: 10px;
|
||
|
|
text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
|
||
|
|
}
|
||
|
|
|
||
|
|
.subtitle {
|
||
|
|
font-size: 1.2rem;
|
||
|
|
opacity: 0.9;
|
||
|
|
}
|
||
|
|
|
||
|
|
.file-browser {
|
||
|
|
background: rgba(255, 255, 255, 0.1);
|
||
|
|
backdrop-filter: blur(10px);
|
||
|
|
border-radius: 15px;
|
||
|
|
padding: 25px;
|
||
|
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
||
|
|
margin-bottom: 30px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.folder-grid {
|
||
|
|
display: grid;
|
||
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||
|
|
gap: 20px;
|
||
|
|
margin-bottom: 30px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.folder-item {
|
||
|
|
background: rgba(255, 255, 255, 0.15);
|
||
|
|
border-radius: 10px;
|
||
|
|
padding: 20px;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
transition: all 0.3s ease;
|
||
|
|
cursor: pointer;
|
||
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
||
|
|
text-decoration: none;
|
||
|
|
color: inherit;
|
||
|
|
}
|
||
|
|
|
||
|
|
.folder-item:hover {
|
||
|
|
background: rgba(255, 255, 255, 0.25);
|
||
|
|
transform: translateY(-5px);
|
||
|
|
}
|
||
|
|
|
||
|
|
.folder-icon {
|
||
|
|
width: 50px;
|
||
|
|
height: 50px;
|
||
|
|
margin-right: 15px;
|
||
|
|
flex-shrink: 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
.folder-icon svg {
|
||
|
|
width: 100%;
|
||
|
|
height: 100%;
|
||
|
|
filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
|
||
|
|
}
|
||
|
|
|
||
|
|
.folder-content h3 {
|
||
|
|
font-size: 1.3rem;
|
||
|
|
margin-bottom: 5px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.folder-content p {
|
||
|
|
opacity: 0.8;
|
||
|
|
font-size: 0.9rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.navigation {
|
||
|
|
display: flex;
|
||
|
|
justify-content: space-between;
|
||
|
|
width: 100%;
|
||
|
|
margin-top: 20px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.nav-btn {
|
||
|
|
background: rgba(255, 255, 255, 0.2);
|
||
|
|
border: none;
|
||
|
|
color: white;
|
||
|
|
padding: 12px 25px;
|
||
|
|
border-radius: 50px;
|
||
|
|
cursor: pointer;
|
||
|
|
font-size: 1rem;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
transition: all 0.3s ease;
|
||
|
|
}
|
||
|
|
|
||
|
|
.nav-btn:hover {
|
||
|
|
background: rgba(255, 255, 255, 0.3);
|
||
|
|
}
|
||
|
|
|
||
|
|
.nav-btn:disabled {
|
||
|
|
opacity: 0.5;
|
||
|
|
cursor: not-allowed;
|
||
|
|
}
|
||
|
|
|
||
|
|
.page-indicator {
|
||
|
|
text-align: center;
|
||
|
|
margin: 10px 0;
|
||
|
|
font-size: 1.1rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 为不同学科添加不同的图标颜色 */
|
||
|
|
.chinese { color: #FF9AA2; }
|
||
|
|
.math { color: #FFB7B2; }
|
||
|
|
.english { color: #FFDAC1; }
|
||
|
|
.physics { color: #E2F0CB; }
|
||
|
|
.chemistry { color: #B5EAD7; }
|
||
|
|
.biology { color: #C7CEEA; }
|
||
|
|
.politics { color: #F8B195; }
|
||
|
|
.history { color: #F67280; }
|
||
|
|
.geography { color: #6C5B7B; }
|
||
|
|
|
||
|
|
/* 响应式设计 */
|
||
|
|
@media (max-width: 768px) {
|
||
|
|
.folder-grid {
|
||
|
|
grid-template-columns: 1fr;
|
||
|
|
}
|
||
|
|
|
||
|
|
h1 {
|
||
|
|
font-size: 2rem;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div class="container">
|
||
|
|
<header>
|
||
|
|
<h1>学科文件</h1>
|
||
|
|
<p class="subtitle">点击学科文件夹查看相关内容,下载源:蓝奏云</p>
|
||
|
|
</header>
|
||
|
|
|
||
|
|
<div class="file-browser">
|
||
|
|
<div class="folder-grid" id="folderContainer">
|
||
|
|
<!-- 文件夹将通过JavaScript动态生成 -->
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="page-indicator">
|
||
|
|
页数: <span id="currentPage">1</span> / <span id="totalPages">3</span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="navigation">
|
||
|
|
<button class="nav-btn" id="prevBtn">
|
||
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||
|
|
<path d="M15 18L9 12L15 6" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||
|
|
</svg>
|
||
|
|
上一页
|
||
|
|
</button>
|
||
|
|
<button class="nav-btn" id="nextBtn">
|
||
|
|
下一页
|
||
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||
|
|
<path d="M9 18L15 12L9 6" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||
|
|
</svg>
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
// 学科数据 - 包含密码信息
|
||
|
|
const subjects = [
|
||
|
|
{
|
||
|
|
id: 1,
|
||
|
|
name: "语文",
|
||
|
|
description: "密码:d1iq",
|
||
|
|
iconColor: "chinese",
|
||
|
|
url: "https://snowcloud.lanzoum.com/b0zkfchxi"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 2,
|
||
|
|
name: "数学",
|
||
|
|
description: "密码:6rp9",
|
||
|
|
iconColor: "math",
|
||
|
|
url: "https://snowcloud.lanzoum.com/b0zkf9u4j"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 3,
|
||
|
|
name: "英语",
|
||
|
|
description: "密码:4wxy",
|
||
|
|
iconColor: "english",
|
||
|
|
url: "https://snowcloud.lanzoum.com/b0zkfchyj"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 4,
|
||
|
|
name: "物理",
|
||
|
|
description: "密码:4n48",
|
||
|
|
iconColor: "physics",
|
||
|
|
url: "https://snowcloud.lanzoum.com/b0zkf9u5a"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 5,
|
||
|
|
name: "化学",
|
||
|
|
description: "密码:kc1b",
|
||
|
|
iconColor: "chemistry",
|
||
|
|
url: "https://snowcloud.lanzoum.com/b0zkf9tyd"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 6,
|
||
|
|
name: "生物",
|
||
|
|
description: "密码:dn3m",
|
||
|
|
iconColor: "biology",
|
||
|
|
url: "https://snowcloud.lanzoum.com/b0zkf9u0f"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 7,
|
||
|
|
name: "政治",
|
||
|
|
description: "密码:4xej",
|
||
|
|
iconColor: "politics",
|
||
|
|
url: "https://snowcloud.lanzoum.com/b0zkf9u6b"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 8,
|
||
|
|
name: "历史",
|
||
|
|
description: "密码:i757",
|
||
|
|
iconColor: "history",
|
||
|
|
url: "https://snowcloud.lanzoum.com/b0zkf9u3i"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
id: 9,
|
||
|
|
name: "地理",
|
||
|
|
description: "密码:dwrz",
|
||
|
|
iconColor: "geography",
|
||
|
|
url: "https://snowcloud.lanzoum.com/b0zkf9u2h"
|
||
|
|
}
|
||
|
|
];
|
||
|
|
|
||
|
|
// 分页设置
|
||
|
|
const itemsPerPage = 6;
|
||
|
|
let currentPage = 1;
|
||
|
|
const totalPages = Math.ceil(subjects.length / itemsPerPage);
|
||
|
|
|
||
|
|
// DOM元素
|
||
|
|
const folderContainer = document.getElementById('folderContainer');
|
||
|
|
const prevBtn = document.getElementById('prevBtn');
|
||
|
|
const nextBtn = document.getElementById('nextBtn');
|
||
|
|
const currentPageSpan = document.getElementById('currentPage');
|
||
|
|
const totalPagesSpan = document.getElementById('totalPages');
|
||
|
|
|
||
|
|
// 初始化总页数
|
||
|
|
totalPagesSpan.textContent = totalPages;
|
||
|
|
|
||
|
|
// 文件夹图标SVG
|
||
|
|
const folderIconSVG = (colorClass) => `
|
||
|
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||
|
|
<path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z" fill="currentColor"/>
|
||
|
|
</svg>
|
||
|
|
`;
|
||
|
|
|
||
|
|
// 显示当前页的文件夹
|
||
|
|
function displayCurrentPage() {
|
||
|
|
folderContainer.innerHTML = '';
|
||
|
|
currentPageSpan.textContent = currentPage;
|
||
|
|
|
||
|
|
const startIndex = (currentPage - 1) * itemsPerPage;
|
||
|
|
const endIndex = Math.min(startIndex + itemsPerPage, subjects.length);
|
||
|
|
|
||
|
|
for (let i = startIndex; i < endIndex; i++) {
|
||
|
|
const subject = subjects[i];
|
||
|
|
|
||
|
|
// 创建链接元素
|
||
|
|
const folderLink = document.createElement('a');
|
||
|
|
folderLink.className = 'folder-item';
|
||
|
|
folderLink.href = subject.url;
|
||
|
|
folderLink.target = '_blank'; // 在新标签页打开
|
||
|
|
|
||
|
|
folderLink.innerHTML = `
|
||
|
|
<div class="folder-icon ${subject.iconColor}">
|
||
|
|
${folderIconSVG()}
|
||
|
|
</div>
|
||
|
|
<div class="folder-content">
|
||
|
|
<h3>${subject.name}</h3>
|
||
|
|
<p>${subject.description}</p>
|
||
|
|
</div>
|
||
|
|
`;
|
||
|
|
|
||
|
|
folderContainer.appendChild(folderLink);
|
||
|
|
}
|
||
|
|
|
||
|
|
// 更新按钮状态
|
||
|
|
prevBtn.disabled = currentPage === 1;
|
||
|
|
nextBtn.disabled = currentPage === totalPages;
|
||
|
|
}
|
||
|
|
|
||
|
|
// 上一页
|
||
|
|
prevBtn.addEventListener('click', () => {
|
||
|
|
if (currentPage > 1) {
|
||
|
|
currentPage--;
|
||
|
|
displayCurrentPage();
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
// 下一页
|
||
|
|
nextBtn.addEventListener('click', () => {
|
||
|
|
if (currentPage < totalPages) {
|
||
|
|
currentPage++;
|
||
|
|
displayCurrentPage();
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
// 初始化显示
|
||
|
|
displayCurrentPage();
|
||
|
|
|
||
|
|
// 添加键盘导航支持
|
||
|
|
document.addEventListener('keydown', (e) => {
|
||
|
|
if (e.key === 'ArrowLeft' && currentPage > 1) {
|
||
|
|
currentPage--;
|
||
|
|
displayCurrentPage();
|
||
|
|
} else if (e.key === 'ArrowRight' && currentPage < totalPages) {
|
||
|
|
currentPage++;
|
||
|
|
displayCurrentPage();
|
||
|
|
}
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<div class="footer">
|
||
|
|
© 2025 * S.A. | SNOWARE
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
</html>
|