<script setup lang="ts">
import { ref } from 'vue'

const links = [
  { name: 'Java 笔记', path: '/java/', icon: '☕', description: 'Java技术栈学习笔记' },
  { name: 'Vue 笔记', path: '/vue/', icon: '💚', description: 'Vue框架学习笔记' }
]
</script>

<template>
  <div class="cafe">
    <div class="cafe-header">
      <span class="cafe-icon">☕</span>
      <span class="cafe-title">咖啡厅</span>
    </div>
    <div class="cafe-links">
      <a
        v-for="link in links"
        :key="link.path"
        :href="link.path"
        class="cafe-link"
      >
        <span class="link-icon">{{ link.icon }}</span>
        <div class="link-info">
          <span class="link-name">{{ link.name }}</span>
          <span class="link-desc">{{ link.description }}</span>
        </div>
      </a>
    </div>
  </div>
</template>

<style scoped>
.cafe {
  height: 100%;
  color: white;
}

.cafe-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.cafe-icon {
  font-size: 24px;
}

.cafe-title {
  font-size: 18px;
  font-weight: 600;
}

.cafe-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cafe-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: white;
  transition: all 0.2s ease;
}

.cafe-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.link-icon {
  font-size: 24px;
}

.link-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-name {
  font-size: 14px;
  font-weight: 500;
}

.link-desc {
  font-size: 12px;
  opacity: 0.7;
}
</style>
