FutureCloud/public/sitemap.xsl
2025-09-15 16:58:31 +08:00

348 lines
16 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html lang="zh-CN">
<head>
<title>网站地图 - Sitemap</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
line-height: 1.6;
color: #333;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 1200px;
margin: 0 auto;
background: white;
border-radius: 20px;
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
overflow: hidden;
}
.header {
background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
color: white;
padding: 40px;
text-align: center;
position: relative;
overflow: hidden;
}
.header::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
animation: float 20s ease-in-out infinite;
pointer-events: none;
}
@keyframes float {
0%, 100% { transform: translateX(0px) translateY(0px); }
50% { transform: translateX(-20px) translateY(-10px); }
}
.header h1 {
font-size: 3rem;
font-weight: 700;
margin-bottom: 10px;
position: relative;
z-index: 1;
}
.header p {
font-size: 1.2rem;
opacity: 0.9;
position: relative;
z-index: 1;
}
.stats {
display: flex;
justify-content: space-around;
padding: 30px;
background: #f8fafc;
border-bottom: 1px solid #e2e8f0;
}
.stat-item {
text-align: center;
padding: 20px;
background: white;
border-radius: 15px;
box-shadow: 0 4px 6px rgba(0,0,0,0.05);
min-width: 120px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-item:hover {
transform: translateY(-5px);
box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.stat-number {
font-size: 2rem;
font-weight: 700;
color: #4f46e5;
display: block;
}
.stat-label {
color: #64748b;
font-size: 0.9rem;
margin-top: 5px;
}
.content {
padding: 40px;
}
.url-list {
display: grid;
gap: 20px;
}
.url-item {
background: #ffffff;
border: 1px solid #e2e8f0;
border-radius: 15px;
padding: 25px;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.url-item::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 4px;
height: 100%;
background: linear-gradient(135deg, #4f46e5, #7c3aed);
transform: scaleY(0);
transition: transform 0.3s ease;
}
.url-item:hover {
transform: translateX(10px);
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
border-color: #4f46e5;
}
.url-item:hover::before {
transform: scaleY(1);
}
.url-main {
display: flex;
align-items: center;
margin-bottom: 15px;
}
.url-icon {
width: 40px;
height: 40px;
background: linear-gradient(135deg, #4f46e5, #7c3aed);
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 15px;
color: white;
font-weight: bold;
}
.url-link {
color: #4f46e5;
text-decoration: none;
font-weight: 600;
font-size: 1.1rem;
transition: color 0.3s ease;
}
.url-link:hover {
color: #7c3aed;
text-decoration: underline;
}
.url-meta {
display: flex;
gap: 20px;
margin-bottom: 15px;
}
.meta-item {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
background: #f1f5f9;
border-radius: 8px;
font-size: 0.9rem;
color: #64748b;
}
.priority-high { background: #fef3c7; color: #d97706; }
.priority-medium { background: #dbeafe; color: #2563eb; }
.priority-low { background: #f3f4f6; color: #6b7280; }
.lang-links {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.lang-link {
padding: 6px 12px;
background: #e0e7ff;
color: #4338ca;
text-decoration: none;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 500;
transition: all 0.3s ease;
border: 1px solid transparent;
}
.lang-link:hover {
background: #4338ca;
color: white;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(67, 56, 202, 0.3);
}
.footer {
background: #1e293b;
color: #94a3b8;
text-align: center;
padding: 30px;
font-size: 0.9rem;
}
.footer a {
color: #60a5fa;
text-decoration: none;
}
.footer a:hover {
text-decoration: underline;
}
@media (max-width: 768px) {
.header h1 { font-size: 2rem; }
.stats { flex-direction: column; gap: 15px; }
.url-meta { flex-direction: column; gap: 10px; }
.content { padding: 20px; }
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>🗺️ 网站地图</h1>
<p>探索我们网站的所有页面和多语言版本</p>
</div>
<div class="stats">
<div class="stat-item">
<span class="stat-number"><xsl:value-of select="count(//sitemap:url)"/></span>
<div class="stat-label">总页面数</div>
</div>
<div class="stat-item">
<span class="stat-number">3</span>
<div class="stat-label">支持语言</div>
</div>
<div class="stat-item">
<span class="stat-number"><xsl:value-of select="count(//sitemap:url[sitemap:priority='1.0'])"/></span>
<div class="stat-label">高优先级</div>
</div>
<div class="stat-item">
<span class="stat-number"><xsl:value-of select="count(//sitemap:url[sitemap:changefreq='daily'])"/></span>
<div class="stat-label">每日更新</div>
</div>
</div>
<div class="content">
<div class="url-list">
<xsl:for-each select="sitemap:urlset/sitemap:url">
<div class="url-item">
<div class="url-main">
<div class="url-icon">
<xsl:choose>
<xsl:when test="contains(sitemap:loc, '/about')">👥</xsl:when>
<xsl:when test="contains(sitemap:loc, '/services')">🛠️</xsl:when>
<xsl:when test="contains(sitemap:loc, '/solutions')">💡</xsl:when>
<xsl:when test="contains(sitemap:loc, '/pricing')">💰</xsl:when>
<xsl:when test="contains(sitemap:loc, '/news')">📰</xsl:when>
<xsl:when test="contains(sitemap:loc, '/contact')">📞</xsl:when>
<xsl:otherwise>🏠</xsl:otherwise>
</xsl:choose>
</div>
<a href="{sitemap:loc}" class="url-link" target="_blank">
<xsl:value-of select="sitemap:loc"/>
</a>
</div>
<div class="url-meta">
<div class="meta-item">
<span>📅</span>
<span>更新频率: <xsl:value-of select="sitemap:changefreq"/></span>
</div>
<div>
<xsl:attribute name="class">
meta-item
<xsl:choose>
<xsl:when test="sitemap:priority >= 0.8"> priority-high</xsl:when>
<xsl:when test="sitemap:priority >= 0.7"> priority-medium</xsl:when>
<xsl:otherwise> priority-low</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<span></span>
<span>优先级: <xsl:value-of select="sitemap:priority"/></span>
</div>
</div>
<div class="lang-links">
<xsl:for-each select="xhtml:link">
<a href="{@href}" class="lang-link" target="_blank">
<xsl:choose>
<xsl:when test="@hreflang='zh-CN'">🇨🇳 简体中文</xsl:when>
<xsl:when test="@hreflang='zh-TW'">🇹🇼 繁體中文</xsl:when>
<xsl:when test="@hreflang='en'">🇺🇸 English</xsl:when>
<xsl:otherwise><xsl:value-of select="@hreflang"/></xsl:otherwise>
</xsl:choose>
</a>
</xsl:for-each>
</div>
</div>
</xsl:for-each>
</div>
</div>
<div class="footer">
<p>此站点地图包含了网站的所有公开页面 | 生成时间: <script>document.write(new Date().toLocaleString('zh-CN'))</script></p>
<p>支持多语言访问,点击语言标签可切换到对应版本</p>
</div>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>