我的 trac 安装(版本 11.4)有一些问题。我应该怎么做才能改变默认主题中的一些颜色?我在网上找到了各种技巧,但没有任何效果,因为大多数技巧都是针对 10.x 版本的。
trac.ini 中是否有任何选项,或者我应该在我的环境中的某处添加一个特殊的 xyz.css?
请帮帮我,我不喜欢默认的黑白设计;)
可以在 Trac 站点找到有关如何为 0.11 版执行此操作的说明,这是该页面中添加自定义 CSS 以及页眉和页脚的示例。
假设您要添加指向自定义样式表的链接,然后添加您自己的页眉和页脚。创建一个文件 /path/to/env/templates/site.html 或 /path/to/inherit/option/templates_dir/site.html,内容如下:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
py:strip="">
<!--! Add site-specific style sheet -->
<head py:match="head" py:attrs="select('@*')">
${select('*')}
<link rel="stylesheet" type="text/css"
href="${href.chrome('site/style.css')}" />
</head>
<body py:match="body" py:attrs="select('@*')">
<!--! Add site-specific header -->
<div id="siteheader">
<!--! Place your header content here... -->
</div>
${select('*|text()')}
<!--! Add site-specific footer -->
<div id="sitefooter">
<!--! Place your footer content here... -->
</div>
</body>
</html>
另一种选择是安装Trac Theme。