Mar. 2nd, 2009

shoorick: (Default)

Проблема:
при апгрейде trac с 0.10 на 0.11 пропала собственная раскраска: все проекты выглядят одинаково.

Причина:
в 0.11 сменился шаблонизатор.

Решение:
для каждого проекта надо:

  1. перенести файл templates/site_css.cs в htdocs/style.css, попутно выкинув из него первые четыре строки:
    <?cs
    ##################################################################
    # Site CSS - Place custom CSS, including overriding styles here.
    ?>
  2. создать файл templates/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('@*')">
        ${select('*|text()')}
      </body>
    </html>
    

Этого вполне достаточно. См. также TracInterfaceCustomization.

Profile

shoorick: (Default)
shoorick

December 2016

S M T W T F S
    1 23
45678910
11121314151617
18 19 2021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 28th, 2025 12:11 am
Powered by Dreamwidth Studios