首页卡片动画、固定滑块
This commit is contained in:
parent
4ab8653cdb
commit
d19398fe7e
@ -24,10 +24,16 @@
|
|||||||
--tooltip-text: black;
|
--tooltip-text: black;
|
||||||
--bg-image: none;
|
--bg-image: none;
|
||||||
--dark-bg-image: none;
|
--dark-bg-image: none;
|
||||||
|
--title-transition: color 0.15s ease-in-out;
|
||||||
}
|
}
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
/* 强制页面内容区域始终显示垂直滚动条 */
|
||||||
|
html {
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: 'Segoe UI', system-ui, sans-serif;
|
font-family: 'Segoe UI', system-ui, sans-serif;
|
||||||
max-width: 1400px;
|
max-width: 1400px;
|
||||||
@ -35,9 +41,10 @@
|
|||||||
padding: 20px;
|
padding: 20px;
|
||||||
background-color: #f8f9fa;
|
background-color: #f8f9fa;
|
||||||
color: #333;
|
color: #333;
|
||||||
transition: background-color 0.3s ease, color 0.3s ease;
|
transition: background-color 0.15s ease-in-out;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 新增私有卡片标记样式 */
|
/* 新增私有卡片标记样式 */
|
||||||
@ -81,7 +88,7 @@
|
|||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.5s ease;
|
transition: opacity 0.3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 视频背景容器 */
|
/* 视频背景容器 */
|
||||||
@ -145,6 +152,7 @@
|
|||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
transition: var(--title-transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 移除导航栏按钮样式 */
|
/* 移除导航栏按钮样式 */
|
||||||
@ -167,7 +175,7 @@
|
|||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
||||||
transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
|
transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out, border-color 0.15s ease-in-out;
|
||||||
}
|
}
|
||||||
.search-results {
|
.search-results {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -179,13 +187,13 @@
|
|||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
display: none;
|
display: none;
|
||||||
transition: background-color 0.3s ease;
|
transition: background-color 0.15s ease-in-out;
|
||||||
}
|
}
|
||||||
.search-result-item {
|
.search-result-item {
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background-color 0.3s ease;
|
transition: background-color 0.15s ease-in-out;
|
||||||
}
|
}
|
||||||
.search-result-item:hover {
|
.search-result-item:hover {
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
@ -367,7 +375,7 @@ body.dark-theme .floating-btn#addBtn {
|
|||||||
z-index: 10;
|
z-index: 10;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||||
transition: background-color 0.3s ease, color 0.3s ease;
|
transition: background-color 0.15s ease-in-out;
|
||||||
margin-left: -15px;
|
margin-left: -15px;
|
||||||
margin-right: -15px;
|
margin-right: -15px;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
@ -585,7 +593,7 @@ body.dark-theme .secondary-filters-container::after {
|
|||||||
border-bottom: 2px solid #e9ecef70;
|
border-bottom: 2px solid #e9ecef70;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
transition: color 0.3s ease, border-color 0.3s ease;
|
transition: var(--title-transition);
|
||||||
}
|
}
|
||||||
.category-title i {
|
.category-title i {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
@ -600,6 +608,18 @@ body.dark-theme .secondary-filters-container::after {
|
|||||||
gap: 20px;
|
gap: 20px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 新增卡片动画样式 */
|
||||||
|
.app-item {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(20px);
|
||||||
|
transition: opacity 0.5s ease, transform 0.5s ease;
|
||||||
|
}
|
||||||
|
.app-item.visible {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 1200px) {
|
@media (max-width: 1200px) {
|
||||||
.app-list {
|
.app-list {
|
||||||
grid-template-columns: repeat(4, 1fr);
|
grid-template-columns: repeat(4, 1fr);
|
||||||
@ -675,7 +695,7 @@ body.dark-theme .secondary-filters-container::after {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
transition: background-color 0.3s ease;
|
transition: background-color 0.15s ease-in-out;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -693,7 +713,7 @@ body.dark-theme .secondary-filters-container::after {
|
|||||||
.app-title {
|
.app-title {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
transition: color 0.3s ease;
|
transition: var(--title-transition);
|
||||||
}
|
}
|
||||||
.app-url {
|
.app-url {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
@ -701,7 +721,7 @@ body.dark-theme .secondary-filters-container::after {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
transition: color 0.3s ease;
|
transition: color 0.15s ease-in-out;
|
||||||
}
|
}
|
||||||
.app-tags {
|
.app-tags {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -1400,6 +1420,20 @@ body.dark-theme .secondary-filters-container::after {
|
|||||||
noResults.textContent = '没有找到匹配的应用';
|
noResults.textContent = '没有找到匹配的应用';
|
||||||
appListContainer.appendChild(noResults);
|
appListContainer.appendChild(noResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加卡片动画效果
|
||||||
|
animateCards();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加卡片动画效果
|
||||||
|
function animateCards() {
|
||||||
|
const cards = document.querySelectorAll('.app-item');
|
||||||
|
cards.forEach((card, index) => {
|
||||||
|
// 使用setTimeout实现卡片依次出现的效果
|
||||||
|
setTimeout(() => {
|
||||||
|
card.classList.add('visible');
|
||||||
|
}, index * 10); // 每个卡片间隔50ms
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 辅助函数:计算对比色
|
// 辅助函数:计算对比色
|
||||||
@ -1655,11 +1689,12 @@ body.dark-theme .secondary-filters-container::after {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 主题切换功能
|
// 主题切换功能
|
||||||
// 主题切换功能
|
|
||||||
function setupThemeSwitcher() {
|
function setupThemeSwitcher() {
|
||||||
const themeToggle = document.getElementById('themeToggle');
|
const themeToggle = document.getElementById('themeToggle');
|
||||||
|
|
||||||
themeToggle.addEventListener('click', () => {
|
themeToggle.addEventListener('click', () => {
|
||||||
|
// 使用requestAnimationFrame确保在浏览器重绘前完成所有样式变更
|
||||||
|
requestAnimationFrame(() => {
|
||||||
// 确定新主题
|
// 确定新主题
|
||||||
const newTheme = document.body.classList.contains('dark-theme') ? 'light' : 'dark';
|
const newTheme = document.body.classList.contains('dark-theme') ? 'light' : 'dark';
|
||||||
|
|
||||||
@ -1705,6 +1740,7 @@ function setupThemeSwitcher() {
|
|||||||
localStorage.setItem('navSettings', JSON.stringify(settingsToSave));
|
localStorage.setItem('navSettings', JSON.stringify(settingsToSave));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 简洁模式切换
|
// 简洁模式切换
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user