Skip to content

Commit

Permalink
Bugfix, v 1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Martino committed Jun 5, 2022
1 parent 5d7fad7 commit 5afa7db
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 16 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Changelog

## [1.1.4] - 2022-06-04
### Changed
- Typo fix


## [1.1.3] - 2022-06-04
### Added
- Autoload the CSS styling.
- Added a new `path` option if the user wants to override the autoloading of the included styles. For example, to customise the styling.
- Added a new `csspath` option if the user wants to override the autoloading of the included styles. For example, to customise the styling.

## [1.1.2] - 2022-03-07
### Changed
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ If you're using ES modules, you can add it like this:

Since version 1.1.3, the styling of Verticator is automatically inserted from the included CSS styles, either loaded through NPM or from the plugin folder. If you enable tooltips in the options, the same goes for those styles.

If you want to change the Verticator or tooltip style, you can simply make your own style and use that stylesheet instead. Linking to your custom styles can be managed through the `path` option of Verticator.
If you want to change the Verticator or tooltip style, you can simply make your own style and use that stylesheet instead. Linking to your custom styles can be managed through the `csspath` option of Verticator.


### HTML
Expand All @@ -100,7 +100,7 @@ Reveal.initialize({
autogenerate: true,
tooltip: false,
scale: 1,
path: {
csspath: {
verticator: '',
tooltip: ''
}
Expand All @@ -126,7 +126,7 @@ Reveal.initialize({
* `tooltip: 'data-name'`: When you use `tooltip: 'data-name'` or `tooltip: 'title'` or any other attribute with a string value, the tooltip will show that value.
* `tooltip: 'auto'`: When you use `tooltip: 'auto'`, Verticator will check titles of each slide in the order: `data-verticator-tooltip`, `data-name`, `title`, and if none found, headings inside each slide in the order: `h1`, `h2`, `h3`, `h4`. Auto-mode is convenient for Verticator tooltips in Markdown slides. Set `data-verticator-tooltip="none"` or a class of `no-verticator-tooltip` on specific slides if you don't want the attribute- or auto-tooltip to show at all.
* **`scale`**: While Verticator will now scale according to the scale factor of the main slides (since version 1.1.1), the option `scale` will resize it manually on top of that. Set to `1` by default, it can be set to a minimum of `0.5` and a maximum of `2`.
* **`path`**: Verticator will automatically load the styling for the bullets and (if needed) the tooltips. If you want to customise the styling, you can link to your own CSS files here for each of the styles.
* **`csspath`**: Verticator will automatically load the styling for the bullets and (if needed) the tooltips. If you want to customise the styling, you can link to your own CSS files here for each of the styles.


## Like it?
Expand Down
6 changes: 3 additions & 3 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h3>Options</h3>
<li>autogenerate</li>
<li>scale</li>
<li>tooltip</li>
<li>path</li>
<li>csspath</li>
</ol>
</div>
</section>
Expand Down Expand Up @@ -200,12 +200,12 @@ <h4>Option 10: scale</h4>
</code></pre>
</section>
<section class="center">
<h4>Option 11: path</h4>
<h4>Option 11: csspath</h4>
<p>Verticator will automatically load the styling for the bullets and (if needed) the tooltips. If you want to change the styling, you can link to your own CSS files:</p>
<pre><code class="javascript">Reveal.initialize({
...
verticator: {
path: {
csspath: {
verticator: 'path-to/my-css-files/customverticator.css',
tooltip: 'path-to/my-css-files/customtooltip.css'
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reveal.js-verticator",
"version": "1.1.3",
"version": "1.1.4",
"description": "A plugin for Reveal.js 4 that adds indicators to show the amount of slides in a vertical stack",
"keywords": "reveal, reveal.js, vertical bullets, reveal-plugin, plugin, fullPage.js",
"homepage": "https://github.com/Martinomagnifico/reveal.js-verticator",
Expand Down
4 changes: 2 additions & 2 deletions plugin/verticator/plugin-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ const Plugin = () => {
return path;
}

let VerticatorStylePath = !!options.csspath.verticator ? options.csspath.verticator : null || `${pluginPath()}verticator.css` || 'plugin/verticator/verticator.css'
let TooltipStylePath =!!options.csspath.tooltip ? options.csspath.tooltip : null || `${pluginPath()}tooltip.css` || 'plugin/verticator/tooltip.css'
let VerticatorStylePath = options.csspath.verticator ? options.csspath.verticator : null || `${pluginPath()}verticator.css` || 'plugin/verticator/verticator.css'
let TooltipStylePath = options.csspath.tooltip ? options.csspath.tooltip : null || `${pluginPath()}tooltip.css` || 'plugin/verticator/tooltip.css'

if (options.debug) {
console.log(`Plugin path = ${pluginPath()}`);
Expand Down
6 changes: 3 additions & 3 deletions plugin/verticator/verticator.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* https://github.com/Martinomagnifico
*
* Verticator.js for Reveal.js
* Version 1.1.3
* Version 1.1.4
*
* @license
* MIT licensed
Expand Down Expand Up @@ -288,8 +288,8 @@ var Plugin = function Plugin() {
return path;
}

var VerticatorStylePath = !!options.csspath.verticator ? options.csspath.verticator : "".concat(pluginPath(), "verticator.css") || 'plugin/verticator/verticator.css';
var TooltipStylePath = !!options.csspath.tooltip ? options.csspath.tooltip : "".concat(pluginPath(), "tooltip.css") || 'plugin/verticator/tooltip.css';
var VerticatorStylePath = options.csspath.verticator ? options.csspath.verticator : "".concat(pluginPath(), "verticator.css") || 'plugin/verticator/verticator.css';
var TooltipStylePath = options.csspath.tooltip ? options.csspath.tooltip : "".concat(pluginPath(), "tooltip.css") || 'plugin/verticator/tooltip.css';

if (options.debug) {
console.log("Plugin path = ".concat(pluginPath()));
Expand Down
6 changes: 3 additions & 3 deletions plugin/verticator/verticator.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* https://github.com/Martinomagnifico
*
* Verticator.js for Reveal.js
* Version 1.1.3
* Version 1.1.4
*
* @license
* MIT licensed
Expand Down Expand Up @@ -294,8 +294,8 @@
return path;
}

var VerticatorStylePath = !!options.csspath.verticator ? options.csspath.verticator : "".concat(pluginPath(), "verticator.css") || 'plugin/verticator/verticator.css';
var TooltipStylePath = !!options.csspath.tooltip ? options.csspath.tooltip : "".concat(pluginPath(), "tooltip.css") || 'plugin/verticator/tooltip.css';
var VerticatorStylePath = options.csspath.verticator ? options.csspath.verticator : "".concat(pluginPath(), "verticator.css") || 'plugin/verticator/verticator.css';
var TooltipStylePath = options.csspath.tooltip ? options.csspath.tooltip : "".concat(pluginPath(), "tooltip.css") || 'plugin/verticator/tooltip.css';

if (options.debug) {
console.log("Plugin path = ".concat(pluginPath()));
Expand Down

0 comments on commit 5afa7db

Please sign in to comment.