0

我现在开始使用 mercurial,并且我在 localhost/hg 上有 Web 界面。

现在我想改变 Mercurial 页面的图形方面,改变外观。(CSS,图标,icon_link,...)

我到处搜索,找不到任何关于它的信息。

有人告诉我该怎么做吗?

提前致谢。

4

2 回答 2

2

我自己没有做过,所以我只能将您指向此处的 hgweb 主题文档。

(我假设您正在使用hgweb发布存储库)

于 2013-01-16T12:44:59.827 回答
0

我解决了我的问题。在我的例子中,我使用 ubuntu: 在/usr/share/mercurial/templates/paper 我们找到 index.tmpl 中我们可以更改 logoimg 和 logourl:

{header}
<title>Mercurial repositories index</title>
</head>
<body>

<div class="container">
<div class="menu">
<a href="{logourl}">
<img src="{staticurl}{logoimg}" width=75 height=90 border=0 alt="mercurial" /></a>
</div>
<div class="main">
<h2>Mercurial Repositories</h2>

<table class="bigtable">
    <tr>
        <th><a href="?sort={sort_name}">Name</a></th>
        <th><a href="?sort={sort_description}">Description</a></th>
        <th><a href="?sort={sort_contact}">Contact</a></th>
        <th><a href="?sort={sort_lastchange}">Last modified</a></th>
        <th>&nbsp;</th>
    </tr>
    {entries%indexentry}
</table>
</div>
</div>
{footer}

例如,如果我们要更改模板中的徽标 url(例如纸模板),我们需要更改所有存在 logourl 的 tmpl 文件。

$:/usr/share/mercurial/templates/paper$ grep logourl *
bookmarks.tmpl:<a href="{logourl}">
branches.tmpl:<a href="{logourl}">
changeset.tmpl:<a href="{logourl}">
error.tmpl:<a href="{logourl}">
fileannotate.tmpl:<a href="{logourl}">
filediff.tmpl:<a href="{logourl}">
filelog.tmpl:<a href="{logourl}">
filerevision.tmpl:<a href="{logourl}">
graph.tmpl:<a href="{logourl}">
help.tmpl:<a href="{logourl}">
helptopics.tmpl:<a href="{logourl}">
search.tmpl:<a href="{logourl}">
shortlog.tmpl:<a href="{logourl}">
tags.tmpl:<a href="{logourl}">

我希望这可以帮助有同样问题的人。

于 2013-01-17T10:36:40.983 回答