vue3实现英皇乐理音乐考试系统原型图ui代码
代码语言:html
所属分类:布局界面
代码描述:vue3实现英皇乐理音乐考试系统原型图ui代码
代码标签: vue 英皇 乐理 音乐 考试 系统 原型图 ui 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>英皇乐理在线考试系统 - 专业版</title>
<!-- 使用 Tailwind CSS 和 Vue.js -->
<script type="text/javascript" src="https://cdn.tailwindcss.com"></script>
<script type="text/javascript" src="https://unpkg.com/vue@3.2.36/dist/vue.global.prod.js"></script>
<!-- 引入 ECharts -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5.5.0/dist/echarts.min.js"></script>
<style>
/* 防止 Vue 初始化时页面闪烁 */
[v-cloak] { display: none; }
/* 页面切换动画 */
.fade-enter-active, .fade-leave-active {
transition: opacity 0.3s ease;
}
.fade-enter-from, .fade-leave-to {
opacity: 0;
}
</style>
</head>
<body class="bg-slate-50 font-sans antialiased">
<div id="app" v-cloak>
<!-- 导航栏 -->
<nav class="bg-white/80 backdrop-blur-md shadow-sm sticky top-0 z-40">
<div class="max-w-screen-xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between items-center h-16">
<!-- Logo 和标题 -->
<div class="flex items-center space-x-3 cursor-pointer" @click="navigateTo('home')">
<div class="flex-shrink-0">
<svg class="h-8 w-8 text-indigo-600" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path d="M12 3.25C12 3.25 6.66667 2.25 5.5 5.75C4.33333 9.25 8.5 11.25 8.5 11.25V18.5C8.5 20.7091 10.2909 22.5 12.5 22.5C14.7091 22.5 16.5 20.7091 16.5 18.5V6.75C17.6667 3.25 22 2.25 22 2.25C22 2.25 17.3333 3.25 16.5 6.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<circle cx="6.5" cy="18.5" r="2" stroke="currentColor" stroke-width="1.5"/>
</svg>
</div>
<h1 class="text-xl font-bold text-slate-800 hidden sm:block">英皇乐理考试系统</h1>
</div>
<!-- 用户菜单 (登录后) -->
<div class="flex items-center space-x-5" v-if="currentUser">
<button @click="navigateTo('dashboard')" class="text-slate-500 hover:text-indigo-600 transition-colors" title="仪表板">
<svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 17v-2a4 4 0 00-4-4H3V9h2a4 4 0 004-4V3l7 4-7 4v2a4 4 0 004 4h2v2H9z"/></svg>
</button>
<button @click="navigateTo('wrongQuestions')" class="text-slate-500 hover:text-red-600 transition-colors" title="错题本">
<svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
</button>
<div class="relative">
<button @click="showUserMenu = !showUserMenu" class="flex items-center space-x-2 text-slate-600 hover:text-indigo-600 transition-colors">
<!-- 图片已更换为 picsum.photos -->
<img :src="`https://picsum.photos/seed/${currentUser.id}/32/32`" class="h-8 w-8 rounded-full ring-2 ring-offset-2 ring-indigo-200">
<span class="hidden md:inline">{{ currentUser.username }}</span>
</button>
<transition name="fade">
<div v-if="showUserMenu" @click.away="showUserMenu = false" class="absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 z-50 ring-1 ring-slate-900/5">
<a @click="logout" class="block px-4 py-2 text-sm text-slate-700 hover:bg-slate-100 hover:text-indigo-600 cursor-pointer">退出登录</a>
</div>
</transition>
</div>
</div>
<!-- 登录/注册按钮 (未登录) -->
<div class="flex space-x-2" v-else>
<button @click="navigateTo('login')" class="px-4 py-2 text-sm font-semibold text-indigo-600 bg-indigo-100 rounded-md hover:bg-indigo-200 transition-colors">登录</button>
<button @click="navigateTo('register')" class="px-4 py-2 text-sm font-semibold text-white bg-indigo-600 rounded-md hover:bg-indigo-700 transition-colors">立即注册</button>
</div>
</div>
</div>
</nav>
<!-- 主要内容区域 -->
<main class="max-w-screen-xl mx-auto py-8 sm:py-12 px-4 sm:px-6 lg:px-8">
<transition name="fade" mode="out-in">
<!-- 首页 -->
<div v-if="currentPage === 'home'" key="home">
<div class="relative text-center mb-16 py-20 px-6 rounded-2xl overflow-hidden bg-slate-800">
<div class="absolute inset-0 bg-gradient-to-br from-indigo-500/30 via-slate-800 to-slate-800"></div>
<div class="absolute -top-1/2 -left-1/2 w-96 h-96 bg-indigo-500/20 rounded-full filter blur-3xl animate-pulse"></div>
<div class="absolute -bottom-1/2 -right-1/2 w-96 h-96 bg-emerald-500/20 rounded-full filter blur-3xl animate-pulse animation-delay-4000"></div>
<div class="relative z-10">
<h2 class="text-4xl md:text-5xl font-extrabold text-white mb-4 tracking-tight">开启您的英皇乐理通关之旅</h2>
<p class="text-xl text-slate-300 mb-8 max-w-3xl mx-auto">系统化题库、智能化分析、全真模拟,助您自信应对每一场考试。</p>
<!-- 图片已更换为 picsum.photos,并选择了一个固定的主题图片 -->
<img src="https://picsum.photos/id/119/1200/500&.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0