+
+
+
+ diff --git a/.hintrc b/.hintrc new file mode 100644 index 0000000..cb34607 --- /dev/null +++ b/.hintrc @@ -0,0 +1,8 @@ +{ + "extends": [ + "development" + ], + "hints": { + "no-inline-styles": "off" + } +} \ No newline at end of file diff --git a/static/css/styles.css b/static/css/styles.css new file mode 100644 index 0000000..2c06b3e --- /dev/null +++ b/static/css/styles.css @@ -0,0 +1,347 @@ +/* === CSS Variables === */ +:root { + --primary-color: #1e3799; + --secondary-color: #4a69bd; + --accent-color: #6c5ce7; + --text-color: #ffffff; + --background-color: #f8f9fa; +} + +/* === Base Styles === */ +* { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: 'Segoe UI', sans-serif; +} + +html { + scroll-behavior: smooth; + visibility: hidden; /* 防止FOUC */ +} + +body { + background-color: var(--background-color); + padding-top: 70px; + min-height: 100vh; + display: flex; + flex-direction: column; +} + +/* === Navigation === */ +nav { + position: fixed; + top: 0; + width: 100%; + z-index: 1000; + background: rgba(30, 55, 153, 0.95); + padding: 1rem 5%; + transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); +} + +.nav-scrolled { + background: var(--primary-color) !important; + padding: 0.8rem 5%; + box-shadow: 0 4px 15px rgba(0,0,0,0.2); +} + +.nav-container { + display: flex; + justify-content: space-between; + align-items: center; + max-width: 1200px; + margin: 0 auto; +} + +.logo { + color: var(--text-color); + font-size: 1.8rem; + font-weight: 700; + text-decoration: none; + transition: transform 0.3s ease; +} + +.logo:hover { + transform: translateY(-2px); +} + +.nav-links { + display: flex; + gap: 2rem; + list-style: none; +} + +.nav-links a { + color: var(--text-color); + text-decoration: none; + font-weight: 500; + padding: 0.5rem 1rem; + border-radius: 4px; + transition: all 0.3s ease; +} + +.nav-links a:hover { + background: rgba(255,255,255,0.1); + transform: translateY(-2px); +} + +/* === Slideshow === */ +.slideshow-container { + height: 100vh; + position: relative; + overflow: hidden; + margin-top: -70px; +} + +.slide { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; + transition: opacity 1s ease-in-out; + background-size: cover; + background-position: center; + animation: kenburns 20s infinite; +} + +@keyframes kenburns { + 0% { transform: scale(1); } + 50% { transform: scale(1.05); } + 100% { transform: scale(1); } +} + +.slide.active { + opacity: 1; +} + +.slideshow-container::after { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: linear-gradient( + 45deg, + rgba(30, 55, 153, 0.7) 0%, + rgba(78, 105, 189, 0.3) 100% + ); + z-index: 1; +} + +/* === Loading Spinner === */ +.loading-spinner { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 50px; + height: 50px; + border: 5px solid rgba(255,255,255,0.3); + border-top-color: var(--text-color); + border-radius: 50%; + animation: spin 1s linear infinite; + z-index: 2000; +} + +@keyframes spin { + to { transform: translate(-50%, -50%) rotate(360deg); } +} + +/* === Slide-up Content === */ +.slide-up-content { + transform: translateY(100%); + opacity: 0; + transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); + padding: 6rem 5%; + background: white; + box-shadow: 0 -4px 30px rgba(0,0,0,0.1); + position: relative; + z-index: 100; + border-radius: 30px 30px 0 0; + margin-top: -150px; +} + +.slide-up-content.active { + transform: translateY(0); + opacity: 1; +} + +/* === Three Columns === */ +.three-columns { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 3rem; + max-width: 1200px; + margin: 0 auto; +} + +.column { + padding: 2.5rem; + background: white; + border-radius: 15px; + transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); + box-shadow: 0 5px 25px rgba(0,0,0,0.08); + position: relative; + overflow: hidden; +} + +.column::before { + content: ''; + position: absolute; + top: -50%; + left: -50%; + width: 200%; + height: 200%; + background: linear-gradient( + 45deg, + transparent 45%, + rgba(108, 92, 231, 0.1) 100% + ); + transform: rotate(45deg); + z-index: 0; +} + +.column:hover { + transform: translateY(-10px); + box-shadow: 0 8px 30px rgba(30,55,153,0.15); +} + +.column > * { + position: relative; + z-index: 1; +} + +.column h2 { + color: var(--primary-color); + margin-bottom: 1.5rem; + font-size: 1.5rem; + position: relative; + padding-bottom: 1rem; +} + +.column h2::after { + content: ''; + position: absolute; + bottom: 0; + left: 0; + width: 40px; + height: 3px; + background: var(--accent-color); +} + +/* === Footer === */ +footer { + background: var(--primary-color); + color: var(--text-color); + padding: 4rem 5%; + margin-top: auto; + position: relative; + z-index: 100; +} + +.footer-content { + max-width: 1200px; + margin: 0 auto; + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 3rem; +} + +.footer-section h3 { + margin-bottom: 1.5rem; + font-weight: 600; +} + +.footer-section ul { + list-style: none; +} + +.footer-section a { + color: rgba(255,255,255,0.8); + text-decoration: none; + transition: all 0.3s ease; +} + +.footer-section a:hover { + color: var(--text-color); + padding-left: 0.5rem; +} + +.footer-bottom { + text-align: center; + margin-top: 3rem; + padding-top: 2rem; + border-top: 1px solid rgba(255,255,255,0.15); +} + +/* === Responsive Design === */ +@media (max-width: 1200px) { + .three-columns { + gap: 2rem; + } +} + +@media (max-width: 992px) { + .nav-links { + gap: 1rem; + } + + .three-columns { + grid-template-columns: 1fr; + max-width: 600px; + } + + .column { + margin-bottom: 1.5rem; + } + + .footer-content { + grid-template-columns: repeat(2, 1fr); + } +} + +@media (max-width: 768px) { + .logo { + font-size: 1.5rem; + } + + .nav-links { + display: none; /* 移动端隐藏菜单,需要添加汉堡菜单 */ + } + + .slide-up-content { + padding: 3rem 5%; + } + + .footer-content { + grid-template-columns: 1fr; + } +} + +@media (max-width: 480px) { + body { + padding-top: 60px; + } + + .slide-up-content { + margin-top: -100px; + } + + .column { + padding: 2rem; + } +} +/* 让a标签继承column样式 */ +.column { + display: block; /* 必须设为块级元素 */ + color: inherit; /* 继承字体颜色 */ + text-decoration: none; /* 去除下划线 */ + cursor: pointer; +} +/* 解决火浏览器点击闪烁问题 */ +.column { + backface-visibility: hidden; +} diff --git a/static/image/1.png b/static/image/1.png new file mode 100644 index 0000000..a86c62d Binary files /dev/null and b/static/image/1.png differ diff --git a/static/javascript/index.js b/static/javascript/index.js new file mode 100644 index 0000000..de0057d --- /dev/null +++ b/static/javascript/index.js @@ -0,0 +1,58 @@ +// 轮播图控制 +let currentSlide = 0; +const slides = document.querySelectorAll('.slide'); + +function showSlide(n) { + slides.forEach(slide => { + slide.style.animation = 'none'; + slide.offsetHeight; // 触发重绘 + slide.style.animation = null; + }); + slides.forEach(slide => slide.classList.remove('active')); + slides[n].classList.add('active'); +} + +function nextSlide() { + currentSlide = (currentSlide + 1) % slides.length; + showSlide(currentSlide); +} + +// 初始化轮播 +setInterval(nextSlide, 6000); + +// 滚动动画控制 +const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + entry.target.classList.add('active'); + } + }); +}, { threshold: 0.15 }); + +document.querySelectorAll('.slide-up-content').forEach(content => { + observer.observe(content); +}); + +// 导航栏滚动效果 +window.addEventListener('scroll', () => { + const nav = document.querySelector('nav'); + window.scrollY > 100 ? + nav.classList.add('nav-scrolled') : + nav.classList.remove('nav-scrolled'); +}); + +// 加载状态控制 +window.addEventListener('DOMContentLoaded', () => { + document.documentElement.classList.remove('slideshow-loading'); +}); + +window.addEventListener('load', () => { + const loader = document.querySelector('.loading-spinner'); + if (loader) loader.style.display = 'none'; +}); + +// 防止页面加载时的布局闪烁 +document.documentElement.style.visibility = 'hidden'; +window.addEventListener('load', () => { + document.documentElement.style.visibility = 'visible'; +}); \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..7c6836a --- /dev/null +++ b/templates/index.html @@ -0,0 +1,80 @@ + + +
+ + +