-
AuthorPosts
-
February 2, 2016 at 9:34 am #776162
I tried adding icons using this code:
<i class=’x-icon-pencil circle’ data-x-icon=’’ style=’color: #fff;border-radius: 100em;font-size: 24px;width: 51px;text-align: center;border: 4px solid #fff;’></i>
into the accordion title and it is showing up on the Cornerstone editor while it doesn’t in the actual page when viewed. Also, the code is lost whenever I reopen the editor.
Please help!
ThanksFebruary 2, 2016 at 9:35 am #776166This reply has been marked as private.February 2, 2016 at 12:44 pm #776482Hi there,
Thanks for writing in! It seems the page you provided doesn’t exists. Make sure to add the code and update us with correct URL.
Cheers!
February 2, 2016 at 7:22 pm #777024Hi,
Sorry it’s http://42f.137.mwp.accessdomain.com/services/
Whenever I add the code it works on the preview but not on the page. Whenever I open it again in Cornerstone to edit the code is no longer there, it doesn’t save the code. Attached below is a screenshot .
February 2, 2016 at 8:02 pm #777065Hi there,
Thanks for updating the thread! The HTML in the title is being stripped out. Cornerstone is saving everything else. There isn’t a way to do this the way you are currently doing it. However if you plan to use the pencil icon on all your accordion items, you can use this CSS. You can add this under Custom > CSS in the Customizer or in your child theme’s style.css file.
.x-accordion-heading .x-accordion-toggle:before { float:left; } a.x-accordion-toggle:after { content: "\f040"; float:left; padding:8px; margin-top:-6px; margin-right:10px; font-family:fontAwesome; line-height: 1; color: #fff; border-radius: 50em; font-size: 24px; width: 25px; height:24px; text-align: center; border: 4px solid #fff; } a.x-accordion-toggle.collapsed:before { float:left; } a.x-accordion-toggle { height: 70px; } a.x-accordion-toggle { padding-top: 17px!important; }
Hope this helps – thanks!
February 2, 2016 at 8:06 pm #777066Thanks but I was planning to use different icons for each accordion title. Is there a possible way for this?
February 2, 2016 at 8:15 pm #777070Hi there,
Thanks for updating the thread! Yes there is. You need to use the CSS provided above. Add a class to every accordion, add the following CSS template to modify them.
.x-accordion.yourClass a.x-accordion-toggle:after { content:"\f041"; }
Note: Change yourClass to any class you like. For the content, you can use FontAwesome Cheetshet to get the values: https://fortawesome.github.io/Font-Awesome/cheatsheet/
Just change the given value like so:
[& #xf040;] => \f040
then you can add it as your content value. (Space was added after the ampersand so would show and not convert into a box)Hope this helps – thanks!
February 2, 2016 at 8:56 pm #777113It works! Thank you so much!
February 2, 2016 at 10:29 pm #777245You’re welcome! We are just glad we were able to help you out.
-
AuthorPosts