App.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <script lang="ts" setup>
  2. import { ref } from 'vue';
  3. import Calendar from './components/CalendarComp.vue';
  4. import Docs from './components/DocsComp.vue';
  5. let lang = ref<'zh' | 'en'>('zh');
  6. </script>
  7. <template>
  8. <!-- <button @click="lang = lang === 'zh' ? 'en' : 'zh'">{{ lang === 'zh' ? 'en' : 'zh' }}</button> -->
  9. <div class="demo-title">
  10. <span>Chinese Days - Demo</span>
  11. <a href="https://github.com/vsme/chinese-days" target="_blank" rel="noopener noreferrer">
  12. <img src="//img.shields.io/github/stars/vsme/chinese-days" alt="GitHub Repo stars">
  13. </a>
  14. </div>
  15. <Calendar :lang />
  16. <Docs />
  17. </template>
  18. <style>
  19. #app {
  20. text-align: center;
  21. color: #2c3e50;
  22. padding: 20px 0;
  23. @media screen and (max-width: 560px) {
  24. padding: 10px 0;
  25. }
  26. .demo-title {
  27. max-width: 680px;
  28. padding: 10px 20px 30px;
  29. margin: 0 auto;
  30. text-align: left;
  31. font-size: 1.25em;
  32. font-weight: bold;
  33. display: flex;
  34. align-items: center;
  35. justify-content: space-between;
  36. a {
  37. display: flex;
  38. align-items: center;
  39. gap: 4px;
  40. font-size: 14px;
  41. }
  42. }
  43. }
  44. </style>