文件补充

This commit is contained in:
skxjx2024. 2025-05-05 08:12:39 +08:00
parent 6dff7c03ed
commit 706b09013d
7 changed files with 2141 additions and 0 deletions

265
about.html Normal file
View File

@ -0,0 +1,265 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="images/favicon.png">
<title>计算机协会 - 协会介绍</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>
<body>
<!-- 导航栏 -->
<header>
<div class="container">
<nav>
<div class="logo">
<img id="logoImage" src="images/skx-w.png" alt="石科信计算机协会">
</div>
<button class="hamburger" id="hamburger">
<span></span>
<span></span>
<span></span>
<span></span>
</button>
<ul class="nav-links">
<li><a href="/">首页</a></li>
<li><a href="/about" class="active">协会介绍</a></li>
<li><a href="/platform">协会平台</a></li>
<li><a href="https://news.skxjx.holytreasure.space/">信息中心</a></li>
<li><a href="https://git.holytreasure.space/holytreasure/">加入我们</a></li>
<li>
<label class="theme-switch">
<input type="checkbox" id="themeToggle">
<span class="slider round">
<i class="fas fa-moon icon moon"></i>
<i class="fas fa-sun icon sun"></i>
</span>
</label>
</li>
</ul>
</nav>
</div>
</header>
<!-- 移动端导航菜单 -->
<div class="mobile-nav" id="mobileNav">
<button class="close-btn" id="closeBtn">
<i class="fas fa-times"></i>
</button>
<ul class="mobile-nav-links">
<li><a href="/">首页</a></li>
<li><a href="/about" class="active">协会介绍</a></li>
<li><a href="/platform">协会平台</a></li>
<li><a href="https://news.skxjx.holytreasure.space/">信息中心</a></li>
<li><a href="https://git.holytreasure.space/holytreasure/">加入我们</a></li>
</ul>
<div class="mobile-theme-toggle">
<span>暗黑模式</span>
<label class="theme-switch">
<input type="checkbox" id="mobileThemeToggle">
<span class="slider round">
<i class="fas fa-moon icon moon"></i>
<i class="fas fa-sun icon sun"></i>
</span>
</label>
</div>
</div>
<!-- 页面标题区域 -->
<section class="page-header">
<div class="container">
<h1 class="page-title">协会介绍</h1>
<p class="page-subtitle">探索计算机协会的使命、愿景与价值观,了解我们的组织架构和辉煌历程</p>
</div>
</section>
<!-- 协会简介 -->
<section class="content-section">
<div class="container">
<h2 class="section-title">协会简介</h2>
<p class="section-description">计算机协会成立于2010年是由一群热爱计算机技术的在校学生自发组织的学术性团体致力于推动校园计算机文化发展和技术创新。</p>
<div class="about-intro">
<div class="about-image">
<img src="images/about-intro.jpg" alt="协会活动照片">
</div>
<div class="about-text">
<h3>我们的使命</h3>
<p>计算机协会以"技术改变生活,创新引领未来"为宗旨,致力于为全校师生提供一个学习、交流和实践计算机技术的平台。</p>
<p>我们定期举办技术讲座、编程竞赛、项目开发等活动,帮助会员提升专业技能,培养创新思维,为未来的职业发展打下坚实基础。</p>
<p>协会下设技术部、宣传部、外联部和项目管理部四个部门,各部门分工协作,共同推动协会发展。</p>
<a href="#join" class="btn">加入我们</a>
</div>
</div>
</div>
</section>
<!-- 组织架构 -->
<section class="org-structure">
<div class="container">
<h2 class="section-title">组织架构</h2>
<p class="section-description">计算机协会采用扁平化管理结构,各部门分工明确,协同合作,确保协会高效运转。</p>
<div class="org-chart">
<div class="org-level">
<!-- 第一行 -->
<div class="org-node">
<h4>指导老师</h4>
<p>提供专业指导与支持</p>
</div>
</div>
<div class="org-connection"></div>
<div class="org-level">
<!-- 第二行 -->
<div class="org-node">
<h4>会长</h4>
<p>负责协会整体规划与决策</p>
</div>
<div class="org-node">
<h4>副会长</h4>
<p>协助会长管理协会事务</p>
</div>
</div>
<div class="org-connection"></div>
<div class="org-level">
<!-- 第三行 -->
<div class="org-node">
<h4>软件部</h4>
<p>负责软件开发与技术研究</p>
</div>
<div class="org-node">
<h4>硬件部</h4>
<p>负责硬件开发与维护</p>
</div>
<div class="org-node">
<h4>秘书处</h4>
<p>负责日常事务与协调工作</p>
</div>
</div>
</div>
</div>
</section>
<!-- 发展历程 -->
<section class="content-section">
<div class="container">
<h2 class="section-title">发展历程</h2>
<p class="section-description">回顾计算机协会从创立至今的重要里程碑,见证我们的成长与蜕变。</p>
<div class="timeline">
<div class="timeline-item">
<div class="timeline-content">
<div class="timeline-date">2010年9月</div>
<h3 class="timeline-title">计算机协会成立</h3>
<p class="timeline-desc">由5名计算机爱好者发起正式成立计算机协会首批会员20人。</p>
</div>
</div>
<div class="timeline-item">
<div class="timeline-content">
<div class="timeline-date">2012年3月</div>
<h3 class="timeline-title">首届编程大赛</h3>
<p class="timeline-desc">成功举办校内首届编程大赛吸引100余名学生参与。</p>
</div>
</div>
<div class="timeline-item">
<div class="timeline-content">
<div class="timeline-date">2015年10月</div>
<h3 class="timeline-title">开源项目启动</h3>
<p class="timeline-desc">首个开源项目"校园助手"在GitHub上线获得100+星标。</p>
</div>
</div>
<div class="timeline-item">
<div class="timeline-content">
<div class="timeline-date">2018年5月</div>
<h3 class="timeline-title">校企合作</h3>
<p class="timeline-desc">与3家知名IT企业建立合作关系提供实习机会。</p>
</div>
</div>
<div class="timeline-item">
<div class="timeline-content">
<div class="timeline-date">2020年12月</div>
<h3 class="timeline-title">会员突破500人</h3>
<p class="timeline-desc">协会规模扩大,成为校内最具影响力的学术社团之一。</p>
</div>
</div>
<div class="timeline-item">
<div class="timeline-content">
<div class="timeline-date">2023年至今</div>
<h3 class="timeline-title">持续创新</h3>
<p class="timeline-desc">开展AI、区块链等前沿技术研究培养创新型人才。</p>
</div>
</div>
</div>
</div>
</section>
<!-- 荣誉展示 -->
<section class="honors">
<div class="container">
<h2 class="section-title">荣誉展示</h2>
<p class="section-description">计算机协会成员在各类竞赛和项目中取得的优异成绩,是我们共同的骄傲。</p>
<div class="honors-grid">
<div class="honor-card">
<div class="honor-image">
<img src="images/honor1.jpg" alt="全国大学生程序设计竞赛">
</div>
<div class="honor-content">
<div class="honor-date">2022年11月</div>
<h3 class="honor-title">全国大学生程序设计竞赛</h3>
<p class="honor-desc">协会代表队获得全国一等奖,创造了学校在该赛事中的最佳成绩。</p>
</div>
</div>
<div class="honor-card">
<div class="honor-image">
<img src="images/honor2.jpg" alt="最佳学生社团">
</div>
<div class="honor-content">
<div class="honor-date">2021年12月</div>
<h3 class="honor-title">最佳学生社团</h3>
<p class="honor-desc">连续三年荣获学校"最佳学生社团"称号,表彰协会的突出贡献。</p>
</div>
</div>
<div class="honor-card">
<div class="honor-image">
<img src="images/honor3.jpg" alt="开源社区贡献奖">
</div>
<div class="honor-content">
<div class="honor-date">2023年3月</div>
<h3 class="honor-title">开源社区贡献奖</h3>
<p class="honor-desc">协会开源项目获得国内知名开源社区颁发的"年度最佳贡献奖"。</p>
</div>
</div>
</div>
</div>
</section>
<!-- 页脚 -->
<footer>
<div class="container">
<ul class="footer-links">
<li><a href="/about">关于我们</a></li>
<li><a href="/contact">联系我们</a></li>
<li><a href="https://git.holytreasure.space/">Git仓库</a></li>
<li><a href="#">隐私政策</a></li>
</ul>
<p class="copyright">© 2023 计算机协会. 保留所有权利.</p>
</div>
</footer>
<script src="js/about.js"></script>
</body>
</html>

798
css/style.css Normal file
View File

@ -0,0 +1,798 @@
/* 全局样式 - 默认暗黑模式 */
:root {
--primary-color: #0a192f;
--secondary-color: #64ffda;
--text-primary: #ccd6f6;
--text-secondary: #8892b0;
--white: #e6f1ff;
--bg-color: #0a192f;
--card-bg: rgba(10, 25, 47, 0.8);
--footer-bg: #020c1b;
--section-bg: rgba(100, 255, 218, 0.03);
--header-bg: rgba(10, 25, 47, 0.9);
}
/* 亮色模式 */
[data-theme="light"] {
--primary-color: #f8f9fa;
--secondary-color: #007bff;
--text-primary: #212529;
--text-secondary: #495057;
--white: #ffffff;
--bg-color: #f8f9fa;
--card-bg: rgba(255, 255, 255, 0.9);
--footer-bg: #e9ecef;
--section-bg: rgba(0, 123, 255, 0.03);
--header-bg: rgba(248, 249, 250, 0.9);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
transition: background-color 0.3s ease, color 0.3s ease;
}
body {
background-color: var(--bg-color);
color: var(--text-primary);
line-height: 1.6;
}
a {
text-decoration: none;
color: var(--secondary-color);
transition: all 0.3s ease;
}
a:hover {
color: var(--white);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
.btn {
display: inline-block;
padding: 12px 28px;
background: transparent;
color: var(--secondary-color);
border: 1px solid var(--secondary-color);
border-radius: 4px;
font-size: 16px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
}
.btn:hover {
background: rgba(100, 255, 218, 0.1);
transform: translateY(-3px);
}
[data-theme="light"] .btn:hover {
background: rgba(0, 123, 255, 0.1);
}
/* 导航栏 */
header {
position: fixed;
top: 0;
left: 0;
right: 0;
background-color: var(--header-bg);
backdrop-filter: blur(10px);
z-index: 1000;
padding: 20px 0;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 24px;
font-weight: 700;
color: var(--secondary-color);
}
.nav-links {
display: flex;
list-style: none;
align-items: center;
}
.nav-links li {
margin-left: 30px;
}
.nav-links a {
color: var(--text-primary);
font-size: 16px;
font-weight: 500;
}
.nav-links a:hover {
color: var(--secondary-color);
}
.logo img {
width: auto;
height: 50px;
}
/* 汉堡菜单按钮 */
.hamburger {
display: none;
cursor: pointer;
width: 30px;
height: 21px;
position: relative;
z-index: 1001;
background: none;
border: none;
padding: 0;
}
.hamburger span {
display: block;
position: absolute;
height: 3px;
width: 100%;
background: var(--text-primary);
border-radius: 3px;
opacity: 1;
left: 0;
transform: rotate(0deg);
transition: .25s ease-in-out;
}
.hamburger span:nth-child(1) {
top: 0;
}
.hamburger span:nth-child(2),
.hamburger span:nth-child(3) {
top: 9px;
}
.hamburger span:nth-child(4) {
top: 18px;
}
.hamburger.open span:nth-child(1) {
top: 9px;
width: 0%;
left: 50%;
}
.hamburger.open span:nth-child(2) {
transform: rotate(45deg);
}
.hamburger.open span:nth-child(3) {
transform: rotate(-45deg);
}
.hamburger.open span:nth-child(4) {
top: 9px;
width: 0%;
left: 50%;
}
/* 主题切换开关 */
.theme-switch {
position: relative;
display: inline-block;
width: 60px;
height: 30px;
margin-left: 20px;
}
.theme-switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
transition: .4s;
border-radius: 34px;
}
.slider:before {
position: absolute;
content: "";
height: 22px;
width: 22px;
left: 4px;
bottom: 4px;
background-color: white;
transition: .4s;
border-radius: 50%;
}
input:checked+.slider {
background-color: var(--secondary-color);
}
input:checked+.slider:before {
transform: translateX(30px);
}
.slider .icon {
position: absolute;
top: 50%;
transform: translateY(-50%);
font-size: 14px;
color: white;
}
.slider .moon {
left: 8px;
}
.slider .sun {
right: 8px;
}
/* 移动端导航菜单 */
.mobile-nav {
position: fixed;
top: 0;
right: -100%;
width: 80%;
max-width: 300px;
height: 100vh;
background: var(--header-bg);
backdrop-filter: blur(10px);
z-index: 1000;
padding: 80px 30px 30px;
transition: right 0.3s ease;
overflow-y: auto;
}
.mobile-nav.open {
right: 0;
}
.mobile-nav-links {
list-style: none;
}
.mobile-nav-links li {
margin-bottom: 20px;
}
.mobile-nav-links a {
color: var(--text-primary);
font-size: 18px;
display: block;
padding: 10px 0;
}
.mobile-nav-links a:hover {
color: var(--secondary-color);
}
.mobile-theme-toggle {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid var(--text-secondary);
}
.mobile-theme-toggle span {
color: var(--text-primary);
font-size: 16px;
}
/* 页面标题区域 */
.page-header {
padding: 150px 0 80px;
text-align: center;
background: linear-gradient(to right, rgba(10, 25, 47, 0.9), rgba(10, 25, 47, 0.7));
position: relative;
overflow: hidden;
}
[data-theme="light"] .page-header {
background: linear-gradient(to right, rgba(248, 249, 250, 0.9), rgba(248, 249, 250, 0.7));
}
.page-header::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('images/about-bg.jpg') center/cover no-repeat;
z-index: -1;
opacity: 0.2;
}
.page-title {
font-size: 48px;
margin-bottom: 20px;
color: var(--secondary-color);
}
.page-subtitle {
font-size: 20px;
color: var(--text-secondary);
max-width: 800px;
margin: 0 auto;
}
/* 内容区域 */
.content-section {
padding: 80px 0;
}
.section-title {
text-align: center;
font-size: 36px;
margin-bottom: 60px;
position: relative;
}
.section-title::after {
content: '';
display: block;
width: 80px;
height: 3px;
background: var(--secondary-color);
margin: 15px auto 0;
}
.section-description {
max-width: 800px;
margin: 0 auto 50px;
text-align: center;
color: var(--text-secondary);
font-size: 18px;
}
/* 协会简介 */
.about-intro {
display: flex;
align-items: center;
gap: 50px;
margin-bottom: 60px;
}
.about-image {
flex: 1;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.about-image img {
width: 100%;
height: auto;
display: block;
transition: transform 0.5s ease;
}
.about-image:hover img {
transform: scale(1.05);
}
.about-text {
flex: 1;
}
.about-text h3 {
font-size: 28px;
margin-bottom: 20px;
color: var(--secondary-color);
}
.about-text p {
margin-bottom: 15px;
line-height: 1.8;
}
/* 组织架构 */
.org-structure {
background: var(--section-bg);
padding: 80px 0;
}
.org-chart {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
margin-top: 50px;
}
.org-level {
display: flex;
justify-content: center;
align-items: flex-start;
width: 100%;
position: relative;
margin-bottom: 20px;
}
.org-node {
background: var(--card-bg);
padding: 20px;
border-radius: 8px;
text-align: center;
width: 200px;
margin: 0 15px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
position: relative;
z-index: 1;
}
.org-node h4 {
color: var(--secondary-color);
margin-bottom: 10px;
font-size: 18px;
}
.org-node p {
color: var(--text-secondary);
font-size: 14px;
margin: 0;
}
/* 垂直连接线 */
.org-connection.vertical {
width: 2px;
height: 30px;
background: var(--secondary-color);
margin: 0 auto;
position: relative;
}
/* 水平连接线(用于副会长到各部门) */
.org-connections.horizontal {
display: flex;
justify-content: center;
width: 100%;
position: relative;
height: 30px;
margin: 10px 0;
}
.org-connections.horizontal .org-connection {
flex: 1;
max-width: 100px;
height: 2px;
background: var(--secondary-color);
position: relative;
margin: 0 5px;
}
/* 连接线箭头 */
.org-connection::after {
content: '';
position: absolute;
width: 8px;
height: 8px;
border-right: 2px solid var(--secondary-color);
border-bottom: 2px solid var(--secondary-color);
transform: rotate(45deg);
bottom: -4px;
right: 0;
}
.org-connection.vertical::after {
right: -3px;
bottom: 0;
transform: rotate(45deg);
}
/* 响应式设计 - 小屏幕改为垂直排列 */
@media (max-width: 768px) {
.org-level {
flex-direction: column;
align-items: center;
margin-bottom: 0;
}
.org-node {
margin: 0 0 30px 0;
}
.org-connection.vertical {
height: 20px;
width: 2px;
}
.org-connections.horizontal {
display: none;
}
/* 移动端连接线 */
.org-node::after {
content: '';
position: absolute;
bottom: -15px;
left: 50%;
transform: translateX(-50%);
width: 2px;
height: 15px;
background: var(--secondary-color);
}
.org-node:last-child::after {
display: none;
}
}
/* 发展历程 */
.timeline {
position: relative;
max-width: 1000px;
margin: 0 auto;
padding: 40px 0;
}
.timeline::before {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 2px;
height: 100%;
background: var(--secondary-color);
transform: translateX(-50%);
}
.timeline-item {
position: relative;
margin-bottom: 50px;
width: 100%;
}
.timeline-item:nth-child(odd) {
padding-right: 50%;
text-align: right;
}
.timeline-item:nth-child(even) {
padding-left: 50%;
text-align: left;
}
.timeline-content {
background: var(--card-bg);
padding: 20px;
border-radius: 8px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
position: relative;
}
.timeline-content::before {
content: '';
position: absolute;
width: 20px;
height: 20px;
background: var(--secondary-color);
border-radius: 50%;
top: 20px;
}
.timeline-item:nth-child(odd) .timeline-content::before {
right: -60px;
}
.timeline-item:nth-child(even) .timeline-content::before {
left: -60px;
}
.timeline-date {
color: var(--secondary-color);
font-weight: bold;
margin-bottom: 10px;
}
.timeline-title {
font-size: 20px;
margin-bottom: 10px;
}
.timeline-desc {
color: var(--text-secondary);
}
/* 荣誉展示 */
.honors {
background: var(--section-bg);
padding: 80px 0;
}
.honors-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 30px;
margin-top: 50px;
}
.honor-card {
background: var(--card-bg);
border-radius: 8px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
}
.honor-card:hover {
transform: translateY(-10px);
}
.honor-image {
height: 200px;
overflow: hidden;
}
.honor-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.5s ease;
}
.honor-card:hover .honor-image img {
transform: scale(1.1);
}
.honor-content {
padding: 20px;
}
.honor-title {
font-size: 20px;
margin-bottom: 10px;
}
.honor-date {
color: var(--secondary-color);
font-size: 14px;
margin-bottom: 10px;
}
.honor-desc {
color: var(--text-secondary);
font-size: 15px;
}
/* 页脚 */
footer {
background: var(--footer-bg);
padding: 50px 0 20px;
text-align: center;
}
.footer-links {
display: flex;
justify-content: center;
list-style: none;
margin-bottom: 30px;
}
.footer-links li {
margin: 0 15px;
}
.copyright {
color: var(--text-secondary);
font-size: 14px;
}
/* 响应式设计 */
@media (max-width: 992px) {
.about-intro {
flex-direction: column;
}
.about-image {
width: 100%;
}
.nav-links {
display: none;
}
.hamburger {
display: block;
}
}
@media (max-width: 768px) {
.page-title {
font-size: 36px;
}
.page-subtitle {
font-size: 16px;
}
.section-title {
font-size: 28px;
}
.timeline::before {
left: 30px;
}
.timeline-item:nth-child(odd),
.timeline-item:nth-child(even) {
padding: 0 0 0 70px;
text-align: left;
}
.timeline-item:nth-child(odd) .timeline-content::before,
.timeline-item:nth-child(even) .timeline-content::before {
left: 20px;
}
.honors-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 480px) {
.page-title {
font-size: 32px;
}
.theme-switch {
width: 50px;
height: 25px;
margin-left: 15px;
}
.slider:before {
height: 18px;
width: 18px;
bottom: 3.5px;
left: 3.5px;
}
input:checked+.slider:before {
transform: translateX(25px);
}
.slider .icon {
font-size: 12px;
}
}
.close-btn {
position: absolute;
top: 20px;
right: 20px;
background: none;
border: none;
color: var(--text-primary);
font-size: 24px;
cursor: pointer;
z-index: 1001;
}
.close-btn:hover {
color: var(--secondary-color);
}

149
js/about.js Normal file
View File

@ -0,0 +1,149 @@
// 获取主题切换开关元素
const themeToggle = document.getElementById('themeToggle');
const mobileThemeToggle = document.getElementById('mobileThemeToggle');
// 获取 logo 图片元素
const logoImage = document.getElementById('logoImage');
// 根据主题模式更新 logo 图片
function updateLogoImage() {
const currentTheme = document.documentElement.getAttribute('data-theme');
if (currentTheme === 'light') {
logoImage.src = './images/skx-b.png'; // 亮色模式图片
} else {
logoImage.src = './images/skx-w.png'; // 暗色模式图片
}
}
// 初始化时设置 logo 图片
updateLogoImage();
// 平滑滚动
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// 导航栏滚动效果
window.addEventListener('scroll', function () {
const header = document.querySelector('header');
if (window.scrollY > 50) {
header.style.boxShadow = '0 5px 20px rgba(0, 0, 0, 0.1)';
} else {
header.style.boxShadow = 'none';
}
});
// 汉堡菜单功能
const hamburger = document.getElementById('hamburger');
const mobileNav = document.getElementById('mobileNav');
hamburger.addEventListener('click', function () {
this.classList.toggle('open');
mobileNav.classList.toggle('open');
// 切换body的overflow以防止页面滚动
if (mobileNav.classList.contains('open')) {
document.body.style.overflow = 'hidden';
} else {
document.body.style.overflow = '';
}
});
// 关闭移动菜单当点击菜单项
document.querySelectorAll('.mobile-nav-links a').forEach(link => {
link.addEventListener('click', function () {
hamburger.classList.remove('open');
mobileNav.classList.remove('open');
document.body.style.overflow = '';
});
});
const closeBtn = document.getElementById('closeBtn');
closeBtn.addEventListener('click', function () {
hamburger.classList.remove('open');
mobileNav.classList.remove('open');
document.body.style.overflow = '';
});
// 检查本地存储中的主题偏好
const currentTheme = localStorage.getItem('theme') || 'dark';
document.documentElement.setAttribute('data-theme', currentTheme);
updateThemeToggle(currentTheme);
updateLogoImage(); // 初始化时也更新logo图片
// 切换主题
function toggleTheme() {
const currentTheme = document.documentElement.getAttribute('data-theme');
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
document.documentElement.setAttribute('data-theme', newTheme);
localStorage.setItem('theme', newTheme);
updateThemeToggle(newTheme);
updateLogoImage(); // 主题切换时更新logo图片
}
// 更新主题切换状态
function updateThemeToggle(theme) {
const isLight = theme === 'light';
themeToggle.checked = isLight;
mobileThemeToggle.checked = isLight;
}
// 添加事件监听器
themeToggle.addEventListener('change', toggleTheme);
mobileThemeToggle.addEventListener('change', toggleTheme);
// 时间轴动画效果
function animateTimeline() {
const timelineItems = document.querySelectorAll('.timeline-item');
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.style.opacity = '1';
entry.target.style.transform = 'translateY(0)';
}
});
}, { threshold: 0.1 });
timelineItems.forEach((item, index) => {
item.style.opacity = '0';
item.style.transform = 'translateY(20px)';
item.style.transition = `opacity 0.5s ease ${index * 0.1}s, transform 0.5s ease ${index * 0.1}s`;
observer.observe(item);
});
}
// 荣誉卡片动画效果
function animateHonorCards() {
const honorCards = document.querySelectorAll('.honor-card');
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.style.opacity = '1';
entry.target.style.transform = 'translateY(0)';
}
});
}, { threshold: 0.1 });
honorCards.forEach((card, index) => {
card.style.opacity = '0';
card.style.transform = 'translateY(20px)';
card.style.transition = `opacity 0.5s ease ${index * 0.1}s, transform 0.5s ease ${index * 0.1}s`;
observer.observe(card);
});
}
// 页面加载完成后执行动画
document.addEventListener('DOMContentLoaded', function() {
animateTimeline();
animateHonorCards();
});

861
加入我们/index.html Normal file
View File

@ -0,0 +1,861 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="images/favicon.png">
<title>计算机协会 - 加入我们</title>
<style>
/* 全局样式 - 默认暗黑模式 */
:root {
--primary-color: #0a192f;
--secondary-color: #64ffda;
--text-primary: #ccd6f6;
--text-secondary: #8892b0;
--white: #e6f1ff;
--bg-color: #0a192f;
--card-bg: rgba(10, 25, 47, 0.8);
--footer-bg: #020c1b;
--news-bg: rgba(100, 255, 218, 0.03);
--link-card-bg: rgba(100, 255, 218, 0.05);
--header-bg: rgba(10, 25, 47, 0.9);
}
/* 亮色模式 */
[data-theme="light"] {
--primary-color: #f8f9fa;
--secondary-color: #007bff;
--text-primary: #212529;
--text-secondary: #495057;
--white: #ffffff;
--bg-color: #f8f9fa;
--card-bg: rgba(255, 255, 255, 0.9);
--footer-bg: #e9ecef;
--news-bg: rgba(0, 123, 255, 0.03);
--link-card-bg: rgba(0, 123, 255, 0.05);
--header-bg: rgba(248, 249, 250, 0.9);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
transition: background-color 0.3s ease, color 0.3s ease;
}
body {
background-color: var(--bg-color);
color: var(--text-primary);
line-height: 1.6;
}
a {
text-decoration: none;
color: var(--secondary-color);
transition: all 0.3s ease;
}
a:hover {
color: var(--white);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
.btn {
display: inline-block;
padding: 12px 28px;
background: transparent;
color: var(--secondary-color);
border: 1px solid var(--secondary-color);
border-radius: 4px;
font-size: 16px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
}
.btn:hover {
background: rgba(100, 255, 218, 0.1);
transform: translateY(-3px);
}
[data-theme="light"] .btn:hover {
background: rgba(0, 123, 255, 0.1);
}
/* 导航栏 */
header {
position: fixed;
top: 0;
left: 0;
right: 0;
background-color: var(--header-bg);
backdrop-filter: blur(10px);
z-index: 1000;
padding: 20px 0;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 24px;
font-weight: 700;
color: var(--secondary-color);
}
.nav-links {
display: flex;
list-style: none;
align-items: center;
}
.nav-links li {
margin-left: 30px;
}
.nav-links a {
color: var(--text-primary);
font-size: 16px;
font-weight: 500;
}
.nav-links a:hover {
color: var(--secondary-color);
}
.logo img {
width: auto;
height: 50px;
}
/* 汉堡菜单按钮 */
.hamburger {
display: none;
cursor: pointer;
width: 30px;
height: 21px;
position: relative;
z-index: 1001;
background: none;
border: none;
padding: 0;
}
.hamburger span {
display: block;
position: absolute;
height: 3px;
width: 100%;
background: var(--text-primary);
border-radius: 3px;
opacity: 1;
left: 0;
transform: rotate(0deg);
transition: .25s ease-in-out;
}
.hamburger span:nth-child(1) {
top: 0;
}
.hamburger span:nth-child(2),
.hamburger span:nth-child(3) {
top: 9px;
}
.hamburger span:nth-child(4) {
top: 18px;
}
.hamburger.open span:nth-child(1) {
top: 9px;
width: 0%;
left: 50%;
}
.hamburger.open span:nth-child(2) {
transform: rotate(45deg);
}
.hamburger.open span:nth-child(3) {
transform: rotate(-45deg);
}
.hamburger.open span:nth-child(4) {
top: 9px;
width: 0%;
left: 50%;
}
/* 主题切换开关 */
.theme-switch {
position: relative;
display: inline-block;
width: 60px;
height: 30px;
margin-left: 20px;
}
.theme-switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
transition: .4s;
border-radius: 34px;
}
.slider:before {
position: absolute;
content: "";
height: 22px;
width: 22px;
left: 4px;
bottom: 4px;
background-color: white;
transition: .4s;
border-radius: 50%;
}
input:checked+.slider {
background-color: var(--secondary-color);
}
input:checked+.slider:before {
transform: translateX(30px);
}
.slider .icon {
position: absolute;
top: 50%;
transform: translateY(-50%);
font-size: 14px;
color: white;
}
.slider .moon {
left: 8px;
}
.slider .sun {
right: 8px;
}
/* 移动端导航菜单 */
.mobile-nav {
position: fixed;
top: 0;
right: -100%;
width: 80%;
max-width: 300px;
height: 100vh;
background: var(--header-bg);
backdrop-filter: blur(10px);
z-index: 1000;
padding: 80px 30px 30px;
transition: right 0.3s ease;
overflow-y: auto;
}
.mobile-nav.open {
right: 0;
}
.mobile-nav-links {
list-style: none;
}
.mobile-nav-links li {
margin-bottom: 20px;
}
.mobile-nav-links a {
color: var(--text-primary);
font-size: 18px;
display: block;
padding: 10px 0;
}
.mobile-nav-links a:hover {
color: var(--secondary-color);
}
.mobile-theme-toggle {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid var(--text-secondary);
}
.mobile-theme-toggle span {
color: var(--text-primary);
font-size: 16px;
}
/* 英雄区域 */
.hero {
height: 100vh;
display: flex;
align-items: center;
padding-top: 80px;
background: linear-gradient(rgba(255, 255, 255, 0.9 rgba(255, 255, 255, 0.9).9)), url('images/join-bg.jpg') no-repeat center center;
background-size: cover;
}
.hero-content {
max-width: 800px;
text-align: center;
margin: 0 auto;
}
.hero-subtitle {
color: var(--secondary-color);
font-size: 18px;
margin-bottom: 20px;
}
.hero-title {
font-size: 60px;
font-weight: 700;
margin-bottom: 20px;
line-height: 1.1;
}
.hero-description {
color: var(--text-secondary);
font-size: 18px;
margin-bottom: 30px;
}
/* 加入我们表单部分 */
.join-section {
padding: 80px 0;
background-color: var(--bg-color);
}
.section-title {
text-align: center;
font-size: 36px;
margin-bottom: 60px;
position: relative;
}
.section-title::after {
content: '';
display: block;
width: 80px;
height: 3px;
background: var(--secondary-color);
margin: 15px auto 0;
}
.form-container {
background: var(--card-bg);
border-radius: 8px;
padding: 40px;
max-width: 800px;
margin: 0 auto;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
/* 部门介绍 */
.departments {
padding: 80px 0;
background: var(--news-bg);
}
.departments-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
}
.department-card {
background: var(--card-bg);
border-radius: 8px;
padding: 30px;
transition: transform 0.3s ease;
}
.department-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.department-icon {
font-size: 40px;
color: var(--secondary-color);
margin-bottom: 20px;
}
.department-title {
font-size: 24px;
margin-bottom: 15px;
color: var(--secondary-color);
}
.department-desc {
color: var(--text-secondary);
margin-bottom: 20px;
}
/* 页脚 */
footer {
background: var(--footer-bg);
padding: 50px 0 20px;
text-align: center;
}
.footer-links {
display: flex;
justify-content: center;
list-style: none;
margin-bottom: 30px;
}
.footer-links li {
margin: 0 15px;
}
.copyright {
color: var(--text-secondary);
font-size: 14px;
}
/* 响应式设计 */
@media (max-width: 992px) {
.hero-title {
font-size: 48px;
}
.nav-links {
display: none;
}
.hamburger {
display: block;
}
}
@media (max-width: 768px) {
.hero-title {
font-size: 36px;
}
.hero-description {
font-size: 16px;
}
.section-title {
font-size: 28px;
}
.form-container {
padding: 30px 20px;
}
.footer-links {
flex-wrap: wrap;
}
.footer-links li {
margin: 10px 15px;
}
}
@media (max-width: 480px) {
.hero-title {
font-size: 32px;
}
.hero-subtitle {
font-size: 16px;
}
.btn {
padding: 10px 20px;
font-size: 14px;
}
.theme-switch {
width: 50px;
height: 25px;
margin-left: 15px;
}
.slider:before {
height: 18px;
width: 18px;
bottom: 3.5px;
left: 3.5px;
}
input:checked+.slider:before {
transform: translateX(25px);
}
.slider .icon {
font-size: 12px;
}
}
.close-btn {
position: absolute;
top: 20px;
right: 20px;
background: none;
border: none;
color: var(--text-primary);
font-size: 24px;
cursor: pointer;
z-index: 1001;
}
.close-btn:hover {
color: var(--secondary-color);
}
</style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>
<body>
<!-- 导航栏 -->
<header>
<div class="container">
<nav>
<div class="logo">
<img id="logoImage" src="images/skx-w.png" alt="石科信计算机协会">
</div>
<button class="hamburger" id="hamburger">
<span></span>
<span></span>
<span></span>
<span></span>
</button>
<ul class="nav-links">
<li><a href="/">首页</a></li>
<li><a href="/about">协会介绍</a></li>
<li><a href="/platform">协会平台</a></li>
<li><a href="https://news.skxjx.holytreasure.space/">信息中心</a></li>
<li><a href="/join" class="active">加入我们</a></li>
<li>
<label class="theme-switch">
<input type="checkbox" id="themeToggle">
<span class="slider round">
<i class="fas fa-moon icon moon"></i>
<i class="fas fa-sun icon sun"></i>
</span>
</label>
</li>
</ul>
</nav>
</div>
</header>
<!-- 移动端导航菜单 -->
<div class="mobile-nav" id="mobileNav">
<button class="close-btn" id="closeBtn">
<i class="fas fa-times"></i>
</button>
<ul class="mobile-nav-links">
<li><a href="/">首页</a></li>
<li><a href="/about">协会介绍</a></li>
<li><a href="/platform">协会平台</a></li>
<li><a href="https://news.skxjx.holytreasure.space/">信息中心</a></li>
<li><a href="/join" class="active">加入我们</a></li>
</ul>
<div class="mobile-theme-toggle">
<span>暗黑模式</span>
<label class="theme-switch">
<input type="checkbox" id="mobileThemeToggle">
<span class="slider round">
<i class="fas fa-moon icon moon"></i>
<i class="fas fa-sun icon sun"></i>
</span>
</label>
</div>
</div>
<!-- 英雄区域 -->
<section class="hero">
<div class="container">
<div class="hero-content">
<p class="hero-subtitle">加入我们的团队</p>
<h1 class="hero-title">成为计算机协会的一员</h1>
<p class="hero-description">
无论你是技术大牛还是初学者,只要对计算机技术充满热情,我们都欢迎你的加入。
在这里,你将有机会参与实际项目,提升技能,结识志同道合的伙伴。
</p>
<a href="#join-form" class="btn">立即申请</a>
</div>
</div>
</section>
<!-- 部门介绍 -->
<section class="departments">
<div class="container">
<h2 class="section-title">我们的部门</h2>
<div class="departments-grid">
<div class="department-card">
<div class="department-icon"><i class="fas fa-code"></i></div>
<h3 class="department-title">开发部</h3>
<p class="department-desc">
负责协会各类软件项目的开发与维护包括网站、小程序、APP等。
我们使用前沿技术栈,实践敏捷开发流程。
</p>
<p><strong>技术方向:</strong>Web开发、移动开发、桌面应用</p>
</div>
<div class="department-card">
<div class="department-icon"><i class="fas fa-shield-alt"></i></div>
<h3 class="department-title">网络安全部</h3>
<p class="department-desc">
研究网络安全技术组织CTF比赛进行安全漏洞挖掘与修复。
保护协会系统和成员信息安全。
</p>
<p><strong>技术方向:</strong>渗透测试、逆向工程、密码学</p>
</div>
<div class="department-card">
<div class="department-icon"><i class="fas fa-robot"></i></div>
<h3 class="department-title">人工智能部</h3>
<p class="department-desc">
探索机器学习、深度学习等AI技术参与各类AI竞赛
开发智能应用解决方案。
</p>
<p><strong>技术方向:</strong>机器学习、计算机视觉、自然语言处理</p>
</div>
<div class="department-card">
<div class="department-icon"><i class="fas fa-gamepad"></i></div>
<h3 class="department-title">游戏开发部</h3>
<p class="department-desc">
从游戏设计到开发实现,创造有趣的游戏作品。
学习Unity、Unreal等游戏引擎的使用。
</p>
<p><strong>技术方向:</strong>游戏设计、图形编程、物理引擎</p>
</div>
<div class="department-card">
<div class="department-icon"><i class="fas fa-chart-line"></i></div>
<h3 class="department-title">数据科学部</h3>
<p class="department-desc">
研究数据分析与可视化技术,处理大规模数据集,
为决策提供数据支持。
</p>
<p><strong>技术方向:</strong>数据分析、数据挖掘、可视化</p>
</div>
<div class="department-card">
<div class="department-icon"><i class="fas fa-users"></i></div>
<h3 class="department-title">运营部</h3>
<p class="department-desc">
负责协会日常运营管理,组织活动策划与执行,
协调各部门工作,维护协会形象。
</p>
<p><strong>工作内容:</strong>活动策划、宣传推广、外联沟通</p>
</div>
</div>
</div>
</section>
<!-- 加入表单 -->
<section class="join-section" id="join-form">
<div class="container">
<h2 class="section-title">申请加入</h2>
<div class="form-container">
<!-- 问卷星表单嵌入 -->
<script type='text/javascript' src='https://www.wjx.top/handler/jqemed.ashx?activity=wdPvJTm&width=760&source=iframe'></script>
<div class="join-info">
<p style="text-align: center; margin-top: 30px; color: var(--text-secondary);">
提交申请后我们将在3个工作日内通过邮件或电话与你联系。<br>
如有任何问题,请联系:<a href="mailto:holytreasure@163.com">holytreasure@163.com</a>
</p>
</div>
</div>
</div>
</section>
<!-- 页脚 -->
<footer>
<div class="container">
<ul class="footer-links">
<li><a href="/about">关于我们</a></li>
<li><a href="/contact">联系我们</a></li>
<li><a href="https://git.holytreasure.space/">Git仓库</a></li>
<li><a href="#">隐私政策</a></li>
</ul>
<p class="copyright">© 2023 计算机协会. 保留所有权利.</p>
</div>
</footer>
<script>
// 获取主题切换开关元素
const themeToggle = document.getElementById('themeToggle');
const mobileThemeToggle = document.getElementById('mobileThemeToggle');
// 获取 logo 图片元素
const logoImage = document.getElementById('logoImage');
// 根据主题模式更新 logo 图片
function updateLogoImage() {
const currentTheme = document.documentElement.getAttribute('data-theme');
if (currentTheme === 'light') {
logoImage.src = './images/skx-b.png'; // 亮色模式图片
} else {
logoImage.src = './images/skx-w.png'; // 暗色模式图片
}
}
// 初始化时设置 logo 图片
updateLogoImage();
// 平滑滚动
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// 导航栏滚动效果
window.addEventListener('scroll', function () {
const header = document.querySelector('header');
if (window.scrollY > 50) {
header.style.boxShadow = '0 5px 20px rgba(0, 0, 0, 0.1)';
} else {
header.style.boxShadow = 'none';
}
});
// 汉堡菜单功能
const hamburger = document.getElementById('hamburger');
const mobileNav = document.getElementById('mobileNav');
hamburger.addEventListener('click', function () {
this.classList.toggle('open');
mobileNav.classList.toggle('open');
// 切换body的overflow以防止页面滚动
if (mobileNav.classList.contains('open')) {
document.body.style.overflow = 'hidden';
} else {
document.body.style.overflow = '';
}
});
// 关闭移动菜单当点击菜单项
document.querySelectorAll('.mobile-nav-links a').forEach(link => {
link.addEventListener('click', function () {
hamburger.classList.remove('open');
mobileNav.classList.remove('open');
document.body.style.overflow = '';
});
});
const closeBtn = document.getElementById('closeBtn');
closeBtn.addEventListener('click', function () {
hamburger.classList.remove('open');
mobileNav.classList.remove('open');
document.body.style.overflow = '';
});
// 检查本地存储中的主题偏好
const currentTheme = localStorage.getItem('theme') || 'dark';
document.documentElement.setAttribute('data-theme', currentTheme);
updateThemeToggle(currentTheme);
updateLogoImage(); // 初始化时也更新logo图片
// 切换主题
function toggleTheme() {
const currentTheme = document.documentElement.getAttribute('data-theme');
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
document.documentElement.setAttribute('data-theme', newTheme);
localStorage.setItem('theme', newTheme);
updateThemeToggle(newTheme);
updateLogoImage(); // 主题切换时更新logo图片
}
// 更新主题切换状态
function updateThemeToggle(theme) {
const isLight = theme === 'light';
themeToggle.checked = isLight;
mobileThemeToggle.checked = isLight;
}
// 添加事件监听器
themeToggle.addEventListener('change', toggleTheme);
mobileThemeToggle.addEventListener('change', toggleTheme);
// 表单加载后调整样式
function adjustFormStyles() {
// 等待表单加载完成
setTimeout(() => {
const formIframe = document.querySelector('iframe');
if (formIframe) {
// 设置iframe宽度为100%
formIframe.style.width = '100%';
// 监听iframe内容加载
formIframe.onload = function() {
try {
// 尝试访问iframe内部文档
const iframeDoc = formIframe.contentDocument || formIframe.contentWindow.document;
// 修改iframe内部样式以适应暗黑模式
if (document.documentElement.getAttribute('data-theme') === 'dark') {
iframeDoc.body.style.backgroundColor = 'transparent';
iframeDoc.body.style.color = '#ccd6f6';
// 修改表单元素样式
const inputs = iframeDoc.querySelectorAll('input, textarea, select');
inputs.forEach(input => {
input.style.backgroundColor = 'rgba(10, 25, 47, 0.8)';
input.style.color = '#ccd6f6';
input.style.borderColor = '#64ffda';
});
// 修改按钮样式
const buttons = iframeDoc.querySelectorAll('button');
buttons.forEach(button => {
button.style.backgroundColor = 'transparent';
button.style.color = '#64ffda';
button.style.borderColor = '#64ffda';
});
}
} catch (e) {
console.log('无法访问iframe内容:', e);
}
};
}
}, 1000);
}
// 页面加载完成后调整表单样式
document.addEventListener('DOMContentLoaded', adjustFormStyles);
</script>
</body>
</html>

45
加入我们/navbar.css Normal file
View File

@ -0,0 +1,45 @@
/* navbar.css */
.navbar {
background-color: #333;
padding: 1rem;
}
.navbar-container {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 1200px;
margin: 0 auto;
}
.navbar-logo {
color: white;
font-weight: bold;
text-decoration: none;
}
.navbar-menu {
display: flex;
list-style: none;
gap: 1rem;
}
.navbar-link {
color: white;
text-decoration: none;
}
.navbar-toggle {
display: none;
cursor: pointer;
}
/* 移动端适配 */
@media (max-width: 768px) {
.navbar-menu {
display: none;
}
.navbar-toggle {
display: block;
}
}

14
加入我们/navbar.html Normal file
View File

@ -0,0 +1,14 @@
<!-- navbar.html -->
<nav class="navbar">
<div class="navbar-container">
<a href="/" class="navbar-logo">网站Logo</a>
<ul class="navbar-menu">
<li class="navbar-item"><a href="/" class="navbar-link">首页</a></li>
<li class="navbar-item"><a href="/survey" class="navbar-link">问卷调查</a></li>
<li class="navbar-item"><a href="/contact" class="navbar-link">联系我们</a></li>
</ul>
<div class="navbar-toggle">
<span class="navbar-toggle-icon"></span>
</div>
</div>
</nav>

9
加入我们/navbar.js Normal file
View File

@ -0,0 +1,9 @@
// navbar.js
document.addEventListener('DOMContentLoaded', function() {
const toggleButton = document.querySelector('.navbar-toggle');
const menu = document.querySelector('.navbar-menu');
toggleButton.addEventListener('click', function() {
menu.style.display = menu.style.display === 'flex' ? 'none' : 'flex';
});
});