feat(route): add more pics and videos popular feeds
This commit is contained in:
parent
68f3d2e4bb
commit
bd5ebcbb04
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import { getCurrentPath } from '@/utils/helpers';
|
||||
const __dirname = getCurrentPath(import.meta.url);
|
||||
|
||||
|
|
@ -10,7 +10,8 @@ import { baseUrl, getTribeDetail, getTribeSets } from './utils';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/tribe/set/:id',
|
||||
categories: ['picture'],
|
||||
categories: ['picture', 'popular'],
|
||||
view: ViewType.Pictures,
|
||||
example: '/500px/tribe/set/f5de0b8aa6d54ec486f5e79616418001',
|
||||
parameters: { id: '部落 ID' },
|
||||
name: '部落影集',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
|
|
@ -6,9 +6,20 @@ import { parseDate } from '@/utils/parse-date';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/:user/:type?',
|
||||
categories: ['design'],
|
||||
categories: ['design', 'popular'],
|
||||
view: ViewType.Pictures,
|
||||
example: '/behance/mishapetrick',
|
||||
parameters: { user: 'username', type: 'type, `projects` or `appreciated`, `projects` by default' },
|
||||
parameters: {
|
||||
user: 'username',
|
||||
type: {
|
||||
description: 'type',
|
||||
options: [
|
||||
{ value: 'projects', label: 'projects' },
|
||||
{ value: 'appreciated', label: 'appreciated' },
|
||||
],
|
||||
default: 'projects',
|
||||
},
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
|
|||
|
|
@ -9,9 +9,20 @@ const cateList = new Set(['all', 'design-resources', 'learn-design', 'inside-eag
|
|||
|
||||
export const route: Route = {
|
||||
path: '/blog/:cate?/:language?',
|
||||
categories: ['design'],
|
||||
categories: ['blog'],
|
||||
example: '/eagle/blog/en',
|
||||
parameters: { cate: 'Category, get by URL, `all` by default', language: 'Language, `cn`, `tw`, `en`, `en` by default' },
|
||||
parameters: {
|
||||
cate: 'Category, get by URL, `all` by default',
|
||||
language: {
|
||||
description: 'Language',
|
||||
options: [
|
||||
{ value: 'cn', label: 'cn' },
|
||||
{ value: 'tw', label: 'tw' },
|
||||
{ value: 'en', label: 'en' },
|
||||
],
|
||||
default: 'en',
|
||||
},
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import got from '@/utils/got';
|
||||
|
||||
export const route: Route = {
|
||||
path: '/ani/anime/:sn',
|
||||
categories: ['anime'],
|
||||
categories: ['anime', 'popular'],
|
||||
view: ViewType.Videos,
|
||||
example: '/gamer/ani/anime/36868',
|
||||
parameters: { sn: '動畫 sn,在 URL 可以找到' },
|
||||
features: {
|
||||
|
|
@ -14,8 +15,14 @@ export const route: Route = {
|
|||
supportPodcast: false,
|
||||
supportScihub: false,
|
||||
},
|
||||
radar: [
|
||||
{
|
||||
source: ['ani.gamer.com.tw/'],
|
||||
target: '/anime/:sn',
|
||||
},
|
||||
],
|
||||
name: '動畫瘋 - 動畫',
|
||||
maintainers: [],
|
||||
maintainers: ['pseudoyu'],
|
||||
handler,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import got from '@/utils/got';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
export const route: Route = {
|
||||
path: '/ani/new_anime',
|
||||
categories: ['anime'],
|
||||
categories: ['anime', 'popular'],
|
||||
view: ViewType.Videos,
|
||||
example: '/gamer/ani/new_anime',
|
||||
parameters: {},
|
||||
features: {
|
||||
|
|
@ -23,7 +24,7 @@ export const route: Route = {
|
|||
},
|
||||
],
|
||||
name: '動畫瘋 - 最後更新',
|
||||
maintainers: [],
|
||||
maintainers: ['pseudoyu'],
|
||||
handler,
|
||||
url: 'ani.gamer.com.tw/',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
|
|
@ -7,9 +7,35 @@ import timezone from '@/utils/timezone';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/gnn/:category?',
|
||||
categories: ['anime'],
|
||||
categories: ['anime', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/gamer/gnn/1',
|
||||
parameters: { category: '版块' },
|
||||
parameters: {
|
||||
category: {
|
||||
description: '版塊',
|
||||
options: [
|
||||
{ value: '1', label: 'PC' },
|
||||
{ value: '3', label: 'TV 掌機' },
|
||||
{ value: '4', label: '手機遊戲' },
|
||||
{ value: '5', label: '動漫畫' },
|
||||
{ value: '9', label: '主題報導' },
|
||||
{ value: '11', label: '活動展覽' },
|
||||
{ value: '13', label: '電競' },
|
||||
{ value: 'ns', label: 'Switch' },
|
||||
{ value: 'ps5', label: 'PS5' },
|
||||
{ value: 'ps4', label: 'PS4' },
|
||||
{ value: 'xbone', label: 'XboxOne' },
|
||||
{ value: 'xbsx', label: 'XboxSX' },
|
||||
{ value: 'pc', label: 'PC 單機' },
|
||||
{ value: 'olg', label: 'PC 線上' },
|
||||
{ value: 'ios', label: 'iOS' },
|
||||
{ value: 'android', label: 'Android' },
|
||||
{ value: 'web', label: 'Web' },
|
||||
{ value: 'comic', label: '漫畫' },
|
||||
{ value: 'anime', label: '動畫' },
|
||||
],
|
||||
},
|
||||
},
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
@ -19,15 +45,9 @@ export const route: Route = {
|
|||
supportScihub: false,
|
||||
},
|
||||
name: 'GNN 新聞',
|
||||
maintainers: ['Arracc', 'ladeng07'],
|
||||
maintainers: ['Arracc', 'ladeng07', 'pseudoyu'],
|
||||
handler,
|
||||
description: `| 首頁 | PC | TV 掌機 | 手機遊戲 | 動漫畫 | 主題報導 | 活動展覽 | 電競 |
|
||||
| ---- | -- | ------- | -------- | ------ | -------- | -------- | ---- |
|
||||
| 缺省 | 1 | 3 | 4 | 5 | 9 | 11 | 13 |
|
||||
|
||||
| Switch | PS5 | PS4 | XboxOne | XboxSX | PC 單機 | PC 線上 | iOS | Android | Web | 漫畫 | 動畫 |
|
||||
| ------ | --- | --- | ------- | ------ | ------- | ------- | --- | ------- | --- | ----- | ----- |
|
||||
| ns | ps5 | ps4 | xbone | xbsx | pc | olg | ios | android | web | comic | anime |`,
|
||||
description: '缺省為首頁',
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Route } from '@/types';
|
||||
import { Route, ViewType } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { load } from 'cheerio';
|
||||
|
|
@ -7,9 +7,10 @@ import timezone from '@/utils/timezone';
|
|||
|
||||
export const route: Route = {
|
||||
path: '/hot/:bsn',
|
||||
categories: ['anime'],
|
||||
categories: ['anime', 'popular'],
|
||||
view: ViewType.Articles,
|
||||
example: '/gamer/hot/47157',
|
||||
parameters: { bsn: '板块 id,在 URL 可以找到' },
|
||||
parameters: { bsn: '板塊 id,在 URL 可以找到' },
|
||||
features: {
|
||||
requireConfig: false,
|
||||
requirePuppeteer: false,
|
||||
|
|
|
|||
Loading…
Reference in New Issue