Skip to content

Commit

Permalink
Align flowchart and sequence diagram to be center and remove backgrou…
Browse files Browse the repository at this point in the history
…nd color.
  • Loading branch information
terrylinooo committed Dec 19, 2018
1 parent cad6109 commit 63d8fba
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions assets/css/githuber-md.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@

.katex-container {
margin: 25px !important;
text-align: center;
}
3 changes: 2 additions & 1 deletion assets/scss/githuber-md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
}

.katex-container {
margin: 25px !important;
margin: 25px !important;
text-align: center;
}
1 change: 1 addition & 0 deletions src/Modules/FlowChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public function front_print_footer_scripts() {
$(function() {
if (typeof $.fn.flowChart !== "undefined") {
if ($(".language-flow").length > 0) {
$(".language-flow").parent("pre").attr("style", "text-align: center; background: none;");
$(".language-flow").addClass("flowchart").removeClass("language-flow");
$(".flowchart").flowChart();
}
Expand Down
14 changes: 8 additions & 6 deletions src/Modules/SequenceDiagram.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,17 @@ public function front_print_footer_scripts() {
$script = '
<script id="module-sequence-diagram">
(function($) {
if (typeof $.fn.sequenceDiagram !== "undefined") {
$(".language-sequence").addClass("sequence-diagram").removeClass("language-sequence");
$(".language-seq").addClass("sequence-diagram").removeClass("language-seq");
$(function() {
$(function() {
if (typeof $.fn.sequenceDiagram !== "undefined") {
$(".language-sequence").parent("pre").attr("style", "text-align: center; background: none;");
$(".language-seq").parent("pre").attr("style", "text-align: center; background: none;");
$(".language-sequence").addClass("sequence-diagram").removeClass("language-sequence");
$(".language-seq").addClass("sequence-diagram").removeClass("language-seq");
$(".sequence-diagram").sequenceDiagram({
theme: "simple"
});
});
}
}
});
})(jQuery);
</script>
';
Expand Down

0 comments on commit 63d8fba

Please sign in to comment.