1+ <script lang="ts" setup>
2+ /**
3+ * Analytics Dashboard - macOS Style
4+ * Overview of analytics with macOS-inspired design.
5+ */
6+ import { ref } from ' vue'
7+ import Card from ' ../../../components/Dashboard/UI/Card.vue'
8+ import StatsCard from ' ../../../components/Dashboard/UI/StatsCard.vue'
9+
10+ useHead ({
11+ title: ' Dashboard - Analytics' ,
12+ })
13+
14+ const analyticsCards = ref ([
15+ { name: ' Web Analytics' , description: ' Page views, sessions, and user behavior' , icon: ' i-hugeicons-chart-line-data-02' , to: ' /analytics/web' },
16+ { name: ' Blog Analytics' , description: ' Post performance and engagement' , icon: ' i-hugeicons-edit-02' , to: ' /analytics/blog' },
17+ { name: ' Commerce Analytics' , description: ' Sales and revenue insights' , icon: ' i-hugeicons-shopping-cart-01' , to: ' /analytics/commerce/sales' },
18+ { name: ' Marketing Analytics' , description: ' Campaign performance' , icon: ' i-hugeicons-megaphone-02' , to: ' /analytics/marketing' },
19+ { name: ' Events' , description: ' Custom event tracking' , icon: ' i-hugeicons-calendar-03' , to: ' /analytics/events' },
20+ { name: ' Referrers' , description: ' Traffic sources' , icon: ' i-hugeicons-link-01' , to: ' /analytics/referrers' },
21+ { name: ' Pages' , description: ' Top performing pages' , icon: ' i-hugeicons-file-02' , to: ' /analytics/pages' },
22+ { name: ' Countries' , description: ' Geographic distribution' , icon: ' i-hugeicons-globe-02' , to: ' /analytics/countries' },
23+ { name: ' Devices' , description: ' Device breakdown' , icon: ' i-hugeicons-smart-phone-01' , to: ' /analytics/devices' },
24+ { name: ' Browsers' , description: ' Browser usage' , icon: ' i-hugeicons-browser' , to: ' /analytics/browsers' },
25+ ])
26+ </script >
27+
128<template >
229 <div >
3- <h1 >Analytics</h1 >
30+ <!-- Overview Stats -->
31+ <div class =" mb-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4" >
32+ <StatsCard
33+ title =" Page Views"
34+ value =" 124,892"
35+ :trend =" 12"
36+ trend-label =" vs last month"
37+ icon =" i-hugeicons-chart-line-data-02"
38+ icon-bg =" primary"
39+ />
40+ <StatsCard
41+ title =" Unique Visitors"
42+ value =" 45,231"
43+ :trend =" 8"
44+ trend-label =" vs last month"
45+ icon =" i-hugeicons-user-multiple-02"
46+ icon-bg =" success"
47+ />
48+ <StatsCard
49+ title =" Avg. Session"
50+ value =" 4m 32s"
51+ :trend =" -5"
52+ trend-label =" vs last month"
53+ icon =" i-hugeicons-clock-01"
54+ icon-bg =" info"
55+ />
56+ <StatsCard
57+ title =" Bounce Rate"
58+ value =" 32.4%"
59+ :trend =" -3"
60+ trend-label =" Lower is better"
61+ icon =" i-hugeicons-logout-02"
62+ icon-bg =" neutral"
63+ />
64+ </div >
65+
66+ <!-- Analytics Sections -->
67+ <div class =" grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3" >
68+ <RouterLink
69+ v-for =" card in analyticsCards"
70+ :key =" card.name"
71+ :to =" card.to"
72+ class =" block"
73+ >
74+ <Card variant =" default" padding =" md" hoverable clickable >
75+ <div class =" flex items-start gap-4" >
76+ <div class =" p-2.5 rounded-lg bg-blue-500/15 text-blue-600 dark:bg-blue-400/20 dark:text-blue-400 flex-shrink-0" >
77+ <div :class =" [card.icon, 'h-5 w-5']" />
78+ </div >
79+ <div class =" flex-1 min-w-0" >
80+ <h3 class =" text-[14px] font-medium text-neutral-900 dark:text-white" >
81+ {{ card.name }}
82+ </h3 >
83+ <p class =" mt-1 text-[12px] text-neutral-500 dark:text-neutral-400" >
84+ {{ card.description }}
85+ </p >
86+ </div >
87+ <div class =" i-hugeicons-arrow-right-01 h-4 w-4 text-neutral-400 flex-shrink-0" />
88+ </div >
89+ </Card >
90+ </RouterLink >
91+ </div >
492 </div >
5- </template >
93+ </template >
0 commit comments