diff --git a/CHANGELOG.md b/CHANGELOG.md index 41b901a..e5a79ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index acd5f99..8d156fa 100644 --- a/README.md +++ b/README.md @@ -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 @@ -100,7 +100,7 @@ Reveal.initialize({ autogenerate: true, tooltip: false, scale: 1, - path: { + csspath: { verticator: '', tooltip: '' } @@ -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? diff --git a/demo.html b/demo.html index 270da74..d01f5bb 100644 --- a/demo.html +++ b/demo.html @@ -66,7 +66,7 @@

Options

  • autogenerate
  • scale
  • tooltip
  • -
  • path
  • +
  • csspath
  • @@ -200,12 +200,12 @@

    Option 10: scale

    -

    Option 11: path

    +

    Option 11: csspath

    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:

    Reveal.initialize({
     	...
     	verticator: {
    -		path: {
    +		csspath: {
     			verticator:  'path-to/my-css-files/customverticator.css',
     			tooltip: 'path-to/my-css-files/customtooltip.css'
     		}
    diff --git a/package.json b/package.json
    index 8790c2f..6cf3fb0 100644
    --- a/package.json
    +++ b/package.json
    @@ -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",
    diff --git a/plugin/verticator/plugin-src.js b/plugin/verticator/plugin-src.js
    index a1cedb0..7bbac13 100644
    --- a/plugin/verticator/plugin-src.js
    +++ b/plugin/verticator/plugin-src.js
    @@ -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()}`);
    diff --git a/plugin/verticator/verticator.esm.js b/plugin/verticator/verticator.esm.js
    index 2cbfbd0..9ae09d3 100644
    --- a/plugin/verticator/verticator.esm.js
    +++ b/plugin/verticator/verticator.esm.js
    @@ -4,7 +4,7 @@
      * https://github.com/Martinomagnifico
      *
      * Verticator.js for Reveal.js 
    - * Version 1.1.3
    + * Version 1.1.4
      * 
      * @license 
      * MIT licensed
    @@ -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()));
    diff --git a/plugin/verticator/verticator.js b/plugin/verticator/verticator.js
    index 196db19..89c3187 100644
    --- a/plugin/verticator/verticator.js
    +++ b/plugin/verticator/verticator.js
    @@ -4,7 +4,7 @@
      * https://github.com/Martinomagnifico
      *
      * Verticator.js for Reveal.js 
    - * Version 1.1.3
    + * Version 1.1.4
      * 
      * @license 
      * MIT licensed
    @@ -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()));