Xiuno BBS 4.0 模板制作入门教程(更换背景、修改颜色)
xiunoa 2020-7-11

Xiuno BBS 模板也是按照插件的制作流程来做的。




1. 首先我们要找到插入点:view/htm/header.inc.htm 文件中的 header_link_after.htm


2. 新建 plugin/xn_theme_paopao,这是我自己取的名字,你可以用你名字 youname_theme_xxx 这样的方式命名你的插件。注意,如果是风格插件,必须要用 xx_theme_xxx 这种格式,这样的主题风格插件会具有排他性,安装的同时自动卸载其他主题风格插件。

3. header_link_after.htm 这个插入点要注意,我们的 CSS 代码写到这里:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<style>
body { background: #196e95 !important; background-image: url(plugin/xn_style_paopao/body_bg.jpg?v=2) !important; background-repeat: no-repeat !important;}
#header { background: rgba(0,0,0,0.5) !important; }
#footer { background: rgba(0,0,0,0.5) !important; }
.card > .card-header { background-image: linear-gradient(0deg, #c4d9e3, #fcfdfd); }
.card { background: #f4fbfe !important; }
.thread:hover { background-color: rgba(255,255,255,0.6) !important; }
.text-grey { color: #90a9b6 !important;}
.thread, .post { border-bottom: 1px solid #c3d8e2;}
.input-group .form-control, .input-group .custom-select, .input-group .custom-file { background: rgba(255,255,255,0.7);}
.card-header-tabs > .nav-item > .nav-link.active { background-image: linear-gradient(0deg, #dfedf4, #f2f2f2); border-color: #c9dce5; border-bottom-color: #dfebf1;}
.nav_tag_list a { color: #c5dbe4; }
.nav_tag_list a.active { color: #6fd2ff; }
.btn-secondary { background-color:#405763; border-color:#3b515d; }
.btn-secondary:hover { background-color: #374b55; border-color: #344751; }
.blockquote { background: #e0eaef;}
</style>

4. 相关文件介绍:


body_bg.jpg:是 CSS 用到的背景图片,我会用附件传上来。


icon.png:是插件的 ICON 文件,宽高 64x64 像素


conf.json:是插件的配置文件,内容:

conf.json:是插件的配置文件,内容:

1
2
3
4
5
6
7
8
9
10
{
    "name""官方皮肤:蓝色背景泡泡",
    "brief""蓝色背景泡泡,更换了一张背景图,导航改了个半透明背景。",
    "version""1.1",
    "bbs_version""4.0",
    "installed": 1,
    "enable": 1,
    "hooks_rank": [],
    "dependencies": []
}

试试看,是不是很简单?


如果要获取该插件也很简单,后台安装 xn_theme_paopao,装完以后 plugin/xn_theme_paopao 目录就是该插件了。


最新回复 (13)
全部楼主
  • HanCF
    2020-10-8 2
    0
    水经验
  • yax021699
    2020-11-15 3
    0
    厉害
  • 豆虫
    2020-12-9 4
    0
    怎么让模板的背景图固定不动啊,我用了background-attachment:fixed;还是会动
  • huiyueming
    2021-3-4 5
    0
    顶顶顶顶顶顶顶!!!
  • xilejun
    2021-5-22 6
    0
    哈哈,不错哦!
  • laoying
    2021-5-29 7
    0
    顶顶顶顶顶顶顶!!!
  • xiunoa 超版 楼主
    2021-7-14 8
    0
    我要拿出这帖子奉献给世人赏阅,我要把这个帖子一直往上顶,往上顶!顶到所有人都看到为止! 
  • 903683395
    2021-7-30 9
    0
    收藏一下,正找这个呢,之前改过好久不用忘了
  • 旺仔
    2021-8-2 10
    0
    楼主,你写得实在是太好了。我惟一能做的,就只有把这个帖子顶上去这件事了。 
  • geruixi
    2021-9-14 11
    0
    面对如此强贴,论遇到多大阻力,只要我一息上尚存,就绝不会让它沉沦下去,这一点请楼主放心。 
  • 46613600
    2022-3-27 12
    0
    顶顶顶顶顶顶顶!!!
  • 土巴牛
    2022-12-4 13
    0
    真的简单诶 估计我也能做一个了 哈哈 感谢分享
  • v1sth
    2022-12-10 14
    0
    面对如此强贴,论遇到多大阻力,只要我一息上尚存,就绝不会让它沉沦下去,这一点请楼主放心。 
返回