stagit

Personal stagit fork
git clone git://git.alexwennerberg.com/stagit
Log | Files | Refs | README | LICENSE

commit 516f65ffea797d22346a1acf596e69673e1c9a1d
parent 3aa669724218de28b011957f4f2e6afc85e998b6
Author: Armaan Bhojwani <me@armaanb.net>
Date:   Tue,  6 Apr 2021 11:55:11 -0400

Implement lighthouse suggestions

Diffstat:
Msrc/stagit-index.c | 3++-
Msrc/stagit.c | 4++--
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/stagit-index.c b/src/stagit-index.c @@ -67,8 +67,9 @@ writeheader(char *path) { FILE *fp = fopen(path, "w"); fputs("<!DOCTYPE html>\n" - "<html>\n<head>\n" + "<html lang=\"en\">\n<head>\n" "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n" + "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n" "<title>", fp); xmlencode(fp, description, strlen(description)); fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.png\" />\n", relpath); diff --git a/src/stagit.c b/src/stagit.c @@ -347,7 +347,7 @@ void writeheader(FILE *fp, const char *title) { fputs("<!DOCTYPE html>\n" - "<html>\n<head>\n" + "<html lang=\"en\">\n<head>\n" "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n" "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n" "<title>", fp); @@ -364,7 +364,7 @@ writeheader(FILE *fp, const char *title) fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath); fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%ssyntax.css\" />\n", relpath); fputs("</head>\n<body>\n<table><tr><td>", fp); - fprintf(fp, "<a href=\"../%s\"><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>", + fprintf(fp, "<a href=\"../%s\"><img alt=\"Go home\" src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>", relpath, relpath); fputs("</td><td><h1>", fp); xmlencode(fp, strippedname, strlen(strippedname));