File: index.html

package info (click to toggle)
highlight.js 10.7.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,332 kB
  • sloc: javascript: 41,059; makefile: 157; python: 29; sh: 20
file content (47 lines) | stat: -rw-r--r-- 1,629 bytes parent folder | download
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 <%= i ? '' : 'class="current"'%> data-category="<%= category %>"><%= `${category} (${count})` %></li>
      <% }); %>
    </ul>
    <h2>Themes</h2>
    <ul class="styles">
      <li class="current">Default</li>
      <% styles.forEach(({name}) => {%>
      <li><%= name %></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>