Merge branch 'cheat-sheet-testable' into 'dev'

Testable cheat sheet

See merge request ligolang/ligo!509
This commit is contained in:
Sander 2020-03-26 11:02:18 +00:00
commit 8f62a15f73
3 changed files with 1091 additions and 111 deletions

File diff suppressed because it is too large Load Diff

View File

@ -166,7 +166,7 @@ export default ({children, className: languageClassName, metastring}) => {
{showCopied ? 'Copied' : 'Copy'} {showCopied ? 'Copied' : 'Copy'}
</button> </button>
<code ref={target} className={styles.codeBlockLines} style={style}> <code ref={target} className={styles.codeBlockLines}>
{tokens.map((line, i) => { {tokens.map((line, i) => {
if (line.length === 1 && line[0].content === '') { if (line.length === 1 && line[0].content === '') {
line[0].content = '\n'; // eslint-disable-line no-param-reassign line[0].content = '\n'; // eslint-disable-line no-param-reassign

View File

@ -989,21 +989,43 @@ a:hover {
} }
} }
/* ReasonLIGO specific syntax highlighting */
.language-reasonligo .hljs-operator {
color: #a626a4;
}
.language-reasonligo .hljs-character {
color: #50a14f;
}
.language-reasonligo .hljs-module-identifier {
color: #00f;
}
.language-reasonligo .hljs-constructor {
color: #a31515;
}
.badge { .badge {
display: none; display: none;
} }
.codeTable {
display: grid;
grid-template-columns: 30% 70%;
align-items: center;
}
.codeTable > .primitive {
width: 100%;
height: 100%;
display: flex;
justify-content: right;
text-align: right;
align-items: center;
font-weight: bold;
padding-right: 1rem;
}
.codeTable > div:nth-child(4n+1) {
background-color: var(--ifm-table-stripe-background);
}
.codeTable > div:nth-child(4n+2) {
background-color: var(--ifm-table-stripe-background);
}
.codeTable > .example {
padding-top: var(--ifm-leading);
}
.codeTable > .example pre,
.codeTable > .example .codeBlockLines_src-theme-CodeBlock- {
background-color: transparent;
}