From 4315e313d12bbf0655710b6ab0aad121e0f7dba2 Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 27 Jul 2020 08:24:09 +0200 Subject: [PATCH] Add mermaid JS renderer (#12334) * Add mermaid JS renderer For feature parity with GitLab. Tested in files, issues, wiki, editor. arc-green only does an inversion because the renderer seems to like to render white backgrounds on boxes. Ref: https://github.com/go-gitea/gitea/issues/3340 Fixes: https://github.com/go-gitea/gitea/issues/12307 * add feature entry, switch to neutral theme, remove border * add bindFunctions support * remove unnecessary border-radius Co-authored-by: Lunny Xiao Co-authored-by: techknowlogick --- .../doc/advanced/customizing-gitea.en-us.md | 39 -- docs/content/page/index.en-us.md | 1 + package-lock.json | 464 +++++++++++++++++- package.json | 1 + web_src/js/index.js | 6 + web_src/js/markdown/content.js | 5 + web_src/js/markdown/mermaid.js | 23 + web_src/js/utils.js | 11 + web_src/less/_markdown.less | 8 + web_src/less/themes/theme-arc-green.less | 4 + 10 files changed, 521 insertions(+), 41 deletions(-) create mode 100644 web_src/js/markdown/content.js create mode 100644 web_src/js/markdown/mermaid.js diff --git a/docs/content/doc/advanced/customizing-gitea.en-us.md b/docs/content/doc/advanced/customizing-gitea.en-us.md index d6a2019ac..6bc7be4ad 100644 --- a/docs/content/doc/advanced/customizing-gitea.en-us.md +++ b/docs/content/doc/advanced/customizing-gitea.en-us.md @@ -108,45 +108,6 @@ Apart from `extra_links.tmpl` and `extra_tabs.tmpl`, there are other useful temp - `body_outer_post.tmpl`, before the bottom `