forked from highlightjs/highlight.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (44 loc) · 1.67 KB
/
index.html
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">
<!-- This file is intended to be built using the instructions here: http://highlightjs.readthedocs.io/en/latest/building-testing.html#building -->
<head>
<meta charset="utf-8">
<title>highlight.js demo</title>
<link rel="shortcut icon" type="image/png" href="https://highlightjs.org/static/favicon.png">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" title="Default" href="styles/default.css">
<% styles.forEach(({ name, path }) => {%>
<link rel="alternate stylesheet" title="<%= name %>" href="<%= path %>" disabled="disabled">
<% }); %>
<script defer src="../highlight<%= minify ? '.min' : '' %>.js"></script>
<script defer src="demo.js"></script>
</head>
<body>
<aside>
<header>
<h1><a href="https://highlightjs.org">highlight.js</a> demo</h1>
</header>
<h2>Language Categories</h2>
<ul class="categories">
<% categories.forEach(({category, count}, i) => {%>
<li><a <%= i ? '' : 'class="current"'%> data-category="<%= category %>" href="#<%= category %>"><%= `${category} (${count})` %></a></li>
<% }); %>
</ul>
<h2>Themes</h2>
<ul class="styles">
<li><a class="current" href="#default">Default</a></li>
<% styles.forEach(({name}) => {%>
<li><a href="#<%= name %>"><%= name %></a></li>
<% }); %>
</ul>
</aside>
<main>
<% languages.forEach(({categories, name, prettyName, sample}) => { %>
<div class="<%= categories.includes('common') ? '' : 'hidden ' %><%= categories.join(' ') %>">
<h2><%= prettyName %></h2>
<pre><code class="language-<%= name %>"><%- sample %></code></pre>
</div>
<% }); %>
</main>
</body>
</html>