idiotbox-c

youtube web application in C
git clone git://git.codemadness.org/idiotbox-c
Log | Files | Refs | README | LICENSE

commit a15cae3be505971d8c4d4945bcae76c4f5894095
parent 137c5972a0b011aa94756dbc3312b8fb27e106cf
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Thu, 28 Jun 2018 20:30:01 +0200

HTML formatting

Diffstat:
main.c | 31+++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)

diff --git a/main.c b/main.c @@ -770,22 +770,22 @@ render(void) continue; OUT( "<tr class=\"v\">\n" - "<td class=\"thumb\" width=\"120\" align=\"center\">\n" - "<a href=\"https://www.youtube.com/embed/"); + " <td class=\"thumb\" width=\"120\" align=\"center\">\n" + " <a href=\"https://www.youtube.com/embed/"); xmlencode(videos[i].id); OUT("\"><img src=\"https://i.ytimg.com/vi/"); xmlencode(videos[i].id); OUT( "/default.jpg\" alt=\"\" height=\"90\" border=\"0\" /></a>\n" - "</td>\n" - "<td>\n" - "<span class=\"title\"><a href=\"https://www.youtube.com/embed/"); + " </td>\n" + " <td>\n" + " <span class=\"title\"><a href=\"https://www.youtube.com/embed/"); xmlencode(videos[i].id); printf("\" accesskey=\"%d\">", i); xmlencode(videos[i].title); OUT( "</a></span><br/>" - "<span class=\"channel\" title=\""); + " <span class=\"channel\" title=\""); xmlencode(videos[i].channeltitle); OUT(" RSS/Atom feed\"><a href=\"https://www.youtube.com/feeds/videos.xml?channel_id="); xmlencode(videos[i].channelid); @@ -793,13 +793,13 @@ render(void) xmlencode(videos[i].channeltitle); OUT( "</a></span><br/>\n" - "<span class=\"publishedat\" title=\""); + " <span class=\"publishedat\" title=\""); xmlencode(videos[i].publishedat); OUT("\">Published: "); friendlytime(videos[i].publishedat); OUT( "</span><br/>\n" - "<span class=\"stats\">"); + " <span class=\"stats\">"); fancycount(strtoll(videos[i].viewcount, NULL, 10)); OUT(" views "); fancycount(strtoll(videos[i].likecount, NULL, 10)); @@ -807,15 +807,18 @@ render(void) fancycount(strtoll(videos[i].dislikecount, NULL, 10)); OUT( " dislikes" - "</span><br/>\n" - "</td>\n" - "<td align=\"right\" class=\"a-r\">\n" - " <span class=\"duration\">"); + " </span><br/>\n" + " </td>\n" + " <td align=\"right\" class=\"a-r\">\n" + " <span class=\"duration\">"); printduration(parseiso8601duration(videos[i].duration)); OUT( - "</span>\n</td>\n" + " </span>\n" + " </td>\n" "</tr>\n" - "<tr class=\"hr\"><td colspan=\"3\"><hr/></td></tr>"); + "<tr class=\"hr\">\n" + " <td colspan=\"3\"><hr/></td>\n" + "</tr>"); } OUT("</tbody>\n");