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

✨ feat(ui): Add Social Share Buttons Using amp-social-share #94

Open
chriskyfung opened this issue Nov 29, 2024 · 0 comments
Open

✨ feat(ui): Add Social Share Buttons Using amp-social-share #94

chriskyfung opened this issue Nov 29, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@chriskyfung
Copy link
Owner

We need to enhance our AMP Jekyll theme by adding social share buttons to improve user engagement and content sharing. The amp-social-share component will be used to implement these buttons.

Tasks:

  1. Include Required Scripts:

    • Add the following script to the head of your HTML:
      <script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
  2. Add Social Share Buttons:

    • Insert the amp-social-share component in the desired locations within your templates. Here are examples for different social platforms:
      • Twitter:
        <amp-social-share type="twitter" aria-label="Share on Twitter"></amp-social-share>
      • LinkedIn:
        <amp-social-share type="linkedin" width="60" height="44" data-param-text="Hello world" data-param-url="https://example.com/" aria-label="Share on LinkedIn"></amp-social-share>
      • Facebook:
        <amp-social-share type="facebook" data-param-app_id="YOUR_APP_ID" aria-label="Share on Facebook"></amp-social-share>
  3. Customize Styles:

    • Optionally, customize the styles of the share buttons to match the theme's design:
      amp-social-share[type='twitter'] {
        background: red;
        background-image: url('datauri:svg/myownsvgicon');
      }
  4. Accessibility:

    • Ensure each amp-social-share button includes an aria-label for accessibility.

References:

@chriskyfung chriskyfung added enhancement New feature or request good first issue Good for newcomers labels Nov 29, 2024
@chriskyfung chriskyfung added this to the v3 milestone Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant