Additional social accounts in general settings

Unless I can actually “see” the problem, it’s going to be hard to help…

Hi Omisnomis,

Silly question but how do you get LinkedIn to be there, is this by adding it in domain.com/ghost or editing the .hbs files?

I have it on one of the posts, but it does not display correctly.

https://blog.withsnap.co.uk/trade-up/

Capture1111111111

Hey @Snap,

Your issue is the CSS.

image

If I add all the CSS through dev tools it works fine

image

image

  • Did you add the CSS in my comment to screen.css?
  • Did you re-upload your theme after doing so?

Hey @Snap, I think if you add this code to your site code injection it should sort out the styling of the button:

<style>
.floating-header-share-li {
    display: block;
    align-items: center;
    width: 60px;
    height: 60px;
    background: #2876b5;
}

@media (max-width: 900px) {
    .floating-header-share-li {
        width: 40px;
        height: 40px;
        line-height: 38px;
    }
}
</style>

Let us know how you get on!

But he shouldn’t need to do that, he needs to add it to screen.css and then re-upload the theme.

Surely that’s cleaner than code injection?

That would be more permanent yes, but I suggested that incase they aren’t that familiar with theme development :slightly_smiling_face:

Thank you all for your help @omisnomis and @DavidDarnes!

I added the injection and it worked.

Unsure why it still isn’t doing it via the screen.css, however I am happy for the injection! :slight_smile:

1 Like

Ah, right ok! That makes sense :slight_smile:

The only thing I can think of, off the top of my head, is you didn’t run yarn zip after you updated screen.css

Is it worth me raising a PR to add this into Casper properly?

Not if this is custom to @Snap’s use case :slightly_smiling_face:. I’m guessing the styles aren’t applying because there’s a build step for Casper which is documented in the theme repo here: GitHub - TryGhost/Casper: The default theme for Ghost

I wouldn’t say it’s custom to @Snap’s use case. The instructions I added in a previous comment where to add a LinkedIn share button - which I think many people are asking for.

The PR would be to add the LinkedIn button to the article sharing menu.

It would be cool if you could validate those people who are asking for it :slightly_smiling_face:. Feel free to open up a new Idea on the forum to see if there’s any interest!

You’re replying on a idea topic for exactly this :slight_smile:

This is the original thread idea:

Add additional social accounts to general settings that can be used within themes.

What you’re suggesting is additional sharing buttons for social networks :slightly_smiling_face:

I guess you’re right :slight_smile:.

1 Like

@here: I’ve figured out how to modify the core and add extra social media links in the general settings. I’m still in the process of testing with the template (casper). I’ve only done github so far but can add others when I have the time. Do you all want me to create a pull request?

There’s a fair bit of fooling around with validation and tests etc but I think I can implement it. Will also need a source for the sgv files to go in /partials/icons. I’m not sure where they came from originally.

@DavidDarnes ^^

2 Likes

@jamespayne these things are best added to your theme as they are very site-specific and the potential list of social accounts is endless

Yeah OK. Fair enough. I see where you’re coming from. I guess I’ll experiment with this part from the Casper README.md:

{{> "icons/rss"}}

Is that what you’re referring to?

I’ve figured out how to modify the core and add extra social media links in the general settings. … Do you all want me to create a pull request?

This was the bit I was referring to - the adding of more social accounts to core. There needs to be a different solution that starting to add a never-ending list of social accounts to the settings area.

Right now anyone can add whichever site-specific social sharing functions they want to their theme which is why I suggested this is something for site owners to customise there.