mirror of
https://github.com/blossom-editor/blossom
synced 2024-11-17 22:48:03 +08:00
增加博客配置项
This commit is contained in:
parent
8196364031
commit
928e0d0b54
@ -1,33 +1,45 @@
|
||||
const blossom: any = {
|
||||
const blossom = {
|
||||
/**
|
||||
* 基础配置
|
||||
*/
|
||||
SYS: {
|
||||
// 修改该值可以改变网页左上角名称, 你可以改为你的名称
|
||||
NAME: 'Blossom',
|
||||
SHORT_NAME: 'BLOSSOM-WEB',
|
||||
// 博客左上角 LOGO 文件名称, 文件需要放在 src/assets/imgs/logo/ 路径下
|
||||
LOGO: 'blossom_logo.png',
|
||||
// 版本
|
||||
VERSION: 'v1.8.0',
|
||||
VERSION: 'v1.9.0',
|
||||
// 公网安备号
|
||||
GONG_WANG_AN_BEI: 'X公网安备 XXXXXXXXXX号',
|
||||
// ICP 备案号
|
||||
ICP_BEI_AN_HAO: '京ICP备123123123号',
|
||||
// 邮箱
|
||||
EMAIL: '491548320@qq.com'
|
||||
EMAIL: ''
|
||||
},
|
||||
/**
|
||||
* 填写服务器的地址
|
||||
* 博客样式,当前可设置样式如下:
|
||||
* 1. 左上角 LOGO 样式
|
||||
* 2. 专题文件夹的特殊样式显示
|
||||
*/
|
||||
THEME: {
|
||||
LOGO_STYLE: {
|
||||
// 左上角 LOGO 的圆角设置
|
||||
'border-radius': '50%'
|
||||
},
|
||||
// 是否以特殊样式显示专题文件夹
|
||||
SUBJECT_TITLE: true
|
||||
},
|
||||
/**
|
||||
* 服务器的地址
|
||||
*/
|
||||
DOMAIN: {
|
||||
LOC: 'http://127.0.0.1:9999/',
|
||||
// 将该值填写为你的后台访问地址, 与 blossom 客户端登录页面填写的地址相同
|
||||
PRD: 'https://www.wangyunf.com/bl/',
|
||||
// PRD: 'http://127.0.0.1:9999/',
|
||||
// 将该值填写你开放为博客的用户ID
|
||||
USER_ID: 1
|
||||
},
|
||||
/**
|
||||
* 可以填写你自己的网站,该信息回展示顶部的【更多】按钮中,以及首页的【我的所有文章】下
|
||||
* 可以填写你自己的网站,该信息会展示在右上角的【更多】按钮中,以及首页的【所有文章】下
|
||||
* NAME: 网站名称
|
||||
* URL: 网站地址
|
||||
* LOGO: 网站LOGO, 放在 src/assets/imgs/linklogo/ 路径下
|
||||
@ -37,24 +49,8 @@ const blossom: any = {
|
||||
// {
|
||||
// NAME: '我的个人主页',
|
||||
// URL: 'https://www.wangyunf.com',
|
||||
// // 请将 logo 放入到 src/assets/imgs/linklogo/
|
||||
// LOGO: 'luban.png'
|
||||
// }
|
||||
{
|
||||
NAME: '我的个人主页',
|
||||
URL: 'https://www.wangyunf.com',
|
||||
LOGO: 'luban.png'
|
||||
},
|
||||
{
|
||||
NAME: 'Blossom 双链笔记软件',
|
||||
URL: 'https://www.wangyunf.com/blossom-doc/index',
|
||||
LOGO: 'blossom_logo.png'
|
||||
},
|
||||
{
|
||||
NAME: 'GuardCat 服务监控解决方案',
|
||||
URL: 'https://www.wangyunf.com/view/#/home',
|
||||
LOGO: 'guardcat_logo.jpg'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div :class="['doc-title']">
|
||||
<div :class="titleClass">
|
||||
<div class="doc-name">
|
||||
<img
|
||||
class="menu-icon-img"
|
||||
@ -27,6 +27,7 @@
|
||||
import { computed } from 'vue'
|
||||
import type { PropType } from 'vue'
|
||||
import { isNotBlank } from '@/assets/utils/obj'
|
||||
import SYSTEM from '@/assets/constants/blossom'
|
||||
|
||||
//#region ----------------------------------------< 标题信息 >--------------------------------------
|
||||
|
||||
@ -58,6 +59,18 @@ const tags = computed(() => {
|
||||
return icons
|
||||
})
|
||||
|
||||
const titleClass = computed(() => {
|
||||
if (!SYSTEM.THEME.SUBJECT_TITLE) {
|
||||
return 'doc-title'
|
||||
}
|
||||
|
||||
if (props.trees.t.includes('subject')) {
|
||||
return 'subject-title'
|
||||
}
|
||||
|
||||
return 'doc-title'
|
||||
})
|
||||
|
||||
//#endregion
|
||||
</script>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div :class="['blossom-header-root', props.bg ? 'blossom-header-bg' : '']">
|
||||
<bl-row class="head-row" width="auto" height="100%">
|
||||
<div class="blossom-logo" @click="toLogin">
|
||||
<img src="@/assets/imgs/blossom/blossom_logo.png" />
|
||||
<img :src="logo" :style="SYSTEM.THEME.LOGO_STYLE" />
|
||||
</div>
|
||||
<div class="project-name" @click="toRoute('/home')">{{ SYSTEM.SYS.NAME }}</div>
|
||||
</bl-row>
|
||||
@ -70,6 +70,8 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const logo = new URL(`../../assets/imgs/logo/${SYSTEM.SYS.LOGO}`, import.meta.url).href
|
||||
|
||||
const getImg = (img: string) => {
|
||||
return new URL(`../../assets/imgs/linklogo/${img}`, import.meta.url).href
|
||||
}
|
||||
@ -171,6 +173,7 @@ const handlLogout = () => {
|
||||
|
||||
img {
|
||||
margin: 5px 10px 5px 0;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.iconbl {
|
||||
|
@ -2,9 +2,9 @@
|
||||
<div class="login-root">
|
||||
<div class="login-form">
|
||||
<bl-col just="center" class="logo" height="auto">
|
||||
<img src="@/assets/imgs/blossom/blossom_logo.png" />
|
||||
<img :src="logo" :style="SYSTEM.THEME.LOGO_STYLE" />
|
||||
<br />
|
||||
<bl-row class="title" just="center">Blossom</bl-row>
|
||||
<bl-row class="title" just="center">{{ SYSTEM.SYS.NAME }}</bl-row>
|
||||
</bl-col>
|
||||
<el-input class="login-input" size="default" v-model="formLogin.username">
|
||||
<template #prepend>用户名</template>
|
||||
@ -22,17 +22,13 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
// import { storeToRefs } from 'pinia'
|
||||
// import { AuthStatus, storeKey, userinfoKey, useUserStore } from '@/stores/user'
|
||||
// import { loginApi, userinfoApi } from '@/api/auth'
|
||||
// import { Local } from '@/assets/utils/storage'
|
||||
import { toRoute } from '@/router'
|
||||
import { login } from '@/scripts/auth'
|
||||
import SYSTEM from '@/assets/constants/blossom'
|
||||
|
||||
const formLogin = ref({
|
||||
username: '',
|
||||
password: ''
|
||||
})
|
||||
const logo = new URL(`../../assets/imgs/logo/${SYSTEM.SYS.LOGO}`, import.meta.url).href
|
||||
|
||||
const formLogin = ref({ username: '', password: '' })
|
||||
|
||||
const handleLogin = () => {
|
||||
login(formLogin.value.username, formLogin.value.password)
|
||||
|
Loading…
Reference in New Issue
Block a user