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
cef864a7
Commit
cef864a7
authored
6 years ago
by
Hakim El Hattab
Browse files
Options
Downloads
Patches
Plain Diff
highlight plugin updates; support for line numbers and highlighting specific lines
parent
b6e13677
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
css/reveal.css
+17
-0
17 additions, 0 deletions
css/reveal.css
css/reveal.scss
+23
-1
23 additions, 1 deletion
css/reveal.scss
demo.html
+19
-19
19 additions, 19 deletions
demo.html
plugin/highlight/highlight.js
+72
-11
72 additions, 11 deletions
plugin/highlight/highlight.js
with
131 additions
and
31 deletions
css/reveal.css
+
17
−
0
View file @
cef864a7
...
...
@@ -1436,6 +1436,23 @@ body {
opacity
:
0
;
visibility
:
hidden
;
}
/*********************************************
* CODE HIGHLGIHTING
*********************************************/
.reveal
.hljs
table
{
margin
:
initial
;
}
.reveal
.hljs.highlight-lines
tr
:not
(
.highlight-line
)
{
opacity
:
0.25
;
}
.reveal
.hljs-ln-code
,
.reveal
.hljs-ln-numbers
{
padding
:
0
;
border
:
0
;
}
.reveal
.hljs-ln-numbers
{
padding-right
:
10px
;
}
/*********************************************
* ROLLING LINKS
*********************************************/
...
...
This diff is collapsed.
Click to expand it.
css/reveal.scss
+
23
−
1
View file @
cef864a7
...
...
@@ -1549,7 +1549,6 @@ $controlsArrowAngleActive: 36deg;
}
/*********************************************
* PLAYBACK COMPONENT
*********************************************/
...
...
@@ -1570,6 +1569,29 @@ $controlsArrowAngleActive: 36deg;
}
/*********************************************
* CODE HIGHLGIHTING
*********************************************/
.reveal
.hljs
table
{
margin
:
initial
;
}
.reveal
.hljs.highlight-lines
tr
:not
(
.highlight-line
)
{
opacity
:
0
.25
;
}
.reveal
.hljs-ln-code
,
.reveal
.hljs-ln-numbers
{
padding
:
0
;
border
:
0
;
}
.reveal
.hljs-ln-numbers
{
padding-right
:
10px
;
}
/*********************************************
* ROLLING LINKS
*********************************************/
...
...
This diff is collapsed.
Click to expand it.
demo.html
+
19
−
19
View file @
cef864a7
...
...
@@ -199,16 +199,16 @@
</section>
<section
data-background=
"https://s3.amazonaws.com/hakim-static/reveal-js/image-placeholder.png"
>
<h2>
Image Backgrounds
</h2>
<pre><code
class=
"hljs"
>
<
section data-background="image.png"
>
</code></pre>
<pre><code
class=
"hljs
html
"
>
<
section data-background="image.png"
>
</code></pre>
</section>
<section
data-background=
"https://s3.amazonaws.com/hakim-static/reveal-js/image-placeholder.png"
data-background-repeat=
"repeat"
data-background-size=
"100px"
>
<h2>
Tiled Backgrounds
</h2>
<pre><code
class=
"hljs"
style=
"word-wrap: break-word;"
>
<
section data-background="image.png" data-background-repeat="repeat" data-background-size="100px"
>
</code></pre>
<pre><code
class=
"hljs
html
"
style=
"word-wrap: break-word;"
>
<
section data-background="image.png" data-background-repeat="repeat" data-background-size="100px"
>
</code></pre>
</section>
<section
data-background-video=
"https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.mp4,https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.webm"
data-background-color=
"#000000"
>
<div
style=
"background-color: rgba(0, 0, 0, 0.9); color: #fff; padding: 20px;"
>
<h2>
Video Backgrounds
</h2>
<pre><code
class=
"hljs"
style=
"word-wrap: break-word;"
>
<
section data-background-video="video.mp4,video.webm"
>
</code></pre>
<pre><code
class=
"hljs
html
"
style=
"word-wrap: break-word;"
>
<
section data-background-video="video.mp4,video.webm"
>
</code></pre>
</div>
</section>
<section
data-background=
"http://i.giphy.com/90F8aUepslB84.gif"
>
...
...
@@ -221,7 +221,7 @@
<p>
Different background transitions are available via the backgroundTransition option. This one's called "zoom".
</p>
<pre><code
class=
"hljs"
>
Reveal.configure({ backgroundTransition: 'zoom' })
</code></pre>
<pre><code
class=
"hljs
javascript
"
>
Reveal.configure({ backgroundTransition: 'zoom' })
</code></pre>
</section>
<section
data-transition=
"slide"
data-background=
"#b5533c"
data-background-transition=
"zoom"
>
...
...
@@ -229,25 +229,25 @@
<p>
You can override background transitions per-slide.
</p>
<pre><code
class=
"hljs"
style=
"word-wrap: break-word;"
>
<
section data-background-transition="zoom"
>
</code></pre>
<pre><code
class=
"hljs
html
"
style=
"word-wrap: break-word;"
>
<
section data-background-transition="zoom"
>
</code></pre>
</section>
<section>
<h2>
Pretty Code
</h2>
<pre><code
class=
"hljs
"
data-trim
contenteditable
>
function linkify( selector ) {
if( supports3DTransforms ) {
var nodes = document.querySelectorAll( selector
);
for( var i = 0, len = nodes.length; i
<
len; i++ ) {
var node = nodes[i]
;
if( !node.className ) {
node.className += ' roll';
}
}
}
<pre><code
class=
"hljs
line-numbers"
data-trim
data-highlight-lines=
"4,8-9"
>
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=
"http://softwaremaniacs.org/soft/highlight/en/description/"
>
highlight.js
</a>
.
</p>
...
...
This diff is collapsed.
Click to expand it.
plugin/highlight/highlight.js
+
72
−
11
View file @
cef864a7
Source diff could not be displayed: it is too large. Options to address this:
view the blob
.
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