增加博客配置项

This commit is contained in:
xiaozzzi 2023-11-26 23:16:54 +08:00
parent 8196364031
commit 928e0d0b54
7 changed files with 44 additions and 36 deletions

View File

@ -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

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -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>

View File

@ -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 {

View File

@ -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)