Skip to content

Commit

Permalink
Merge branch 'issue-230-体验优化' of https://github.com/MarleneJiang/Byte…
Browse files Browse the repository at this point in the history
…Dream-JueJin into issue-230-体验优化
  • Loading branch information
MarleneJiang committed Feb 14, 2023
2 parents c17ea83 + a4398d2 commit b661869
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 301 deletions.

Large diffs are not rendered by default.

17 changes: 7 additions & 10 deletions frontend/components/ArticlesList/Item/AuthorCard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ defineProps<{
</script>

<template>
<div class="author_card">
<div class="author_card truncate">
<div class="about">
<ArticlesListUiImg :src="avatar" :alt="name" avatar />
<div class="info">
<div class="ml-[0.5rem]">
<div class="name">
<span>{{ name }}</span>
<img class="w-[3rem] ml-[1rem]" :src="`https://pan.marlene.top/d/share/jj/${rank}.png`" :alt="`lv${rank}`">
<img class="w-[3rem] ml-[0.75rem]" :src="`https://pan.marlene.top/d/share/jj/${rank}.png`" :alt="`lv${rank}`">
</div>
<div class="text-[#8f969c] text-[0.1rem]">
<div class="text-[#8f969c] text-[12px]">
{{ motto }}
</div>
</div>
Expand All @@ -28,17 +28,14 @@ defineProps<{
<style scoped>
.author_card {
box-shadow: 0 8px 24px rgb(81 87 103 / 16%);
@apply bg-white absolute top-[-9rem] left-0 mlg:left-[-1.67rem]
@apply px-[1rem] bg-white absolute top-[-9rem] left-0 mlg:left-[-1.67rem]
@apply dark:(bg-jj-article text-white)
}
.about {
@apply flex items-center m-[1rem] mb-0
}
.info {
@apply flex flex-col justify-center
@apply flex items-center my-[0.75rem] mb-0 min-w-[250px]
}
.name {
@apply flex-auto flex items-center pr-[1rem]
@apply flex items-center pr-[1rem]
}
.author_card::after {
border: 10px solid transparent;
Expand Down
26 changes: 10 additions & 16 deletions frontend/components/ArticlesList/Item/Bar/Top.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
<script setup lang="ts">
import type { ITagItem } from '~~/types/IArticleItem'
defineProps({
duration: String,
tags: {
type: Array<ITagItem>,
default: [],
},
authorId: {
type: Object,
default: () => {},
},
adId: String,
})
import type { IAuthor, ITagItem } from '~~/types/IArticleItem'
defineProps<{
duration: string
tags?: ITagItem[]
authorId?: IAuthor
adId?: string
}>()
</script>

<template>
<div class="topbar">
<div class="author">
<span class="name">{{ adId ? adId : authorId.name }}</span>
<span class="name">{{ adId ? adId : authorId?.name }}</span>
<ArticlesListItemAuthorCard
v-if="authorId"
:name="authorId.name"
Expand All @@ -27,7 +21,7 @@ defineProps({
class="info"
/>
</div>
<span :class="`duration ${tags.length ? 'b-r-1' : ''}`">{{ duration }}</span>
<span :class="`duration ${tags?.length ? 'b-r-1' : ''}`">{{ duration }}</span>
<div class="flex px-3">
<div v-for="(item, index) of tags" :key="item.tag" class="tag">
<div v-if="index" class="icon" />
Expand Down Expand Up @@ -55,7 +49,7 @@ defineProps({
@apply text-jj-thirdly px-3
}
.tag {
@apply
@apply flex items-center
}
.tag span {
@apply transition px-0 text-jj-thirdly hover:text-primary
Expand Down
4 changes: 2 additions & 2 deletions frontend/components/ArticlesList/Ui/Btns.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="f-c-c">
<div class="flex justify-between">
<div class="primary">
关注
</div>
Expand All @@ -12,7 +12,7 @@
<style scoped>
.primary {
transition: background-color .1s linear .05s;
@apply px-[3.5rem] py-[0.4rem] m-[0.75rem] text-[1.167rem] text-white h-full bg-jj-brand-normal rounded-[2px]
@apply px-[3.5rem] py-[0.4rem] my-[0.75rem] text-[1.167rem] text-white h-full bg-jj-brand-normal rounded-[2px]
@apply border border-solid border-jj-stroke-normal
@apply hover:bg-jj-button-primary-normal
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/ArticlesList/Ui/Img.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ defineProps<{
@apply object-cover w-[120px] h-[80px]
}
.avatar {
@apply w-16 h-16 rounded-full
@apply w-[50px] h-[50px] rounded-full
}
</style>
4 changes: 2 additions & 2 deletions frontend/components/ArticlesList/index.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup lang="ts">
import type { IArticleItem } from '~~/types/IArticleItem'
const artlist = useState<IArticleItem[]>(() => [])
const artlist = useState<IArticleItem[]>('artlist', () => [])
const { data: articleAds } = (await useFetch('/api/global/ad'))
const isLoading = useState(() => true)
const isLoading = useState('isLoading', () => true)
const route = useRoute()
let pagenum = 1
const addArtListItem = useThrottle(async () => {
Expand Down
6 changes: 3 additions & 3 deletions frontend/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ export default defineNuxtConfig({
autoTrack: true,
doNotTrack: false,
cache: false,
domains: 'bytedream.top',
websiteId: 'f0ab5003-8840-46dc-956b-36dbabc6fa4f',
scriptUrl: 'https://analytics.umami.is/script.js',
domains: 'bytedream.marlene.top',
websiteId: '908a66e8-a102-4f1b-900b-7b10891cc03c',
scriptUrl: 'http://8.130.20.114:3000/umami.js',
},
meilisearch: {
hostUrl: process.env.MEILISEARCH_HOST,
Expand Down
2 changes: 1 addition & 1 deletion frontend/types/IArticleItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ export {
IArticleItem,
ITagItem,
IArticleAd,
ICatalogue,
IAuthor,
ICatalogue,
}

0 comments on commit b661869

Please sign in to comment.