diff --git a/src/css/ngGallery.css b/src/css/ngGallery.css index 20c3a4b..3913a38 100644 --- a/src/css/ngGallery.css +++ b/src/css/ngGallery.css @@ -6,13 +6,12 @@ img.ng-thumb { height: 50px; - float: left; display: block; cursor: pointer; - margin: 2px 2px 0 0; + margin: 2px 2px 0 0; } -.ng-overlay { +.ng-overlay { position: fixed; top: 0; left: 0; @@ -28,8 +27,32 @@ img.ng-thumb { user-select: none; -webkit-user-drag: none; } +.ng-gallery { + clear: both; +} +.ng-gallery > .ng-gallery-thumbs { + float: left; + position: relative; +} +.ng-gallery > .ng-gallery-thumbs:hover .delete-icon { + visibility: visible; + opacity: 1; + text-shadow: 0px 0px 1px rgba(0, 0, 0, 1); +} + +.ng-gallery > .ng-gallery-thumbs .delete-icon { + cursor: pointer; + color: white; + position: absolute; + padding: 2px 6px; + right: 0; + top: 0; + visibility: hidden; + opacity: 0; + transition: opacity 0.1s; +} -.ng-gallery-content { +.ng-gallery-content { position: fixed; top: 0; left: 0; @@ -39,28 +62,23 @@ img.ng-thumb { text-align: center; } -.ng-gallery-content > a.close-popup { - font-size: 42px; - float: right; - color: #fff; - text-decoration: none; - margin: 0 30px 0 0; - cursor: pointer; +.ng-gallery-content > .image-controls { position: absolute; top: 20px; right: 0; + z-index: 2; } -.ng-gallery-content > a.download-image { +.ng-gallery-content > .image-controls > a.download-image, +.ng-gallery-content > .image-controls > a.delete-image, +.ng-gallery-content > .image-controls > a.close-popup { font-size: 42px; float: right; color: #fff; text-decoration: none; margin: 0 30px 0 0; cursor: pointer; - position: absolute; - top: 20px; - right: 63px; + position: relative; } .ng-gallery-content > a.nav-left, .ng-gallery-content > a.nav-right { @@ -72,17 +90,37 @@ img.ng-thumb { } .ng-gallery-content > a.nav-left { - position: fixed; - left: 30px; + width: 50%; + height: 100%; + position: absolute; + left: 0; + top: 0; + z-index: 1; + text-align: left; +} + +.ng-gallery-content > a.nav-right { + width: 50%; + height: 100%; + position: absolute; + right: 0; + top: 0; + z-index: 1; + text-align: right; +} + +.ng-gallery-content > a.nav-left > i { top: 50%; + left: 30px; transform: translateY(-50%); + position: relative; } -.ng-gallery-content > a.nav-right { - position: fixed; - right: 30px; +.ng-gallery-content > a.nav-right > i { top: 50%; + right: 30px; transform: translateY(-50%); + position: relative; } .ng-gallery-content > img { @@ -130,13 +168,14 @@ img.ng-thumb { width: 400px; height: 70px; text-align: center; - position: fixed; + position: absolute; bottom: 20px; left: 0; right: 0; margin-left: auto; margin-right: auto; overflow-x: hidden; + z-index: 2; } .ng-gallery-content > .ng-thumbnails-wrapper > .ng-thumbnails { @@ -153,7 +192,7 @@ img.ng-thumb { opacity: 0.6; } -.ng-gallery-content > .ng-thumbnails-wrapper > .ng-thumbnails > div > img:hover, +.ng-gallery-content > .ng-thumbnails-wrapper > .ng-thumbnails > div > img:hover, .ng-gallery-content > .ng-thumbnails-wrapper > .ng-thumbnails > div > img.active { transition: opacity 0.25s ease; opacity: 1; @@ -162,11 +201,11 @@ img.ng-thumb { /* Loading - from http://loading.io */ uiload { display: inline-block; - position: relative; + position: relative; } uiload > div { - position: relative; + position: relative; } @-webkit-keyframes uil-ring-anim { @@ -175,7 +214,7 @@ uiload > div { -moz-transform: rotate(0deg); -webkit-transform: rotate(0deg); -o-transform: rotate(0deg); - transform: rotate(0deg); + transform: rotate(0deg); } 100% { @@ -183,8 +222,8 @@ uiload > div { -moz-transform: rotate(360deg); -webkit-transform: rotate(360deg); -o-transform: rotate(360deg); - transform: rotate(360deg); - } + transform: rotate(360deg); + } } @-moz-keyframes uil-ring-anim { @@ -193,7 +232,7 @@ uiload > div { -moz-transform: rotate(0deg); -webkit-transform: rotate(0deg); -o-transform: rotate(0deg); - transform: rotate(0deg); + transform: rotate(0deg); } 100% { @@ -201,8 +240,8 @@ uiload > div { -moz-transform: rotate(360deg); -webkit-transform: rotate(360deg); -o-transform: rotate(360deg); - transform: rotate(360deg); - } + transform: rotate(360deg); + } } @-ms-keyframes uil-ring-anim { @@ -211,7 +250,7 @@ uiload > div { -moz-transform: rotate(0deg); -webkit-transform: rotate(0deg); -o-transform: rotate(0deg); - transform: rotate(0deg); + transform: rotate(0deg); } 100% { @@ -219,8 +258,8 @@ uiload > div { -moz-transform: rotate(360deg); -webkit-transform: rotate(360deg); -o-transform: rotate(360deg); - transform: rotate(360deg); - } + transform: rotate(360deg); + } } @keyframes uil-ring-anim { @@ -229,7 +268,7 @@ uiload > div { -moz-transform: rotate(0deg); -webkit-transform: rotate(0deg); -o-transform: rotate(0deg); - transform: rotate(0deg); + transform: rotate(0deg); } 100% { @@ -237,8 +276,8 @@ uiload > div { -moz-transform: rotate(360deg); -webkit-transform: rotate(360deg); -o-transform: rotate(360deg); - transform: rotate(360deg); - } + transform: rotate(360deg); + } } .uil-ring-css { @@ -247,7 +286,7 @@ uiload > div { top: 0; margin: 180px auto 0 auto; width: 100px; - height: 100px; + height: 100px; } .uil-ring-css > div { @@ -263,5 +302,5 @@ uiload > div { -moz-animation: uil-ring-anim 1s linear infinite; -webkit-animation: uil-ring-anim 1s linear infinite; -o-animation: uil-ring-anim 1s linear infinite; - animation: uil-ring-anim 1s linear infinite; + animation: uil-ring-anim 1s linear infinite; } \ No newline at end of file diff --git a/src/js/ngGallery.js b/src/js/ngGallery.js index 56e7dbf..fa3b560 100644 --- a/src/js/ngGallery.js +++ b/src/js/ngGallery.js @@ -30,7 +30,8 @@ // Set the default template $templateCache.put(template_url, '
' + - '
' + + ' ' + '
' + @@ -38,8 +39,11 @@ '
' + '