valaxy-theme-yun 0.20.0-beta.1 → 0.20.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/bump.config.ts +7 -0
  2. package/components/ValaxyMain.vue +11 -18
  3. package/components/YunAdBoard.vue +4 -0
  4. package/components/YunAlbum.vue +13 -3
  5. package/components/YunAlbumList.vue +5 -11
  6. package/components/YunCategories.vue +2 -1
  7. package/components/YunCategory.vue +23 -37
  8. package/components/YunCategoryChildItem.vue +49 -0
  9. package/components/YunLayoutPostTag.vue +12 -1
  10. package/components/YunNotice.vue +6 -5
  11. package/components/YunOverview.vue +0 -5
  12. package/components/YunPagination.vue +12 -5
  13. package/components/YunPostCollapse.vue +5 -3
  14. package/components/YunPostList.vue +8 -7
  15. package/components/YunPrologue.vue +1 -1
  16. package/components/animation/LineBurstEffects.vue +8 -5
  17. package/components/author/YunAuthorAvatar.vue +2 -1
  18. package/components/layout/YunLayoutWrapper.vue +3 -7
  19. package/components/project/YunProjectCard.vue +29 -3
  20. package/components/project/YunProjectCollection.vue +1 -1
  21. package/components/project/YunProjectToggleButton.vue +1 -0
  22. package/components/prologue/PrologueSquare.vue +81 -109
  23. package/components/prologue/YunAEFrame.vue +68 -85
  24. package/components/site/YunSiteDescription.vue +11 -0
  25. package/components/site/YunSiteLinkItem.vue +1 -1
  26. package/components/site/YunSiteSubtitle.vue +14 -0
  27. package/components/ui/YunDivider.vue +3 -0
  28. package/composables/animation.ts +37 -0
  29. package/layouts/404.vue +1 -3
  30. package/layouts/albums.vue +25 -24
  31. package/layouts/archives.vue +0 -1
  32. package/layouts/categories.vue +8 -4
  33. package/layouts/gallery.vue +31 -30
  34. package/layouts/home.vue +6 -12
  35. package/layouts/tags.vue +11 -5
  36. package/package.json +9 -5
  37. package/styles/animations/index.scss +45 -0
  38. package/styles/css-vars.scss +1 -1
  39. package/styles/layout/index.scss +0 -5
  40. package/unocss.config.ts +0 -1
  41. package/utils/animation.ts +2 -0
  42. package/valaxy.config.ts +1 -0
package/layouts/home.vue CHANGED
@@ -1,10 +1,8 @@
1
1
  <script lang="ts" setup>
2
2
  import { computed } from 'vue'
3
3
  import { useRoute } from 'vue-router'
4
- import { useYunAppStore } from '../stores'
5
4
  import { useThemeConfig } from '../composables'
6
5
 
7
- const yunStore = useYunAppStore()
8
6
  const route = useRoute()
9
7
  const themeConfig = useThemeConfig()
10
8
 
@@ -17,16 +15,12 @@ const showNotice = computed(() => {
17
15
  </script>
18
16
 
19
17
  <template>
20
- <main
21
- class="yun-main flex-center"
18
+ <YunLayoutWrapper
19
+ class="items-center flex-col"
22
20
  :class="{
23
- 'pl-0': !yunStore.leftSidebar.isOpen,
24
- 'md:pl-$va-sidebar-width': yunStore.leftSidebar.isOpen,
25
- 'pt-36': isPage,
26
- }" flex="~ col" w="full"
21
+ 'mt-0!': !isPage,
22
+ }"
27
23
  >
28
- <YunSidebar :show-hamburger="true" />
29
-
30
24
  <template v-if="!isPage">
31
25
  <YunBanner />
32
26
  <YunSay v-if="themeConfig.say.enable" w="full" />
@@ -35,7 +29,7 @@ const showNotice = computed(() => {
35
29
 
36
30
  <YunNotice
37
31
  v-if="showNotice"
38
- class="mb-10"
32
+ class="mb-2 md:mb-6"
39
33
  :class="{
40
34
  'mt-4': !isPage,
41
35
  }"
@@ -49,5 +43,5 @@ const showNotice = computed(() => {
49
43
  </slot>
50
44
 
51
45
  <YunFooter />
52
- </main>
46
+ </YunLayoutWrapper>
53
47
  </template>
package/layouts/tags.vue CHANGED
@@ -53,6 +53,7 @@ function displayTag(tag: string) {
53
53
  }
54
54
 
55
55
  const title = usePostTitle(frontmatter)
56
+ const tagArr = computed(() => Array.from(tags.value).sort())
56
57
 
57
58
  // use flex to fix `overflow-wrap: break-words;` not working in Safari
58
59
  </script>
@@ -65,7 +66,6 @@ const title = usePostTitle(frontmatter)
65
66
  <component :is="Component">
66
67
  <template #main-header>
67
68
  <YunPageHeader
68
- class="mt-8"
69
69
  :title="title || t('menu.tags')"
70
70
  :icon="frontmatter.icon || 'i-ri-tag-line'"
71
71
  :color="frontmatter.color"
@@ -73,14 +73,20 @@ const title = usePostTitle(frontmatter)
73
73
  />
74
74
  </template>
75
75
  <template #main-content>
76
- <div class="yun-text-light" text="center" p="2">
77
- {{ t('counter.tags', Array.from(tags).length) }}
78
- </div>
76
+ <Transition
77
+ enter-active-class="animate-fade-in animate-duration-400"
78
+ appear
79
+ >
80
+ <div class="yun-text-light" text="center" p="2">
81
+ {{ t('counter.tags', tagArr.length) }}
82
+ </div>
83
+ </Transition>
79
84
 
80
85
  <div class="justify-center items-end" flex="~ wrap" gap="1">
81
86
  <YunLayoutPostTag
82
- v-for="[key, tag] in Array.from(tags).sort()"
87
+ v-for="([key, tag], i) in tagArr"
83
88
  :key="key"
89
+ :i="i"
84
90
  :title="key"
85
91
  :count="tag.count"
86
92
  :style="getTagStyle(tag.count)"
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.20.0-beta.1",
3
+ "type": "module",
4
+ "version": "0.20.0-beta.11",
4
5
  "author": {
5
6
  "email": "me@yunyoujun.cn",
6
7
  "name": "YunYouJun",
@@ -19,9 +20,12 @@
19
20
  },
20
21
  "main": "index.ts",
21
22
  "module": "index.ts",
23
+ "scripts": {
24
+ "release": "bumpp && npm publish"
25
+ },
22
26
  "dependencies": {
23
27
  "@ctrl/tinycolor": "^4.1.0",
24
- "@explosions/fireworks": "^0.0.2",
28
+ "@explosions/fireworks": "^0.1.0",
25
29
  "@iconify-json/ant-design": "^1.2.1",
26
30
  "@iconify-json/simple-icons": "^1.2.5",
27
31
  "@vueuse/motion": "^2.2.5",
@@ -32,7 +36,7 @@
32
36
  },
33
37
  "devDependencies": {
34
38
  "@types/animejs": "^3.1.12",
35
- "valaxy-addon-waline": "0.2.0",
36
- "valaxy": "0.20.0-beta.1"
39
+ "valaxy": "workspace:*",
40
+ "valaxy-addon-waline": "workspace:*"
37
41
  }
38
- }
42
+ }
@@ -4,6 +4,14 @@
4
4
  @use 'sass:map';
5
5
  @use '../vars.scss' as *;
6
6
 
7
+ .transition-cubic-bezier-ease-in {
8
+ transition-timing-function: map.get($cubic-bezier, 'ease-in');
9
+ }
10
+
11
+ .transition-cubic-bezier-ease-in-out {
12
+ transition-timing-function: map.get($cubic-bezier, 'ease-in-out');
13
+ }
14
+
7
15
  .v-enter-active,
8
16
  .v-leave-active {
9
17
  transition: opacity .2s map.get($cubic-bezier, 'ease-in');
@@ -34,3 +42,40 @@
34
42
  opacity: 1;
35
43
  }
36
44
  }
45
+
46
+ // title-effects
47
+ .yun-title-effects {
48
+ position: relative;
49
+
50
+ &::before,
51
+ &::after {
52
+ content: "";
53
+ position: absolute;
54
+ width: 10px;
55
+ height: 10px;
56
+ opacity: 0;
57
+ border: 2px solid;
58
+ transition: 0.3s;
59
+ transition-timing-function: cubic-bezier(0.17, 0.67, 0.05, 1.29);
60
+ }
61
+
62
+ &::before {
63
+ top: 0;
64
+ left: 0;
65
+ border-width: 2px 0 0 2px;
66
+ transform: translate3d(10px, 10px, 0);
67
+ }
68
+
69
+ &::after {
70
+ right: 0;
71
+ bottom: 0;
72
+ border-width: 0 2px 2px 0;
73
+ transform: translate3d(-10px, -10px, 0);
74
+ }
75
+
76
+ &:hover::before,
77
+ &:hover::after {
78
+ opacity: 1;
79
+ transform: translate3d(0, 0, 0);
80
+ }
81
+ }
@@ -26,7 +26,7 @@ html.dark {
26
26
  // animation
27
27
  @media screen and (width <= 768px) {
28
28
  :root {
29
- --rect-margin: 20px;
29
+ --rect-margin: 16px;
30
30
  }
31
31
  }
32
32
 
@@ -6,8 +6,3 @@
6
6
  html {
7
7
  overflow-y: scroll;
8
8
  }
9
-
10
- .yun-main {
11
- transition: padding-left var(--va-transition-duration);
12
- transition-timing-function: map.get($cubic-bezier, 'ease-in-out');
13
- }
package/unocss.config.ts CHANGED
@@ -2,7 +2,6 @@ import { defineConfig } from 'unocss'
2
2
 
3
3
  export default defineConfig({
4
4
  shortcuts: [
5
- ['yun-main', 'lt-md:pl-0'],
6
5
  ['yun-card', 'transition yun-transition shadow hover:shadow-lg'],
7
6
  ],
8
7
  rules: [
@@ -1,4 +1,6 @@
1
1
  import { gsap } from 'gsap'
2
+ // gsap/ScrollToPlugin is ESM, but gsap not include 'type:module' in package.json
3
+ // use cjs for vite-ssg, optimizeDeps for ESM
2
4
  import ScrollToPlugin from 'gsap/dist/ScrollToPlugin'
3
5
 
4
6
  gsap.registerPlugin(ScrollToPlugin)
package/valaxy.config.ts CHANGED
@@ -20,6 +20,7 @@ function ThemeVitePlugin(options: ResolvedValaxyOptions<ThemeConfig>): Plugin {
20
20
  },
21
21
 
22
22
  optimizeDeps: {
23
+ include: ['gsap/dist/ScrollToPlugin'],
23
24
  exclude: ['@docsearch/js'],
24
25
  },
25
26
  }