sharing-fund-test / index.html
maxium's picture
Add 3 files
b4c8f05 verified
Raw History Blame Contribute Delete
16.7 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fund Dashboard - 015641</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Inter', sans-serif;
background-color: #f8fafc;
}
.bento-box {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: auto auto;
gap: 16px;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
.bento-cell {
border-radius: 12px;
padding: 20px;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
transition: all 0.3s ease;
background-color: white;
}
.bento-cell:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.header-cell {
grid-column: span 4;
background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
color: white;
}
.large-cell {
grid-column: span 2;
}
.performance-up {
color: #10b981;
}
.performance-down {
color: #ef4444;
}
.chart-container {
height: 200px;
position: relative;
}
.sparkline {
width: 100%;
height: 100%;
}
.tooltip {
position: absolute;
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 5px 10px;
border-radius: 4px;
font-size: 12px;
pointer-events: none;
opacity: 0;
transition: opacity 0.2s;
}
@media (max-width: 768px) {
.bento-box {
grid-template-columns: 1fr;
}
.header-cell, .large-cell {
grid-column: span 1;
}
}
</style>
</head>
<body>
<div class="bento-box">
<!-- Header Cell -->
<div class="bento-cell header-cell flex flex-col md:flex-row justify-between items-center">
<div>
<h1 class="text-2xl md:text-3xl font-bold">华夏中证全指证券公司ETF联接C</h1>
<p class="text-blue-100 mt-1">基金代码: 015641 | 成立日期: 2022-04-27</p>
</div>
<div class="mt-4 md:mt-0">
<button class="bg-white text-blue-600 px-4 py-2 rounded-lg font-medium hover:bg-blue-50 transition">
<i class="fas fa-share-alt mr-2"></i>分享
</button>
</div>
</div>
<!-- Performance Summary -->
<div class="bento-cell large-cell">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold">业绩表现</h2>
<span class="text-sm text-gray-500">截至: <span id="current-date"></span></span>
</div>
<div class="grid grid-cols-2 gap-4">
<div class="bg-gray-50 p-4 rounded-lg">
<p class="text-sm text-gray-500">单位净值</p>
<p class="text-2xl font-bold mt-1">0.9313</p>
<p class="text-sm performance-up mt-1">+0.32% <span class="text-gray-500">日涨幅</span></p>
</div>
<div class="bg-gray-50 p-4 rounded-lg">
<p class="text-sm text-gray-500">今年以来</p>
<p class="text-2xl font-bold mt-1 performance-down">-4.23%</p>
<p class="text-sm text-gray-500 mt-1">同类平均: -2.15%</p>
</div>
<div class="bg-gray-50 p-4 rounded-lg">
<p class="text-sm text-gray-500">近1月</p>
<p class="text-2xl font-bold mt-1 performance-up">+1.56%</p>
<p class="text-sm text-gray-500 mt-1">同类排名: 256/892</p>
</div>
<div class="bg-gray-50 p-4 rounded-lg">
<p class="text-sm text-gray-500">近1年</p>
<p class="text-2xl font-bold mt-1 performance-down">-8.72%</p>
<p class="text-sm text-gray-500 mt-1">沪深300: -5.42%</p>
</div>
</div>
</div>
<!-- Net Value Chart -->
<div class="bento-cell large-cell">
<h2 class="text-lg font-semibold mb-4">净值走势</h2>
<div class="chart-container">
<canvas id="netValueChart" class="sparkline"></canvas>
<div class="tooltip" id="chartTooltip"></div>
</div>
<div class="flex justify-between mt-4 text-sm">
<span class="text-gray-500">1个月</span>
<span class="text-gray-500">3个月</span>
<span class="text-gray-500">6个月</span>
<span class="text-gray-500">1年</span>
<span class="text-blue-600 font-medium">今年以来</span>
</div>
</div>
<!-- Basic Info -->
<div class="bento-cell">
<h2 class="text-lg font-semibold mb-4">基本信息</h2>
<div class="space-y-3">
<div>
<p class="text-sm text-gray-500">基金类型</p>
<p class="font-medium">ETF联接基金</p>
</div>
<div>
<p class="text-sm text-gray-500">风险等级</p>
<p class="font-medium">中高风险(R4)</p>
</div>
<div>
<p class="text-sm text-gray-500">基金规模</p>
<p class="font-medium">1.23亿元</p>
</div>
<div>
<p class="text-sm text-gray-500">基金经理</p>
<p class="font-medium">李俊</p>
</div>
<div>
<p class="text-sm text-gray-500">管理费率</p>
<p class="font-medium">0.50%/年</p>
</div>
</div>
</div>
<!-- Asset Allocation -->
<div class="bento-cell">
<h2 class="text-lg font-semibold mb-4">资产配置</h2>
<div class="chart-container">
<canvas id="assetChart" class="sparkline"></canvas>
</div>
<div class="mt-4 space-y-2">
<div class="flex items-center">
<div class="w-3 h-3 bg-blue-500 rounded-full mr-2"></div>
<span class="text-sm">股票投资: 92.45%</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 bg-green-500 rounded-full mr-2"></div>
<span class="text-sm">债券投资: 3.21%</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 bg-yellow-500 rounded-full mr-2"></div>
<span class="text-sm">现金资产: 4.34%</span>
</div>
</div>
</div>
<!-- Top Holdings -->
<div class="bento-cell large-cell">
<h2 class="text-lg font-semibold mb-4">重仓持股</h2>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase">股票名称</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase">占比</th>
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase">涨跌幅</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-4 py-2 whitespace-nowrap text-sm font-medium">中信证券</td>
<td class="px-4 py-2 whitespace-nowrap text-sm">15.23%</td>
<td class="px-4 py-2 whitespace-nowrap text-sm performance-up">+1.2%</td>
</tr>
<tr>
<td class="px-4 py-2 whitespace-nowrap text-sm font-medium">东方财富</td>
<td class="px-4 py-2 whitespace-nowrap text-sm">12.76%</td>
<td class="px-4 py-2 whitespace-nowrap text-sm performance-down">-0.8%</td>
</tr>
<tr>
<td class="px-4 py-2 whitespace-nowrap text-sm font-medium">华泰证券</td>
<td class="px-4 py-2 whitespace-nowrap text-sm">10.45%</td>
<td class="px-4 py-2 whitespace-nowrap text-sm performance-up">+0.5%</td>
</tr>
<tr>
<td class="px-4 py-2 whitespace-nowrap text-sm font-medium">海通证券</td>
<td class="px-4 py-2 whitespace-nowrap text-sm">8.32%</td>
<td class="px-4 py-2 whitespace-nowrap text-sm performance-up">+1.7%</td>
</tr>
<tr>
<td class="px-4 py-2 whitespace-nowrap text-sm font-medium">国泰君安</td>
<td class="px-4 py-2 whitespace-nowrap text-sm">7.89%</td>
<td class="px-4 py-2 whitespace-nowrap text-sm performance-down">-0.3%</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Rating & Risk -->
<div class="bento-cell">
<h2 class="text-lg font-semibold mb-4">评级与风险</h2>
<div class="flex items-center mb-4">
<div class="mr-3">
<div class="w-12 h-12 bg-yellow-400 rounded-full flex items-center justify-center text-white font-bold">A</div>
</div>
<div>
<p class="text-sm text-gray-500">晨星评级</p>
<p class="font-medium">3年评级: ★★★</p>
</div>
</div>
<div class="space-y-3">
<div>
<p class="text-sm text-gray-500">波动率</p>
<div class="w-full bg-gray-200 rounded-full h-2.5 mt-1">
<div class="bg-orange-500 h-2.5 rounded-full" style="width: 65%"></div>
</div>
<p class="text-xs text-gray-500 mt-1">高于85%同类基金</p>
</div>
<div>
<p class="text-sm text-gray-500">夏普比率</p>
<div class="w-full bg-gray-200 rounded-full h-2.5 mt-1">
<div class="bg-blue-500 h-2.5 rounded-full" style="width: 40%"></div>
</div>
<p class="text-xs text-gray-500 mt-1">低于60%同类基金</p>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
// Set current date
const now = new Date();
document.getElementById('current-date').textContent = now.toLocaleDateString('zh-CN');
// Net Value Chart
const netValueCtx = document.getElementById('netValueChart').getContext('2d');
const netValueChart = new Chart(netValueCtx, {
type: 'line',
data: {
labels: Array.from({length: 30}, (_, i) => (i + 1) + '日'),
datasets: [{
label: '单位净值',
data: [0.91, 0.915, 0.92, 0.918, 0.925, 0.928, 0.93, 0.932, 0.935, 0.933,
0.93, 0.928, 0.925, 0.923, 0.92, 0.918, 0.92, 0.922, 0.925, 0.927,
0.929, 0.93, 0.932, 0.934, 0.935, 0.933, 0.931, 0.93, 0.929, 0.9313],
borderColor: '#3b82f6',
backgroundColor: 'rgba(59, 130, 246, 0.05)',
borderWidth: 2,
fill: true,
tension: 0.3,
pointRadius: 0,
pointHoverRadius: 5
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
display: false
},
tooltip: {
mode: 'index',
intersect: false,
callbacks: {
label: function(context) {
return '单位净值: ' + context.parsed.y.toFixed(4);
}
}
}
},
scales: {
x: {
grid: {
display: false
},
ticks: {
display: false
}
},
y: {
grid: {
drawBorder: false
},
ticks: {
display: false
}
}
},
interaction: {
mode: 'nearest',
axis: 'x',
intersect: false
}
}
});
// Asset Allocation Chart
const assetCtx = document.getElementById('assetChart').getContext('2d');
const assetChart = new Chart(assetCtx, {
type: 'doughnut',
data: {
labels: ['股票投资', '债券投资', '现金资产'],
datasets: [{
data: [92.45, 3.21, 4.34],
backgroundColor: [
'#3b82f6',
'#10b981',
'#f59e0b'
],
borderWidth: 0
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
cutout: '70%',
plugins: {
legend: {
display: false
},
tooltip: {
callbacks: {
label: function(context) {
return context.label + ': ' + context.raw + '%';
}
}
}
}
}
});
// Share button functionality
document.querySelector('button').addEventListener('click', function() {
alert('分享链接已复制到剪贴板: https://fund.eastmoney.com/015641.html');
// In a real implementation, you would use the Clipboard API
// navigator.clipboard.writeText('https://fund.eastmoney.com/015641.html');
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=maxium/sharing-fund-test" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>