Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Social Media Widget #434

Closed
mharis opened this issue Oct 30, 2018 · 7 comments
Closed

Social Media Widget #434

mharis opened this issue Oct 30, 2018 · 7 comments
Assignees

Comments

@mharis
Copy link
Contributor

mharis commented Oct 30, 2018

We should add a social media wordpress widget or support to add social media/icons to WP menu links.

@coreymcollins
Copy link
Contributor

We have added some support for social networks in a couple of themes in the past when social links are needed in a menu-type situation. I haven't had to do it consistently, so it was never added to wd_s core but if we think it'd be useful we could add it in.

Basically, we loop through our social networks set in a $social-sites Sass list targeting the href of the link and adding the icon that way. With this, the user/client doesn't need to worry about adding any extra classes to their menu items.

$social-sites: facebook twitter googleplus linkedin instagram youtube;

// Set the background image for each social network.
@each $network in $social-sites {
    &[href*='#{$network}'] {
        background-image: url('assets/images/svg-icons/#{$network}.svg');
        background-size: rem(30);

        @include media($tablet-portrait) {
            background-size: rem(19);
        }
    }
}

Would something like that suffice? Or do you think we still need an actual sidebar widget?

@coreymcollins
Copy link
Contributor

(this is obviously a bit of an older example with that pesky googleplus in there 😆 )

@mharis
Copy link
Contributor Author

mharis commented Dec 10, 2018

@coreymcollins We should keep our theme clean from widgets and shortcodes (even the yearly shortcode) and create a helper plugin or plugins for this functionality. This will keep code base leaner and easier to maintain.

@coreymcollins
Copy link
Contributor

@mharis this example doesn't create a widget at all – just basic styles to style links with social network URLs in a menu. This functionality would/does work based on the core WP nav menu without any additional functionality in the theme. Since it's all CSS-based and affects visuals without added widgets/functions, I think this could be pretty easily added to the theme.

For me, it seems like overkill to create a plugin for 11 lines of Sass.

Thoughts?

@mharis
Copy link
Contributor Author

mharis commented Dec 11, 2018

Ohh okay, yes, that makes sense. My original proposal was to create a WP widget.

@mharis
Copy link
Contributor Author

mharis commented Dec 11, 2018

With fields, and all the fun stuff which is overkill for a theme, esp a starter theme.

@jomurgel
Copy link
Contributor

@mharis still something you think is needed or worth building?

ImBigWill pushed a commit that referenced this issue Jan 18, 2019
* Adds styles to replace social icon links in a menu with the icons and hidden text (still screen reader accessible)

* Compiles

* Squashed commit of the following:

commit 1eae31f
Author: Corey M Collins <coreymcollins@gmail.com>
Date:   Fri Jan 18 13:51:15 2019 -0600

    Feature/#429 replace hidden elements (#454)

    * Removes the CSS hiding aside post format post titles

    * Adds screen reader class if the post is an aside

    * Actually, just remove the whole screen reader thing

    * Compiles styles

* Compiles styles

* Squashed commit of the following:

commit 1eae31f
Author: Corey M Collins <coreymcollins@gmail.com>
Date:   Fri Jan 18 13:51:15 2019 -0600

    Feature/#429 replace hidden elements (#454)

    * Removes the CSS hiding aside post format post titles

    * Adds screen reader class if the post is an aside

    * Actually, just remove the whole screen reader thing

    * Compiles styles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants