summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOscar Benedito <oscar@oscarbenedito.com>2020-07-10 19:37:51 +0200
committerOscar Benedito <oscar@oscarbenedito.com>2020-07-30 12:44:17 +0200
commit2362fc8e586cfb631eef30db40529fbf54341651 (patch)
treed8af52061ddcc510cc0ba4d207df75758159410a
parentd04741c8d606c1c7252c1c91142efe4e84e8d7da (diff)
Change appearence of stagit-index
-rw-r--r--stagit-index.c25
-rw-r--r--style.css25
2 files changed, 23 insertions, 27 deletions
diff --git a/stagit-index.c b/stagit-index.c
index c4bdd22..8fcaf6c 100644
--- a/stagit-index.c
+++ b/stagit-index.c
@@ -12,7 +12,7 @@ static git_repository *repo;
static const char *relpath = "";
-static char description[255] = "Repositories";
+static char description[255] = "Oscar Benedito's Git repositories";
static char *name = "";
static char owner[255];
@@ -67,19 +67,15 @@ writeheader(FILE *fp)
"<html>\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\">\n"
- "<title>", fp);
- xmlencode(fp, description, strlen(description));
- fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.ico\" />\n", relpath);
+ "<title>Git Repositories | Oscar Benedito</title>\n", fp);
+ fprintf(fp, "<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.ico\" />\n", relpath);
fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath);
- fputs("</head>\n<body>\n", fp);
- fprintf(fp, "<table>\n<tr><td><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></td>\n"
- "<td><span class=\"desc\">", relpath);
+ fputs("</head>\n<body id=\"home\">\n<h1>", fp);
xmlencode(fp, description, strlen(description));
- fputs("</span></td></tr><tr><td></td><td>\n"
- "</td></tr>\n</table>\n<hr/>\n<div id=\"content\">\n"
- "<table id=\"index\"><thead>\n"
- "<tr><td><b>Name</b></td><td><b>Description</b></td><td><b>Owner</b></td>"
- "<td><b>Last commit</b></td></tr>"
+ fputs("</h1>\n<div id=\"content\">\n"
+ "<h2 id=\"repositories\">Repositories</h2>\n"
+ "<div class=\"table-container\">\n<table id=\"index\"><thead>\n"
+ "<tr><td><b>Name</b></td><td><b>Description</b></td><td><b>Last commit</b></td></tr>"
"</thead><tbody>\n", fp);
}
@@ -87,8 +83,7 @@ void
writefooter(FILE *fp)
{
fputs("</tbody>\n</table>\n</div>\n"
- "<div id=\"contribute\">\n"
- "<h1>Contribute</h1>\n"
+ "<h2 id=\"contribute\">Contribute</h2>\n"
"<p>The best way to contribute to my repositories is through e-mail, check out <a href=\"https://git-send-email.io\">git-send-email.io</a> if you don’t know how to do that. Send your patches to <a href=\"mailto:patches@oscarbenedito.com\">patches@oscarbenedito.com</a> and change the subject prefix to specify the repository you are sending the patch for. You can do that running the following command from the git repository:</p>\n"
"<pre><code>git config format.subjectPrefix \"PATCH &lt;name-of-repository&gt;\"</code></pre>\n"
"<p>You can also contribute on <a href=\"https://gitlab.com/oscarbenedito\">GitLab</a> or <a href=\"https://github.com/oscarbenedito\">GitHub</a> (all my public repositories should be on both platforms) doing pull requests.</p>\n"
@@ -131,8 +126,6 @@ writelog(FILE *fp)
fputs("</a></td><td>", fp);
xmlencode(fp, description, strlen(description));
fputs("</td><td>", fp);
- xmlencode(fp, owner, strlen(owner));
- fputs("</td><td>", fp);
if (author)
printtimeshort(fp, &(author->when));
fputs("</td></tr>", fp);
diff --git a/style.css b/style.css
index f17619c..118e1e4 100644
--- a/style.css
+++ b/style.css
@@ -16,24 +16,15 @@ body {
padding: 5px;
}
-#content {
+#content, .table-container {
max-width: 800px;
overflow-x: auto;
margin: auto;
}
-#contribute {
- max-width: 800px;
- margin: auto;
- margin-top: 2.5em;
-}
-
-#contribute h1 {
- font-size: 1.25em;
-}
-
#log, #index {
min-width: 600px;
+ width: 100%;
overflow-x: auto;
}
@@ -48,6 +39,18 @@ a {
color: var(--links);
}
+#home h1 {
+ font-size: 1.5em;
+ text-align: center;
+ margin-top: 1em;
+}
+
+#home h2 {
+ font-size: 1.25em;
+ margin-top: 2.5em;
+ margin-bottom: 1em;
+}
+
h1, h2, h3, h4, h5, h6 {
font-size: 1em;
margin: 0;