Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

小白想法 #47

Open
lanjd opened this issue Mar 30, 2022 · 1 comment
Open

小白想法 #47

lanjd opened this issue Mar 30, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@lanjd
Copy link

lanjd commented Mar 30, 2022

这个主题算是看过的所有vuepress博客主题里漂亮的了,有几个不成熟的想法,fork也不知道咋改,望有大神指教

  1. tags的条目颜色要能改就好了,为啥有一部分选中颜色,有一部分又不是
  2. 这个搜索是覆盖在文章上面的嘛(哈哈,感觉想法有点蠢)?背景颜色要是能在当前页面上改成半透明颜色或者磨砂效果就好了,尽管文档有提过修改样式,但不知道如何下手
@Renovamen
Copy link
Owner

感谢关注!

  1. tag 颜色:会先按把 tag 按每个条目的文章数量从高到低排序,然后颜色从深到浅渐变,代码在这里:

    export const useTags = (start = "#a5a5e4", end = "#4388c4") => {

    也就是说如果想 fork 改颜色,改上面那行的 start(颜色变化范围下界)和 end(颜色变化范围上界)就行。现在这俩颜色是写死的,之后我做成可配置的吧。

    为啥有一部分选中颜色,有一部分又不是

    可能是因为现在的颜色变化范围上界正好是就是选中颜色,所以选中颜色最深的那几个 tag(文章最多的条目)时可能会看不出来区别。

  2. 如文档中提到,主题的默认搜索组件是我重写过的,效果可以看这里(点右上角搜索键)。这个组件应该会好看一点,但只能搜博客不能搜文档。如果只有搜博客的需求的话可以直接用这个。

    因为主题文档网站有搜索文档的需求,所以用的是官方搜索组件而不是主题默认的那个。目前的确还没完全适配好官方搜索组件的样式,但我短期内应该没精力调这个样式(欢迎 pr)。

    可以自行通过 css 变量来改样式,还不行的话就直接重写 css。

@Renovamen Renovamen added the enhancement New feature or request label Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants