|
Alain Reguera Delgado |
46de3c |
# -*- coding: utf-8 -*-
|
|
Alain Reguera Delgado |
46de3c |
"""
|
|
Alain Reguera Delgado |
46de3c |
This macro shows the CentOS Artwork Table of Content.
|
|
Alain Reguera Delgado |
46de3c |
"""
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
TOC = [('Identity', '1. Identity:'),
|
|
Alain Reguera Delgado |
46de3c |
('IdentityConcept', '1.1. Concept'),
|
|
Alain Reguera Delgado |
46de3c |
('IdentityLogo', '1.2. Logo'),
|
|
Alain Reguera Delgado |
46de3c |
('IdentityTypography', '1.3. Typography'),
|
|
Alain Reguera Delgado |
46de3c |
('IdentityColors', '1.4. Colors'),
|
|
Alain Reguera Delgado |
46de3c |
('IdentityNewIdeas', '1.5. New Ideas'),
|
|
Alain Reguera Delgado |
46de3c |
('Anaconda', '2. Anaconda:'),
|
|
Alain Reguera Delgado |
46de3c |
('AnacondaPrompt', '2.1. Prompt'),
|
|
Alain Reguera Delgado |
46de3c |
('AnacondaHeader', '2.2. Header'),
|
|
Alain Reguera Delgado |
46de3c |
('AnacondaSplash', '2.3. Spalsh'),
|
|
Alain Reguera Delgado |
46de3c |
('AnacondaProgress', '2.4. Progress'),
|
|
Alain Reguera Delgado |
46de3c |
('AnacondaProgressSlides', '2.4.1. Slides'),
|
|
Alain Reguera Delgado |
46de3c |
('AnacondaFirstboot', '2.5. First Boot'),
|
|
Alain Reguera Delgado |
46de3c |
('BootUp', '3. Boot Up:'),
|
|
Alain Reguera Delgado |
46de3c |
('BootUpGRUB', '3.1. GRUB'),
|
|
Alain Reguera Delgado |
46de3c |
('BootUpRHGB', '3.2. RHGB'),
|
|
Alain Reguera Delgado |
46de3c |
('BootUpGDM', '3.3. GDM'),
|
|
Alain Reguera Delgado |
46de3c |
('BootUpGnomeSplash', '3.3. GnomeSplash'),
|
|
Alain Reguera Delgado |
46de3c |
('HighVisibility', '4. High Visibility:'),
|
|
Alain Reguera Delgado |
46de3c |
('HighVisibilityWallpapers', '4.1. Wallpapers'),
|
|
Alain Reguera Delgado |
46de3c |
('Promo', '5. Promotion:'),
|
|
Alain Reguera Delgado |
46de3c |
('PromoMedia', '5.1. Media'),
|
|
Alain Reguera Delgado |
46de3c |
('PromoPosters', '5.2. Posters'),
|
|
Alain Reguera Delgado |
46de3c |
('PromoTShirts', '5.3. T-Shirts'),
|
|
Alain Reguera Delgado |
46de3c |
('PromoOOoTemplates', '5.5. OOo Templates'),
|
|
Alain Reguera Delgado |
46de3c |
('Repo', '6. Image Repositories:'),
|
|
Alain Reguera Delgado |
46de3c |
('RepoWidgets', '6.1. Widgets'),
|
|
Alain Reguera Delgado |
46de3c |
('Theming', '7. Theming:'),
|
|
Alain Reguera Delgado |
46de3c |
('ThemingApache', '7.1. Apache Web Server'),
|
|
Alain Reguera Delgado |
46de3c |
('ThemingSquid', '7.2. Squid Cache Proxy'),
|
|
Alain Reguera Delgado |
46de3c |
('ThemingBrowserDefaultPage', '7.3. Browser Default Page'),
|
|
Alain Reguera Delgado |
46de3c |
('ThemingMantis', '7.4. Mantis'),
|
|
Alain Reguera Delgado |
46de3c |
('ThemingMoin', '7.5. Moin'),
|
|
Alain Reguera Delgado |
46de3c |
('ThemingTrac', '7.5. Trac'),
|
|
Alain Reguera Delgado |
46de3c |
('ThemingPunbb', '7.5. Punbb'),
|
|
Alain Reguera Delgado |
46de3c |
('ThemingPuntal', '7.5. Puntal'),
|
|
Alain Reguera Delgado |
46de3c |
]
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
def execute(hdf, args, env):
|
|
Alain Reguera Delgado |
46de3c |
html = '' \
|
|
Alain Reguera Delgado |
46de3c |
'Table of Contents' \
|
|
Alain Reguera Delgado |
46de3c |
'
|
|
Alain Reguera Delgado |
46de3c |
curpage = '%s' % hdf.getValue('wiki.page_name', '')
|
|
Alain Reguera Delgado |
46de3c |
lang, page = '/' in curpage and curpage.split('/', 1) or ('', curpage)
|
|
Alain Reguera Delgado |
46de3c |
for ref, title in TOC:
|
|
Alain Reguera Delgado |
46de3c |
if page == ref:
|
|
Alain Reguera Delgado |
46de3c |
cls = ' class="active"'
|
|
Alain Reguera Delgado |
46de3c |
else:
|
|
Alain Reguera Delgado |
46de3c |
cls = ''
|
|
Alain Reguera Delgado |
46de3c |
html += '<li%s>%s' \
|
|
Alain Reguera Delgado |
46de3c |
% (cls, env.href.wiki(lang+ref), title)
|
|
Alain Reguera Delgado |
46de3c |
return html + ''
|