Skip to content

Commit

Permalink
Version 2.0.1
Browse files Browse the repository at this point in the history
- Simplemenu will now not stop of no menu is present at all (manual or via options)
  • Loading branch information
Martinomagnifico committed Jun 10, 2023
1 parent b66f14b commit baf4f05
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [2.0.1] - 2023-06-10
### Changed
- Simplemenu will now not stop of no menu is present at all (manual or via options)


## [2.0.0] - 2022-12-22
### Added
Expand Down
2 changes: 1 addition & 1 deletion demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h4>JavaScript</h4>
Reveal.initialize({
plugins: [ Simplemenu ]
});
&lt;script&gt;</code></pre>
&lt;/script&gt;</code></pre>
</section>
<section>
<h4>HTML Markup</h4>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "reveal.js-simplemenu",
"version": "2.0.0",
"version": "2.0.1",
"main": "plugin/simplemenu/simplemenu.js",
"module": "plugin/simplemenu/simplemenu.esm.js",
"description": "A simple menu for Reveal.js",
"description": "A simple Reveal.js plugin for a menubar or a header or footer with an auto-generated menu.",
"keywords": "reveal, reveal.js, reveal-plugin, plugin, menu, header, logo, portfolio",
"homepage": "https://github.com/Martinomagnifico/reveal.js-simplemenu",
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion plugin/simplemenu/plugin-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,9 @@ const Plugin = () => {

let menus = menuArray();

if (!menus) {
if (!menus || (menus && !menus.automenus)) {
console.log("There are no menus. Please add one or more menus manually or through the 'barhtml' option.")
return
}

if (menus.automenus.length >= 1 && (sections.namedvisible).length >= 1) {
Expand Down
6 changes: 4 additions & 2 deletions plugin/simplemenu/simplemenu.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* https://github.com/Martinomagnifico
*
* Simplemenu.js for Reveal.js
* Version 2.0.0
* Version 2.0.1
*
* @license
* MIT licensed
Expand All @@ -14,6 +14,7 @@
******************************************************************/



const Plugin = () => {
let options = {};
const vars = {};
Expand Down Expand Up @@ -356,8 +357,9 @@ const Plugin = () => {
debugLog("Preparing menus");
let menus = menuArray();

if (!menus) {
if (!menus || menus && !menus.automenus) {
console.log("There are no menus. Please add one or more menus manually or through the 'barhtml' option.");
return;
}

if (menus.automenus.length >= 1 && sections.namedvisible.length >= 1) {
Expand Down
6 changes: 4 additions & 2 deletions plugin/simplemenu/simplemenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* https://github.com/Martinomagnifico
*
* Simplemenu.js for Reveal.js
* Version 2.0.0
* Version 2.0.1
*
* @license
* MIT licensed
Expand All @@ -14,6 +14,7 @@
******************************************************************/



(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
Expand Down Expand Up @@ -362,8 +363,9 @@
debugLog("Preparing menus");
let menus = menuArray();

if (!menus) {
if (!menus || menus && !menus.automenus) {
console.log("There are no menus. Please add one or more menus manually or through the 'barhtml' option.");
return;
}

if (menus.automenus.length >= 1 && sections.namedvisible.length >= 1) {
Expand Down

0 comments on commit baf4f05

Please # to comment.