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

AddToThis replcaing the share buttons #1296

Open
daattali opened this issue Mar 12, 2024 Discussed in #1283 · 3 comments
Open

AddToThis replcaing the share buttons #1296

daattali opened this issue Mar 12, 2024 Discussed in #1283 · 3 comments

Comments

@daattali
Copy link
Owner

Discussed in #1283

Originally posted by monksy January 30, 2024
I was asking for enhancements for the share buttons, but this might look like a better way to handle that situation:

https://www.addtoany.com/

Thoughts?

@daattali
Copy link
Owner Author

@monksy transferring this to be an issue

@daattali
Copy link
Owner Author

It's a good idea, and I do like their lightweight design.
I wish I knew about them 8 years ago. I'm not sure how to handle this change in the config, this should not warrant a breaking change, but it doesn't really work well with the current config parameteres. Adding a brand new feature is easy becaue a new config parameter gets added and for old websites we can use a default value, but changing the way an existing feature works is very tricky. Let me know if you have a good solution for this.

@ccorsi
Copy link

ccorsi commented Aug 19, 2024

It's a good idea, and I do like their lightweight design. I wish I knew about them 8 years ago. I'm not sure how to handle this change in the config, this should not warrant a breaking change, but it doesn't really work well with the current config parameteres. Adding a brand new feature is easy becaue a new config parameter gets added and for old websites we can use a default value, but changing the way an existing feature works is very tricky. Let me know if you have a good solution for this.

@daattali It seems that you already have a similar solution with respect to your use of the external url and css files. You check if the given attribute is a simple entry or an object. You could extend this feature using the same technique. For example let's use the email link thus you can go from:

social-network-links:
email: name@host.com

to

social-network-links:
email:
name: name@host.com
img: [uri]

such that your check will be able to determine if the email field is the first case or the second case like you do with you ext-js.html include file.

The other suggestion is that you can create a general include file that will be able to generate the li entry. Looking at the social-network-links.html include file. It is clear that you have several fields that you can define like:

  • title
  • href
  • second i element class type, fa-[name]
  • sr-only text

The above will make it easier to add and update the format for the generated li entry.

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

No branches or pull requests

2 participants