Руководство по Trac / Настройка интерфейса Trac |
- Statistics
- Participants
- Translate into Russian
- Translation result
- 72% translated in draft. Almost done, let's finish it!
If you do not want to register an account, you can sign in with OpenID.
TracGuide / Customizing the Trac Interface | ||
= Customizing the Trac Interface = | ||
[[TracGuideToc]] | ||
== Introduction == | ||
This page is meant to give users suggestions on how they can customize the look of Trac. Topics on this page cover editing the HTML templates and CSS files, but not the program code itself. The topics are intended to show users how they can modify the look of Trac to meet their specific needs. Suggestions for changes to Trac's interface applicable to all users should be filed as tickets, not listed on this page. | Эта страница предназначена для того, чтобы дать пользователям рекомендации по настройке внешнего вида Trac. На этой странице описывается редактирование HTML-шаблонов и CSS-файлов, но не кода программы. ?разделы? предназначены для того, чтобы показать пользователям, как они могут изменить внешний вид Trac для соответствия их нуждам. Предложения по изменению интерфейса Trac, касающиеся всех пользователей, следует вносить в виде тикетов, а не перечислять на этой странице. | |
== Project Logo and Icon == | — Иконка... грр, забыл как она называется. Может кто вспомнит? — Darion | |
The easiest parts of the Trac interface to customize are the logo and the site icon. Both of these can be configured with settings in [wiki:TracIni trac.ini]. | Элементы интерфейса Trac, которые проще всего изменить, - это логотип и иконка. Они оба могут быть настроены в файле [wiki:TracIni trac.ini]. | — Здесь и ниже - заменить, когда кто-нибудь вспомнит, как она называется. — Darion |
The logo or icon image should be put in a folder named "htdocs" in your project's environment folder. (''Note: in projects created with a Trac version prior to 0.9 you will need to create this folder'') | Картинки для логотипа или иконки должны быть размещены в папке ''htdocs'' вашего рабочего окружения. (''Заметьте, в проектах, созданных в версиях Trac ниже 0.9, вам нужно будет создать эту папку'') | |
''Note: you can actually put the logo and icon anywhere on your server (as long as it's accessible through the web server), and use their absolute or server-relative URLs in the configuration.'' | '' На самом деле вы можете разместить логотип и иконку где угодно на вашем сервере (там где они доступны через веб-сервер), и использовать их абсолютные или относительные URL в конфигурации.'' | |
Now configure the appropriate section of your [wiki:TracIni trac.ini]: | Сконфигурируем соответствующую секцию файла [wiki:TracIni trac.ini]: | |
=== Logo === | ||
Change the `src` setting to `site/` followed by the name of your image file. The `width` and `height` settings should be modified to match your image's dimensions (the Trac chrome handler uses "`site/`" for files within the project directory `htdocs` and "`common/`" for the common ones). | Поменяйте параметр `src` на `site/` + имя вашего файла-картинки. Параметры `width` и `height` необходимо изменить в соответствии с размерами вашей картинки (Trac chrome handler использует "`site/`" для файлов внутри директории проекта `htdocs` и "`common/`" для общих файлов). | — Trac chrome handler переводим? Как? — chocky |
{{{ | ||
[header_logo] | ||
src = site/my_logo.gif | ||
alt = My Project | ||
width = 300 | ||
height = 100 | ||
}}} | ||
=== Icon === | ||
Icons should be a 16x16 image in `.gif` or `.ico` format. Change the `icon` setting to `site/` followed by the name of your icon file. Icons will typically be displayed by your web browser next to the site's URL and in the `Bookmarks` menu. | Иконка должна быть картинкой размером 16х16 в формате `.gif` или `.ico`. Измените параметр `icon` на `site/` + имя вашего файла-иконки. Иконки обычно отображаются в браузере рядом с URL сайта и в меню `Закладки`. | |
{{{ | ||
[project] | ||
icon = site/my_icon.ico | ||
}}} | ||
Note though that this icon is ignored by Internet Explorer, which only accepts a file named ``favicon.ico`` at the root of the host. To make the project icon work in both IE and other browsers, you can store the icon in the document root of the host, and reference it from ``trac.ini`` as follows: | Однако обратите внимание, что Internet Explorer проигнорирует эту иконку, он допускает только файл под именем ``favicon.ico`` в корне хоста. Чтобы заставить иконку проекта работать и в IE, и в других браузерах, можно хранить иконку в корневом каталоге документов и ссылаться на нее в файле ``trac.ini`` следующим образом: |

— Это ключевое слово "Table of Contents", переводить не нужно — Darion