質問

I started using mercurial now, and I have the web interface on localhost/hg.

Now I wanted to change the graphic aspect of the Mercurial page, change the look. (CSS, icon, icon_link, ...)

I've searched everywhere and can not find anything about it.

Someone tell me how to do?

Thanks in advance.

役に立ちましたか?

解決

I haven't done it myself so I can't help more than pointing you to the hgweb theming documentation which is here.

(I'm assuming that you are using hgweb to publish the repositories)

他のヒント

I solved my problem. In my case I use ubuntu: in /usr/share/mercurial/templates/paper we find the index.tmpl where we can change the logoimg and 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}

for example if We want to change the logo url in template(e.g. paper template) we need to change in all tmpl files where the logourl exist.

$:/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}">

I hope this can help someone with the same problem.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top