-
AuthorPosts
-
September 14, 2015 at 3:51 pm #683842
Hey Guys,
On the homepage in “Upcoming new events” module title, we have a “small font” first word and a second one bigger.
I need to increase the number of characters in the first smaller word.
Can you please tell me how to do this.
Cheers,
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
September 15, 2015 at 4:14 am #683984Hi,
You will see that see style below into templates/ja_charity/css/template.css file to work with smaller word in “Upcoming new events” module title
.mod-title .first-word {
font-family: "Lato", Helvetica, Arial, sans-serif;
display: block;
font-weight: 400;
line-height: 2;
font-size: 22px !important;
}and you need to create the custom templates/ja_charity/css/custom.css file and add new rule
.mod-title .first-word {
font-size: 22px !important;
}Hope it helps
Regards
1 user says Thank You to Ninja Lead for this useful post
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
September 15, 2015 at 4:14 am #748579Hi,
In this case, you have to customise it from JS file
Below are my workaround:
– Open the file: templates/ja_charity/js/script.js
– Find and change:
$('.mod-title').each(function(){
var me = $(this);
me.html(me.html().replace(/^(w+)/, '<small class="first-word">$1</small>'));
});
to
$('.event-slider h2.mod-title').each(function(){
var me = $(this);
var string_replace = '';
var matches = me.html().match(/b[^ds]+b/g);
if (matches.length >= 2) {
for (var i = 0; i < 2; i++) {
string_replace = string_replace + matches + ' ';
};
me.html(me.html().replace(string_replace, '<small class="first-word">'+string_replace+'</small>'));
}});
You can change the value in red as above if you want to increase to number greater than 2
Hope it helps
Regards
1 user says Thank You to Ninja Lead for this useful post
September 15, 2015 at 12:38 pm #684179It worked just fine.
Thanks for your help
-
AuthorPosts
This topic contains 5 replies, has 2 voices, and was last updated by luismi 9 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum