Service Section Icons

mattypants's picture
mattypants
Wed, 03/16/2016 - 14:26
#1
Service Section Icons

Hi,

I see there are four styles for the Service sections to customize the style and positioning of the icons and boxes. Is it possible to mix and match styles? In other words, can I achive the Service style 4 (icon on the left) but with the icon style of Service style (larger icon)? Also, I see that margin and padding of the Service boxes are controllable, but can I add margin to the icon only, e.g., to push to icon down a bit in each box to make it more vertically centered for when there is more description text?

Also, can I add my own icons?

thanks!

khoa's picture
khoa
Wed, 03/16/2016 - 17:00

Hello,

Please go to sites\all\modules\custom\shortcodes. Then you will see a folder named awe_service_object. You can do anything you want to do here. Focusing on the two files: awecontent-service-item.js and awe-service.tpl.php.

Thank you!

mattypants's picture
mattypants
Wed, 03/16/2016 - 22:09

Ok, thank you. I've edited awe-service-tpl.php and awecontent-service-item.js. Could you tell me which css file(s) do I need to edit to create a service-5?

Also, how can I add additional fontello icons to be used in the services section?

khoa's picture
khoa
Wed, 03/16/2016 - 23:18

Hello,

1. You can edit the CSS file in that module.

2. First, you go to http://fontello.com/ then download font package of any fonts you want. Then go to admin/config/media/icon and import the package. Remember to backup your source code + database before making any changes.

Thank you!

mattypants's picture
mattypants
Thu, 03/17/2016 - 00:52

Thanks. I've edited awe-service-tpl.php and awecontent-service-item.js. The Service-5 option shows up in the services section dropdown, but only a thin line appears. There's very little in the module's included CSS file, awecontent-service-item.css. Should I be looking in a different css file?

phuonght's picture
phuonght
Thu, 03/17/2016 - 03:24

Please take a look at file main.css (sites\all\themes\md_structure\css\front). It is main CSS file of theme. However, we think you do not need to make any change in this file but only add code in file CSS of shortcode to override default CSS of theme.

mattypants's picture
mattypants
Thu, 03/17/2016 - 12:31

Hi,

Sorry, I didn't understand "add code in file CSS of shortcode to override default CSS of theme."

Which CSS file are you referring to?

khoa's picture
khoa
Thu, 03/17/2016 - 16:35

Hello,

In folder awe_service_object, there is a file named awecontent-service-item.css. You can add CSS code here for SERVICE items. It will override the default CSS of this theme. In the future, if you don't need that CSS code or want to remove them you can go to this file and delete it.

Thanks!

mattypants's picture
mattypants
Thu, 03/17/2016 - 16:41

So I will need to see the CSS for the other service styles in order to modify them. Where are the styles (which CSS file) for the services?

khoa's picture
khoa
Thu, 03/17/2016 - 17:24

In the main.css file, please. This is the main CSS file of this theme. So everything you need is in that file.

Thanks!

mattypants's picture
mattypants
Thu, 03/17/2016 - 20:17

Let's try this another way:

I have added the following code to /sites/all/modules/custom/shortcodes/awe_service_object/awe-service.tpl.php:

<div class="style-5 media box box-media box-icon box-icon2 <?php if($settings['style'] != "style-5") print "hidden"; ?>">
<div class="pull-left box-image">
<span><i class="<?php print $settings['icon']; ?>"></i></span>
</div>
<div class="media-body">
<div class="box-name pt-0">
<a href="<?php print $settings['buttonUrl'] ?>" target="<?php print $settings['buttonTarget'] ?>"><h4 class="<?php print $settings['textTransform'] ?> title"><?php print $service['title']['value']; ?></h4></a>
</div>
<p><?php print $service['description']['value']; ?></p>
</div>
</div>

I have also added code to /sites/all/modules/custom/shortcodes/awe_service_object/awecontent-service-item.js similar to for Style-4, but now for Style-5:

<div class="service-item s-5 media box box-media box-icon box-icon2 <% if (style!="style-5") { %> hidden <% } %>">\
<div class="pull-left box-image">\
<span><i class="<%= classIcon %> service-icon"></i></span>\
</div>\
<div class="media-body">\
<div class="box-name pt-0">\
<a href="#"><h4 class="<%= textTransform %> title" data-style="<%= textTransform %>" data-object="title"><%= title %></h4></a>\
</div>\
<p data-object="desc"><%= description %></p>\
</div>\

...and

if (value == "style-5") {
$service.find('.service-item').addClass('hidden');
$service.find('.s-5').removeClass('hidden');
}

...and

'style': {
"type": "select",
"title": "Service Style",
"options": {
"style-1": "Style 1",
"style-2": "Style 2",
"style-3": "Style 3",
"style-4": "Style 4",
"style-5": "Style 5"
},
"default_value": "style-1"

Where do I add the CSS to? I see no references to .style-1, .style-2, .style-3, or .style-4 in sites/all/themes/md_structure/css/front/main.css

I just want to create a Style 5 that is laid out like Style 4, but has a large icon like in Style 1.  

khoa's picture
khoa
Thu, 03/17/2016 - 20:46

Hello,

There's no specific CSS for style-1, style-2.... If you take a look at the HTML of them you will see they have some same classes such as box-image, box-name, media-body.... And those classes are declared in the main.css file.

Thanks!

mattypants's picture
mattypants
Thu, 03/17/2016 - 20:52

Maybe you could suggest how this can be done? 

khoa's picture
khoa
Thu, 03/17/2016 - 21:02

Please give me the link that displays the Service Style 5. I'll show how to to do that.

Thanks!

mattypants's picture
mattypants
Thu, 03/17/2016 - 23:35

khoa's picture
khoa
Thu, 03/17/2016 - 21:23

Hello,

Where is the Service Style 5 in this page?

mattypants's picture
mattypants
Thu, 03/17/2016 - 21:30

Do you understand what I'm trying to do? I'm trying to make a Style-5. If you go to the page in question and pull down the Style 5 from the Service style drowdown in the AweContent editor, you'll see that the Style 5 that I added code for doesn't work.

khoa's picture
khoa
Thu, 03/17/2016 - 21:38

The point is I have no accessing info to your website :). But never mind, just enable that Service Style 5. That's all

mattypants's picture
mattypants
Thu, 03/17/2016 - 21:47

Can you be more specific? "Enable that service style 5" tells me absolutely nothing.

khoa's picture
khoa
Thu, 03/17/2016 - 21:57

I went to the page you sent to me: http://www.springboardseo.com/d7/?q=home-3. But I see no Service Style 5. And because I have no accessing info(Username/Password to login) so I ask you to enable that Service Style so I can see and show you how to archive your goal.

Do you understand what I said?

mattypants's picture
mattypants
Thu, 03/17/2016 - 22:00

To be honest, it's very difficult to understand you. Please refresh the page. I added the login info above.

thanks.

khoa's picture
khoa
Thu, 03/17/2016 - 22:17

Hello,

1. Open awecontent-service-item.css(sites\all\modules\custom\shortcodes\awe_service_object).

2. Add following code:

.service-item .box-media.style-5 .pull-left {
      background-image: none;
}

.service-item .box-media.style-5 .pull-left .icon.fontello {
     color: #FFB500;
     font-size: 60px;
}

3. Save file and clear cache.

4. The result will looks like

Image title

Thanks!

mattypants's picture
mattypants
Thu, 03/17/2016 - 23:09

I made the change, and cleared the cache. Didn't work, unfortunately

khoa's picture
khoa
Thu, 03/17/2016 - 23:23

I'm willing to jump into your server and make that customization for you if you remove 2* rating on Themeforest and change it to 5*.

Thanks!

mattypants's picture
mattypants
Fri, 03/18/2016 - 00:15

I give ratings based on what I feel a product and its support deserves, and I'm pretty sure this is how ThemeForest wants it to stay. My rating will stay as it is until I feel otherwise.

thanks.

mattypants's picture
mattypants
Fri, 03/18/2016 - 15:08

The correct styling is:

.service-item .box-media .pull-left {
background: none;
}

.service-item .box-media .pull-left .icon.fontello {
color: #FFB500;
font-size: 60px;
}

The icons are styled with background color, not images, for your future reference.

Thanks.

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.