File: config

package info (click to toggle)
libtemplate-perl 2.14-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 5,496 kB
  • ctags: 667
  • sloc: perl: 15,349; makefile: 62; xml: 7; sh: 5
file content (71 lines) | stat: -rw-r--r-- 2,088 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
[%  PROCESS docset/config;
    bookname = template.book;
    pagename = template.page;
    book = docset.books.$bookname;
    page = book.pages.$pagename;
    nextpage = book.pages.${page.next};
    prevpage = book.pages.${page.prev};

    # macro for resolving links of the form L<Template::Manual::Config>
    MACRO ttlink(link, text) PROCESS link;

    # macro for resolving a link from the current page
    MACRO uplink(link) BLOCK;
	prefix = page.uplink ? "$page.uplink/" : '';
	"${prefix}$link";
    END;

    # define links from this page to main index and book index
    rootindex = uplink('index.html');
    bookindex = uplink(book.pages.index.url);

    # build list of tabs for each book
    booktabs = [ ];
    FOREACH bid = docset.booklist;
	b = docset.books.$bid;
	p = b.pagelist.size == 1 ? b.pagelist.0 : 'index';
	p = b.pages.$p;
	t = { text = b.id, link = uplink(p.url) };
	booktabs.push(t);
    END;

    # build buttons for page navigation menu
    pagemenu = [ 
        { link = rootindex, text = 'Index' }
    ];
    b = { link = bookindex, text = "$book.name" };
    pagemenu.push(b) UNLESS page.id == book.pages.index.id;
    b = { link = '#top', text = 'Top' };
    pagemenu.push(b);

    # build buttons for prev/next navigation menu
    navigate = [ ];
    navleft = 0; navright = 0;
    IF prevpage;
	b = {
	    text = prevpage.title
	    link = uplink(prevpage.url)
	};
	navleft = 1;
	navigate.push(b);
    END;
    IF nextpage;
	b = { 
	    text = nextpage.title
	    link = uplink(nextpage.url)
	};
        navright=1;
        navigate.push(b);
    END;

    tt_start_tag = "<b>[\%"
    tt_end_tag   = "%\]</b>";
    tt_homepage  = 'http://www.template-toolkit.org/';

    SET splash.style.select.col.fore  = splash_fg IF splash_fg;
    SET splash.style.default.col.fore = splash_bg IF splash_bg;
    SET splash.style.select.col.text  = splash_ft IF splash_ft;
    SET splash.style.select.col.icon  = splash_ft IF splash_ft;
    SET splash.style.default.col.text = splash_bt IF splash_bt;
    SET splash.style.default.col.icon = splash_bt IF splash_bt;
-%]