Allow customizing mermaid configuration
This commit is contained in:
parent
66c6631400
commit
50f6d78ff1
@ -14,6 +14,7 @@ Changelog
|
||||
- gemify plugin to use it with Gemfile.local or other plugins
|
||||
- remove spam protection functionality
|
||||
- Chart.js 2.9.4 support
|
||||
- Allow overwrite mermaid theme and variables
|
||||
|
||||
3.0.0
|
||||
+++++
|
||||
|
@ -1,7 +1,7 @@
|
||||
' Need Help? :
|
||||
= link_to(l(:label_additionals_doc),
|
||||
'https://additionals.readthedocs.io/en/latest/',
|
||||
= link_to l(:label_additionals_doc), 'https://additionals.readthedocs.io/en/latest/',
|
||||
class: 'external',
|
||||
target: '_blank',
|
||||
rel: 'noopener')
|
||||
rel: 'noopener'
|
||||
|
||||
= render_tabs additionals_settings_tabs
|
||||
|
@ -1,5 +1,16 @@
|
||||
$(function() {
|
||||
mermaid.initialize({ startOnLoad: true,
|
||||
theme: 'default',
|
||||
themeVariables: { 'fontSize': '12px' } });
|
||||
if (globalThis !== undefined && globalThis.mermaidTheme !== undefined) {
|
||||
var mermaidTheme = globalThis.mermaidTheme;
|
||||
} else {
|
||||
var mermaidTheme = 'default';
|
||||
}
|
||||
if (globalThis !== undefined && globalThis.mermaidThemeVariables !== undefined) {
|
||||
var mermaidThemeVariables = globalThis.mermaidThemeVariables;
|
||||
} else {
|
||||
var mermaidThemeVariables = { 'fontSize': '12px' };
|
||||
}
|
||||
mermaid.initialize({
|
||||
startOnLoad: true,
|
||||
theme: mermaidTheme,
|
||||
themeVariables: mermaidThemeVariables });
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user