List for cgit developers and users
 help / color / mirror / Atom feed
From: andy at warmcat.com (Andy Green)
Subject: [PATCH 2/2] ui-shared: emit root-desc-html and repo.desc-html after their text counterparts
Date: Thu, 21 Jun 2018 14:46:47 +0800	[thread overview]
Message-ID: <152956360719.741.17537017810992910496.stgit@mail.warmcat.com> (raw)
In-Reply-To: <45190b3f-ced1-2b5f-9d3e-c9da90192867@warmcat.com>

Where root-desc and repo.desc are used in the header region, also
emit their html counterparts afterwards if they are defined.

Where root-desc are repo.desc are used outside the header,
eg in the repo list, leave it as it is without adding any
related html.

Signed-off-by: Andy Green <andy at warmcat.com>
---
 ui-shared.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ui-shared.c b/ui-shared.c
index c8f4d8f..a9ec430 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -1013,11 +1013,15 @@ static void print_header(void)
 	html("<tr><td class='sub'>");
 	if (ctx.repo) {
 		html_txt(ctx.repo->desc);
+		if (ctx.repo->desc_html)
+			html(ctx.repo->desc_html);
 		html("</td><td class='sub right'>");
 		html_txt(ctx.repo->owner);
 	} else {
 		if (ctx.cfg.root_desc)
 			html_txt(ctx.cfg.root_desc);
+		if (ctx.cfg.root_desc_html)
+			html(ctx.cfg.root_desc_html);
 	}
 	html("</td></tr></table>\n");
 }



  parent reply	other threads:[~2018-06-21  6:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20  9:04 repo.desc as raw html? andy
2018-06-20 13:17 ` [PATCH] noheader: place branch combo on tabs if no header andy
2018-06-23 10:50   ` john
2018-06-21  6:46 ` [PATCH 1/2] config: add root-desc-html and repo.desc-html andy
2018-06-21  6:46 ` andy [this message]
2018-06-23 10:28   ` [PATCH 2/2] ui-shared: emit root-desc-html and repo.desc-html after their text counterparts john
2018-06-23 10:33     ` andy
2018-06-23 10:53       ` john
2018-06-23 11:08         ` andy
2018-06-23 16:33           ` john

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=152956360719.741.17537017810992910496.stgit@mail.warmcat.com \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).