logo

etc_portage

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/etc_portage.git

0009-Use-common-path-for-assets-style.css-logo.png.patch (2012B)


  1. From 8c648491538dc93052127d352fc880996138eb05 Mon Sep 17 00:00:00 2001
  2. From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
  3. Date: Tue, 4 Apr 2017 18:56:41 +0200
  4. Subject: [PATCH 09/22] Use common path for assets(style.css & logo.png)
  5. ---
  6. config.h | 1 +
  7. stagit.c | 8 ++++----
  8. 2 files changed, 5 insertions(+), 4 deletions(-)
  9. diff --git a/config.h b/config.h
  10. index 72da0f4..09a5b79 100644
  11. --- a/config.h
  12. +++ b/config.h
  13. @@ -1,3 +1,4 @@
  14. /* See LICENSE file for copyright and license details. */
  15. static const unsigned summarylen = 70; /* summary length in the log */
  16. static const int showlinecount = 1; /* display line count or file size in file tree index */
  17. +static const char *assetpath = "/git/"; /* Where are the assets (example: assetpath/style.css ) */
  18. diff --git a/stagit.c b/stagit.c
  19. index 78390c9..33edd82 100644
  20. --- a/stagit.c
  21. +++ b/stagit.c
  22. @@ -352,13 +352,13 @@ writeheader(FILE *fp, const char *title)
  23. if (description[0])
  24. fputs(" - ", fp);
  25. xmlencode(fp, description, strlen(description));
  26. - fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.png\" />\n", relpath);
  27. + fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.png\" />\n", assetpath);
  28. fprintf(fp, "<link rel=\"alternate\" type=\"application/atom+xml\" title=\"%s Atom Feed\" href=\"%satom.xml\" />\n",
  29. name, relpath);
  30. - fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath);
  31. + fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", assetpath);
  32. fputs("</head>\n<body>\n<table><tr><td>", fp);
  33. - fprintf(fp, "<a href=\"../%s\"><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>",
  34. - relpath, relpath);
  35. + fprintf(fp, "<a href=\"..\"><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>",
  36. + assetpath);
  37. fputs("</td><td><h1>", fp);
  38. xmlencode(fp, strippedname, strlen(strippedname));
  39. fputs("</h1><span class=\"desc\">", fp);
  40. --
  41. 2.26.2