use table layout for twtxt feed preview
This commit is contained in:
parent
1c0bd73dab
commit
acc2de6dd7
1 changed files with 5 additions and 4 deletions
9
main.c
9
main.c
|
@ -83,7 +83,7 @@ int gettwtxt(FILE* f) {
|
|||
char *l, *d, *m;
|
||||
FILE* twtxt = fopen(SITEROOT "twtxt.txt", "r");
|
||||
|
||||
scat(buf, "<div id='twtxtFeed'><h2>recent activity:</h2>");
|
||||
scat(buf, "<div id='twtxtFeed'><h2>recent activity:</h2><table>");
|
||||
if (!twtxt) {
|
||||
error("Get twtxt feed", "no twtxt.txt");
|
||||
return 0;
|
||||
|
@ -98,10 +98,11 @@ int gettwtxt(FILE* f) {
|
|||
l++;
|
||||
}
|
||||
scat(msgbuf, l);
|
||||
scat(buf, "<tr><td style='white-space:nowrap;vertical-align: top;'>");
|
||||
scat(buf, datebuf);
|
||||
scat(buf, ": ");
|
||||
scat(buf, ":</td><td> ");
|
||||
scat(buf, msgbuf);
|
||||
scat(buf, "<br/>");
|
||||
scat(buf, "</td></tr>");
|
||||
d = datebuf;
|
||||
while (*d) {
|
||||
*d++ = 0;
|
||||
|
@ -112,7 +113,7 @@ int gettwtxt(FILE* f) {
|
|||
}
|
||||
i++;
|
||||
}
|
||||
scat(buf, "<a href='/twtxt.txt'>see all</a>");
|
||||
scat(buf, "</table><a href='/twtxt.txt'>see all</a>");
|
||||
scat(buf, "</div>");
|
||||
fputs(buf, f);
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue