Edgewall Software

Changes between Version 3 and Version 4 of CookBook/TracLayoutRecipe


Ignore:
Timestamp:
Aug 4, 2015, 8:22:51 PM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • CookBook/TracLayoutRecipe

    v3 v4  
     1[[PageOutline(2-5,Contents,pullout)]]
     2
    13= Trac Layout Recipe
    24
     
    68
    79== Prepare `site.html` Template
     10
    811The first step is to prepare a `site.html` template that will be used by all projects.
    912
    1013There are two ways to specify a `site.html` template for an environment:
    11 1. Set the `templates_dir` in the `[inherit]` section of each `trac.ini` to a shared directory (e.g. `/path/to/common/templates`), and save the `site.html` file in that directory. The `templates_dir` may also be specified in a [TracIni#GlobalConfiguration global configuration] that is included in each environment's configuration through the `file` option in the `[inherit]` section of trac.ini.
    12 1. Copy the `site.html` file to the `templates` directory of all environments (or better yet, create symlink in all directories to a single common location).
     14 1. Set the `templates_dir` in the `[inherit]` section of each `trac.ini` to a shared directory (e.g. `/path/to/common/templates`), and save the `site.html` file in that directory. The `templates_dir` may also be specified in a [TracIni#GlobalConfiguration global configuration] that is included in each environment's configuration through the `file` option in the `[inherit]` section of `trac.ini`.
     15 1. Copy the `site.html` file to the `templates` directory of all environments, or better yet, create a symlink in all directories to a single common location.
    1316
    1417A reference `site.html` template may be found in the `templates` directory of the [attachment:TracLayoutRecipe.zip zip archive] attached to this page.
    15 The reference file is documented inline, so I will just give a short overview of the template:
    16 - It begins by adding a [#SiteCss CSS file] to the ''head'' -- make sure to update the URL if needed for your setup.
    17 - It includes a list of topnav items as quick-jumps between projects -- make sure to modify it to your specific project-list, as it is hardcoded.
    18 - It includes a left box and right box that will appear on the left-hand side and right-hand side of each page. You can use these boxes for whatever you want (e.g. quick links, Google ads, etc.).[[BR]]
    19  An example for a left box is included in `templates/site_leftbox.html` in the [attachment:TracLayoutRecipe.zip zip archive].[[BR]]
    20  There is no right box in the example...
    21 - There's also a footer section for contact & copyrights information (or anything else you'd like to put there).
     18
     19The reference file is documented inline, so here is an abbreviated overview of the template:
     20 - It begins by adding a [#SiteCss CSS file] to the '''head''' -- make sure to update the URL if needed for your setup.
     21 - It includes a list of '''topnav''' items as quick-jumps between projects -- make sure to modify it to your specific project-list, as it is hardcoded.
     22 - It includes a '''left box''' and '''right box''' that will appear on the left-hand side and right-hand side of each page. You can use these boxes for whatever you want (e.g. quick links, Google ads, etc.). An example for a left box is included in `templates/site_leftbox.html` in the [attachment:TracLayoutRecipe.zip zip archive]. There is no right box in the example.
     23 - There is also a '''footer''' section for contact and copyright information, or anything else you like to put there.
    2224
    2325== Adjust the Site Style Sheet #SiteCss
    24 A reference `projects.css` stylesheet is included in the attached [attachment:TracLayoutRecipe.zip zip archive] (under the `css` directory), with the styles of the edgewall.org site. As with the site template, the stylesheet must also be accessible by each project environment. It may be placed in the directory specified by the `htdocs_dir` option in the `[inherit]` section of trac.ini, or in the project environment's `htdocs` directory.
    2526
    26 You may modify and adjust the style sheet to meet your artistic taste.
     27A reference `projects.css` stylesheet is included in the attached [attachment:TracLayoutRecipe.zip zip archive] (under the `css` directory), with the styles of the edgewall.org site. As with the site template, the stylesheet must also be accessible by each project environment. It may be placed in the directory specified by the `htdocs_dir` option in the `[inherit]` section of your `trac.ini` file, or in the project environment's `htdocs` directory.
    2728
    28 One important thing to notice with respect to the `projects.css` file is that it refers to various images (used for backgrounds, gradients, etc.).
     29You may modify the stylesheet to meet your artistic taste.
    2930
    30 The images are found in the `gfx` directory of the attached [attachment:TracLayoutRecipe.zip zip archive],
    31 but the `projects.css` file assumes that the images are available under the `../gfx` directory, where `..` refers to one level up relative to the directory in which the `projects.css` is located.
     31One important thing to note with respect to the `projects.css` file is that it refers to various images used for backgrounds, gradients, etc.
    3232
    33 You must make sure that one of the following is met:
    34 1. The `gfx` directory is visible, and is one level up relative to the `css` directory.
    35 2. All references to `../gfx` in `projects.css` are replaced with a correct URL.
     33The images are found in the `gfx` directory of the attached [attachment:TracLayoutRecipe.zip zip archive], but the `projects.css` file assumes that the images are available under the `../gfx` directory, where `..` refers to one level up relative to the directory in which the `projects.css` is located.
     34
     35Make sure that one of the following is met:
     36 1. The `gfx` directory is visible, and is one level up relative to the `css` directory.
     37 1. All references to `../gfx` in `projects.css` are replaced with a correct URL.
     38
    3639Note that the paths in this context are URLs, not filesystem paths.
    3740