|
| 1 | +<%#encoding:UTF-8%><!DOCTYPE html> |
| 2 | +<html<%= (attr? :nolang) ? nil : %( lang="#{attr :lang, 'en'}") %>> |
| 3 | +<head> |
| 4 | +<meta http-equiv="Content-Type" content="text/html; charset=<%= attr :encoding %>"> |
| 5 | +<meta name="viewport" content="width=device-width, initial-scale=1.0"><% |
| 6 | +[:description, :keywords, :author, :copyright].each do |key| |
| 7 | + if attr? key %> |
| 8 | +<meta name="<%= key %>" content="<%= attr key %>"><% |
| 9 | + end |
| 10 | +end %> |
| 11 | +<title><%= doctitle(:sanitize => true) || (attr 'untitled-label') %></title><% |
| 12 | +if Asciidoctor::DEFAULT_STYLESHEET_KEYS.include?(attr :stylesheet) |
| 13 | + if @safe >= Asciidoctor::SafeMode::SECURE || (attr? :linkcss) %> |
| 14 | +<link rel="stylesheet" href="<%= normalize_web_path(Asciidoctor::DEFAULT_STYLESHEET_NAME, (attr :stylesdir, '')) %>"><% |
| 15 | + else %> |
| 16 | +<%= Asciidoctor::Stylesheets.instance.embed_primary_stylesheet %> |
| 17 | +<% |
| 18 | + end |
| 19 | +elsif attr? :stylesheet |
| 20 | + if @safe >= Asciidoctor::SafeMode::SECURE || (attr? :linkcss) %> |
| 21 | +<link rel="stylesheet" href="<%= normalize_web_path((attr :stylesheet), attr(:stylesdir, '')) %>"><% |
| 22 | + else %> |
| 23 | +<style> |
| 24 | +<%= read_asset normalize_system_path((attr :stylesheet), (attr :stylesdir, '')), true %> |
| 25 | +</style><% |
| 26 | + end |
| 27 | +end |
| 28 | +if attr? :icons, 'font' |
| 29 | + if !(attr 'iconfont-remote', '').nil? %> |
| 30 | +<link rel="stylesheet" href="share/font-awesome-4.2.0/css/font-awesome.min.css"><% |
| 31 | + else %> |
| 32 | +<link rel="stylesheet" href="<%= normalize_web_path(%(#{attr 'iconfont-name', 'font-awesome'}.css), (attr :stylesdir, '')) %>"><% |
| 33 | + end |
| 34 | +end |
| 35 | +case attr 'source-highlighter' |
| 36 | +when 'coderay' |
| 37 | + if (attr 'coderay-css', 'class') == 'class' |
| 38 | + if @safe >= Asciidoctor::SafeMode::SECURE || (attr? :linkcss) %> |
| 39 | +<link rel="stylesheet" href="<%= normalize_web_path('asciidoctor-coderay.css', (attr :stylesdir, '')) %>"><% |
| 40 | + else %> |
| 41 | +<%= Asciidoctor::Stylesheets.embed_coderay_stylesheet %> |
| 42 | +<% |
| 43 | + end |
| 44 | + end |
| 45 | +when 'pygments' |
| 46 | + if (attr 'pygments-css', 'class') == 'class' |
| 47 | + if @safe >= Asciidoctor::SafeMode::SECURE || (attr? :linkcss) %> |
| 48 | +<link rel="stylesheet" href="<%= normalize_web_path('asciidoctor-pygments.css', (attr :stylesdir, '')) %>"><% |
| 49 | + else %> |
| 50 | +<%= Asciidoctor::Stylesheets.embed_pygments_stylesheet(attr 'pygments-style') %> |
| 51 | +<% |
| 52 | + end |
| 53 | + end |
| 54 | +when 'highlightjs' %> |
| 55 | +<link rel="stylesheet" href="<%= attr 'highlightjsdir', 'http://cdnjs.cloudflare.com/ajax/libs/highlight.js/7.4' %>/styles/<%= attr 'highlightjs-theme', 'googlecode' %>.min.css"> |
| 56 | +<script src="<%= attr 'highlightjsdir', 'http://cdnjs.cloudflare.com/ajax/libs/highlight.js/7.4' %>/highlight.min.js"></script> |
| 57 | +<script src="<%= attr 'highlightjsdir', 'http://cdnjs.cloudflare.com/ajax/libs/highlight.js/7.4' %>/lang/common.min.js"></script> |
| 58 | +<script>hljs.initHighlightingOnLoad()</script><% |
| 59 | +when 'prettify' %> |
| 60 | +<link rel="stylesheet" href="<%= attr 'prettifydir', 'http://cdnjs.cloudflare.com/ajax/libs/prettify/r298' %>/<%= attr 'prettify-theme', 'prettify' %>.min.css"> |
| 61 | +<script src="<%= attr 'prettifydir', 'http://cdnjs.cloudflare.com/ajax/libs/prettify/r298' %>/prettify.min.js"></script> |
| 62 | +<script>document.addEventListener('DOMContentLoaded', prettyPrint)</script><% |
| 63 | +end |
| 64 | +if attr? 'math' %> |
| 65 | +<script type="text/x-mathjax-config"> |
| 66 | +MathJax.Hub.Config({ |
| 67 | + tex2jax: { |
| 68 | + inlineMath: [<%= Asciidoctor::INLINE_MATH_DELIMITERS[:latexmath] %>], |
| 69 | + displayMath: [<%= Asciidoctor::BLOCK_MATH_DELIMITERS[:latexmath] %>], |
| 70 | + ignoreClass: 'nomath|nolatexmath' |
| 71 | + }, |
| 72 | + asciimath2jax: { |
| 73 | + delimiters: [<%= Asciidoctor::BLOCK_MATH_DELIMITERS[:asciimath] %>], |
| 74 | + ignoreClass: 'nomath|noasciimath' |
| 75 | + } |
| 76 | +}); |
| 77 | +</script> |
| 78 | +<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script> |
| 79 | +<script>document.addEventListener('DOMContentLoaded', MathJax.Hub.TypeSet)</script><% |
| 80 | +end |
| 81 | +%><%= (docinfo_content = docinfo).empty? ? nil : %( |
| 82 | +#{docinfo_content}) %> |
| 83 | +<link rel="stylesheet" href="share/highlight-github.css"> |
| 84 | +</head> |
| 85 | +<body<%= @id && %( id="#{@id}") %> class="<%= [(attr :doctype),((attr? 'toc-class') && (attr? :toc) && (attr? 'toc-placement', 'auto') ? %(#{attr 'toc-class'} toc-#{attr 'toc-position', 'left'}) : nil)].compact * ' ' %>"<%= (attr? 'max-width') ? %( style="max-width: #{attr 'max-width'};") : nil %>><% |
| 86 | +unless noheader %> |
| 87 | +<div id="header"><% |
| 88 | + if doctype == 'manpage' %> |
| 89 | +<h1><%= doctitle %> Manual Page</h1><% |
| 90 | + if (attr? :toc) && (attr? 'toc-placement', 'auto') %> |
| 91 | +<div id="toc" class="<%= attr 'toc-class', 'toc' %>"> |
| 92 | +<div id="toctitle"><%= attr 'toc-title' %></div> |
| 93 | +<%= converter.convert self, 'outline' %> |
| 94 | +</div><% |
| 95 | + end %> |
| 96 | +<h2><%= attr 'manname-title' %></h2> |
| 97 | +<div class="sectionbody"> |
| 98 | +<p><%= %(#{attr :manname} - #{attr :manpurpose}) %></p> |
| 99 | +</div><% |
| 100 | + else |
| 101 | + if has_header? |
| 102 | + unless notitle %> |
| 103 | +<h1><%= @header.title %></h1><% |
| 104 | + end |
| 105 | + end |
| 106 | + end %> |
| 107 | +</div><% |
| 108 | +end %> |
| 109 | +<div id="content"> |
| 110 | + <%if (attr? :toc) && (attr? 'toc-placement', 'auto') %> |
| 111 | +<div id="toc" class="<%= attr 'toc-class', 'toc' %>"> |
| 112 | +<div id="toctitle"><%= attr 'toc-title' %></div> |
| 113 | +<%= converter.convert self, 'outline' %> |
| 114 | +</div><% |
| 115 | + end%> |
| 116 | +<%= content %> |
| 117 | +</div><% |
| 118 | +unless !footnotes? || attr?(:nofootnotes) %> |
| 119 | +<div id="footnotes"> |
| 120 | +<hr><% |
| 121 | + footnotes.each do |fn| %> |
| 122 | +<div class="footnote" id="_footnote_<%= fn.index %>"> |
| 123 | +<a href="#_footnoteref_<%= fn.index %>"><%= fn.index %></a>. <%= fn.text %> |
| 124 | +</div><% |
| 125 | + end %> |
| 126 | +</div><% |
| 127 | +end %><% |
| 128 | +unless nofooter %> |
| 129 | +<div id="footer"> |
| 130 | +<div id="footer-text"><% |
| 131 | +if attr? :revnumber %> |
| 132 | +<%= %(#{attr 'version-label'} #{attr :revnumber}) %><br><% |
| 133 | +end |
| 134 | +if attr? 'last-update-label' %> |
| 135 | +<%= %(#{attr 'last-update-label'} #{attr :docdatetime}) %><% |
| 136 | +end %><%= (docinfo_content = (docinfo :footer)).empty? ? nil : %( |
| 137 | +#{docinfo_content}) %> |
| 138 | +</div> |
| 139 | +</div><% |
| 140 | +end %> |
| 141 | +<script src="share/jquery.js"></script> |
| 142 | +<script src="share/underscore.js"></script> |
| 143 | +<script src="share/highlight.pack.js"></script> |
| 144 | +<script src="share/holder.js"></script> |
| 145 | +<script src="share/raphael-min.js"></script> |
| 146 | +<script src="share/flowchart.min.js"></script> |
| 147 | +<script src="share/sequence-diagram-min.js"></script> |
| 148 | +<script src="share/emojify.min.js"></script> |
| 149 | +<script src="assets/main.js"></script> |
| 150 | +</body> |
| 151 | +</html> |
0 commit comments