Skip to content

Commit

Permalink
chore: use WebP for better performance.
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo-Messi committed Jan 13, 2025
1 parent fc7d880 commit 3f76d36
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default defineConfig({

themeConfig: {
siteTitle: `Lumen <code class="VPBadge tip">${Lumenversion}</code>`,
logo: { src: '/Logo.png', width: 24, height: 24 },
logo: { src: '/Logo.webp', width: 24, height: 24 },
editLink: {
pattern: 'https://github.com/Theo-Messi/lumen/edit/main/docs/:path',
text: '为此页提供修改建议'
Expand Down
6 changes: 3 additions & 3 deletions docs/.vitepress/configs/head.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { HeadConfig } from 'vitepress'

export const head: HeadConfig[] = [
['link', { rel: 'icon', type: 'icon', href: '/Logo.png' }],
['link', { rel: 'icon', type: 'icon', href: '/Logo.webp' }],
['meta', { name: 'msapplication-TileColor', content: '#da532c' }],
['meta', { name: 'theme-color', content: '#ffffff' }],
['meta', { name: 'author', content: 'Theo-Messi' }],
Expand All @@ -24,7 +24,7 @@ export const head: HeadConfig[] = [
['meta', { name: 'og:site_name', content: 'Lumen' }],
['meta', { name: 'og:title', content: 'Lumen' }],
['meta', { name: 'og:url', content: 'https://lumen.theojs.cn/' }],
['meta', { name: 'og:image', content: 'https://lumen.theojs.cn/Logo.png' }],
['meta', { name: 'og:image', content: 'https://lumen.theojs.cn/Logo.webp' }],
['meta', { name: 'og:image:alt', content: 'Lumen Logo' }],
[
'meta',
Expand All @@ -45,7 +45,7 @@ export const head: HeadConfig[] = [
],
[
'meta',
{ name: 'twitter:image', content: 'https://lumen.theojs.cn/Logo.png' }
{ name: 'twitter:image', content: 'https://lumen.theojs.cn/Logo.webp' }
],
['meta', { name: 'twitter:image:alt', content: 'Lumen Logo' }],
[
Expand Down
8 changes: 4 additions & 4 deletions docs/.vitepress/data/AsideData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Aside_Data: AsideItem[] = [
// },
// {
// link: 'https://fbinv02.fbaff.cc/auth/register?code=RZP3',
// image: 'https://i.theojs.cn/docs/202409111237242.png',
// image: 'https://i.theojs.cn/docs/202409111237242.webp',
// activity: 'FlyingBird 双旦活动开启',
// info1:
// '月付 85折 优惠码 <span style="color: var(--vp-c-brand-3)"> 122485 </span>',
Expand All @@ -34,7 +34,7 @@ export const Aside_Data: AsideItem[] = [
},
{
link: 'https://fbinv02.fbaff.cc/auth/register?code=RZP3',
image: 'https://i.theojs.cn/docs/202409111237242.png',
image: 'https://i.theojs.cn/docs/202409111237242.webp',
activity: 'FlyingBird'
},
{
Expand All @@ -49,14 +49,14 @@ export const Aside_Data: AsideItem[] = [
},
{
link: 'https://doc.theojs.cn/',
image: 'https://i.theojs.cn/avatar.png',
image: 'https://i.theojs.cn/avatar.webp',
name: 'Theo-Docs',
hide1: '流媒体观影',
hide2: '一站式服务'
},
{
link: 'https://xx.theojs.cn/',
image: 'https://i.theojs.cn/avatar.png',
image: 'https://i.theojs.cn/avatar.webp',
name: '玄学宝典',
hide1: '传世经典著作',
hide2: '山医命相卜'
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/announcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 首页公告栏
---

![首页公告栏 - 效果图](https://i.theojs.cn/docs/202411071152313.png)
![首页公告栏 - 效果图](https://i.theojs.cn/docs/202411071152313.webp)

## 引入组件

Expand Down
6 changes: 3 additions & 3 deletions docs/guide/docasidelogo.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 侧边栏链接
---

![侧边栏 - 效果图](https://i.theojs.cn/docs/202408081937401.png =400x)
![侧边栏 - 效果图](https://i.theojs.cn/docs/202408081937401.webp =400x)

## 创建数据

Expand All @@ -14,14 +14,14 @@ import type { AsideItem } from '@theojs/lumen'
export const Aside_Data: AsideItem[] = [
{
link: 'https://example.com/',
image: 'https://example.com/icon.png',
image: 'https://example.com/icon.webp',
activity: '活动标题',
info1: '简介1',
info2: '简介2'
},
{
link: 'https://example.com/',
image: 'https://example.com/icon.png',
image: 'https://example.com/icon.webp',
name: '标题',
hide1: '隐藏信息1',
hide2: '隐藏信息2'
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/homefooter.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
title: 页脚配置
---

![桌面端效果图](https://i.theojs.cn/docs/202411071146149.png)
![桌面端效果图](https://i.theojs.cn/docs/202411071146149.webp)

![移动端效果图](https://i.theojs.cn/docs/202411071155536.png =300x)
![移动端效果图](https://i.theojs.cn/docs/202411071155536.webp =300x)

## 创建数据

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/homeunderline.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 首页下划线
---

![首页下划线 - 效果图](https://i.theojs.cn/docs/202411071153583.png)
![首页下划线 - 效果图](https://i.theojs.cn/docs/202411071153583.webp)

## 引入组件

Expand Down
6 changes: 3 additions & 3 deletions docs/guide/image-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 图片描述
---

![效果图](/Logo.png)
![效果图](/Logo.webp)

## 安装 @mdit/plugin-figure 插件

Expand Down Expand Up @@ -63,7 +63,7 @@ import '@theojs/lumen/pic'
## 使用

```md
![效果图](/Logo.png)
![效果图](/Logo.webp)

![浅色模式{.light-only}](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ-w7jYJD-PBaozaH5WdubTPnBdi-XcQ4N96w&usqp=CAU)

Expand All @@ -74,7 +74,7 @@ import '@theojs/lumen/pic'
![浅色模式](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ-w7jYJD-PBaozaH5WdubTPnBdi-XcQ4N96w&usqp=CAU#light)
```

![效果图](/Logo.png)
![效果图](/Logo.webp)

![浅色模式{.light-only}](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ-w7jYJD-PBaozaH5WdubTPnBdi-XcQ4N96w&usqp=CAU)

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ hero:
tagline: ✨ 集成 Vue 功能组件和主题美化的 VitePress 插件

image:
src: '/Logo.png'
src: '/Logo.webp'
alt: '@theojs/lumen'

prelink:
Expand Down
Binary file removed docs/public/Logo.png
Binary file not shown.
Binary file added docs/public/Logo.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div align="center">
<p>
<img src="https://lumen.theojs.cn/Logo.png" alt="@theojs/lumen">
<img src="https://lumen.theojs.cn/Logo.webp" alt="@theojs/lumen">
</p>
<p>
<img src="https://img.shields.io/npm/v/@theojs/lumen?style=flat&colorA=080f12&colorB=1fa669" alt="release">
Expand Down
2 changes: 1 addition & 1 deletion src/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div align="center">
<p>
<img src="https://lumen.theojs.cn/Logo.png" alt="@theojs/lumen">
<img src="https://lumen.theojs.cn/Logo.webp" alt="@theojs/lumen">
</p>
<p>
<img src="https://img.shields.io/npm/v/@theojs/lumen?style=flat&colorA=080f12&colorB=1fa669" alt="release">
Expand Down
2 changes: 1 addition & 1 deletion src/theme/home-links.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ a.lumen.theo::before {
display: inline-block;
transform: translateY(7px);
margin-right: 0.5em;
background-image: url('https://i.theojs.cn/avatar.png');
background-image: url('https://i.theojs.cn/avatar.webp');
background-position: bottom;
background-size: 1.5rem;
background-repeat: no-repeat;
Expand Down

0 comments on commit 3f76d36

Please sign in to comment.