Skip to content

Commit

Permalink
* use svg image for the handle
Browse files Browse the repository at this point in the history
  • Loading branch information
Razzo1987 committed Aug 31, 2020
1 parent 92e123a commit b133a2c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
22 changes: 14 additions & 8 deletions media/css/imagecomparisonslider.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
margin-left: -22px;
margin-top: -22px;
border-radius: 50%;
/* background: #dc717d url("../img/cd-arrows.svg") no-repeat center center; */
/* background: var(--primary) no-repeat center center; */
cursor: move;
box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.2), 0 0 10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
opacity: 0;
Expand All @@ -139,14 +139,20 @@
-o-transform: translate3d(0, 0, 0) scale(0);
transform: translate3d(0, 0, 0) scale(0);
}
.cs-handle:before {
position: absolute;
font-family: 'Font Awesome 5 Free';
font-size: 1.5rem;
top: 6px;
left: 12px;
content: "\f337";
.cs-handle .cs-icon {
height: 36px;
width: 36px;
display: inline-block;
margin-top: 4px;
margin-left: 4px;
-webkit-mask: url("../images/slide-h.svg") no-repeat 50% 50%;
mask: url("../images/slide-h.svg") no-repeat 50% 50%;
background-color: #ffffff;
}
.cs-handle:hover .cs-icon {
background-color: #ececec;
}

.cs-handle.draggable {
/* change background color when element is active */
/* background-color: #445b7c; */
Expand Down
1 change: 1 addition & 0 deletions media/images/slide-h.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions media/images/slide-v.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion mod_joomlalabs_imagecomparisonslider_module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<authorUrl>https://joomlalabs.com</authorUrl>
<copyright>Copyright (C) 2015 - 2020 Joomla!LABS. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>1.1.1</version>
<version>1.2.0</version>
<description>MOD_JOOMLALABS_IMAGECOMPARISONSLIDER_MODULE_XML_DESCRIPTION</description>

<files>
Expand All @@ -19,6 +19,7 @@
</files>

<media destination="mod_joomlalabs_imagecomparisonslider_module" folder="media">
<folder>images</folder>
<folder>css</folder>
<folder>js</folder>
</media>
Expand Down
2 changes: 1 addition & 1 deletion tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
<span class="cs-image-label" data-type="left"><?php echo $left_caption; ?></span>
</div>

<span class="cs-handle btn-primary"></span> <!-- slider handle -->
<span class="cs-handle btn-primary"><i class="cs-icon"></i></span> <!-- slider handle -->
</figure> <!-- cs-image-container -->

0 comments on commit b133a2c

Please sign in to comment.