ImageShowGK4 text align

GK User
Wed May 27, 2015 11:17 am
Hi there,
Using the ImageShowGK4 with the gk-photo template. Is there a way to make the text on the slides centered while maintaining the nice hover (arrow left/right) to navigate through the different slides?
Marc
User avatar
Senior Boarder

GK User
Fri May 29, 2015 3:09 pm
Hello,

Please try to add the following CSS code under template settings-> advanced settings -> custom CSS code:

Code: Select all
.gkIsWrapper-gk_photo figcaption {
  text-align: center;
}
.gkIsWrapper-gk_photo figcaption h2,
.gkIsWrapper-gk_photo figcaption p {
  width: 100%;
}
.gkIsWrapper-gk_photo figcaption a {
  float: none;
  display: inline-block;
}
User avatar
Administrator

GK User
Fri May 29, 2015 5:06 pm
Hi Dziudek,
Thanks for your reply. If I add that code...(have tried something same as this) the hover effect is not possible anymore.
There is no cursor arrow anymore when hovering over the text...
Any thoughts?
User avatar
Senior Boarder

GK User
Sat May 30, 2015 11:19 am
Please try to replace in the gk_photo style in the engine.js file:

Code: Select all
elmt.addEvent('mouseover', function() {
                            if(!wrapper.hasClass('gk-arrow-visible')) {
                               wrapper.addClass('gk-arrow-visible');
                            }
                         });
                        
                         elmt.addEvent('mouseout', function() {
                            if(wrapper.hasClass('gk-arrow-visible')) {
                               wrapper.removeClass('gk-arrow-visible');
                            }
                         });


to:

Code: Select all
elmt.addEvent('mouseenter', function() {
                            if(!wrapper.hasClass('gk-arrow-visible')) {
                               wrapper.addClass('gk-arrow-visible');
                            }
                         });
                        
                         elmt.addEvent('mouseleave', function() {
                            if(wrapper.hasClass('gk-arrow-visible')) {
                               wrapper.removeClass('gk-arrow-visible');
                            }
                         });
User avatar
Administrator

GK User
Mon Jun 01, 2015 11:36 am
Thanks Dziudek, I adjusted the code but it does not work. No cache and multiple refreshes but still the same, no arrow on hovering the text...
User avatar
Senior Boarder

GK User
Tue Jun 02, 2015 4:23 pm
Sorry but in this case I have no other idea how to fix this issue - most probably it needs a bigger investigation which is beyond of our technical support.
User avatar
Administrator

GK User
Wed Jun 03, 2015 4:20 pm
Yep, solved it! As soon as you remove the floats all text becomes an obstacle for the hovering effect. So this is what I did:

- Edited view.php (in modules/mod_image_show_gk4/styles/gk_photo)

Changed line 84 from:
Code: Select all
<a href="<?php echo $link; ?>"><?php echo $link_text; ?></a>


To:
-
Code: Select all
<div style="float:left; width:100%;"><a href="<?php echo $link; ?>"><?php echo $link_text; ?></a></div>


And used the css styles from Dziudek:

.gkIsWrapper-gk_photo figcaption {
text-align: center;
}
.gkIsWrapper-gk_photo figcaption h2,
.gkIsWrapper-gk_photo figcaption p {
width: 100%;
}
.gkIsWrapper-gk_photo figcaption a {
float: none;
display: inline-block;
}
User avatar
Senior Boarder


cron