Blame Identity/Webenv/Themes/Default/Trac/0.10.4/Modern/ArtworkToc.py

f2e824
# -*- coding: utf-8 -*-
f2e824
"""
f2e824
This macro shows the CentOS Artwork Table of Content.
f2e824
"""
f2e824
f2e824
TOC = [('Identity',	   		                '

1. Identity:

'),
f2e824
       ('IdentityConcept',                  '1.1. Concept'),
f2e824
       ('IdentityLogo',			            '1.2. Logo'),
f2e824
       ('IdentityTypography',	            '1.3. Typography'),
f2e824
       ('IdentityColors',                   '1.4. Colors'),
f2e824
       ('IdentityNewIdeas',		            '1.5. New Ideas'),
f2e824
       ('Anaconda',	   		                '

2. Anaconda:

'),
f2e824
       ('AnacondaPrompt',   	    	    '2.1. Prompt'),
f2e824
       ('AnacondaHeader',	                '2.2. Header'),
f2e824
       ('AnacondaSplash',		            '2.3. Spalsh'),
f2e824
       ('AnacondaProgress', 		        '2.4. Progress'),
f2e824
       ('AnacondaProgressSlides', 		    '2.4.1. Slides'),
f2e824
       ('AnacondaFirstboot', 		        '2.5. First Boot'),
f2e824
       ('BootUp',			                '

3. Boot Up:

'),
f2e824
       ('BootUpGRUB',			            '3.1. GRUB'),
f2e824
       ('BootUpRHGB',			            '3.2. RHGB'),
f2e824
       ('BootUpGDM',			            '3.3. GDM'),
f2e824
       ('BootUpGnomeSplash',		        '3.3. GnomeSplash'),
f2e824
       ('HighVisibility',		            '

4. High Visibility:

'),
f2e824
       ('HighVisibilityWallpapers',	        '4.1. Wallpapers'),
f2e824
       ('Promo',			                '

5. Promotion:

'),
f2e824
       ('PromoMedia',			            '5.1.  Media'),
f2e824
       ('PromoPosters',			            '5.2. Posters'),
f2e824
       ('PromoTShirts',			            '5.3. T-Shirts'),
f2e824
       ('PromoOOoTemplates',		        '5.5. OOo Templates'),
f2e824
       ('Repo',				                '

6. Image Repositories:

'),
f2e824
       ('RepoWidgets',			            '6.1. Widgets'),
f2e824
       ('Theming',			                '

7. Theming:

'),
f2e824
       ('ThemingApache',		            '7.1. Apache Web Server'),
f2e824
       ('ThemingSquid',		                '7.2. Squid Cache Proxy'),
f2e824
       ('ThemingBrowserDefaultPage',        '7.3. Browser Default Page'),
f2e824
       ('ThemingMantis',		            '7.4. Mantis'),
f2e824
       ('ThemingMoin',		                '7.5. Moin'),
f2e824
       ('ThemingTrac',		                '7.5. Trac'),
f2e824
       ('ThemingPunbb',		                '7.5. Punbb'),
f2e824
       ('ThemingPuntal',		            '7.5. Puntal'),
f2e824
       ]
f2e824
f2e824
def execute(hdf, args, env):
f2e824
    html = '
' \
f2e824
           '

Table of Contents

' \
f2e824
           '
    '
f2e824
    curpage = '%s' % hdf.getValue('wiki.page_name', '')
f2e824
    lang, page = '/' in curpage and curpage.split('/', 1) or ('', curpage)
f2e824
    for ref, title in TOC:
f2e824
        if page == ref:
f2e824
            cls =  ' class="active"'
f2e824
        else:
f2e824
            cls = ''
f2e824
        html += '<li%s>%s' \
f2e824
                % (cls, env.href.wiki(lang+ref), title)
f2e824
    return html + ''