summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorGravatar Eirik Oeverby2025-01-06 20:03:00 +0100
committerGravatar Eirik Oeverby2025-01-06 20:04:24 +0100
commit3b818f557ae3c1073f1464fe0a7319a0e025ba86 (patch)
treeb9c30f207dd1d094be956cb686396d767c409000 /html.c
parentUpdated TODO. (diff)
downloadpenes-snac2-3b818f557ae3c1073f1464fe0a7319a0e025ba86.tar.gz
penes-snac2-3b818f557ae3c1073f1464fe0a7319a0e025ba86.tar.xz
penes-snac2-3b818f557ae3c1073f1464fe0a7319a0e025ba86.zip
Add short_description_raw option
Diffstat (limited to 'html.c')
-rw-r--r--html.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/html.c b/html.c
index e8803ab..b54556d 100644
--- a/html.c
+++ b/html.c
@@ -537,10 +537,11 @@ xs_html *html_instance_head(void)
537 537
538static xs_html *html_instance_body(void) 538static xs_html *html_instance_body(void)
539{ 539{
540 const char *host = xs_dict_get(srv_config, "host"); 540 const char *host = xs_dict_get(srv_config, "host");
541 const char *sdesc = xs_dict_get(srv_config, "short_description"); 541 const char *sdesc = xs_dict_get(srv_config, "short_description");
542 const char *email = xs_dict_get(srv_config, "admin_email"); 542 const char *sdescraw = xs_dict_get(srv_config, "short_description_raw");
543 const char *acct = xs_dict_get(srv_config, "admin_account"); 543 const char *email = xs_dict_get(srv_config, "admin_email");
544 const char *acct = xs_dict_get(srv_config, "admin_account");
544 545
545 xs *blurb = xs_replace(snac_blurb, "%host%", host); 546 xs *blurb = xs_replace(snac_blurb, "%host%", host);
546 547
@@ -553,12 +554,21 @@ static xs_html *html_instance_body(void)
553 dl = xs_html_tag("dl", NULL))); 554 dl = xs_html_tag("dl", NULL)));
554 555
555 if (sdesc && *sdesc) { 556 if (sdesc && *sdesc) {
556 xs_html_add(dl, 557 if (!xs_is_null(sdescraw) && xs_type(sdescraw) == XSTYPE_TRUE) {
557 xs_html_tag("di", 558 xs_html_add(dl,
558 xs_html_tag("dt", 559 xs_html_tag("di",
559 xs_html_text(L("Site description"))), 560 xs_html_tag("dt",
560 xs_html_tag("dd", 561 xs_html_text(L("Site description"))),
561 xs_html_text(sdesc)))); 562 xs_html_tag("dd",
563 xs_html_raw(sdesc))));
564 } else {
565 xs_html_add(dl,
566 xs_html_tag("di",
567 xs_html_tag("dt",
568 xs_html_text(L("Site description"))),
569 xs_html_tag("dd",
570 xs_html_text(sdesc))));
571 }
562 } 572 }
563 if (email && *email) { 573 if (email && *email) {
564 xs *mailto = xs_fmt("mailto:%s", email); 574 xs *mailto = xs_fmt("mailto:%s", email);