Merge pull request #31056 from sftim/20211221_mermaid_improvements
Improvements for Mermaid support
This commit is contained in:
@@ -771,6 +771,10 @@ figure {
|
|||||||
max-width: clamp(0vw, 95vw, 100%);
|
max-width: clamp(0vw, 95vw, 100%);
|
||||||
max-height: calc(80vh - 8rem);
|
max-height: calc(80vh - 8rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
figure + noscript > *{
|
||||||
|
max-width: calc(max(100%, 100vw));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 768px) {
|
@media only screen and (min-width: 768px) {
|
||||||
@@ -793,6 +797,9 @@ figure {
|
|||||||
max-height: calc(100vh - 10rem);
|
max-height: calc(100vh - 10rem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
figure + noscript > * {
|
||||||
|
max-width: 80%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Indent definition lists
|
// Indent definition lists
|
||||||
@@ -825,3 +832,13 @@ dl {
|
|||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-js .mermaid {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.alert > em.javascript-required {
|
||||||
|
display: inline-block;
|
||||||
|
min-height: 1.5em;
|
||||||
|
margin: calc(max(4em, ( 8vh + 4em ) / 2)) 0 0.25em 0;
|
||||||
|
}
|
||||||
|
|||||||
@@ -87,6 +87,9 @@ other = ","
|
|||||||
[input_placeholder_email_address]
|
[input_placeholder_email_address]
|
||||||
other = "email address"
|
other = "email address"
|
||||||
|
|
||||||
|
[javascript_required]
|
||||||
|
other = "JavaScript must be [enabled](https://www.enable-javascript.com/) to view this content"
|
||||||
|
|
||||||
[latest_release]
|
[latest_release]
|
||||||
other = "Latest Release:"
|
other = "Latest Release:"
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<script src="/js/bootstrap-4.3.1.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
<script src="/js/bootstrap-4.3.1.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
{{ if .Site.Params.mermaid.enable }}
|
{{ if .Site.Params.mermaid.enable }}
|
||||||
<script src="/js//mermaid.min.js" crossorigin="anonymous"></script>
|
<script src="/js/mermaid.min.js" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
|
<figure>
|
||||||
<div class="mermaid">
|
<div class="mermaid">
|
||||||
{{.Inner}}
|
{{.Inner}}
|
||||||
</div>
|
</div>
|
||||||
|
</figure>
|
||||||
<!-- Hide content and error if JS is disabled. -->
|
<!-- Hide content and error if JS is disabled. -->
|
||||||
<noscript>
|
<noscript>
|
||||||
<style type="text/css">
|
<div class="alert alert-secondary callout" role="alert">
|
||||||
.mermaid { display:none; }
|
<em class="javascript-required">{{ T "javascript_required" | markdownify }}</em>
|
||||||
</style>
|
</div>
|
||||||
<h4>[JavaScript must be <a href="https://www.enable-javascript.com/">enabled</a> to view content]</h4>
|
|
||||||
</noscript>
|
</noscript>
|
||||||
Vendored
+7
-7
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user