Skip to content
This repository has been archived by the owner on Sep 4, 2023. It is now read-only.

Commit

Permalink
feat: added data-hide-controls
Browse files Browse the repository at this point in the history
  • Loading branch information
rparree committed Nov 20, 2021
1 parent 5b964ff commit ae06d01
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 5 deletions.
20 changes: 20 additions & 0 deletions cypress/integration/hide-controls.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
describe('unhide sections spec', () => {
beforeEach(() => {
cy.visit('/webyarns-hidenav.html')
})

it('should hide controls on a section', () => {
cy.nextSlide();
cy.get(".navigate-left").should("be.visible")
cy.nextSlide();
cy.get(".navigate-left").should("not.be.visible")
cy.nextSlide();
cy.get(".navigate-left").should("be.visible")
})






})
2 changes: 1 addition & 1 deletion uglify.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"output": {
"preamble": "// version 3.8.3-vertical"
"preamble": "// version 3.8.4-vertical"
},
"sourceMap": {
"url": "inline"
Expand Down
57 changes: 57 additions & 0 deletions webyarns-hidenav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>reveal.js</title>
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/black.css">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/monokai.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h1>Start</h1>
</section>
<section>
<h1>normal slide 1</h1>
</section>
<section data-hide-controls="">
<h1>slide with hidden nav</h1>
</section>
<section>
<h1>normal slide 1</h1>
</section>
</div>
</div>

<script src="webyarns-util/lib/helpers.js"></script>
<script src="js/reveal-vertical.js"></script>

<script>
// More info about config & dependencies:
// - https://github.com/hakimel/reveal.js#configuration
// - https://github.com/hakimel/reveal.js#dependencies
Reveal.initialize({
dependencies: [
{ src: 'webyarns-util/lib/webyarn-plugin.js' },
{ src: 'plugin/markdown/marked.js' },
{ src: 'plugin/markdown/markdown.js' },
{ src: 'plugin/notes/notes.js', async: true },
{ src: 'plugin/highlight/highlight.js', async: true }
]
});
</script>
</body>
</html>
22 changes: 21 additions & 1 deletion webyarns-util/lib/webyarn-plugin.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions webyarns-util/lib/webyarn-plugin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webyarns-util/lib/webyarn-plugin.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ae06d01

Please sign in to comment.