From 61bf72aca45739ee1437aecd8be75be3d4cd5f89 Mon Sep 17 00:00:00 2001 From: acidvegas Date: Fri, 16 Jun 2023 21:07:29 -0400 Subject: [PATCH] Added a contacts/mirrors header on the home page --- assets/helper | 3 ++- stagit-index.c | 8 ++++++-- stagit.c | 6 ++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/assets/helper b/assets/helper index 352b03b..097a48f 100755 --- a/assets/helper +++ b/assets/helper @@ -21,6 +21,7 @@ find_repos() { prepair() { [ -d $HTML_DIR ] && rm -rf $HTML_DIR/* mkdir -p $HTML_DIR/assets + echo "[~] populating custom assets..." cp acidvegas.png favicon.png logo.png mostdangerous.png style.css $HTML_DIR/assets echo $URL > $HTML_DIR/CNAME } @@ -59,7 +60,7 @@ make_repos() { echo "[~] processing '$REPO' repository..." mkdir -p $HTML_DIR/$REPO && cd $HTML_DIR/$REPO && stagit -l $COMMIT_LIMIT -u "$PROTO://$URL/$REPO" $dir ln -sf log.html index.html - #git --git-dir $dir/.git archive --format=tar.gz -o "$HTML_DIR/$REPO/$REPO.tar.gz" --prefix="$REPO/" HEAD + git --git-dir $dir/.git archive --format=tar.gz -o "$HTML_DIR/$REPO/$REPO.tar.gz" --prefix="$REPO/" HEAD done } diff --git a/stagit-index.c b/stagit-index.c index f6b5cbf..47eab80 100644 --- a/stagit-index.c +++ b/stagit-index.c @@ -80,8 +80,12 @@ void writeheader(FILE *fp) { "\n", fp); fputs("\n" "\n", fp); - fputs("
\n
\n

\n" - "
\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t", fp); + fputs("
\n
\n

\n", fp); + fputs("
\n\t
\n\t
NameDescriptionLast commit
\n\t\t\n\t
\n" + "contact : discordircmailtwitter\n" + "
mirrors : githubgitlabsourcehutsupernets\n" + "\t\t
\n\t
\n\n
\n", fp); + fputs("
\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t", fp); } void writefooter(FILE *fp) { diff --git a/stagit.c b/stagit.c index f67ff9d..b57104b 100644 --- a/stagit.c +++ b/stagit.c @@ -495,14 +495,12 @@ void writeheader(FILE *fp, const char *title) { fprintf(fp, "Files | ", relpath); fprintf(fp, "Refs", relpath); if (submodules) - fprintf(fp, " | Submodules", - relpath, submodules); + fprintf(fp, " | Submodules", relpath, submodules); if (readme) //fprintf(fp, " | README", relpath, readme); fprintf(fp, " | README", relpath); if (license) - fprintf(fp, " | LICENSE", - relpath, license); + fprintf(fp, " | LICENSE", relpath, license); fputs("\n\t
NameDescriptionLast commit
\n
\n
\n", fp); }