From 367a234ca23533508ddd2cd6257b0f9b0112adb7 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 26 Jul 2020 22:40:10 +0200 Subject: [PATCH 1/4] 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 --- .../doc/advanced/customizing-gitea.en-us.md | 39 -- 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 | 18 + web_src/js/utils.js | 11 + web_src/less/_markdown.less | 11 + web_src/less/themes/theme-arc-green.less | 4 + 9 files changed, 518 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 d6a2019ac0393..6bc7be4ad05c7 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 `