题
我们使用托管的Trac。 它使用元史的模板。 我认为,我们可以提交自己的site.html。 我们想摆脱Trac的标准页脚。 什么是这样做的最优雅的方式?
我怀疑,答案是在一些不错的元史把戏。 我不知道,也不元史Trac系统的补充它。 我试了预感几件事情,但没有奏效。
我试图CSS
<style type="text/css">
#footer
{
visibility:hidden;
}
</style>
这是确定的,除非你想用你自己的页脚(称为“#sitefooter”)。 此人能经过“#footer的”,和隐藏页脚留下难看的白色空间。
然后我试图jquery的:
<script>
jQuery(document).ready(function($) { $("#footer").text(''); });
</script>
这是好的但我不知道有多宽jQuery的支持,真的是。
解决方案
我没有最近的TRAC的拷贝对我目前捅到尽可能走的模板,但对于CSS,你想尝试
display: none;
margin: 0;
padding: 0;
代替
的visibility:hidden;
能见度隐藏物品仍然占用空间。
其他提示
在最优雅的方式是只改变它在trac.ini。 页脚设定在trac.ini,这是默认:
[project]
footer = Visit the Trac open source project at<br /><a href="http://trac.edgewall.org/">http://trac.edgewall.org/</a>
最优雅的方式是修改site.html下
/path-to-trac/projectname/templates/
实施例site.html文件:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://genshi.edgewall.org/" py:strip="">
<!--! Custom match templates go here -->
<div py:match="div[@id='footer']">
<!-- put custom footer markup here -->
</div>
</html>
信用到的Marcin。
不隶属于 StackOverflow