From 4a5bf3dc88551e11b3d361b1c70eaaa2daa4551f Mon Sep 17 00:00:00 2001 From: Abdullah Islam Date: Sat, 23 Sep 2023 15:36:34 +0600 Subject: [PATCH] changed styling --- Makefile | 4 ++-- lib/navbar.awk | 2 +- scripts/sitemap_html.awk | 10 +++++----- src/style.css | 9 ++++----- testing/output.html | 2 +- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 6f333df..0b8653a 100644 --- a/Makefile +++ b/Makefile @@ -49,10 +49,10 @@ html/%.html: src/%.gmi scripts/html.awk lib/navbar.awk gmi/%.gmi: src/%.gmi scripts/gemini.awk lib/navbar.awk mawk -f lib/navbar.awk -f lib/path.awk -v 'sourcePath=src/ outputPath=gmi/' -f scripts/gemini.awk -- $< > $@ -html/sitemap.html: $(SITEMAP_INDEX_FILES) scripts/sitemap_html.awk scripts/navbar.awk +html/sitemap.html: $(SITEMAP_INDEX_FILES) scripts/sitemap_html.awk lib/navbar.awk mawk -f lib/navbar.awk -f lib/path.awk -v 'sourcePath=src/ outputPath=html/' -f scripts/sitemap_html.awk -- $(SITEMAP_INDEX_FILES) > $@ -gmi/sitemap.gmi: $(SITEMAP_INDEX_FILES) scripts/sitemap_gmi.awk scripts/navbar.awk +gmi/sitemap.gmi: $(SITEMAP_INDEX_FILES) scripts/sitemap_gmi.awk lib/navbar.awk mawk -f lib/navbar.awk -f lib/path.awk -v 'sourcePath=src/ outputPath=gmi/' -f scripts/sitemap_gmi.awk -- $(SITEMAP_INDEX_FILES) > $@ html/feed.atom: scripts/feed.awk diff --git a/lib/navbar.awk b/lib/navbar.awk index 7aa5a0a..51f88b6 100755 --- a/lib/navbar.awk +++ b/lib/navbar.awk @@ -13,7 +13,7 @@ function genNavbarHTML(filename, sourcePath, outputPath) { sitemap | \n\ feed | \n\ git\n\ -
\n", \ +
\n", \ getRelativePath(dirname, outputPath "/index.html"), \ getRelativePath(dirname, outputPath "/useful/index.html"), \ getRelativePath(dirname, outputPath "/notes/index.html"), \ diff --git a/scripts/sitemap_html.awk b/scripts/sitemap_html.awk index c5ff268..045053d 100755 --- a/scripts/sitemap_html.awk +++ b/scripts/sitemap_html.awk @@ -31,6 +31,9 @@ BEGIN { } END { + dirname = getDirname(FILENAME) + stylesheetPath = getRelativePath(dirname, outputPath "/style.css") + printf "\n\ \n\ \n\ @@ -40,11 +43,7 @@ END { \n\ \n\ \n\ - \n\ + \n\ \n\ \n\
\n\ @@ -55,6 +54,7 @@ body { margin: 20px; }\n\ \n\ \n\ ", \ + stylesheetPath, \ genNavbarHTML(FILENAME, sourcePath, outputPath), \ body } diff --git a/src/style.css b/src/style.css index a64ee95..050b16b 100644 --- a/src/style.css +++ b/src/style.css @@ -1,5 +1,4 @@ -#content { max-width: 70ch; margin: auto; padding: 10px; } -#navbar { max-width: 70ch; margin: auto; padding: 10px; background: teal; color: white; } -#navbar a { color: white; } -hr { max-width: 70ch; } -.permalink { margin-left: 15px; } +#content { max-width: 40ch; margin: auto; padding: 10px; } +#navbar { max-width: 40ch; margin: auto; padding: 10px; } +hr { max-width: 45ch; } +.permalink { margin-left: 15px; } \ No newline at end of file diff --git a/testing/output.html b/testing/output.html index 7fab8f8..4a3c52e 100644 --- a/testing/output.html +++ b/testing/output.html @@ -17,7 +17,7 @@ sitemap | feed | git -
+