]> git.armaanb.net Git - stagit.git/commitdiff
Implement lighthouse suggestions
authorArmaan Bhojwani <me@armaanb.net>
Tue, 6 Apr 2021 15:55:11 +0000 (11:55 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Tue, 6 Apr 2021 15:55:11 +0000 (11:55 -0400)
src/stagit-index.c
src/stagit.c

index 545fda3909d2d59e0320989f51a4ed725b476fe2..ecdfbc1b52af277e462b69ae7f19158688a521b1 100644 (file)
@@ -67,8 +67,9 @@ writeheader(char *path)
 {
        FILE *fp = fopen(path, "w");
        fputs("<!DOCTYPE html>\n"
 {
        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 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);
                "<title>", fp);
        xmlencode(fp, description, strlen(description));
        fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.png\" />\n", relpath);
index b5580b8cc772f7bebd6533cd437d0aae98ef6766..247fe704d42aac14c2b78348849f7c4d11974680 100644 (file)
@@ -347,7 +347,7 @@ void
 writeheader(FILE *fp, const char *title)
 {
        fputs("<!DOCTYPE html>\n"
 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);
                "<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, "<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));
                relpath, relpath);
        fputs("</td><td><h1>", fp);
        xmlencode(fp, strippedname, strlen(strippedname));