This commit is contained in:
123 2025-06-26 18:14:06 +08:00
parent 9fc09dc7c4
commit a94d4bac21
5 changed files with 282 additions and 114 deletions

View File

@ -71,12 +71,43 @@
.rotate-180 {
transform: rotate(180deg);
}
.hidden { display: none; }
.container {
max-width: 600px;
margin: 20px auto;
padding: 20px;
border: 1px solid #ddd;
}
.button-group {
display: flex;
gap: 10px;
margin-bottom: 20px;
}
button {
padding: 12px 24px;
border: none;
border-radius: 6px;
background: #409eff;
color: white;
cursor: pointer;
transition: all 0.3s ease;
}
button.active {
background: #67c23a;
box-shadow: 0 0 8px rgba(103, 194, 58, 0.3);
}
.content-box {
padding: 20px;
background: #f9f9f9;
border-radius: 8px;
border: 1px solid #eee;
}
</style>
</head>
<body class="font-sans">
<!-- Top Announcement Bar -->
<div class="bg-blue-900 text-white text-center py-2 px-4">
<p class="text-sm md:text-base" style="text-align: left;">当前时间 <a href="#contact" class="font-semibold underline ml-2">Schedule Now</a></p>
<p class="text-sm md:text-base" style="text-align: left;">当前时间 <a href="#" id="datetime" class="font-semibold underline ml-2"></a></p>
</div>
<!-- Header/Navigation -->
<header class="sticky top-0 z-50 bg-white shadow-sm">
@ -297,10 +328,10 @@
<!-- News Tabs -->
<div class="flex justify-center mb-8 overflow-x-auto">
<div class="flex space-x-2 md:space-x-4">
<button class="tab-btn px-4 py-2 rounded-full bg-blue-600 text-white font-medium whitespace-nowrap" data-tab="all">全部新闻</button>
<button class="tab-btn px-4 py-2 rounded-full bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium whitespace-nowrap" data-tab="awards">财税新闻</button>
<button class="tab-btn px-4 py-2 rounded-full bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium whitespace-nowrap" data-tab="events">活动讲座</button>
<div class="button-group">
<!-- <button class="tab-btn px-4 py-2 rounded-full bg-blue-600 text-white font-medium whitespace-nowrap" data-tab="all">全部新闻</button> -->
<button data-target="div1" onclick="toggleContent('div1')" class="tab-btn px-4 py-2 rounded-full bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium whitespace-nowrap" >财税新闻</button>
<button data-target="div2" onclick="toggleContent('div2')" class="tab-btn px-4 py-2 rounded-full bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium whitespace-nowrap" >活动讲座</button>
<!-- <button class="tab-btn px-4 py-2 rounded-full bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium whitespace-nowrap" data-tab="community">公益服务</button> -->
<!-- <button class="tab-btn px-4 py-2 rounded-full bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium whitespace-nowrap" data-tab="updates">法律动态</button> -->
</div>
@ -308,15 +339,15 @@
</div>
<!-- Horizontal Scrollable News -->
<div class="pb-6 overflow-x-auto">
<div class="flex space-4 w-max gap-6 pb-4 h-[420px]">
<div id="div1" class="pb-6 overflow-x-auto">
<div class="flex space-4 w-max gap-6 pb-4 h-[420px]">
<!-- News Item 1 (Awards) -->
<div class="w-72 flex-shrink-0 border rounded-lg overflow-hidden shadow-sm hover:shadow-md transition" data-tab="awards">
<div class="w-72 flex-shrink-0 border rounded-lg overflow-hidden shadow-sm hover:shadow-md transition" data-tab="awards">
<img src="https://images.unsplash.com/photo-1450101499163-c8848c66ca85" class="w-full h-48 object-cover" alt="新闻图片">
<div class="p-6">
<span class="text-sm text-gray-500">2023-06-15</span>
<h3 class="text-xl font-semibold my-2">本所荣获2023年度最佳所称号</h3>
<p class="text-gray-600 mb-4">在2023年度法律服务评选中本所以卓越的服务和专业的团队获得客户一致好评...</p>
<h3 class="text-xl font-semibold my-2">hangye1</h3>
<p class="text-gray-600 mb-4">本所以卓越的服务和专业的团队获得客户一致好评...</p>
<a href="#" class="text-red-600 font-medium flex items-center">
查看更多 <i class="fas fa-arrow-right ml-2"></i>
</a>
@ -325,11 +356,11 @@
<!-- News Item 2 (Events) -->
<div class="w-72 flex-shrink-0 border rounded-lg overflow-hidden shadow-sm hover:shadow-md transition" data-tab="events">
<img src="https://images.unsplash.com/photo-1581093458171-2d137ff5fe60" class="w-full h-48 object-cover" alt="新闻图片">
<img src="https://images.unsplash.com/photo-1450101499163-c8848c66ca85" class="w-full h-48 object-cover" alt="新闻图片">
<div class="p-6">
<span class="text-sm text-gray-500">2023-05-28</span>
<h3 class="text-xl font-semibold my-2">新劳动法专题讲座圆满举办</h3>
<p class="text-gray-600 mb-4">5月25日我所劳动法律事务部成功举办"新劳动法解读与企业合规管理"专题讲座...</p>
<h3 class="text-xl font-semibold my-2">xinwen1</h3>
<p class="text-gray-600 mb-4"></p>
<a href="#" class="text-red-600 font-medium flex items-center">
查看更多 <i class="fas fa-arrow-right ml-2"></i>
</a>
@ -341,8 +372,8 @@
<img src="https://images.unsplash.com/photo-1522204523234-8729aa6e3d5f" class="w-full h-48 object-cover" alt="新闻图片">
<div class="p-6">
<span class="text-sm text-gray-500">2023-05-10</span>
<h3 class="text-xl font-semibold my-2">公益法律服务进社区活动启动</h3>
<p class="text-gray-600 mb-4">我所积极响应"法律服务下基层"号召,组织律师团队深入社区开展免费法律咨询活动...</p>
<h3 class="text-xl font-semibold my-2">xinwen2</h3>
<p class="text-gray-600 mb-4">aasa</p>
<a href="#" class="text-red-600 font-medium flex items-center">
查看更多 <i class="fas fa-arrow-right ml-2"></i>
</a>
@ -354,8 +385,8 @@
<img src="https://images.unsplash.com/photo-1606326608606-aa0b62935f2b" class="w-full h-48 object-cover" alt="新闻图片">
<div class="p-6">
<span class="text-sm text-gray-500">2023-04-22</span>
<h3 class="text-xl font-semibold my-2">新公司法修订要点解析</h3>
<p class="text-gray-600 mb-4">我所公司法律事务部对新修订的公司法进行详细解读,帮助企业更好适应新法...</p>
<h3 class="text-xl font-semibold my-2">xinwen3</h3>
<p class="text-gray-600 mb-4">...</p>
<a href="#" class="text-red-600 font-medium flex items-center">
查看更多 <i class="fas fa-arrow-right ml-2"></i>
</a>
@ -367,8 +398,78 @@
<img src="https://images.unsplash.com/photo-1469371670807-013ccf25f16a" class="w-full h-48 object-cover" alt="新闻图片">
<div class="p-6">
<span class="text-sm text-gray-500">2023-03-18</span>
<h3 class="text-xl font-semibold my-2">王律师荣膺"年度十佳律师"称号</h3>
<p class="text-gray-600 mb-4">我所合伙人王律师因在知识产权领域的卓越贡献获得2023年度十佳律师称号...</p>
<h3 class="text-xl font-semibold my-2">xinw3</h3>
<p class="text-gray-600 mb-4">...</p>
<a href="#" class="text-blue-600 font-medium flex items-center">
查看更多 <i class="fas fa-arrow-right ml-2"></i>
</a>
</div>
</div>
</div>
</div>
<!-- Horizontal Scrollable News -->
<div id="news2" class="pb-6 overflow-x-auto">
<div class="flex space-4 w-max gap-6 pb-4 h-[420px]">
<!-- News Item 1 (Awards) -->
<div class="w-72 flex-shrink-0 border rounded-lg overflow-hidden shadow-sm hover:shadow-md transition" data-tab="awards">
<img src="https://images.unsplash.com/photo-1450101499163-c8848c66ca85" class="w-full h-48 object-cover" alt="新闻图片">
<div class="p-6">
<span class="text-sm text-gray-500">2023-06-15</span>
<h3 class="text-xl font-semibold my-2">gongsi11</h3>
<p class="text-gray-600 mb-4">本所以卓越的服务和专业的团队获得客户一致好评...</p>
<a href="#" class="text-red-600 font-medium flex items-center">
查看更多 <i class="fas fa-arrow-right ml-2"></i>
</a>
</div>
</div>
<!-- News Item 2 (Events) -->
<div class="w-72 flex-shrink-0 border rounded-lg overflow-hidden shadow-sm hover:shadow-md transition" data-tab="events">
<img src="https://images.unsplash.com/photo-1450101499163-c8848c66ca85" class="w-full h-48 object-cover" alt="新闻图片">
<div class="p-6">
<span class="text-sm text-gray-500">2023-05-28</span>
<h3 class="text-xl font-semibold my-2">xinwen1</h3>
<p class="text-gray-600 mb-4"></p>
<a href="#" class="text-red-600 font-medium flex items-center">
查看更多 <i class="fas fa-arrow-right ml-2"></i>
</a>
</div>
</div>
<!-- News Item 3 (Community) -->
<div class="w-72 flex-shrink-0 border rounded-lg overflow-hidden shadow-sm hover:shadow-md transition" data-tab="community">
<img src="https://images.unsplash.com/photo-1522204523234-8729aa6e3d5f" class="w-full h-48 object-cover" alt="新闻图片">
<div class="p-6">
<span class="text-sm text-gray-500">2023-05-10</span>
<h3 class="text-xl font-semibold my-2">xinwen2</h3>
<p class="text-gray-600 mb-4">aasa</p>
<a href="#" class="text-red-600 font-medium flex items-center">
查看更多 <i class="fas fa-arrow-right ml-2"></i>
</a>
</div>
</div>
<!-- News Item 4 (Updates) -->
<div class="w-72 flex-shrink-0 border rounded-lg overflow-hidden shadow-sm hover:shadow-md transition" data-tab="updates">
<img src="https://images.unsplash.com/photo-1606326608606-aa0b62935f2b" class="w-full h-48 object-cover" alt="新闻图片">
<div class="p-6">
<span class="text-sm text-gray-500">2023-04-22</span>
<h3 class="text-xl font-semibold my-2">xinwen3</h3>
<p class="text-gray-600 mb-4">...</p>
<a href="#" class="text-red-600 font-medium flex items-center">
查看更多 <i class="fas fa-arrow-right ml-2"></i>
</a>
</div>
</div>
<!-- News Item 5 (Awards) -->
<div class="w-72 flex-shrink-0 border rounded-lg overflow-hidden shadow-sm hover:shadow-md transition" data-tab="awards">
<img src="https://images.unsplash.com/photo-1469371670807-013ccf25f16a" class="w-full h-48 object-cover" alt="新闻图片">
<div class="p-6">
<span class="text-sm text-gray-500">2023-03-18</span>
<h3 class="text-xl font-semibold my-2">xinw3</h3>
<p class="text-gray-600 mb-4">...</p>
<a href="#" class="text-blue-600 font-medium flex items-center">
查看更多 <i class="fas fa-arrow-right ml-2"></i>
</a>
@ -432,77 +533,80 @@
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
{dreamer-cms:channel typeid="eb286fer" length="9" showall="true" type="son"}
<!-- Practice Area Card 1 -->
<div class="practice-card bg-white p-8 rounded-lg shadow-md transition duration-300">
<div class="text-blue-700 text-4xl mb-4">
<i class="fas fa-gavel"></i>
</div>
<h3 class="text-xl font-bold mb-3 text-gray-800">Criminal Defense</h3>
<p class="text-gray-600 mb-4">Protecting your rights when facing criminal charges with aggressive defense strategies tailored to your case.</p>
<a href="#" class="text-blue-700 font-semibold flex items-center">
<h3 class="text-xl font-bold mb-3 text-gray-800">[field:typenamecn /]</h3>
<p class="text-gray-600 mb-4">提供[field:typenamecn /]</p>
<a href="[field:typeurl/]" class="text-blue-700 font-semibold flex items-center">
查看更多 <i class="fas fa-arrow-right ml-2"></i>
</a>
</div>
{/dreamer-cms:channel}
<!-- Practice Area Card 2 -->
<div class="practice-card bg-white p-8 rounded-lg shadow-md transition duration-300">
<div class="text-amber-700 text-4xl mb-4">
<i class="fas fa-home"></i>
</div>
<h3 class="text-xl font-bold mb-3 text-gray-800">Real Estate Law</h3>
<p class="text-gray-600 mb-4">Expert guidance for property transactions, disputes, and all matters related to real estate law and regulations.</p>
<a href="#" class="text-amber-700 font-semibold flex items-center">
Learn More <i class="fas fa-arrow-right ml-2"></i>
</a>
</div>
<!-- <div class="practice-card bg-white p-8 rounded-lg shadow-md transition duration-300">-->
<!-- <div class="text-amber-700 text-4xl mb-4">-->
<!-- <i class="fas fa-home"></i>-->
<!-- </div>-->
<!-- <h3 class="text-xl font-bold mb-3 text-gray-800">Real Estate Law</h3>-->
<!-- <p class="text-gray-600 mb-4">Expert guidance for property transactions, disputes, and all matters related to real estate law and regulations.</p>-->
<!-- <a href="#" class="text-amber-700 font-semibold flex items-center">-->
<!-- Learn More <i class="fas fa-arrow-right ml-2"></i>-->
<!-- </a>-->
<!-- </div>-->
<!-- Practice Area Card 3 -->
<div class="practice-card bg-white p-8 rounded-lg shadow-md transition duration-300">
<div class="text-amber-700 text-4xl mb-4">
<i class="fas fa-user-tie"></i>
</div>
<h3 class="text-xl font-bold mb-3 text-gray-800">Corporate Law</h3>
<p class="text-gray-600 mb-4">Comprehensive legal solutions for businesses including formation, compliance, mergers, and acquisitions.</p>
<a href="#" class="text-amber-700 font-semibold flex items-center">
Learn More <i class="fas fa-arrow-right ml-2"></i>
</a>
</div>
<!-- <div class="practice-card bg-white p-8 rounded-lg shadow-md transition duration-300">-->
<!-- <div class="text-amber-700 text-4xl mb-4">-->
<!-- <i class="fas fa-user-tie"></i>-->
<!-- </div>-->
<!-- <h3 class="text-xl font-bold mb-3 text-gray-800">Corporate Law</h3>-->
<!-- <p class="text-gray-600 mb-4">Comprehensive legal solutions for businesses including formation, compliance, mergers, and acquisitions.</p>-->
<!-- <a href="#" class="text-amber-700 font-semibold flex items-center">-->
<!-- Learn More <i class="fas fa-arrow-right ml-2"></i>-->
<!-- </a>-->
<!-- </div>-->
<!-- -->
<!-- Practice Area Card 4 -->
<div class="practice-card bg-white p-8 rounded-lg shadow-md transition duration-300">
<div class="text-amber-700 text-4xl mb-4">
<i class="fas fa-heart"></i>
</div>
<h3 class="text-xl font-bold mb-3 text-gray-800">Family Law</h3>
<p class="text-gray-600 mb-4">Sensitive handling of divorce, custody, adoption and other family matters with care and professionalism.</p>
<a href="#" class="text-amber-700 font-semibold flex items-center">
Learn More <i class="fas fa-arrow-right ml-2"></i>
</a>
</div>
<!-- <div class="practice-card bg-white p-8 rounded-lg shadow-md transition duration-300">-->
<!-- <div class="text-amber-700 text-4xl mb-4">-->
<!-- <i class="fas fa-heart"></i>-->
<!-- </div>-->
<!-- <h3 class="text-xl font-bold mb-3 text-gray-800">Family Law</h3>-->
<!-- <p class="text-gray-600 mb-4">Sensitive handling of divorce, custody, adoption and other family matters with care and professionalism.</p>-->
<!-- <a href="#" class="text-amber-700 font-semibold flex items-center">-->
<!-- Learn More <i class="fas fa-arrow-right ml-2"></i>-->
<!-- </a>-->
<!-- </div>-->
<!-- Practice Area Card 5 -->
<div class="practice-card bg-white p-8 rounded-lg shadow-md transition duration-300">
<div class="text-amber-700 text-4xl mb-4">
<i class="fas fa-file-contract"></i>
</div>
<h3 class="text-xl font-bold mb-3 text-gray-800">Contract Law</h3>
<p class="text-gray-600 mb-4">Drafting, reviewing, and enforcing contracts to protect your interests in all business dealings.</p>
<a href="#" class="text-amber-700 font-semibold flex items-center">
Learn More <i class="fas fa-arrow-right ml-2"></i>
</a>
</div>
<!-- <div class="practice-card bg-white p-8 rounded-lg shadow-md transition duration-300">-->
<!-- <div class="text-amber-700 text-4xl mb-4">-->
<!-- <i class="fas fa-file-contract"></i>-->
<!-- </div>-->
<!-- <h3 class="text-xl font-bold mb-3 text-gray-800">Contract Law</h3>-->
<!-- <p class="text-gray-600 mb-4">Drafting, reviewing, and enforcing contracts to protect your interests in all business dealings.</p>-->
<!-- <a href="#" class="text-amber-700 font-semibold flex items-center">-->
<!-- Learn More <i class="fas fa-arrow-right ml-2"></i>-->
<!-- </a>-->
<!-- </div>-->
<!-- Practice Area Card 6 -->
<div class="practice-card bg-white p-8 rounded-lg shadow-md transition duration-300">
<div class="text-amber-700 text-4xl mb-4">
<i class="fas fa-hand-holding-usd"></i>
</div>
<h3 class="text-xl font-bold mb-3 text-gray-800">Personal Injury</h3>
<p class="text-gray-600 mb-4">Aggressive representation to secure maximum compensation for injuries caused by others' negligence.</p>
<a href="#" class="text-amber-700 font-semibold flex items-center">
Learn More <i class="fas fa-arrow-right ml-2"></i>
</a>
</div>
<!-- <div class="practice-card bg-white p-8 rounded-lg shadow-md transition duration-300">-->
<!-- <div class="text-amber-700 text-4xl mb-4">-->
<!-- <i class="fas fa-hand-holding-usd"></i>-->
<!-- </div>-->
<!-- <h3 class="text-xl font-bold mb-3 text-gray-800">Personal Injury</h3>-->
<!-- <p class="text-gray-600 mb-4">Aggressive representation to secure maximum compensation for injuries caused by others' negligence.</p>-->
<!-- <a href="#" class="text-amber-700 font-semibold flex items-center">-->
<!-- Learn More <i class="fas fa-arrow-right ml-2"></i>-->
<!-- </a>-->
<!-- </div>-->
</div>
</div>
</section>
@ -516,8 +620,8 @@
</div>
<div class="lg:w-1/2">
<h2 class="text-3xl md:text-4xl font-bold text-gray-800 mb-6">关于我们</h2>
<p class="text-gray-600 mb-4">Founded in 1987, Advocate & Partners has grown to become one of the most respected law firms in the region, known for our commitment to excellence, integrity, and client-focused service.</p>
<p class="text-gray-600 mb-6">Our team of experienced attorneys works collaboratively to provide comprehensive legal solutions tailored to each client's unique needs and circumstances.</p>
<p class="text-gray-600 mb-4">山东华臻会计师事务所(普通合伙)2005年经山东省财政部批准设立是一家在区域内颇具影响力的提供财税及鉴证服务的专业机构。自成立以来集团公司始终秉持规范执业、稳健经营的理念坚持诚信独立客观公正的原则秉承立足本土、面向国际的视野坚持以客户潜在和现实需求为导向不断开拓并创新高端智力服务产品保持在行业内的领先地位最大限度地提升客户的价值。</p>
<!-- <p class="text-gray-600 mb-6">Our team of experienced attorneys works collaboratively to provide comprehensive legal solutions tailored to each client's unique needs and circumstances.</p>-->
<div class="grid grid-cols-1 sm:grid-cols-2 gap-6 mb-8">
<div class="flex items-start">
@ -652,9 +756,9 @@
<!-- Call to Action -->
<section class="bg-blue-700 py-16">
<div class="container mx-auto px-4 text-center text-white">
<h2 class="text-3xl md:text-4xl font-bold mb-4">Ready to Get Started?</h2>
<p class="text-xl max-w-3xl mx-auto mb-8">Schedule your free initial consultation today and let us help you navigate your legal challenges with confidence.</p>
<button class="bg-white hover:bg-gray-100 text-amber-700 px-8 py-4 text-lg rounded-lg transition duration-300 shadow-lg font-semibold">Contact Us Now <i class="fas fa-arrow-right ml-2"></i></button>
<h2 class="text-3xl md:text-4xl font-bold mb-4">有相关问题或需求?与我们取得联系</h2>
<p class="text-xl max-w-3xl mx-auto mb-8">我们会尽快回复您的咨询,帮助您找到最佳解决方案。我们将提供专业、高效的支持,确保您的权益得到保障。</p>
<button class="bg-white hover:bg-gray-100 text-amber-700 px-8 py-4 text-lg rounded-lg transition duration-300 shadow-lg font-semibold">联系我们 <i class="fas fa-arrow-right ml-2"></i></button>
</div>
</section>
@ -733,37 +837,37 @@
<!-- JavaScript -->
<script>
// News tab functionality
document.addEventListener('DOMContentLoaded', function() {
const tabBtns = document.querySelectorAll('.tab-btn');
const newsItems = document.querySelectorAll('[data-tab]');
// document.addEventListener('DOMContentLoaded', function() {
// const tabBtns = document.querySelectorAll('.tab-btn');
// const newsItems = document.querySelectorAll('[data-tab]');
tabBtns.forEach(btn => {
btn.addEventListener('click', function() {
// Update active tab style
tabBtns.forEach(b => {
b.classList.remove('bg-red-600', 'text-white');
b.classList.add('bg-gray-200', 'text-gray-700', 'hover:bg-gray-300');
});
this.classList.remove('bg-gray-200', 'text-gray-700', 'hover:bg-gray-300');
this.classList.add('bg-red-600', 'text-white');
// tabBtns.forEach(btn => {
// btn.addEventListener('click', function() {
// // Update active tab style
// tabBtns.forEach(b => {
// b.classList.remove('bg-blue-600', 'text-white');
// b.classList.add('bg-gray-200', 'text-gray-700', 'hover:bg-gray-300');
// });
// this.classList.remove('bg-gray-200', 'text-gray-700', 'hover:bg-gray-300');
// this.classList.add('bg-blue-600', 'text-white');
// Filter news items
const tab = this.getAttribute('data-tab');
newsItems.forEach(item => {
if (tab === 'all' || item.getAttribute('data-tab') === tab) {
item.style.display = 'block';
} else {
// item.style.display = 'none';
}
});
});
});
// // Filter news items
// const tab = this.getAttribute('data-tab');
// newsItems.forEach(item => {
// if (tab === 'awards' || item.getAttribute('data-tab') === tab) {
// item.style.display = 'block';
// } else {
// // item.style.display = 'none';
// }
// });
// });
// });
// Initialize - show all news initially
newsItems.forEach(item => {
item.style.display = 'flex'; // Changed to flex for horizontal scrolling
});
});
// // Initialize - show all news initially
// newsItems.forEach(item => {
// item.style.display = 'flex'; // Changed to flex for horizontal scrolling
// });
// });
// Mobile menu toggle and dropdown functionality
document.getElementById('mobile-menu-button').addEventListener('click', function() {
const menu = document.getElementById('mobile-menu');
@ -833,6 +937,70 @@
prevEl: '.swiper-button-prev',
},
});
const datetimeElement = document.getElementById('datetime');
// 页面加载时初始化
window.addEventListener('DOMContentLoaded', function() {
// 触发按钮1的点击事件
document.getElementById('btn1').click();
});
function toggleContent(targetId) {
// 获取所有按钮和内容区域
const buttons = document.querySelectorAll('.button-group button');
const contents = document.querySelectorAll('div[id^="div"]');
// 重置所有按钮状态
buttons.forEach(btn => {
btn.classList.remove('active');
});
// 显示所有内容区域(后续再隐藏不需要的)
contents.forEach(content => {
content.style.display = 'block';
});
// 激活当前按钮
event.target.classList.add('active');
// 隐藏非目标内容
contents.forEach(content => {
if (content.id !== targetId) {
content.style.display = 'none';
}
});
}
function updateDateTime() {
const now = new Date();
// 手动格式化(推荐):
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始
const day = String(now.getDate()).padStart(2, '0');
const hours = String(now.getHours()).padStart(2, '0');
const minutes = String(now.getMinutes()).padStart(2, '0');
const seconds = String(now.getSeconds()).padStart(2, '0');
const weekDays = ['日', '一', '二', '三', '四', '五', '六'];
const weekDay = weekDays[now.getDay()];
// 组合日期时间格式YYYY年MM月DD日 HH:MM:SS
datetimeElement.textContent =
year+"年"+month+"月"+day+"日"+ hours+":"+minutes+":"+seconds+" "+"星期"+weekDay;
/* 自动本地化版本(根据系统设置显示):
datetimeElement.textContent =
now.toLocaleDateString('zh-CN') + ' ' +
now.toLocaleTimeString();
*/
}
// 初始加载
updateDateTime();
// 每秒更新
setInterval(updateDateTime, 1000);
</script>
</body>
</html>

View File

@ -1,8 +1,8 @@
server:
port: 8889
port: 8890
web:
resource-path: D:\projects\dreamer_cms-huazhen\WebResources\
resource-path: D:\projects\dreamer_cms-huazhen\hz-website\WebResources\
spring:
datasource:
name: dev
@ -18,7 +18,7 @@ spring:
port: 6379
timeout: 2000
database: 0
password: 123456
# password: 123456
jedis:
pool:
max-idle: 100

View File

@ -1,5 +1,5 @@
server:
port: 8889
port: 8890
web:
resource-path: /home/web/dreamer-cms/

View File

@ -1,8 +1,8 @@
server:
port: 8889
port: 8890
web:
resource-path: D:\projects\dreamer_cms-huazhen\WebResources\
resource-path: D:\projects\dreamer_cms-huazhen\hz-website\WebResources\
spring:
datasource:
name: dev
@ -18,7 +18,7 @@ spring:
port: 6379
timeout: 2000
database: 0
password: 123456
# password: 123456
jedis:
pool:
max-idle: 100

View File

@ -1,5 +1,5 @@
server:
port: 8889
port: 8890
web:
resource-path: /home/web/dreamer-cms/