Skip to content

Commit

Permalink
v1.0.4 - new download HTML5 entity
Browse files Browse the repository at this point in the history
  • Loading branch information
Serrin authored Jul 26, 2020
1 parent 6ce883d commit 317a9c5
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 20 deletions.
5 changes: 5 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@

https://opensource.org/licenses/MIT

MIT License

SPDX short identifier: MIT

Copyright (c) 2017 Ferenc Czigler

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
7 changes: 4 additions & 3 deletions imglightbox.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* imglightbox
* @version 1.0.3
* @version 1.0.4
* @author Ferenc Czigler <serrin.salamander@gmail.com>
* @see https://github.com/Serrin/
*
Expand All @@ -9,9 +9,10 @@
*/

#imgLightbox {
font-family: Arial, Helvetica, sans-serif !important;
background-image: url('');
background-repeat: no-repeat;
background-size: contain;
background-size: contain;
background-position: center center;
position: fixed;
top: 0%;
Expand Down Expand Up @@ -42,7 +43,7 @@
color: white;
font-size: 40px;
z-index: 9999999;
}
}

.imgLightbox-button {
display: inline-block;
Expand Down
20 changes: 10 additions & 10 deletions imglightbox.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- version 1.0.3 -->
<!-- version 1.0.4 -->
<html lang="en">
<head>
<meta charset="utf-8">
Expand All @@ -8,15 +8,15 @@
<title>imgLightbox</title>
<meta name="Author" content="Czigler Ferenc">

<link href="imglightbox.min.css" rel="stylesheet" type="text/css">
<script src="imglightbox.min.js"></script>
<link href="imglightbox.css" rel="stylesheet" type="text/css">
<script src="imglightbox.js"></script>

<style>

*,:before,:after { box-sizing: border-box; word-break: break-all; word-wrap: break-word;}

body {
font-family: Arial, sans-serif;
font-family: Arial, Helvetica, sans-serif;
text-align: justify;
margin: 0 auto;
padding: 5px;
Expand All @@ -32,7 +32,7 @@
text-align: left;
padding: 5px;
white-space: pre-wrap;
word-wrap: break-word;
word-wrap: break-word;
}

code, button { display: inline-block; margin: 2px; }
Expand Down Expand Up @@ -64,10 +64,10 @@ <h3>Include</h3>
<pre>&#60;div id="imgLightbox" onclick="imgLightbox.close();"&#62;
&#60;div id="imgLightbox-button-area"&#62;
&#60;a title="download and close" id="imgLightbox-button-download"&#62;
&#60;span class="imgLightbox-button"&#62;&amp;#x021A7;&#60;/span&#62;
&#60;/a&#62;
&#60;span class="imgLightbox-button"&#62;&amp;DownArrowBar;&#60;/span&#62;
&#60;/a&#62;
&#60;span title="close" class="imgLightbox-button" onclick="imgLightbox.close();"&#62;&amp;Cross;&#60;/span&#62;
&#60;/div&#62;
&#60;/div&#62;
&#60;/div&#62;</pre>

<h3>Get the library version:</h3>
Expand Down Expand Up @@ -155,10 +155,10 @@ <h2>MIT License</h2>
<div id="imgLightbox" onclick="imgLightbox.close();">
<div id="imgLightbox-button-area">
<a title="download and close" id="imgLightbox-button-download">
<span class="imgLightbox-button">&#x021A7;</span>
<span class="imgLightbox-button">&DownArrowBar;</span>
</a>
<span title="close" class="imgLightbox-button" onclick="imgLightbox.close();">&Cross;</span>
</div>
</div>
</div>

</body>
Expand Down
6 changes: 3 additions & 3 deletions imglightbox.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* imglightbox
* @version 1.0.3
* @version 1.0.4
* @author Ferenc Czigler <serrin.salamander@gmail.com>
* @see https://github.com/Serrin/
*
Expand All @@ -12,14 +12,14 @@ var imgLightbox = (function(){
"use strict";
return {
config: {
version: "1.0.3",
version: "1.0.4",
download: false
},
open: function (filename, download) {
if (typeof download !== "boolean") { download = this.config.download; }
var els = document.getElementById("imgLightbox").style;
els.backgroundImage = "url('"+filename+"')";
els.display="block";
els.display = "block";
var dlbtn = document.getElementById("imgLightbox-button-download");
if (download) {
dlbtn.style.display = "inline-block";
Expand Down
4 changes: 2 additions & 2 deletions imglightbox.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions imglightbox.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

# imgLightbox

Just another simple image lightbox without dependecies.

IE11, mobile browser and ES5 compatible.

For the documentation please read the __imglightbox.html__!

## How to clone

$ git clone https://github.com/Serrin/imgLightbox/

## License

https://opensource.org/licenses/MIT

MIT License

SPDX short identifier: MIT

Copyright (c) 2017 Ferenc Czigler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

0 comments on commit 317a9c5

Please sign in to comment.