app.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <!--
  2. * @Author: NMTuan
  3. * @Email: NMTuan@qq.com
  4. * @Date: 2024-02-18 11:35:10
  5. * @LastEditTime: 2024-02-20 15:25:07
  6. * @LastEditors: NMTuan
  7. * @Description:
  8. * @FilePath: \timeNow\app.vue
  9. -->
  10. <template>
  11. <div class="w-full h-screen overflow-hidden flex flex-col items-center justify-between">
  12. <div></div>
  13. <div class="bg-white/5 w-full flex flex-col items-center justify-center py-[4vw]">
  14. <div class="select-none">
  15. <ClockWeek></ClockWeek>
  16. <ClockBoard></ClockBoard>
  17. <ClockDate></ClockDate>
  18. </div>
  19. </div>
  20. <div class="w-full px-[2px]">
  21. <TimeLine></TimeLine>
  22. <div class="my-[4px]">
  23. <DayLine></DayLine>
  24. <MonthLine></MonthLine>
  25. </div>
  26. </div>
  27. </div>
  28. </template>
  29. <script setup>
  30. const dateStore = useDateStore()
  31. let dt
  32. onMounted(() => {
  33. dateStore.getNow()
  34. dt = setInterval(() => {
  35. dateStore.getNow()
  36. }, 97)
  37. })
  38. onBeforeUnmount(() => {
  39. clearInterval(dt)
  40. })
  41. </script>
  42. <style lang="scss">
  43. html,
  44. body,
  45. #__nuxt {
  46. background-color: #000;
  47. }
  48. @font-face {
  49. font-family: 'DigitalDismay';
  50. src: url('/fonts/DigitalDismay.otf') format('opentype');
  51. }
  52. .font {
  53. &-digital-dismay {
  54. font-family: 'DigitalDismay';
  55. }
  56. }
  57. </style>