]> Pileus Git - site/blob - src/html.h
Initial site
[site] / src / html.h
1 /* Links */
2 #define PILEUS   "http://pileus.org/"
3
4 #define DEV_LIST "http://pileus.org/mailman/listinfo/dev"
5 #define DEV_ARCH "http://pileus.org/pipermail/dev/"
6
7 /* Constants */
8 #define BASE "pages"
9
10 /* Forward declarations */
11 typedef struct page_t page_t;
12 typedef struct menu_t menu_t;
13
14 /* Menu display display types */
15 typedef enum {
16         SHOW_NORMAL,
17         SHOW_ACTIVE,
18         SHOW_HIDDEN,
19 } show_t;
20
21 /* Page information */
22 struct page_t {
23         char     *title; // title tag
24         char     *keys;  // meta keywords tag, or NULL
25         char     *desc;  // meta description tag, or NULL
26         char     *text;  // unfiltered text
27         char     *html;  // generated html
28 };
29
30 /* Navigation menu entry */
31 struct menu_t {
32         char     *path;  // path to the page
33         char     *name;  // name of the page
34         char     *base;  // base file name of the page
35         menu_t   *next;  // next menu item
36         menu_t   *kids;  // child menu items for directories
37         show_t    show;  // is this part of the current path?
38 };
39
40 /* Helper functions */
41 void href(const char *url);
42
43 void print_link(char *path, char *name, int cur);
44 void print_menu(menu_t *menu, int first, int last);
45
46 /* Global functions */
47 void print_header(void);
48 void print_page(page_t *page, menu_t *menu);