Skip to content

Commit

Permalink
Update to latest Screenfull version
Browse files Browse the repository at this point in the history
  • Loading branch information
Martino committed Sep 4, 2022
1 parent 5b03741 commit a370f52
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 75 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

## [1.1.1] - 2021-12-10

### Added
- Started keeping the changelog.

### Changed
- Update Screenfull to 2.0.11


TO DO

## [1.0.0] - 2020-05-27
- First commit
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Martijn De Jongh (Martino)
Copyright (c) 2022 Martijn De Jongh (Martino)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The FsFx plugin has been rewritten for Reveal.js version 4.

If you want to use FsFx with an older version of Reveal, use the [1.0.7 version](https://github.com/Martinomagnifico/reveal.js-fsfx/releases).

FsFx.js automatically includes a (great) script to be able to function: [Screenfull.js](https://github.com/sindresorhus/screenfull.js) by [Sindre Sorhus](https://sindresorhus.com). This checks the capabilities of the browser to go fullscreen. Screenfull is already imported into FsFx.
FsFx.js automatically includes a (great) script to be able to function: [Screenfull.js](https://github.com/sindresorhus/screenfull.js) by [Sindre Sorhus](https://sindresorhus.com). This checks the capabilities of the browser to go fullscreen.


### Regular installation
Expand All @@ -46,8 +46,6 @@ The FsFx plugin folder can then be referenced from `node_modules/reveal.js-fsfx/

### JavaScript

The FsFx plugin has been written for Reveal.js version 4.

There are two JavaScript files for FsFx, a regular one, `fsfx.js`, and a module one, `fsfx.esm.js`. You only need one of them:


Expand Down Expand Up @@ -142,4 +140,4 @@ And if you want to show off what you made with it, please do :-)
## License
MIT licensed

Copyright (C) 2020 Martijn De Jongh (Martino)
Copyright (C) 2022 Martijn De Jongh (Martino)
96 changes: 59 additions & 37 deletions css/demo.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
.slides {
opacity: 0;
-webkit-transition: opacity .5s ease;
-o-transition: opacity .5s ease;
transition: opacity .5s ease; }
-webkit-transition: opacity 0.5s ease;
-o-transition: opacity 0.5s ease;
transition: opacity 0.5s ease;
}

.reveal.ready .slides {
opacity: 1; }
opacity: 1;
}

ul, ol {
font-size: 90%; }
font-size: 90%;
}

li + li {
margin-top: 0.3em; }
margin-top: 0.3em;
}

.small {
font-size: .6em; }
font-size: 0.6em;
}

.fsbutton {
border-radius: 6px;
Expand All @@ -24,9 +29,10 @@ li + li {
text-align: center;
-webkit-appearance: none;
-moz-appearance: none;
-webkit-transition: opacity .5s ease-in-out;
-o-transition: opacity .5s ease-in-out;
transition: opacity .5s ease-in-out; }
-webkit-transition: opacity 0.5s ease-in-out;
-o-transition: opacity 0.5s ease-in-out;
transition: opacity 0.5s ease-in-out;
}

.reveal > .fsbutton {
border: 1.1px solid white;
Expand All @@ -41,35 +47,40 @@ li + li {
opacity: 0.6;
-webkit-transition: opacity 0.15s ease-in-out;
-o-transition: opacity 0.15s ease-in-out;
transition: opacity 0.15s ease-in-out; }
.reveal > .fsbutton:hover {
opacity: 1; }
transition: opacity 0.15s ease-in-out;
}
.reveal > .fsbutton:hover {
opacity: 1;
}

.slides .fsbutton {
border: none;
padding: 1em;
margin: 1em;
background: #ffffff;
color: #000000;
font-size: .5em;
font-size: 0.5em;
-webkit-box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.2);
box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.2); }
.slides .fsbutton:hover {
-webkit-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5); }
box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.2);
}
.slides .fsbutton:hover {
-webkit-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
}

.hide {
opacity: 0; }
opacity: 0;
}

@font-face {
font-family: 'fsfx';
font-family: "fsfx";
src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAWcAAsAAAAABVAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxEMrGNtYXAAAAFoAAAAXAAAAFwAaQDdZ2FzcAAAAcQAAAAIAAAACAAAABBnbHlmAAABzAAAAagAAAGol0gf52hlYWQAAAN0AAAANgAAADYevkEjaGhlYQAAA6wAAAAkAAAAJAfCA8dobXR4AAAD0AAAABgAAAAYDgAACmxvY2EAAAPoAAAADgAAAA4A/ACObWF4cAAAA/gAAAAgAAAAIAAJAENuYW1lAAAEGAAAAWIAAAFiTFMt/nBvc3QAAAV8AAAAIAAAACAAAwAAAAMDVQGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAQAAAAC0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAEAAAAAMAAgAAgAEAAEAIAArAC3//f//AAAAAAAgACsALf/9//8AAf/j/9n/2AADAAEAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAACAAD/wAQAA8AAHwBAAAABNjIXFhQHMQEhMhYfARQGIzEhIiY1MRE0NjMyFhUxEQEyFhUxERQGIyImNTERAQ4BLwEmNDcxASEiJi8BNDYzMQGCChwKCgr+wwECDhMBARQP/qsOFBQODhQDmg4UFA4OFP7DChkKBAoKAT3+/g4TAQEUDwFyCgoKHQr+wxENBA4UFA4BVQ8UFA/+/QOMFA7+qw8UFA8BAv7DCQEIAgodCgE9EQ0EDhQAAgAK/8cD9gO2AB8AQAAAATYyFxYUBzEBITIWFxUUBiMxISImNTERNDYzMhYVMREHMhYVMREUBiMiJjUxEQEOAS8BJjQ3MQEhIiYnNTQ2MzEDxgocCgoK/sMBAw0TAhQO/qoOFBQODhTuDhQUDg8U/sMJGgoDCgoBPf79DRMCFA4DtgoKChwK/sMSDQQOFBQOAVYOFBQO/v39FA7+qg4UFA4BA/7DCQIIAwocCgE9Eg0EDhQAAQAAAAEAAOz603dfDzz1AAsEAAAAAADdz35TAAAAAN3PflMAAP/ABAADwAAAAAgAAgAAAAAAAAABAAADwP/AAAAEAAAAAAAEAAABAAAAAAAAAAAAAAAAAAAABgQAAAAAAAAAAAAAAAIAAAAEAAAABAAACgAAAAAACgAUAB4AegDUAAAAAQAAAAYAQQACAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAQAAAABAAAAAAACAAcARQABAAAAAAADAAQALQABAAAAAAAEAAQAWgABAAAAAAAFAAsADAABAAAAAAAGAAQAOQABAAAAAAAKABoAZgADAAEECQABAAgABAADAAEECQACAA4ATAADAAEECQADAAgAMQADAAEECQAEAAgAXgADAAEECQAFABYAFwADAAEECQAGAAgAPQADAAEECQAKADQAgGZzZngAZgBzAGYAeFZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZzZngAZgBzAGYAeGZzZngAZgBzAGYAeFJlZ3VsYXIAUgBlAGcAdQBsAGEAcmZzZngAZgBzAGYAeEZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=) format("woff");
font-weight: normal;
font-style: normal; }

font-style: normal;
}
.icon-fs:after {
font-family: "fsfx";
content: '+';
content: "+";
line-height: 1;
width: 1em;
height: 1em;
Expand All @@ -79,42 +90,53 @@ li + li {
text-transform: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
margin-left: 12px; }
margin-left: 12px;
}

.reveal > .icon-fs:after {
margin-left: 0; }
margin-left: 0;
}

.icon-fsexit:after {
content: '-'; }
content: "-";
}

.reveal-viewport {
background: #1a1626; }
background: #1a1626;
}

.backgrounds {
background: #1a1626;
-webkit-transition: background-color .5s ease-in-out;
-o-transition: background-color .5s ease-in-out;
transition: background-color .5s ease-in-out; }
-webkit-transition: background-color 0.5s ease-in-out;
-o-transition: background-color 0.5s ease-in-out;
transition: background-color 0.5s ease-in-out;
}

.reveal.fullscreen .backgrounds {
color: green;
background: DarkSlateGray;
background-color: DarkSlateGray; }
background-color: DarkSlateGray;
}

.fsfx-disabled {
display: none; }
.no-fsfx .fsfx-disabled {
display: block; }
display: none;
}
.no-fsfx .fsfx-disabled {
display: block;
}

.no-fsfx .fsfx-enabled {
display: none; }
display: none;
}

a.github-corner {
position: absolute;
z-index: 1;
width: clamp(50px, 8vmax, 80px);
line-height: 0;
color: rgba(255, 255, 255, 0.5); }
color: rgba(255, 255, 255, 0.5);
}

a.github-corner:hover {
color: white; }
color: white;
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "reveal.js-fsfx",
"version": "1.1.1",
"version": "1.1.2",
"description": "A plugin for Reveal.js 4, that enters or exits fullscreen, and toggles classes on certain elements",
"keywords": "reveal, reveal.js, reveal-plugin, plugin, fullscreen",
"keywords": "reveal, reveal.js, reveal-plugin, plugin, fullscreen, screenfull",
"homepage": "https://github.com/Martinomagnifico/reveal.js-fsfx",
"repository": {
"type": "git",
"url": "https://github.com/Martinomagnifico/reveal.js-fsfx.git"
},
"author": "Martijn De Jongh",
"license": "MIT, Copyright (C) 2022 Martijn De Jongh",
"peerDependencies": {
"reveal.js": "^4.2"
},
"author": "Martijn De Jongh",
"license": "MIT, Copyright (C) 2021 Martijn De Jongh"
}
}
28 changes: 17 additions & 11 deletions plugin/fsfx/fsfx.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
* https://github.com/Martinomagnifico
*
* FsFx.js for Reveal.js
* Version 1.1.1
* Version 1.1.2
*
* @license
* MIT licensed
*
* Thanks to:
* - Hakim El Hattab, Reveal.js
* - Sindre Sorhus for Screenfull.js
******************************************************************/


Expand All @@ -23,14 +24,17 @@ function _arrayWithHoles(arr) {
}

function _iterableToArrayLimit(arr, i) {
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];

if (_i == null) return;
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;

var _s, _e;

try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);

if (i && _arr.length === i) break;
Expand Down Expand Up @@ -70,9 +74,12 @@ function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}

function _createForOfIteratorHelper(o) {
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) {
function _createForOfIteratorHelper(o, allowArrayLike) {
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];

if (!it) {
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
if (it) o = it;
var i = 0;

var F = function () {};
Expand All @@ -98,13 +105,12 @@ function _createForOfIteratorHelper(o) {
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}

var it,
normalCompletion = true,
var normalCompletion = true,
didErr = false,
err;
return {
s: function () {
it = o[Symbol.iterator]();
it = it.call(o);
},
n: function () {
var step = it.next();
Expand Down Expand Up @@ -401,4 +407,4 @@ var Plugin = function Plugin() {
};
};

export default Plugin;
export { Plugin as default };
Loading

0 comments on commit a370f52

Please sign in to comment.