|
| 1 | +<template> |
| 2 | + <footer class="footer-container"> |
| 3 | + <v-divider></v-divider> |
| 4 | + <div class="footer-content pt-5"> |
| 5 | + <div class="footer-text"> |
| 6 | + <span class="copyright"> |
| 7 | + © {{ currentYear }} CourseBench. All rights reserved. |
| 8 | + </span> |
| 9 | + <span class="version-info"> |
| 10 | + v{{ version }} |
| 11 | + <span v-if="buildHash" class="build-hash"> |
| 12 | + (Build: {{ buildHash }}) |
| 13 | + </span> |
| 14 | + <span v-if="buildDate" class="build-date"> |
| 15 | + Last build at: {{ buildDate }} |
| 16 | + </span> |
| 17 | + </span> |
| 18 | + </div> |
| 19 | + </div> |
| 20 | + </footer> |
| 21 | +</template> |
| 22 | + |
| 23 | +<script> |
| 24 | +export default { |
| 25 | + name: 'Footer', |
| 26 | + setup() { |
| 27 | + const currentYear = new Date().getFullYear(); |
| 28 | + const version = process.env.VUE_APP_VERSION || '0.1.0'; |
| 29 | + const buildHash = process.env.VUE_APP_BUILD_HASH || ''; |
| 30 | + const buildDate = process.env.VUE_APP_BUILD_DATE || ''; |
| 31 | +
|
| 32 | + return { |
| 33 | + currentYear, |
| 34 | + version, |
| 35 | + buildHash, |
| 36 | + buildDate, |
| 37 | + }; |
| 38 | + }, |
| 39 | +}; |
| 40 | +</script> |
| 41 | + |
| 42 | +<style scoped> |
| 43 | +.footer-container { |
| 44 | + padding: 30px 20px; |
| 45 | + background-color: #f8f8f9; |
| 46 | + text-align: center; |
| 47 | +} |
| 48 | +
|
| 49 | +.footer-content { |
| 50 | + max-width: 1200px; |
| 51 | + margin: 0 auto; |
| 52 | +} |
| 53 | +
|
| 54 | +.footer-text { |
| 55 | + display: flex; |
| 56 | + flex-direction: column; |
| 57 | + gap: 8px; |
| 58 | + font-size: 0.875rem; |
| 59 | + color: rgba(0, 0, 0, 0.6); |
| 60 | +} |
| 61 | +
|
| 62 | +.copyright { |
| 63 | + font-weight: 500; |
| 64 | +} |
| 65 | +
|
| 66 | +.version-info { |
| 67 | + font-size: 0.8125rem; |
| 68 | + color: rgba(0, 0, 0, 0.5); |
| 69 | +} |
| 70 | +
|
| 71 | +.build-hash { |
| 72 | + font-family: monospace; |
| 73 | + margin-left: 4px; |
| 74 | +} |
| 75 | +
|
| 76 | +.build-date { |
| 77 | + margin-left: 8px; |
| 78 | +} |
| 79 | +
|
| 80 | +/* Dark mode support */ |
| 81 | +@media (prefers-color-scheme: dark) { |
| 82 | + .footer-container { |
| 83 | + background-color: #222222; |
| 84 | + } |
| 85 | +
|
| 86 | + .footer-text { |
| 87 | + color: rgba(255, 255, 255, 0.7); |
| 88 | + } |
| 89 | +
|
| 90 | + .version-info { |
| 91 | + color: rgba(255, 255, 255, 0.5); |
| 92 | + } |
| 93 | +} |
| 94 | +</style> |
0 commit comments