Debian Codegraph @

examples/markdown/index.html

raw
1 <!doctype html>
2
3 <!--
4 A presentation done entirely in Markdown, as found in extras/markdown/.
5
6 By: @henrikingo
7 -->
8
9 <html lang="en">
10 <head>
11 <meta charset="utf-8" />
12 <title>Markdown in impress.js | by Henrik Ingo @henrikingo</title>
13
14 <meta name="description" content="Authoring impress.js presentations in Markdown" />
15 <meta name="author" content="Henrik Ingo" />
16 <link rel="stylesheet" href="../../extras/highlight/styles/github.css">
17
18 <!-- Common styles for example presentations -->
19 <link href="..\..\css\impress-common.css" rel="stylesheet" />
20 <!--
21 Styles specific for this example presentation.
22 -->
23 <link href="css/markdown-slides.css" rel="stylesheet" />
24 <link href="css/devopsy.css" rel="stylesheet" />
25 <link href="css/effects.css" rel="stylesheet" />
26
27 </head>
28
29 <body class="impress-not-supported">
30 <div class="fallback-message">
31 <p>Your browser <b>doesn't support the features required</b> by impress.js, so you are presented with a simplified version of this presentation.</p>
32 <p>For the best experience please use the latest <b>Chrome</b>, <b>Safari</b> or <b>Firefox</b> browser.</p>
33 </div>
34
35 <div id="impress" data-transition-duration="1000">
36
37 <div id="markdown" class="step slide markdown" data-rel-x="0" data-rel-y="900">
38 # Markdown
39 ## to author Impress.js presentations
40
41 * This presentation was written entirely in Markdown
42 * Added by popular request
43 * Easy way to make quick, simple yet aesthetic, presentations
44 * Authoring without all the clutter of HTML
45
46 -----
47 # Markdown.js
48
49 * Provided by [Markdown.js](https://github.com/evilstreak/markdown-js) in [extras/](https://github.com/impress/impress.js/tree/master/extras)
50 * Jot down your bullet points in *Markdown* & have it automatically converted to HTML
51 * Note: The Markdown is converted into a presentation client side, in the browser. This is unlike
52 existing tools like [Hovercraft](https://github.com/regebro/hovercraft) and
53 markdown-impress where you generate a new
54 html file on the command line.
55 * This combines the ease of typing Markdown with the full power of impress.js HTML5+CSS3+JavaScript!
56
57 -----
58 # Styles
59
60 * You can use *italics* & **bold**
61 * ...and `code`
62
63
64 -----
65 # A blockquote &amp; image
66
67 ![Mother Teresa holding a newborn baby](images/3476636111_c551295ca4_b.jpg)
68
69 > Spread love everywhere you go.
70 > Let no one ever come to you without leaving happier.
71
72 *-- Mother Teresa*
73
74 Image credit: [Peta de Aztlan](https://www.flickr.com/photos/peta-de-aztlan/3476636111/)@Flickr. CC-BY 2.0
75
76 -----
77 # Code
78
79 When also using [Highlight.js](https://highlightjs.org/) integration, code blocks in Markdown
80 are converted to HTML first, then colored by Highlight.js:
81
82 // `init` API function that initializes (and runs) the presentation.
83 var init = function () {
84 if (initialized) { return; }
85 execPreInitPlugins();
86
87 // First we set up the viewport for mobile devices.
88 // For some reason iPad goes nuts when it is not done properly.
89 var meta = $("meta[name='viewport']") || document.createElement("meta");
90 meta.content = "width=device-width, minimum-scale=1, maximum-scale=1, user-scalable=no";
91 if (meta.parentNode !== document.head) {
92 meta.name = 'viewport';
93 document.head.appendChild(meta);
94 }
95
96 -----
97
98 # Slide separator
99
100 * 5 dashes are used to separate slides:
101
102 `-----`
103
104 * Attributes from `div.step` element are simply repeated.
105 * Better use relative positioning, lest your slides will all be on top of each other.
106 * If you need to set some attributes, just use HTML and create a div element, then write
107 Markdown inside each div.
108 </div>
109
110 <div id="title-slide" class="step slide title markdown" data-x="2000" data-y="5000">
111 # Title slide
112 ## This slide has different CSS class than the previous ones
113 </div>
114
115
116 <div id="tilted-slide" class="step slide markdown" data-rotate="-85" data-x="2000" data-y="2000" data-z="1000" data-scale="4">
117 # Simplicity of Markdown & Full power of Impress.js
118
119 * This slide sets its own `rotate`, `x`, `y`, and even `z` coordinates
120 * Note that the Mother Teresa slide earlier was pimped with some custom CSS, all the while
121 the content was written in simple Markdown.
122 </div>
123
124 <div class="step slide title markdown" data-rotate="-85" data-x="4000" data-y="2000" data-markdown-dialect="Maruku">
125 This is an example of a slide with a specific Markdown dialect.
126 ===============================================================
127 </div>
128
129 <script type="text/javascript">
130 var enableBwCss = function(){
131 disableDevopsCss();
132 disableEffectsCss();
133 };
134
135 var enableDevopsCss = function(){
136 document.body.classList.add("devopsy");
137 disableEffectsCss();
138 };
139
140 var disableDevopsCss = function(){
141 document.body.classList.remove("devopsy");
142 };
143
144 var enableEffectsCss = function(){
145 document.body.classList.add("effects");
146 disableDevopsCss();
147 };
148
149 var disableEffectsCss = function(){
150 document.body.classList.remove("effects");
151 };
152 </script>
153
154
155 <div id="js-slide" class="step slide" data-rotate="0" data-x="4000" data-y="5000">
156 <h1>CSS &amp; JavaScript magic</h1>
157
158 <p>Just to emphasize my point, this last slide allows you to use a JavaScript powered menu to
159 toggle the CSS style:</p>
160
161 <p><a href="#" onclick="enableBwCss();" class="css-menu-bw">Black &amp; white</a>,
162 <a href="#" onclick="enableDevopsCss();" class="css-menu-devopsy">Devopsy</a>,
163 <a href="#" onclick="enableEffectsCss();" class="css-menu-effects">Effects overload</a></p>
164
165 <p>Simplicity of Markdown married with full power of Impress.js!</p>
166
167 </div>
168
169
170 <div id="overview" class="step" data-x="5000" data-y="4000" data-scale="10" style="pointer-events: none;" data-rotate="5">
171 </div>
172
173 </div>
174
175 <div id="impress-toolbar"></div>
176 <div id="impress-help"></div>
177
178
179 <!-- Extra modules
180 Load highlight.js, mermaid.js and markdown.js from extras.
181 See also src/plugins/extras/extras.js -->
182 <script type="text/javascript" src="../../extras/highlight/highlight.pack.js"></script>
183 <script type="text/javascript" src="../../extras/mermaid/mermaid.min.js"></script>
184 <script type="text/javascript" src="../../extras/markdown/markdown.js"></script>
185
186 <!--
187 To make all described above really work, you need to include impress.js in the page.
188 You also need to call a `impress().init()` function to initialize impress.js presentation.
189 And you should do it in the end of your document.
190 -->
191 <script type="text/javascript" src="../../js/impress.js"></script>
192 <script>impress().init();</script>
193 </body>
194 </html>