From a3704d2564035127ee520b7174e53fd2c85f1adc Mon Sep 17 00:00:00 2001 From: the1812 Date: Sat, 25 Jun 2022 17:05:51 +0800 Subject: [PATCH] Refactor codes --- .../home-redesign/minimal/MinimalHome.vue | 19 +++++++++++++-- .../tabs/{MinimalHomeFeeds.vue => Feeds.vue} | 23 +++---------------- .../{MinimalHomeTrending.vue => Trending.vue} | 23 +++---------------- 3 files changed, 23 insertions(+), 42 deletions(-) rename registry/lib/components/style/home-redesign/minimal/tabs/{MinimalHomeFeeds.vue => Feeds.vue} (75%) rename registry/lib/components/style/home-redesign/minimal/tabs/{MinimalHomeTrending.vue => Trending.vue} (75%) diff --git a/registry/lib/components/style/home-redesign/minimal/MinimalHome.vue b/registry/lib/components/style/home-redesign/minimal/MinimalHome.vue index 137cdae15..279ab33b8 100644 --- a/registry/lib/components/style/home-redesign/minimal/MinimalHome.vue +++ b/registry/lib/components/style/home-redesign/minimal/MinimalHome.vue @@ -17,13 +17,13 @@ const tabs: TabMappings = [ { name: MinimalHomeTabOption.Feeds, displayName: '动态', - component: () => import('./tabs/MinimalHomeFeeds.vue').then(m => m.default), + component: () => import('./tabs/Feeds.vue').then(m => m.default), activeLink: 'https://t.bilibili.com/?tab=video', }, { name: MinimalHomeTabOption.Trending, displayName: minimalHomeOptions.personalized ? '推荐' : '热门', - component: () => import('./tabs/MinimalHomeTrending.vue').then(m => m.default), + component: () => import('./tabs/Trending.vue').then(m => m.default), activeLink: 'https://www.bilibili.com/v/popular/all', }, ] @@ -73,6 +73,21 @@ export default Vue.extend({ flex-direction: column; &-tabs { flex-grow: 1; + .minimal-home-tab { + &-cards { + display: grid; + grid-template-columns: repeat( + var(--minimal-home-card-column), + var(--card-width) + ); + gap: 12px; + padding: 0 8px; + margin-bottom: 16px; + .video-card * { + transition: 0.2s ease-out; + } + } + } } } diff --git a/registry/lib/components/style/home-redesign/minimal/tabs/MinimalHomeFeeds.vue b/registry/lib/components/style/home-redesign/minimal/tabs/Feeds.vue similarity index 75% rename from registry/lib/components/style/home-redesign/minimal/tabs/MinimalHomeFeeds.vue rename to registry/lib/components/style/home-redesign/minimal/tabs/Feeds.vue index 0b88c25cc..66b206236 100644 --- a/registry/lib/components/style/home-redesign/minimal/tabs/MinimalHomeFeeds.vue +++ b/registry/lib/components/style/home-redesign/minimal/tabs/Feeds.vue @@ -1,11 +1,11 @@ - diff --git a/registry/lib/components/style/home-redesign/minimal/tabs/MinimalHomeTrending.vue b/registry/lib/components/style/home-redesign/minimal/tabs/Trending.vue similarity index 75% rename from registry/lib/components/style/home-redesign/minimal/tabs/MinimalHomeTrending.vue rename to registry/lib/components/style/home-redesign/minimal/tabs/Trending.vue index 34d0ff2c8..58f771057 100644 --- a/registry/lib/components/style/home-redesign/minimal/tabs/MinimalHomeTrending.vue +++ b/registry/lib/components/style/home-redesign/minimal/tabs/Trending.vue @@ -1,11 +1,11 @@ -