Jump to content

How can I place Social Icons in Mobile Menu?

Recommended Posts

When building my site, i came across a problem I couldn't solve.  I have my social media icons on the navigation on top of the page.  When viewed in mobile, I lose them.  I was looking to put them in the mobile menu (inside the hamburger icon) but was never able to find a solution.  Was wondering if anyone had a solution to that.  What I did was I placed them in the contact page on the bottom when seen on mobile.  That is a temporary solution until i find a permanent solution.  Is there a way to do this using CSS? I am using brine template.  A solution to this would be appreciated. 

http://www.marinocarrabs.com

Thank you!

Edited by mcskin45
Link to comment
  • 1 month later...

Here is what i did.

 

DESIGN > SITE STYLE > HEADER LAYOUT

Social Position : Hide.

 

SETTINGS > ADVANCED > CODE INJECTION

Pasted this code to HEADER:

<script defer src="https://use.fontawesome.com/releases/v5.0.10/js/all.js" integrity="sha384-slN8GvtUJGnv6ca26v8EzVaR9DC58QEwsIk9q1QXdCU8Yu8ck/tL/5szYlBbqmS+" crossorigin="anonymous"></script>

 

Then google fontawesome

Choose your icon

Copy link

 

 

create links in PRIMARY NAVIGATION or SECONDARY NAVIGATION.

 

Paste link to title:

LINK TITLE - <i class="fab fa-facebook"></i>

LINK - url of my social account

 

And its done.

The size will be the font size you choose for navigation.

Alter its position by rearranging it in the menu.

It will display on mobile also but vertically.

Link to comment
  • 2 weeks later...

Ghost Plugins strikes again: https://www.ghostplugins.com/secret/841l164f

I think you may need a business account to use this SS feature.

P/W for GhostPlugins secret plugins is "whisper"

I highly recommend subscribing to their list, they are awesome!

From your Squarespace account, go to Site Code Injection. Copy and paste the code below into the Header Code Injection box.

<script>
Y.on('domready', function(){
var mobileSocial = Y.one(".Header-social").cloneNode(true).addClass('.mobile-social');
Y.one(".Mobile-overlay-menu-main").append(mobileSocial);
});
</script>

 

Link to comment
  • 3 weeks later...
  • 1 month later...
22 minutes ago, maldrich said:

Any idea why the plugin from Ghost works on one of my sites but not another? www.smithstreethomes.com is the site i question where I put it in the header code injection and nothing happens 😞

follow this comment: 

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 6 months later...
On 8/10/2020 at 11:15 PM, siweisong said:

What if I don't have or want social icons on the header? But I still want them on the mobile menu?

Add 3 Link items to Menu & add this to Home > Settings > Advanced > Code Injection > Header, then share site url. We can give the code.

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 4 months later...
On 8/10/2020 at 9:15 AM, siweisong said:

What if I don't have or want social icons on the header? But I still want them on the mobile menu?

You can still use the code above and then add the following to your Custom CSS to hide on desktop.

// Hide Social Links Header //

.Header--top .SocialLinks-link {display: none !important}

 

Link to comment
  • 8 months later...
On 9/3/2021 at 2:56 AM, knockout.design said:

Code worked great, but can't figure out how to change the social icon color on the mobile menu only - any tips? I need them to remain black on the website but trying to get them to display white on the mobile menu - see pic attached. Appreciate anyone's help on this!

Screen Shot 2021-09-02 at 12.55.36 PM.png

Hi,

What is your site url?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.