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"
5 ebc9d200 2022-12-04 op #include "tmpl.h"
7 bff58270 2022-09-19 op int list(struct template *, struct tailhead *);
11 bff58270 2022-09-19 op {{ define base(struct template *tp, struct tailhead *head) }}
12 bff58270 2022-09-19 op <!doctype html>
15 bff58270 2022-09-19 op {{ render list(tp, head) }}
20 bff58270 2022-09-19 op {{ define list(struct template *tp, struct tailhead *head) }}
22 9c75d045 2022-10-03 op struct entry *np;
25 bff58270 2022-09-19 op {{ if !TAILQ_EMPTY(head) }}
28 bff58270 2022-09-19 op {{ tailq-foreach np head entries }}
29 bff58270 2022-09-19 op <li>{{ np->text }}</li>
33 bff58270 2022-09-19 op <p>no items</p>
37 9c75d045 2022-10-03 op {{ for i = 0; i < 3; ++i }}
38 9c75d045 2022-10-03 op hello{{ " " }}