Comments (5)
There are 5 things going on:
- There is no empty menu present in the HTML.
- The above is not needed if a menubar with menu is inserted via the Simplemenu "barhtml" option. But that is also not provided.
- Simplemenu gives a warning message in the console if no menu is inserted, either directly in HTML or via the options. This warning message can be overlooked. Maybe it should be changed to an alert. But there's also an error in the script that Simplemenu tries to continue even if no menu is present. That causes an error. This will be fixed in an update soon.
- There is content in each parent section that is not a child section. Try to avoid that.
- The parent sections are not named.
Below is a fixed version of the code:
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Test Simplemenu</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/black.css">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/zenburn.css">
</head>
<body>
<!-- SLIDES -->
<div class="reveal">
<div class="slides">
<style>
.td_left {
border:none !important;
text-align:left !important;
font-size:50% !important;
height:50% !important;
}
.td_right {
border:none !important;
text-align: right !important;
font-size:50% !important;
height:50% !important;
}
</style>
<!-- TEST -->
<section data-name="Section 1">
<section>
<h1>TEST 1</h1>
SOME TEXT
</section>
<section>
<h3>SUBSECTION</h3>
TEST
</section>
<section>
<h3>SUBSECTION</h3>
TEST 2
</section>
</section>
<section data-name="Section 2">
<section>
<h1>TEST 2</h1>
SOME TEXT
</section>
<section>
<h3>SUBSECTION</h3>
TEST
</section>
<section>
<h3>SUBSECTION</h3>
TEST 2
</section>
</section>
</div>
</div>
<script src="dist/reveal.js"></script>
<script src="plugin/notes/notes.js"></script>
<script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script src="plugin/math/math.js"></script>
<script src="plugin/simplemenu/simplemenu.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
// Activate SlideNumbers
slideNumber: "c/t",
simplemenu: {
barhtml: {
header: "<div class='menubar'><ul class='menu'></ul><div>",
footer: ""
}
},
// Learn about plugins: https://revealjs.com/plugins/
plugins: [ Simplemenu, RevealMath.KaTeX, RevealMarkdown, RevealHighlight, RevealNotes ]
});
</script>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
</body>
</html>
from reveal.js-simplemenu.
Okay now I see where I failed. In the README I have red the Chapter "Styling" and was thinking: "no I don't want to style the menu right now I first need it to run without changes to design, so I skipped the chapters afterwards. Thx for this awesome Menu now that I can use it ^^.
from reveal.js-simplemenu.
Hi Matti,
the plugin is simply a third-party plugin, so not a built-in one made by the author of Reveal. Built-in plugins are included with Reveal, like RevealHighlight, RevealMarkdown etcetera.
There is a list of third-party plugins at this page. You can see that Simplemenu is there as well.
To include a plugin in an existing project, look at how the official documentation does it. Usually, you start with the standard reveal.js script, then the plugins scripts, then add a Reveal initialization script that includes a reference to the plugins you want to include.
The instructions of how to include and use Simplemenu are in the Readme.
If you still have trouble getting it to work, you can post your code here in this issue, or send your project as a zip via email. See my profile for that.
Martijn
from reveal.js-simplemenu.
Hi Martjin,
I tried those steps, but had no luck so far. All I get presented after activating the plugin the background. Since I wasn't able to send the code zipped via mail, I created a repo: https://github.com/MaKaNu/test_simplemenu
The Very Basic Example works if I remove the plugin.
thx so far
Matti
from reveal.js-simplemenu.
If you like it, you can star it :-)
from reveal.js-simplemenu.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reveal.js-simplemenu.