banner customization

24 views
Skip to first unread message

Joe Bird

unread,
Oct 29, 2021, 10:31:12 AM10/29/21
to Trac Users
Hi,
I'm trying to customize the header, in trac interface.
I did customize a new logo, as explained in the documentation.

I did modify the  site_header.html in the templates directory as follow

<!-- site_header.html: Add site-specific header -->
<link rel="stylesheet" type="text/css" href="href.chrome('site/ux_header.css')}"/>
    <div id="siteheader">
    <mtitle>
<strong>UUX, make your own custom distro</strong>
    </mtitle>
    </div>site/ux_header.css'

<!-- /site_header.html -->

I did also define a specific css for the header (site/ux_header.css) as follow 

mtitle strong {
color: green;
margin: 100px;
}

The thing is the logo is declared in the banner div, not in the siteheader div. 
(see attachement)
In fact  they are defined at the same level so,
my new style sheet do not apply to the logo.

Hence i'm getting the following result (see attachment)

Note: I also try to use site/style.css with the proper css, but it does not apply
to the header.

Any idea ?

Mfg
Jacques


Capture d’écran du 2021-10-29 16-24-53.png
Capture d’écran du 2021-10-29 16-20-45.png

RjOllos

unread,
Oct 29, 2021, 1:17:21 PM10/29/21
to Trac Users
Are you using Trac 1.4 or later?

I think you want to put the custom stylesheet in site_head.html and use CSS selectors to apply the styles to the banner div and siteheader div.


Ryan 

J Cornily

unread,
Nov 2, 2021, 5:07:14 PM11/2/21
to trac-...@googlegroups.com
Hi,
I'm using 1.4.2
I don't it's possible.
At present if you want to customize the upper part of the Gui.
One basic thing is to configure the logo. You do it through trac.ini and its fine.
This is managed as followed

<div id="banner">
      <div id="header">
        <a id="logo" href="http://bp01:8080/ux">
          <img alt="UX custom distrib generator" height="120" src="/ux/chrome/site/ux.png"></a>
      </div>
      <form id="search" action="/ux/search" method="get">
        <div>
          <label for="proj-search">Recherche&nbsp;:</label>
          <input type="text" id="proj-search" name="q" size="18" value="" dcvalue="">
          <input type="submit" value="Recherche" dcvalue="Recherche">
        </div>
      </form>
          <div id="metanav" class="nav">
      <ul><li class="first">Connecté en tant qu'utilisateur <span class="trac-author-user">UX</span></li><li><form action="/ux/logout" class="trac-logout" id="logout" method="post"><div><button name="logout" type="submit">Déconnexion</button><input name="__FORM_TOKEN" type="hidden" value="b97e4b8bbea8c2ba1f2c6e28"></div></form></li><li><a href="/ux/prefs">Préférences</a></li><li><a href="/ux/wiki/TracGuide">Aide / Guide</a></li><li class="last"><a href="/ux/about">À propos de Trac</a></li></ul>
    </div> 

What i'm trying to achieve something like.


--------------- ------------------------------
|     LOGO  |        My project title    |
----------------------------------------------

I can define my My project title by adding this in 
<!-- site_header.html: Add site-specific header --> site_header.html
    <div id="siteheader">
    <uxtitle>

<strong>UUX, make your own custom distro</strong>
    </uxtitle>
    </div>
<!-- /site_header.html -->

Unfortunately i get 

------------------------------
|        My project title    |
--------------- 
|     LOGO  | 
-----------------

Because the logo belongs to the div called banner/header
and the my "Project title belongs to the div siteheader

Any idea , how i could achieve this ?

Best Regards
Jacques












--
You received this message because you are subscribed to a topic in the Google Groups "Trac Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/trac-users/BFYx8rkFoOc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to trac-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/d0298e78-0bf3-4703-a6e3-c64161070711n%40googlegroups.com.

J Cornily

unread,
Nov 2, 2021, 8:06:51 PM11/2/21
to trac-...@googlegroups.com
Hi
I finally managed to do what i wanted
So
     I wrote my own stylesheet included it in site_head.html (as written in the doc)
     I created a specific site_header.html (as written in the doc)

     But for the logo (trac.ini), i created a blank logo (as there is no control on it , it belongs to the banner div)
     Could be interesting, to have the possibility to disable it completely in trac.ini
Best Regards
Jacques
     



Le ven. 29 oct. 2021 à 19:17, RjOllos <rjo...@gmail.com> a écrit :
--

Jun Omae

unread,
Nov 3, 2021, 3:24:23 AM11/3/21
to trac-...@googlegroups.com
On Wed, Nov 3, 2021 at 9:06 AM 'J Cornily' via Trac Users
<trac-...@googlegroups.com> wrote:
> But for the logo (trac.ini), i created a blank logo (as there is no control on it , it belongs to the banner div)
> Could be interesting, to have the possibility to disable it completely in trac.ini

Configuring [header_logo] src option with empty, the logo in header
will be disabled.

--
Jun Omae <jun...@gmail.com> (大前 潤)
Reply all
Reply to author
Forward
0 new messages