This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
/
doc.liquid
47 lines (45 loc) · 2.45 KB
/
doc.liquid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="en" class="no-js">
{% include head %}
{% if site.banner.text %}
<body class="banner-displayed">
{% else %}
<body>
{% endif %}
{% include menu %}
<main class="doc">
<article class="container">
{% if ad == "text" %}
{% include text-ad %}
{% else %}
<div class="eslint-ad-float hidden-xs hidden-sm">
{% include ad %}
</div>
{% endif %}
{% comment %}Versioned pages didn't have title in front matter{% endcomment %}
{% assign versioned = page.url | regexMatch: "\/docs/\d" %}
{% unless versioned %}
<h1>{{ title }}</h1>
{% endunless %}
{{ content
| replace: '<p>Examples of <strong>incorrect</strong> code', '<p class="incorrect icon">Examples of <strong>incorrect</strong> code'
| replace: '<p>Example of <strong>incorrect</strong> code', '<p class="incorrect icon">Example of <strong>incorrect</strong> code'
| replace: '<p>Examples of additional <strong>incorrect</strong> code', '<p class="incorrect icon">Examples of additional <strong>incorrect</strong> code'
| replace: '<p>Example of additional <strong>incorrect</strong> code', '<p class="incorrect icon">Example of additional <strong>incorrect</strong> code'
| replace: '<p>Examples of <strong>correct</strong> code', '<p class="correct icon">Examples of <strong>correct</strong> code'
| replace: '<p>Example of <strong>correct</strong> code', '<p class="correct icon">Example of <strong>correct</strong> code'
| replace: '<p>Examples of additional <strong>correct</strong> code', '<p class="correct icon">Examples of additional <strong>correct</strong> code'
| replace: '<p>Example of additional <strong>correct</strong> code', '<p class="correct icon">Example of additional <strong>correct</strong> code'
| replace: '<p>(recommended) ', '<p class="recommended icon">'
| replace: '<p>(removed) ', '<p class="removed icon">'
| replace: '<p>(fixable) ', '<p class="fixable icon">'
| replace: '<p>(hasSuggestions) ', '<p class="hasSuggestions icon">'
| replace: '(recommended)', '<span title="recommended" aria-label="recommended">✓</span>'
| replace: '(fixable)', '<span title="fixable" aria-label="fixable">🔧</span>'
| replace: '(hasSuggestions)', '<span title="hasSuggestions" aria-label="hasSuggestions">💡</span>'
}}
</article>
</main>
{% include footer %}
</body>
</html>