2 bff58270 2022-09-19 op #include <sys/queue.h>
3 bff58270 2022-09-19 op #include <string.h>
4 bff58270 2022-09-19 op #include "lists.h"
6 bff58270 2022-09-19 op int list(struct template *, struct tailhead *);
10 bff58270 2022-09-19 op {{ define base(struct template *tp, struct tailhead *head) }}
11 bff58270 2022-09-19 op <!doctype html>
14 bff58270 2022-09-19 op {{ render list(tp, head) }}
19 bff58270 2022-09-19 op {{ define list(struct template *tp, struct tailhead *head) }}
21 9c75d045 2022-10-03 op struct entry *np;
24 bff58270 2022-09-19 op {{ if !TAILQ_EMPTY(head) }}
27 bff58270 2022-09-19 op {{ tailq-foreach np head entries }}
28 bff58270 2022-09-19 op <li>{{ np->text }}</li>
32 bff58270 2022-09-19 op <p>no items</p>
36 9c75d045 2022-10-03 op {{ for i = 0; i < 3; ++i }}
37 9c75d045 2022-10-03 op hello{{ " " }}