如何在默认主题trac中使用自定义css样式?

时间:2009-09-04 11:55:56

标签: css trac

我的trac安装有问题(版本11.4)。我该怎么做才能改变默认主题中的某些颜色?我在网上发现了各种提示,但没有任何效果,因为大多数提示都是针对10.x版本的。

trac.ini中是否有任何选项,还是应该在我的环境中的某处添加特殊的xyz.css?

请帮帮我,我不喜欢默认的黑&白色设计;)

2 个答案:

答案 0 :(得分:3)

可以找到有关如何为版本0.11执行此操作的说明at the Trac site,此处是该页面中添加自定义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>

答案 1 :(得分:2)

另一个选择是安装Trac Theme

相关问题