<template>
  <div class="home-container">
    <header class="header">
      <h1>Rspack功能测试页面</h1>
      <p class="subtitle">集成多种功能测试示例</p>
    </header>

    <div class="features-container">
      <div class="feature-category">
        <h2 class="category-title">文档内容爬取</h2>
        <div class="feature-cards">
          <router-link to="/tencent-doc" class="feature-card">
            <div class="card-content">
              <h3>腾讯文档API获取</h3>
              <p>通过API方式获取腾讯文档数据，支持文档导出</p>
            </div>
          </router-link>

          <router-link to="/canvas-ocr" class="feature-card">
            <div class="card-content">
              <h3>Canvas OCR识别</h3>
              <p>通过截图+OCR方式识别Canvas内容</p>
            </div>
          </router-link>
        </div>
      </div>

      <div class="feature-category">
        <h2 class="category-title">图像处理</h2>
        <div class="feature-cards">
          <router-link to="/test" class="feature-card">
            <div class="card-content">
              <h3>OCR文本识别</h3>
              <p>基于Tesseract.js的OCR文本识别</p>
            </div>
          </router-link>

          <router-link to="/test2" class="feature-card">
            <div class="card-content">
              <h3>电子签名</h3>
              <p>实现电子签名功能</p>
            </div>
          </router-link>
        </div>
      </div>

      <div class="feature-category">
        <h2 class="category-title">文档处理</h2>
        <div class="feature-cards">
          <router-link to="/test3" class="feature-card">
            <div class="card-content">
              <h3>Word转HTML</h3>
              <p>将Word文档转换为HTML格式</p>
            </div>
          </router-link>

          <router-link to="/test4" class="feature-card">
            <div class="card-content">
              <h3>Word文档转换</h3>
              <p>将Word文档转换为HTML/图片/PDF格式</p>
            </div>
          </router-link>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
defineOptions({
  name: 'HomePage',
});
</script>

<style scoped>
.home-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.header {
  text-align: center;
  margin-bottom: 40px;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #333;
}

.subtitle {
  font-size: 1.2rem;
  color: #666;
}

.features-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.feature-category {
  margin-bottom: 20px;
}

.category-title {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #2c3e50;
  border-bottom: 2px solid #eaeaea;
  padding-bottom: 10px;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #2c3e50;
}

.card-content p {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .feature-cards {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .header h1 {
    font-size: 2rem;
  }
}
</style> 