diff --git a/Dockerfile b/Dockerfile index 3c71a3e..3b97440 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,6 +33,8 @@ FROM base AS dev EXPOSE 6157 2222 16157 VOLUME /opengist +RUN git config --global --add safe.directory /opengist + CMD ["make", "watch"] diff --git a/public/gist.ts b/public/gist.ts index 38ecc57..d81c98f 100644 --- a/public/gist.ts +++ b/public/gist.ts @@ -21,6 +21,9 @@ document.querySelectorAll('.table-code').forEach((el) => { let copybtnhtml = ``; document.querySelectorAll('.markdown-body pre').forEach((el) => { + if (el.classList.contains("mermaid")) { + return; + } el.innerHTML = copybtnhtml + `` + el.innerHTML + ``; }); diff --git a/templates/base/base_header.html b/templates/base/base_header.html index 2292087..a77ec19 100644 --- a/templates/base/base_header.html +++ b/templates/base/base_header.html @@ -179,11 +179,11 @@ {{ else }} {{ if not .DisableSignup }} - + {{ end }} - + {{ end }} @@ -252,9 +252,15 @@ {{ .locale.Tr "header.menu.my-gists" }} {{ .locale.Tr "header.menu.settings" }} - {{ if .userLogged.IsAdmin }} + {{ if .userLogged.IsAdmin }} {{ .locale.Tr "header.menu.admin" }} {{ end }} + {{ .locale.Tr "header.menu.logout" }} + {{ else }} + {{ if not .DisableSignup }} + {{ .locale.Tr "header.menu.register" }} + {{ end }} + {{ .locale.Tr "header.menu.login" }} {{ end }} diff --git a/templates/partials/_gist_preview.html b/templates/partials/_gist_preview.html index f4956de..5a435d2 100644 --- a/templates/partials/_gist_preview.html +++ b/templates/partials/_gist_preview.html @@ -5,7 +5,7 @@