add boolean config option for nav in header
This commit is contained in:
parent
63a2974807
commit
8b0e55a074
2 changed files with 28 additions and 16 deletions
22
config.def.h
22
config.def.h
|
@ -1,27 +1,29 @@
|
||||||
/* clang-format off */
|
/* clang-format off */
|
||||||
|
|
||||||
#define MAINCSS "/nilfm.css?v=20220112.1"
|
#define MAINCSS "/nilfm.css?v=20220117.1"
|
||||||
#define DOMAIN "https://nilfm.cc"
|
#define DOMAIN "https://nilfm.cc"
|
||||||
#define LEXICON_SIZE 1024
|
#define LEXICON_SIZE 1024
|
||||||
#define TWTXT "/twtxt.txt"
|
#define TWTXT "/twtxt.txt"
|
||||||
#define FRONTCSS "/nilfm.css?v=20220112.1"
|
#define FRONTCSS "/nilfm.css?v=20220117.1"
|
||||||
#define CONTACT_HTML "contact: <a href='mailto:nilix@nilfm.cc' class='mono'>nilix@nilfm.cc</a> [<a href='/serv/90587A740FA4FFA0971575383B7FBC22144E6398.asc' class='mono'>0x90587A740FA4FFA0</a>]<br/>\n" \
|
#define CONTACT_HTML "contact: <a href='mailto:nilix@nilfm.cc' class='mono'>nilix@nilfm.cc</a><br/><a href='/serv/90587A740FA4FFA0971575383B7FBC22144E6398.asc' style='font-family:monospace;display:inline-block;max-width:24ch;'>9058 7A74 0FA4 FFA0 9715 7538 3B7F BC22 144E 6398</a>\n" \
|
||||||
""
|
""
|
||||||
#define NAME "nilFM"
|
#define NAME "nilFM"
|
||||||
#define TAG_BODY_SIZE 4096
|
#define TAG_BODY_SIZE 4096
|
||||||
#define ABOUT_HTML "Derek Stevens <<a class='mono' href='mailto:nilix@nilfm.cc'>nilix@nilfm.cc</a>><br/>\n" \
|
#define ABOUT_HTML "Derek Stevens <<a style='font-family:monospace;' href='mailto:nilix@nilfm.cc'>nilix@nilfm.cc</a>><br/>\n" \
|
||||||
"software artisan, digital philosopher<br/><br/>\n" \
|
"software artisan, digital philosopher<br/><br/>\n" \
|
||||||
"[<a href='/serv/90587A740FA4FFA0971575383B7FBC22144E6398.asc' class='mono'>0x90587A740FA4FFA0</a>]\n" \
|
"<a href='/serv/90587A740FA4FFA0971575383B7FBC22144E6398.asc' style='font-family:monospace;display:inline-block;max-width:24ch;'>9058 7A74 0FA4 FFA0 9715 7538 3B7F BC22 144E 6398</a>\n" \
|
||||||
""
|
""
|
||||||
#define FOOTER_HTML "<a href='/git/'><img src='/img/git.svg' alt='nilFM hack lab'/></a> \n" \
|
#define FOOTER_HTML "<div style='float:right;text-align:center;'><a href='https://nilfm.cc/git/' target='_blank'><img src='/img/git.svg' alt='nilFM hack lab'/></a> \n" \
|
||||||
"<a href='https://webring.xxiivv.com'><img src='/img/webring.svg' alt='xxiivv webring'/></a> \n" \
|
"<a href='https://webring.xxiivv.com' target='_blank'><img src='/img/webring.svg' alt='xxiivv webring'/></a> \n" \
|
||||||
"<a href='https://lightcrystal.systems'><img src='/img/lightcrystal_bw_small.svg' alt='lightcrystal.systems'/><br/>\n" \
|
"<a href='https://lightcrystal.systems' target='_blank'><img src='/img/lightcrystal_bw_small.svg' alt='lightcrystal.systems'/> \n" \
|
||||||
|
"<a href='/support.html'><img src='/img/tipjar.svg' alt='tips appreciated'/><br/>" \
|
||||||
"<a href='/sitemap.html'>sitemap</a><br/>\n" \
|
"<a href='/sitemap.html'>sitemap</a><br/>\n" \
|
||||||
""
|
""
|
||||||
#define LICENSE_HTML "<a rel='license' href='https://creativecommons.org/licenses/by-nc/4.0/legalcode.txt'>CC-BY-NC 4</a><br/>\n" \
|
#define LICENSE_HTML "<a rel='license' href='https://creativecommons.org/licenses/by-nc/4.0/legalcode.txt' target='_blank'>CC-BY-NC 4</a><br/>\n" \
|
||||||
"<a href='/legal_disclaimer.html'>opinions are my own</a>"
|
"<a href='/legal_disclaimer.html'>opinions are my own</a></div>"
|
||||||
#define LOGO_HTML "<img src='/img/nilfm_blackHole_128.png' alt='blackhole://nilFM'/>"
|
#define LOGO_HTML "<img src='/img/nilfm_blackHole_128.png' alt='blackhole://nilFM'/>"
|
||||||
#define DESC "lair of drkste aka nilix: software artisan, digital philosopher"
|
#define DESC "lair of drkste aka nilix: software artisan, digital philosopher"
|
||||||
#define SITEROOT "../www/"
|
#define SITEROOT "../www/"
|
||||||
|
#define IS_NAV_IN_HEADER 1
|
||||||
|
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
|
|
10
main.c
10
main.c
|
@ -709,12 +709,22 @@ FILE* build(FILE* f, Lexicon* l, char* name, char* srcpath) {
|
||||||
/* header */
|
/* header */
|
||||||
fputs("<header>\n", f);
|
fputs("<header>\n", f);
|
||||||
fputs("<a href='/'><h1>" LOGO_HTML "</h1></a>\n", f);
|
fputs("<a href='/'><h1>" LOGO_HTML "</h1></a>\n", f);
|
||||||
|
if (IS_NAV_IN_HEADER) {
|
||||||
|
/* nav */
|
||||||
|
fputs("<nav>\n", f);
|
||||||
|
if (!fpportal(f, l, "meta.nav", 0))
|
||||||
|
printf(">>> Building failed: %s\n", name);
|
||||||
|
fputs("</nav>\n", f);
|
||||||
|
fputs("</header>\n", f);
|
||||||
|
} else {
|
||||||
fputs("</header>\n", f);
|
fputs("</header>\n", f);
|
||||||
/* nav */
|
/* nav */
|
||||||
fputs("<nav>\n", f);
|
fputs("<nav>\n", f);
|
||||||
if (!fpportal(f, l, "meta.nav", 0))
|
if (!fpportal(f, l, "meta.nav", 0))
|
||||||
printf(">>> Building failed: %s\n", name);
|
printf(">>> Building failed: %s\n", name);
|
||||||
fputs("</nav>\n", f);
|
fputs("</nav>\n", f);
|
||||||
|
}
|
||||||
|
|
||||||
/* main */
|
/* main */
|
||||||
stat(srcpath, &attr);
|
stat(srcpath, &attr);
|
||||||
edittime = attr.st_mtime;
|
edittime = attr.st_mtime;
|
||||||
|
|
Loading…
Reference in a new issue