From 8b0e55a074721ce49e835ae969d3550d037885b5 Mon Sep 17 00:00:00 2001 From: Derek Stevens Date: Tue, 17 Jan 2023 18:51:18 -0700 Subject: [PATCH] add boolean config option for nav in header --- config.def.h | 22 ++++++++++++---------- main.c | 22 ++++++++++++++++------ 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/config.def.h b/config.def.h index ce4deee..5b443d1 100644 --- a/config.def.h +++ b/config.def.h @@ -1,27 +1,29 @@ /* clang-format off */ -#define MAINCSS "/nilfm.css?v=20220112.1" +#define MAINCSS "/nilfm.css?v=20220117.1" #define DOMAIN "https://nilfm.cc" #define LEXICON_SIZE 1024 #define TWTXT "/twtxt.txt" -#define FRONTCSS "/nilfm.css?v=20220112.1" -#define CONTACT_HTML "contact: nilix@nilfm.cc [0x90587A740FA4FFA0]
\n" \ +#define FRONTCSS "/nilfm.css?v=20220117.1" +#define CONTACT_HTML "contact: nilix@nilfm.cc
9058 7A74 0FA4 FFA0 9715 7538 3B7F BC22 144E 6398\n" \ "" #define NAME "nilFM" #define TAG_BODY_SIZE 4096 -#define ABOUT_HTML "Derek Stevens <nilix@nilfm.cc>
\n" \ +#define ABOUT_HTML "Derek Stevens <nilix@nilfm.cc>
\n" \ "software artisan, digital philosopher

\n" \ -"[0x90587A740FA4FFA0]\n" \ +"9058 7A74 0FA4 FFA0 9715 7538 3B7F BC22 144E 6398\n" \ "" -#define FOOTER_HTML "nilFM hack lab \n" \ -"xxiivv webring \n" \ -"lightcrystal.systems
\n" \ +#define FOOTER_HTML "
nilFM hack lab \n" \ +"xxiivv webring \n" \ +"lightcrystal.systems \n" \ +"tips appreciated
" \ "
sitemap
\n" \ "" -#define LICENSE_HTML "CC-BY-NC 4
\n" \ -"opinions are my own" +#define LICENSE_HTML "CC-BY-NC 4
\n" \ +"opinions are my own
" #define LOGO_HTML "blackhole://nilFM" #define DESC "lair of drkste aka nilix: software artisan, digital philosopher" #define SITEROOT "../www/" +#define IS_NAV_IN_HEADER 1 /* clang-format on */ diff --git a/main.c b/main.c index d8ba336..2c59484 100644 --- a/main.c +++ b/main.c @@ -709,12 +709,22 @@ FILE* build(FILE* f, Lexicon* l, char* name, char* srcpath) { /* header */ fputs("
\n", f); fputs("

" LOGO_HTML "

\n", f); - fputs("
\n", f); - /* nav */ - fputs("\n", f); + if (IS_NAV_IN_HEADER) { + /* nav */ + fputs("\n", f); + fputs("\n", f); + } else { + fputs("\n", f); + /* nav */ + fputs("\n", f); + } + /* main */ stat(srcpath, &attr); edittime = attr.st_mtime;