From bf4dbc7888d36d62836ac04bc6be8008f7c90469 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Wed, 11 May 2022 17:47:42 +0800 Subject: [PATCH] feat: add themes page component Signed-off-by: Ryan Wang --- src/views/interface/Themes.vue | 28 ++ src/views/interface/themes-mock.ts | 583 +++++++++++++++++++++++++++++ 2 files changed, 611 insertions(+) create mode 100644 src/views/interface/themes-mock.ts diff --git a/src/views/interface/Themes.vue b/src/views/interface/Themes.vue index 8e91923f7..a766f8696 100644 --- a/src/views/interface/Themes.vue +++ b/src/views/interface/Themes.vue @@ -2,7 +2,9 @@ import { FilledLayout } from "@/layouts"; import { VPageHeader } from "@/components/base/header"; import { VButton } from "@/components/base/button"; +import { VCard } from "@/components/base/card"; import { IconPalette } from "@/core/icons"; +import { themes } from "@/views/interface/themes-mock"; + +
+
    +
  • + +
    + +
    +

    + {{ theme.name }} +

    +
    +
  • +
+
diff --git a/src/views/interface/themes-mock.ts b/src/views/interface/themes-mock.ts new file mode 100644 index 000000000..7c41fc723 --- /dev/null +++ b/src/views/interface/themes-mock.ts @@ -0,0 +1,583 @@ +export const themes = [ + { + id: "cetr_sagiri", + name: "Sagiri", + website: "https://github.com/cetr/halo-theme-sagiri", + branch: "master", + repo: "https://github.com/cetr/halo-theme-sagiri", + updateStrategy: "RELEASE", + description: "As lovely as sagiri", + logo: null, + version: "2.2.8", + require: "1.5.0", + author: { + name: "知雨", + website: "https://coor.top", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/cetr_sagiri", + folderName: "cetr_sagiri", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/cetr_sagiri/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "iissnan_next", + name: "NexT", + website: "https://github.com/halo-dev/halo-theme-next", + branch: "master", + repo: "https://github.com/halo-dev/halo-theme-next", + updateStrategy: "RELEASE", + description: null, + logo: null, + version: "1.6.2", + require: "1.3.0", + author: { + name: "iissnan", + website: "https://iissnan.com", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/iissnan_next", + folderName: "iissnan_next", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/iissnan_next/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "caicai_anatole", + name: "Anatole", + website: "https://github.com/halo-dev/halo-theme-anatole", + branch: "master", + repo: "https://github.com/halo-dev/halo-theme-anatole", + updateStrategy: "RELEASE", + description: "A other Halo theme", + logo: "https://avatars1.githubusercontent.com/u/1811819?s=460&v=4", + version: "1.2.0", + require: "1.3.0", + author: { + name: "Caicai", + website: "https://www.caicai.me", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/caicai_anatole", + folderName: "caicai_anatole", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/caicai_anatole/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "louie_senpai_siren", + name: "Siren", + website: "https://github.com/louie-senpai/Siren", + branch: "master", + repo: "https://github.com/halo-dev/halo-theme-siren", + updateStrategy: "RELEASE", + description: null, + logo: null, + version: "1.1.0", + require: "1.3.0", + author: { + name: "louie-senpai", + website: "https://www.cssplus.org", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/louie_senpai_siren", + folderName: "louie_senpai_siren", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/louie_senpai_siren/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "txperl_story", + name: "Story", + website: "https://github.com/halo-dev/halo-theme-story", + branch: "master", + repo: "https://github.com/halo-dev/halo-theme-story", + updateStrategy: "RELEASE", + description: null, + logo: null, + version: "1.2.1", + require: "1.3.0", + author: { + name: "Trii Hsia", + website: "https://yumoe.com", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/txperl_story", + folderName: "txperl_story", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/txperl_story/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "xuanhuang_hux", + name: "Hux", + website: "https://github.com/halo-dev/halo-theme-hux", + branch: "master", + repo: "https://github.com/halo-dev/halo-theme-hux", + updateStrategy: "RELEASE", + description: null, + logo: null, + version: "1.3.2", + require: "1.3.0", + author: { + name: "Xuan Huang", + website: "https://huangxuan.me", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/xuanhuang_hux", + folderName: "xuanhuang_hux", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/xuanhuang_hux/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "ghost_casper", + name: "Casper", + website: "https://github.com/halo-dev/halo-theme-casper", + branch: "master", + repo: "https://github.com/halo-dev/halo-theme-casper", + updateStrategy: "RELEASE", + description: null, + logo: "https://avatars1.githubusercontent.com/u/2178663?s=200&v=4", + version: "1.8", + require: "1.3.0", + author: { + name: "Ghost", + website: "https://ghost.org", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/ghost_casper", + folderName: "ghost_casper", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/ghost_casper/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "codelunatic_simple", + name: "Simple Bootstrap", + website: "https://halo.cyblogs.top", + branch: "master", + repo: "https://github.com/codelunatic/halo-theme-simple-bootstrap", + updateStrategy: "RELEASE", + description: "使用Bootstrap构建的简洁主题", + logo: null, + version: "1.1.0", + require: "1.3.0", + author: { + name: "CY", + website: "https://halo.cyblogs.top", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/codelunatic_simple", + folderName: "codelunatic_simple", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/codelunatic_simple/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "onevcat_vno", + name: "Vno", + website: "https://github.com/halo-dev/halo-theme-vno", + branch: "master", + repo: "https://github.com/halo-dev/halo-theme-vno", + updateStrategy: "RELEASE", + description: null, + logo: null, + version: "1.4.1", + require: "1.3.0", + author: { + name: "Wei Wang", + website: "https://onevcat.com", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/onevcat_vno", + folderName: "onevcat_vno", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/onevcat_vno/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "ppoffice_icarus", + name: "Icarus", + website: "https://github.com/ppoffice/hexo-theme-icarus", + branch: "master", + repo: "https://github.com/halo-dev/halo-theme-icarus", + updateStrategy: "RELEASE", + description: null, + logo: null, + version: "2.7.0", + require: "1.5.0", + author: { + name: "ppoffice", + website: "https://github.com/ppoffice", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/ppoffice_icarus", + folderName: "ppoffice_icarus", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/ppoffice_icarus/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "hshan", + name: "hanshan", + website: "https://github.com/halo-dev/halo-theme-hshan", + branch: "master", + repo: "https://github.com/halo-dev/halo-theme-hshan", + updateStrategy: "RELEASE", + description: "大道至简", + logo: null, + version: "1.0", + require: "1.3.0", + author: { + name: "hshan", + website: "https://baozi.fun", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/hshan", + folderName: "hshan", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/hshan/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "LIlGG_Sakura", + name: "Sakura", + website: "https://github.com/LIlGG/halo-theme-sakura", + branch: "master", + repo: "https://github.com/LIlGG/halo-theme-sakura", + updateStrategy: "RELEASE", + description: "Halo 版本的樱花🌸主题", + logo: null, + version: "1.3.4", + require: "1.5.0", + author: { + name: "LIlGG", + website: "https://lixingyong.com", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/LIlGG_Sakura", + folderName: "LIlGG_Sakura", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/LIlGG_Sakura/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "fastbyte01_keepit", + name: "KeepIt", + website: "https://github.com/Fastbyte01/KeepIt", + branch: "master", + repo: "https://github.com/halo-dev/halo-theme-KeepIt", + updateStrategy: "RELEASE", + description: null, + logo: null, + version: "1.0.1", + require: "1.3.0", + author: { + name: "Fastbyte01", + website: "https://fsb01.com", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/fastbyte01_keepit", + folderName: "fastbyte01_keepit", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/fastbyte01_keepit/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "dream", + name: "Dream 1.0", + website: "https://blog.nineya.com", + branch: "master", + repo: "https://github.com/nineya/halo-theme-dream", + updateStrategy: "RELEASE", + description: "梦之城,童话梦境", + logo: "https://q1.qlogo.cn/g?b=qq&nk=361654768&s=640", + version: "1.5.1", + require: "1.3.0", + author: { + name: "nineya", + website: "https://www.nineya.com", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/dream", + folderName: "dream", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/dream/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "guqing_higan", + name: "彼岸", + website: "https://github.com/guqing/halo-theme-higan.git", + branch: "master", + repo: "https://github.com/guqing/halo-theme-higan.git", + updateStrategy: "RELEASE", + description: + "生死为此岸,涅槃为彼岸;有苦无乐为此岸,无苦无乐为彼岸...它代表着对一切美好的精神追求,也代表着生生不息的轮回亦如本主题分黑白两色,阴极阳至,向死而生。", + logo: "https://guqing.xyz/logo.png", + version: "1.0.0", + require: "1.5.0", + author: { + name: "guqing", + website: "https://www.guqing.xyz", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/guqing_higan", + folderName: "guqing_higan", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/guqing_higan/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "chakhsu_pinghsu", + name: "Pinghsu", + website: "https://github.com/halo-dev/halo-theme-pinghsu", + branch: "master", + repo: "https://github.com/halo-dev/halo-theme-pinghsu", + updateStrategy: "RELEASE", + description: null, + logo: null, + version: "1.2.1", + require: "1.3.0", + author: { + name: "Chakhsu.Lau", + website: "https://www.linpx.com", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/chakhsu_pinghsu", + folderName: "chakhsu_pinghsu", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/chakhsu_pinghsu/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "imkun_fantastic", + name: "Fantastic", + website: "https://www.imkun.dev", + branch: "master", + repo: "https://github.com/halo-dev/halo-theme-imkundev", + updateStrategy: "RELEASE", + description: null, + logo: null, + version: "1.2.0", + require: "1.3.0", + author: { + name: "Quinn", + website: "https://github.com/imkundev", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/imkun_fantastic", + folderName: "imkun_fantastic", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/imkun_fantastic/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "butterfly", + name: "Butterfly", + website: "https://dhjdd.cn", + branch: "master", + repo: "https://github.com/dhjddcn/halo-theme-butterfly", + updateStrategy: "RELEASE", + description: "Halo主题 butterfly", + logo: "https://dhjdd.cn/logo", + version: "1.0.0", + require: "^1.4.11", + author: { + name: "小红", + website: "https://dhjdd.cn", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/butterfly", + folderName: "butterfly", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/butterfly/screenshot.jpg", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "bao", + name: "雪", + website: "https://github.com/xzhuz/halo-theme-xue", + branch: "master", + repo: "https://github.com/xzhuz/halo-theme-xue", + updateStrategy: "RELEASE", + description: "大道至简", + logo: null, + version: "1.4.2", + require: "1.5.1", + author: { + name: "雪", + website: "https://baozi.fun", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/bao", + folderName: "bao", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/bao/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "flex-block", + name: "flex-block", + website: "https://github.com/guiyunweb/halo-theme-flex-block", + branch: "master", + repo: "https://github.com/guiyunweb/halo-theme-flex-block", + updateStrategy: "RELEASE", + description: "flex-block主题修改", + logo: "https://image.guiyunweb.com/2021/84306692_p0_master1200_1608708448480_1625562784578_1625565770497.jpg", + version: "2.0", + require: null, + author: { + name: "Guiyunweb", + website: "https://guiyunweb.com", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/flex-block", + folderName: "flex-block", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/flex-block/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: true, + }, + { + id: "imzeuk_zozo", + name: "Zozo", + website: "https://github.com/halo-dev/halo-theme-zozo", + branch: "master", + repo: "https://github.com/halo-dev/halo-theme-zozo", + updateStrategy: "RELEASE", + description: "A simple and beautiful theme for Halo", + logo: null, + version: "1.0.1", + require: "1.3.0", + author: { + name: "zeuk", + website: "https://zeuk.me/", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/imzeuk_zozo", + folderName: "imzeuk_zozo", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/imzeuk_zozo/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "SumiMakito_Journal", + name: "Journal", + website: "https://github.com/SumiMakito/hexo-theme-journal", + branch: "master", + repo: "https://github.com/halo-dev/halo-theme-journal", + updateStrategy: "RELEASE", + description: "隻言片語・於此匯聚 – Moments piled up.", + logo: "https://avatars3.githubusercontent.com/u/5277268?s=460&v=4", + version: "2.0.4", + require: "1.3.0", + author: { + name: "SumiMakito", + website: "https://keep.moe", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/SumiMakito_Journal", + folderName: "SumiMakito_Journal", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/SumiMakito_Journal/screenshot.png", + postMetaField: null, + sheetMetaField: null, + activated: false, + }, + { + id: "joe2.0", + name: "Joe2.0", + website: "https://bbchin.com", + branch: "master", + repo: "https://github.com/qinhua/halo-theme-joe2.0", + updateStrategy: "RELEASE", + description: "Halo主题 Joe2.0", + logo: "https://bbchin.com/logo", + version: "1.0.10", + require: "^1.5.0", + author: { + name: "M酷", + website: "https://bbchin.com", + avatar: null, + }, + themePath: "/root/.halo/templates/themes/joe2.0", + folderName: "joe2.0", + hasOptions: true, + screenshots: "https://demo.halo.run/themes/joe2.0/screenshot.jpg", + postMetaField: [ + "enable_collect_check", + "enable_like", + "enable_aside", + "enable_read_limit", + "use_raw_content", + "enable_passage_tips", + "enable_page_meta", + "img_max_width", + "enable_donate", + "img_align", + "enable_toc", + "enable_fold_long_code", + "enable_share", + "toc_depth", + "enable_katex", + "enable_comment", + "code_theme", + "enable_copy", + ], + sheetMetaField: [ + "img_align", + "enable_collect_check", + "enable_aside", + "use_raw_content", + "enable_page_meta", + "enable_katex", + "enable_comment", + "img_max_width", + ], + activated: false, + }, +];