Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
JUNCA24 RevealJS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PGI15-Teaching
JUNCA24 RevealJS
Commits
d0188cb4
Commit
d0188cb4
authored
5 years ago
by
Hakim El Hattab
Browse files
Options
Downloads
Patches
Plain Diff
add code animation example to demo.html
parent
e2a2c2c0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
demo.html
+36
-21
36 additions, 21 deletions
demo.html
test/examples/auto-animate.html
+47
-28
47 additions, 28 deletions
test/examples/auto-animate.html
with
83 additions
and
49 deletions
demo.html
+
36
−
21
View file @
d0188cb4
...
...
@@ -88,6 +88,42 @@
</p>
</section>
<section
data-auto-animate
>
<h2
data-id=
"code-title"
>
Pretty Code
</h2>
<pre
data-id=
"code-animation"
><code
class=
"hljs"
data-trim
data-line-numbers
>
import React, { useState } from 'react';
function Example() {
const [count, setCount] = useState(0);
return (
...
);
}
</code></pre>
<p>
Code syntax highlighting courtesy of
<a
href=
"https://highlightjs.org/usage/"
>
highlight.js
</a>
.
</p>
</section>
<section
data-auto-animate
>
<h2
data-id=
"code-title"
>
With animations
</h2>
<pre
data-id=
"code-animation"
><code
class=
"hljs"
data-trim
data-line-numbers=
"|4|4,8-11"
>
import React, { useState } from 'react';
function Example() {
const [count, setCount] = useState(0);
return (
<
div
>
<
p
>
You clicked {count} times
<
/p
>
<
button onClick={() =
>
setCount(count + 1)}
>
Click me
<
/button
>
<
/div
>
);
}
</code></pre>
</section>
<section>
<h2>
Point of View
</h2>
<p>
...
...
@@ -239,27 +275,6 @@
</div>
</section>
<section>
<h2>
Pretty Code
</h2>
<pre><code
class=
"hljs"
data-trim
data-line-numbers=
"4|9|4,8-11"
>
import React, { useState } from 'react';
function Example() {
const [count, setCount] = useState(0);
return (
<
div
>
<
p
>
You clicked {count} times
<
/p
>
<
button onClick={() =
>
setCount(count + 1)}
>
Click me
<
/button
>
<
/div
>
);
}
</code></pre>
<p>
Code syntax highlighting courtesy of
<a
href=
"https://highlightjs.org/usage/"
>
highlight.js
</a>
.
</p>
</section>
<section>
<h2>
Marvelous List
</h2>
<ul>
...
...
This diff is collapsed.
Click to expand it.
test/examples/auto-animate.html
+
47
−
28
View file @
d0188cb4
...
...
@@ -31,9 +31,9 @@
</section>
<section
data-auto-animate
data-auto-animate-unmatched=
"fade"
>
<h3>
Auto-Animate Example
</h3>
<p
style=
"opacity: 0.2; margin-top:
2
00px;"
>
This will fade out
</p>
<p
style=
"opacity: 0.2; margin-top:
1
00px;"
>
This will fade out
</p>
<p>
This element is unmatched
</p>
<img
src=
"assets/image1.png"
style=
"height: 1
0
0px;"
>
<img
src=
"assets/image1.png"
style=
"height: 1
5
0px;"
>
<pre
data-id=
"code"
><code
data-line-numbers
class=
"hljs"
data-trim
>
function Example() {
New line!
...
...
@@ -49,34 +49,53 @@
<p
data-id=
"text-props"
style=
"background: #555; line-height: 3em; letter-spacing: 0.2em;"
>
Line Height
&
Letter Spacing
</p>
</section>
<section
data-auto-animate
>
<pre
data-id=
"code"
><code
data-line-numbers
class=
"hljs"
data-trim
>
import React, { useState } from 'react';
function Example() {
const [count, setCount] = useState(0);
<section>
<section
data-auto-animate
>
<pre
data-id=
"code"
><code
data-line-numbers
class=
"hljs"
data-trim
>
import React, { useState } from 'react';
return (
...
);
}
</code></pre>
</section>
<section
data-auto-animate
>
<pre
data-id=
"code"
><code
data-line-numbers
class=
"hljs"
data-trim
>
function Example() {
const [count, setCount] = useState(0);
function Example() {
const [count, setCount] = useState(0);
return (
<
div
>
<
p
>
You clicked {count} times
<
/p
>
<
button onClick={() =
>
setCount(count + 1)}
>
Click me
<
/button
>
<
/div
>
);
}
</code></pre>
return (
...
);
}
</code></pre>
</section>
<section
data-auto-animate
>
<pre
data-id=
"code"
><code
data-line-numbers
class=
"hljs"
data-trim
>
function Example() {
const [count, setCount] = useState(0);
return (
<
div
>
<
p
>
You clicked {count} times
<
/p
>
<
button onClick={() =
>
setCount(count + 1)}
>
Click me
<
/button
>
<
/div
>
);
}
</code></pre>
</section>
<section
data-auto-animate
>
<pre
data-id=
"code"
><code
data-line-numbers
class=
"hljs"
data-trim
>
function Example() {
// A comment!
const [count, setCount] = useState(0);
return (
<
div
>
<
p
>
You clicked {count} times
<
/p
>
<
button onClick={() =
>
setCount(count + 1)}
>
Click me
<
/button
>
<
/div
>
);
}
</code></pre>
</section>
</section>
<section>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment