-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make mermaid diagram scrollable width-wise
- Loading branch information
Showing
3 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
class MermaidController < ApplicationController | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<h1> Driving in Great Britain on a non-GB licence</h1> | ||
<pre class="mermaid"> | ||
%%{ | ||
init: { | ||
'theme': 'base', | ||
'themeVariables': { | ||
'primaryColor': '#fff', | ||
'primaryTextColor': '#0B0C0C', | ||
'primaryBorderColor': '#0B0C0C', | ||
'secondaryColor': '#006100', | ||
'tertiaryColor': '#fff' | ||
} | ||
} | ||
}%% | ||
graph TD | ||
A[Start] --- B[Q1 Are you:] | ||
B --> C[a resident of Great Britain?] | ||
B --> D[a visitor of Great Britain?] | ||
B --> E[a foreign student studying in Great Britain?] | ||
E --> F | ||
F[Q2 What kind of driving licence do you have?] | ||
|
||
|
||
style A fill:#006100,color:#ffffff | ||
</pre> | ||
<script type="module"> | ||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs'; | ||
mermaid.initialize({ startOnLoad: true}); | ||
</script> | ||
|