diff --git a/src/language/en.ts b/src/language/en.ts
index ab07aa82..a7ebe921 100644
--- a/src/language/en.ts
+++ b/src/language/en.ts
@@ -49,10 +49,11 @@ export default {
mainPage: {
header: {
filter: 'Filter',
- search: 'Search Topics',
+ category: 'Category',
+ galgame: 'Visual Novel',
+ technique: 'Technique',
+ others: 'Others',
all: 'All Topics',
- history: 'Search History',
- clear: 'Clear all history',
updated: 'Default',
time: 'Time',
popularity: 'Popularity',
diff --git a/src/language/zh.ts b/src/language/zh.ts
index 49d8ab8b..1871e8a7 100644
--- a/src/language/zh.ts
+++ b/src/language/zh.ts
@@ -49,10 +49,11 @@ export default {
mainPage: {
header: {
filter: '筛选',
- search: '搜索话题',
+ category: '分类',
+ galgame: 'Galgame',
+ technique: '技术交流',
+ others: '其它',
all: '全部话题',
- history: '搜索历史',
- clear: '清除所有历史',
updated: '恢复默认排序',
time: '按照时间排序',
popularity: '按热度值排序',
diff --git a/src/store/temp/home.ts b/src/store/temp/home.ts
index 535d86a3..4985a695 100644
--- a/src/store/temp/home.ts
+++ b/src/store/temp/home.ts
@@ -18,7 +18,7 @@ export const useTempHomeStore = defineStore({
* @returns {HomeTopicResponseData} topicData
*/
keywords: '',
- category: '',
+ category: 'galgame',
page: 1,
limit: 17,
sortField: 'updated',
diff --git a/src/views/Home/content/article/components/header/ArticleHeader.vue b/src/views/Home/content/article/components/header/ArticleHeader.vue
index 43e5a37e..d6a37e49 100644
--- a/src/views/Home/content/article/components/header/ArticleHeader.vue
+++ b/src/views/Home/content/article/components/header/ArticleHeader.vue
@@ -1,20 +1,51 @@
-
-
+
+
{{ $tm('mainPage.header.category') }}
+
+
+
+
+
+
+
-
-
-
{{ $tm('mainPage.header.all') }}
@@ -28,11 +59,82 @@ const category = ['Galgame']
height: 40px;
display: flex;
flex-shrink: 0;
- border-bottom: 1px solid var(--kungalgame-trans-blue-4);
color: var(--kungalgame-font-color-3);
z-index: 1;
}
+.category {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ width: 1px;
+ flex-grow: 1;
+ position: relative;
+ background-color: var(--kungalgame-trans-white-5);
+ border-radius: 5px;
+ cursor: pointer;
+
+ & > span:nth-child(2) {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-size: 18px;
+ margin-left: 7px;
+ color: var(--kungalgame-blue-4);
+ }
+}
+
+.category-container {
+ width: 100%;
+ top: 40px;
+ position: absolute;
+}
+
+.category-submenu {
+ display: none;
+ flex-direction: column;
+ background-color: var(--kungalgame-trans-white-2);
+ box-shadow: var(--shadow);
+ border-radius: 5px;
+
+ .item {
+ padding: 10px 0;
+ font-size: 14px;
+ color: var(--kungalgame-font-color-3);
+ text-decoration: none;
+ display: flex;
+ justify-content: space-around;
+ cursor: pointer;
+
+ &:hover {
+ background-color: var(--kungalgame-trans-blue-1);
+ backdrop-filter: blur(5px);
+ }
+
+ &:active {
+ background-color: var(--kungalgame-trans-blue-2);
+ }
+
+ .icon-item {
+ color: var(--kungalgame-blue-4);
+ padding-right: 3px;
+ font-size: 20px;
+ }
+
+ &:first-child {
+ border-radius: 5px 5px 0 0;
+ }
+
+ &:last-child {
+ border-radius: 0 0 5px 5px;
+ }
+ }
+}
+
+.category:hover .category-submenu {
+ display: flex;
+}
+
.more {
height: 100%;
width: 1px;
@@ -44,8 +146,8 @@ const category = ['Galgame']
flex-grow: 1;
border-radius: 0 5px 0 0;
cursor: pointer;
- border-left: 1px solid var(--kungalgame-trans-blue-4);
color: var(--kungalgame-font-color-3);
+ margin-left: 10px;
&:hover {
background-color: var(--kungalgame-trans-blue-2);
diff --git a/src/views/Home/content/article/components/header/SortTopic.vue b/src/views/Home/content/article/components/header/SortTopic.vue
index 75a77b5f..98c80a79 100644
--- a/src/views/Home/content/article/components/header/SortTopic.vue
+++ b/src/views/Home/content/article/components/header/SortTopic.vue
@@ -5,7 +5,7 @@ import { ref } from 'vue'
import { useTempHomeStore } from '@/store/temp/home'
import { storeToRefs } from 'pinia'
-import { navSortItem } from './navSortItem'
+import { sortItem } from './navItem'
const ascClass = ref('')
@@ -47,12 +47,11 @@ const iconMap: Record = {
-