OSTS Posted July 31 Share Posted July 31 (edited) Hello! My website needs two buttons in the header, one styled as per the site's standard CTA button styling, and another styled differently. To get the two buttons in the header, I followed @creedon's solution that worked well: https://github.com/tomsWebConsulting/twcsl/tree/main/v7.1/Add Buttons to Header#add-buttons-to-header Now, I need to style the new button differently than the standard CTA button. I'm having trouble figuring out the best way to modify the javascript such that it assigns a new class to the second button. Ideally I'd like to use the site's tertiary button styling for this second button. I am on Squarespace 7.1. Any ideas? Edited July 31 by OSTS clarifying question and adding squarespace version # Link to comment
Solution creedon Posted July 31 Solution Share Posted July 31 You may be able to do this with pure CSS. Please post the URL for a page on your site where we can see your issue. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/. Please set up a site-wide password, if your site is not public and you've not already done so. Post the password here. Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the site-wide password and how to share a link documentation to understand how they work. We can then take a look at your issue. You may find How to post a forum question post useful. tuanphan 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
OSTS Posted August 2 Author Share Posted August 2 Hi @creedon, you can access the site here. Thank you for your help. Link to comment
creedon Posted August 2 Share Posted August 2 On 7/31/2023 at 10:15 AM, OSTS said: I'm having trouble figuring out the best way to modify the javascript such that it assigns a new class to the second button. Ideally I'd like to use the site's tertiary button styling for this second button. I adjusted the code so you can add a secondary or tertiary button. Let us know how it goes. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
OSTS Posted August 2 Author Share Posted August 2 (edited) @creedon It sort of worked, but not entirely. I implemented the v.8 code. While the second button does now take on the tertiary styling, it seems the code has broken the font that's used in the header. It now presents as a fall-back font, and not the site font (Poppins, in this case). Any ideas why that might be? EDIT: Having a look at Twitter, it looks like the custom font issue is being experienced by other users. Perhaps this is a Squarespace issue. Edited August 2 by OSTS Updated with Twitter findings. Link to comment
creedon Posted August 2 Share Posted August 2 Quote Perhaps this is a Squarespace issue. I think it is as my code does nothing with fonts. I've also been seeing many reports of font and other issues recently. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
OSTS Posted October 20 Author Share Posted October 20 (edited) @creedon It turned out the issue was with Squarespace. All resolved. Thank you for your help. Edited October 20 by OSTS creedon 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment