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) }}
20 bff58270 2022-09-19 op {! struct entry *np; !}
21 bff58270 2022-09-19 op {{ if !TAILQ_EMPTY(head) }}
24 bff58270 2022-09-19 op {{ tailq-foreach np head entries }}
25 bff58270 2022-09-19 op <li>{{ np->text }}</li>
29 bff58270 2022-09-19 op <p>no items</p>