1
This commit is contained in:
@@ -10,7 +10,6 @@
|
|||||||
<title>Github文件加速</title>
|
<title>Github文件加速</title>
|
||||||
<link rel="icon" href="./favicon.ico">
|
<link rel="icon" href="./favicon.ico">
|
||||||
<style>
|
<style>
|
||||||
/* 现代化设计系统 */
|
|
||||||
:root {
|
:root {
|
||||||
--background: #ffffff;
|
--background: #ffffff;
|
||||||
--foreground: #0f172a;
|
--foreground: #0f172a;
|
||||||
@@ -85,7 +84,6 @@
|
|||||||
transition: background-color 0.3s, color 0.3s;
|
transition: background-color 0.3s, color 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 现代化导航栏 */
|
|
||||||
.navbar {
|
.navbar {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -168,7 +166,6 @@
|
|||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 主要内容区域 */
|
|
||||||
.main {
|
.main {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 2rem 1rem;
|
padding: 2rem 1rem;
|
||||||
@@ -204,7 +201,6 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 现代化卡片设计 */
|
|
||||||
.card {
|
.card {
|
||||||
background-color: var(--card);
|
background-color: var(--card);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
@@ -235,7 +231,6 @@
|
|||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 现代化表单设计 */
|
|
||||||
.form-group {
|
.form-group {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
@@ -298,7 +293,6 @@
|
|||||||
background-color: var(--muted);
|
background-color: var(--muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 输出区域 */
|
|
||||||
.output-container {
|
.output-container {
|
||||||
margin-top: 1.5rem;
|
margin-top: 1.5rem;
|
||||||
display: none;
|
display: none;
|
||||||
@@ -338,7 +332,6 @@
|
|||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Docker 信息卡片 */
|
|
||||||
.docker-info {
|
.docker-info {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(20px);
|
transform: translateY(20px);
|
||||||
@@ -363,7 +356,6 @@
|
|||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 黑夜模式下的Docker按钮样式 */
|
|
||||||
.dark .docker-button {
|
.dark .docker-button {
|
||||||
background: linear-gradient(135deg, #374151, #4b5563);
|
background: linear-gradient(135deg, #374151, #4b5563);
|
||||||
}
|
}
|
||||||
@@ -372,7 +364,6 @@
|
|||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 模态框设计 */
|
|
||||||
.modal {
|
.modal {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -446,7 +437,6 @@
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Toast 通知 */
|
|
||||||
.toast {
|
.toast {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 1rem;
|
top: 1rem;
|
||||||
@@ -469,7 +459,6 @@
|
|||||||
transform: translateX(0);
|
transform: translateX(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 页脚 */
|
|
||||||
.footer {
|
.footer {
|
||||||
padding: 2rem 1rem;
|
padding: 2rem 1rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -489,7 +478,6 @@
|
|||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 动画 */
|
|
||||||
@keyframes fadeInUp {
|
@keyframes fadeInUp {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@@ -501,7 +489,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 响应式设计 */
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.hero-title {
|
.hero-title {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
@@ -662,12 +649,10 @@
|
|||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 主题管理
|
const themeToggle = document.getElementById('themeToggle');
|
||||||
const themeToggle = document.getElementById('themeToggle');
|
|
||||||
const html = document.documentElement;
|
const html = document.documentElement;
|
||||||
|
|
||||||
// 初始化主题
|
const savedTheme = localStorage.getItem('theme');
|
||||||
const savedTheme = localStorage.getItem('theme');
|
|
||||||
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||||
|
|
||||||
if (savedTheme === 'dark' || (!savedTheme && prefersDark)) {
|
if (savedTheme === 'dark' || (!savedTheme && prefersDark)) {
|
||||||
@@ -682,15 +667,13 @@
|
|||||||
localStorage.setItem('theme', isDark ? 'dark' : 'light');
|
localStorage.setItem('theme', isDark ? 'dark' : 'light');
|
||||||
});
|
});
|
||||||
|
|
||||||
// 域名设置
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
|
||||||
const fullDomain = window.location.host;
|
const fullDomain = window.location.host;
|
||||||
document.querySelectorAll('.domain-base').forEach(span => {
|
document.querySelectorAll('.domain-base').forEach(span => {
|
||||||
span.textContent = fullDomain;
|
span.textContent = fullDomain;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 模态框管理
|
const modal = document.getElementById('dockerModal');
|
||||||
const modal = document.getElementById('dockerModal');
|
|
||||||
const dockerButton = document.getElementById('dockerButton');
|
const dockerButton = document.getElementById('dockerButton');
|
||||||
const closeButton = document.getElementById('closeModal');
|
const closeButton = document.getElementById('closeModal');
|
||||||
|
|
||||||
@@ -701,8 +684,7 @@
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
// GitHub链接格式化功能
|
function formatGithubLink() {
|
||||||
function formatGithubLink() {
|
|
||||||
const githubLinkInput = document.getElementById('githubLinkInput');
|
const githubLinkInput = document.getElementById('githubLinkInput');
|
||||||
const currentHost = window.location.host;
|
const currentHost = window.location.host;
|
||||||
let formattedLink = "";
|
let formattedLink = "";
|
||||||
@@ -731,8 +713,7 @@
|
|||||||
outputBlock.classList.add('show');
|
outputBlock.classList.add('show');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 复制功能
|
function copyToClipboard() {
|
||||||
function copyToClipboard() {
|
|
||||||
const output = document.getElementById('formattedLinkOutput');
|
const output = document.getElementById('formattedLinkOutput');
|
||||||
const text = output.textContent;
|
const text = output.textContent;
|
||||||
|
|
||||||
@@ -740,9 +721,8 @@
|
|||||||
navigator.clipboard.writeText(text).then(() => {
|
navigator.clipboard.writeText(text).then(() => {
|
||||||
showToast('链接已复制到剪贴板');
|
showToast('链接已复制到剪贴板');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// 降级方案
|
const range = document.createRange();
|
||||||
const range = document.createRange();
|
|
||||||
range.selectNode(output);
|
range.selectNode(output);
|
||||||
window.getSelection().removeAllRanges();
|
window.getSelection().removeAllRanges();
|
||||||
window.getSelection().addRange(range);
|
window.getSelection().addRange(range);
|
||||||
@@ -752,14 +732,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开链接
|
function openLink() {
|
||||||
function openLink() {
|
|
||||||
const formattedLinkOutput = document.getElementById('formattedLinkOutput');
|
const formattedLinkOutput = document.getElementById('formattedLinkOutput');
|
||||||
window.open(formattedLinkOutput.textContent);
|
window.open(formattedLinkOutput.textContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Toast 通知
|
function showToast(message) {
|
||||||
function showToast(message) {
|
|
||||||
const toast = document.getElementById('toast');
|
const toast = document.getElementById('toast');
|
||||||
toast.textContent = message;
|
toast.textContent = message;
|
||||||
toast.classList.add('show');
|
toast.classList.add('show');
|
||||||
@@ -769,13 +747,11 @@
|
|||||||
}, 3000);
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 事件监听
|
document.getElementById('formatButton').addEventListener('click', formatGithubLink);
|
||||||
document.getElementById('formatButton').addEventListener('click', formatGithubLink);
|
|
||||||
document.getElementById('copyButton').addEventListener('click', copyToClipboard);
|
document.getElementById('copyButton').addEventListener('click', copyToClipboard);
|
||||||
document.getElementById('redirButton').addEventListener('click', openLink);
|
document.getElementById('redirButton').addEventListener('click', openLink);
|
||||||
|
|
||||||
// 回车键支持
|
document.getElementById('githubLinkInput').addEventListener('keyup', function(event) {
|
||||||
document.getElementById('githubLinkInput').addEventListener('keyup', function(event) {
|
|
||||||
if (event.key === 'Enter') {
|
if (event.key === 'Enter') {
|
||||||
formatGithubLink();
|
formatGithubLink();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<title>Docker镜像搜索</title>
|
<title>Docker镜像搜索</title>
|
||||||
<link rel="icon" href="./favicon.ico">
|
<link rel="icon" href="./favicon.ico">
|
||||||
<style>
|
<style>
|
||||||
/* 现代化设计系统 */
|
|
||||||
:root {
|
:root {
|
||||||
--background: #ffffff;
|
--background: #ffffff;
|
||||||
--foreground: #0f172a;
|
--foreground: #0f172a;
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
transition: background-color 0.3s, color 0.3s;
|
transition: background-color 0.3s, color 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 现代化导航栏 */
|
|
||||||
.navbar {
|
.navbar {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 主要内容区域 */
|
|
||||||
.main {
|
.main {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 2rem 1rem;
|
padding: 2rem 1rem;
|
||||||
@@ -206,7 +206,7 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 搜索区域 */
|
|
||||||
.search-card {
|
.search-card {
|
||||||
background-color: var(--card);
|
background-color: var(--card);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
@@ -271,7 +271,7 @@
|
|||||||
transform: none;
|
transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 加载状态 */
|
|
||||||
.loading {
|
.loading {
|
||||||
display: none;
|
display: none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -296,7 +296,7 @@
|
|||||||
100% { transform: rotate(360deg); }
|
100% { transform: rotate(360deg); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 结果区域 */
|
|
||||||
.results-container {
|
.results-container {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(20px);
|
transform: translateY(20px);
|
||||||
@@ -327,7 +327,7 @@
|
|||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 结果卡片 */
|
|
||||||
.result-card {
|
.result-card {
|
||||||
background-color: var(--card);
|
background-color: var(--card);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
@@ -408,7 +408,7 @@
|
|||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 分页 */
|
|
||||||
.pagination {
|
.pagination {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -437,7 +437,7 @@
|
|||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 标签详情 */
|
|
||||||
.tag-list {
|
.tag-list {
|
||||||
display: none;
|
display: none;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@@ -451,7 +451,7 @@
|
|||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 标签头部 */
|
|
||||||
.tag-header {
|
.tag-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -594,7 +594,7 @@
|
|||||||
background-color: #1d4ed8;
|
background-color: #1d4ed8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 标签项 */
|
|
||||||
.tag-item {
|
.tag-item {
|
||||||
background-color: var(--card);
|
background-color: var(--card);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
@@ -637,7 +637,7 @@
|
|||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 漏洞指示器 */
|
|
||||||
.vulnerability-indicator {
|
.vulnerability-indicator {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
@@ -657,14 +657,14 @@
|
|||||||
.vulnerability-low { background-color: #28a745; }
|
.vulnerability-low { background-color: #28a745; }
|
||||||
.vulnerability-unknown { background-color: #6c757d; }
|
.vulnerability-unknown { background-color: #6c757d; }
|
||||||
|
|
||||||
/* 组织标签 */
|
|
||||||
.badge-organization {
|
.badge-organization {
|
||||||
background-color: #6c757d;
|
background-color: #6c757d;
|
||||||
color: white;
|
color: white;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 返回按钮 */
|
|
||||||
.back-to-search {
|
.back-to-search {
|
||||||
display: none;
|
display: none;
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
@@ -682,7 +682,7 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Toast 通知 */
|
|
||||||
.toast {
|
.toast {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 1rem;
|
top: 1rem;
|
||||||
@@ -705,7 +705,7 @@
|
|||||||
transform: translateX(0);
|
transform: translateX(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 动画 */
|
|
||||||
@keyframes fadeInUp {
|
@keyframes fadeInUp {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@@ -717,7 +717,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 响应式设计 */
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.hero-title {
|
.hero-title {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
|
|||||||
Reference in New Issue
Block a user