2025-04-14 13:09:00 +00:00
|
|
|
<template>
|
|
|
|
<div id="app">
|
2025-05-31 22:15:17 +00:00
|
|
|
<!-- Dashboard Layout -->
|
2025-05-31 14:19:08 +00:00
|
|
|
<template v-if="isDashboardLayout">
|
2025-05-31 22:15:17 +00:00
|
|
|
<SidebarMenu :isOpen="isSidebarOpen" @close="isSidebarOpen = false" />
|
2025-05-31 14:19:08 +00:00
|
|
|
<div class="dashboard-page">
|
|
|
|
<div class="content">
|
2025-05-31 22:15:17 +00:00
|
|
|
<AppHeader @toggle-sidebar="toggleSidebar" :pageTitle="$route.meta.title" />
|
2025-05-31 14:19:08 +00:00
|
|
|
<router-view></router-view>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
2025-04-14 13:09:00 +00:00
|
|
|
|
2025-05-31 22:15:17 +00:00
|
|
|
<!-- Sample Layout for SignUp, etc. -->
|
2025-05-31 14:19:08 +00:00
|
|
|
<template v-else>
|
|
|
|
<router-view></router-view>
|
|
|
|
</template>
|
2025-05-03 11:02:18 +00:00
|
|
|
|
2025-05-31 14:19:08 +00:00
|
|
|
<Footer />
|
|
|
|
</div>
|
2025-04-14 13:09:00 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2025-05-31 14:19:08 +00:00
|
|
|
import AppHeader from '@/components/Header.vue';
|
|
|
|
import SidebarMenu from '@/components/SidebarMenu.vue';
|
|
|
|
import Footer from '@/components/Footer.vue';
|
2025-05-03 11:02:18 +00:00
|
|
|
|
2025-04-14 13:09:00 +00:00
|
|
|
export default {
|
|
|
|
name: 'App',
|
2025-05-03 11:02:18 +00:00
|
|
|
components: {
|
2025-05-31 14:19:08 +00:00
|
|
|
Footer,
|
|
|
|
SidebarMenu,
|
|
|
|
AppHeader,
|
|
|
|
},
|
2025-05-31 22:15:17 +00:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
isSidebarOpen: false
|
|
|
|
};
|
|
|
|
},
|
2025-05-31 14:19:08 +00:00
|
|
|
computed: {
|
|
|
|
isDashboardLayout() {
|
|
|
|
return this.$route.meta.requiresAuth === true;
|
2025-05-31 22:15:17 +00:00
|
|
|
}
|
2025-05-31 14:19:08 +00:00
|
|
|
},
|
2025-05-31 22:15:17 +00:00
|
|
|
methods: {
|
|
|
|
toggleSidebar() {
|
|
|
|
this.isSidebarOpen = !this.isSidebarOpen;
|
|
|
|
}
|
|
|
|
}
|
2025-05-31 14:19:08 +00:00
|
|
|
};
|
2025-04-14 13:09:00 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
2025-05-31 22:15:17 +00:00
|
|
|
/* Reset default margins and set base font */
|
2025-04-14 13:09:00 +00:00
|
|
|
body {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
2025-05-31 22:15:17 +00:00
|
|
|
font-family: 'Yekan', 'Arial', sans-serif;
|
|
|
|
background-color: #f4f7fa;
|
2025-04-14 13:09:00 +00:00
|
|
|
}
|
|
|
|
|
2025-05-31 22:15:17 +00:00
|
|
|
/* App title styling */
|
2025-04-14 13:09:00 +00:00
|
|
|
.app-title {
|
2025-05-31 22:15:17 +00:00
|
|
|
color: #fff;
|
|
|
|
font-size: 2rem; /* 32px, using rem for scalability */
|
|
|
|
font-weight: 700;
|
2025-04-14 13:09:00 +00:00
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
2025-05-31 22:15:17 +00:00
|
|
|
/* Main app container */
|
2025-04-14 13:09:00 +00:00
|
|
|
#app {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
min-height: 100vh;
|
|
|
|
}
|
|
|
|
|
2025-05-31 22:15:17 +00:00
|
|
|
/* Router view content */
|
2025-04-14 13:09:00 +00:00
|
|
|
router-view {
|
|
|
|
flex-grow: 1;
|
2025-05-31 22:15:17 +00:00
|
|
|
padding: 1.25rem; /* 20px, using rem for consistency */
|
2025-04-14 13:09:00 +00:00
|
|
|
}
|
2025-05-31 14:19:08 +00:00
|
|
|
|
2025-04-14 13:09:00 +00:00
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
2025-05-31 22:15:17 +00:00
|
|
|
/* Font Face Declaration */
|
2025-04-14 13:09:00 +00:00
|
|
|
@font-face {
|
2025-05-03 11:02:18 +00:00
|
|
|
font-family: 'IRANSans';
|
|
|
|
src: url('@/assets/fonts/IRANSansXFaNum-Medium.ttf') format('truetype');
|
2025-05-31 22:15:17 +00:00
|
|
|
font-weight: 500;
|
2025-04-14 13:09:00 +00:00
|
|
|
font-style: normal;
|
2025-05-31 22:15:17 +00:00
|
|
|
font-display: swap; /* Improves font loading performance */
|
2025-04-14 13:09:00 +00:00
|
|
|
}
|
|
|
|
|
2025-05-31 22:15:17 +00:00
|
|
|
/* Global Font Application */
|
2025-05-03 11:02:18 +00:00
|
|
|
* {
|
|
|
|
font-family: 'IRANSans', sans-serif !important;
|
2025-04-14 13:09:00 +00:00
|
|
|
}
|
2025-05-31 14:19:08 +00:00
|
|
|
|
2025-05-31 22:15:17 +00:00
|
|
|
/* Base Content Styles */
|
2025-05-31 14:19:08 +00:00
|
|
|
.content {
|
|
|
|
background-color: #f8f9fa;
|
|
|
|
border-radius: 20px;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
gap: 32px;
|
2025-05-31 22:15:17 +00:00
|
|
|
padding: 35px 80px;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Responsive Styles */
|
|
|
|
@media (max-width: 520px) {
|
|
|
|
.dashboard-page {
|
|
|
|
padding: 15px 5px;
|
|
|
|
direction: rtl;
|
|
|
|
}
|
|
|
|
|
|
|
|
.content {
|
|
|
|
padding: 5px 15px !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (min-width: 521px) and (max-width: 780px) {
|
|
|
|
.dashboard-page {
|
|
|
|
padding: 15px;
|
|
|
|
direction: rtl;
|
|
|
|
}
|
|
|
|
|
|
|
|
.content {
|
|
|
|
padding: 35px 15px !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (min-width: 781px) and (max-width: 1024px) {
|
|
|
|
.dashboard-page {
|
|
|
|
margin-right: 20rem;
|
|
|
|
padding: 20px;
|
|
|
|
direction: rtl;
|
|
|
|
}
|
|
|
|
|
|
|
|
.content {
|
|
|
|
padding: 15px 45px 45px 0 !important;
|
|
|
|
}
|
2025-05-31 14:19:08 +00:00
|
|
|
}
|
|
|
|
|
2025-05-31 22:15:17 +00:00
|
|
|
@media (min-width: 1025px) {
|
|
|
|
.dashboard-page {
|
|
|
|
margin-right: 20rem;
|
|
|
|
padding: 20px;
|
|
|
|
direction: rtl;
|
|
|
|
}
|
|
|
|
|
|
|
|
.content {
|
|
|
|
padding: 35px 80px !important;
|
|
|
|
}
|
|
|
|
}
|
2025-05-31 14:19:08 +00:00
|
|
|
|
2025-04-14 13:09:00 +00:00
|
|
|
</style>
|