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

2386 replace twitter image #2387

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Draft
- Replace Twitter logo with X logo within social sharing and social link components [#2387](https://github.com/bigcommerce/cornerstone/pull/2387)

## 6.12.0 (07-06-2023)
- sync package lock file [#2373](https://github.com/bigcommerce/cornerstone/pull/2373)
Expand Down
6 changes: 0 additions & 6 deletions assets/icons/twitter.svg

This file was deleted.

5 changes: 5 additions & 0 deletions assets/icons/x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/img/icon-sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions templates/components/common/share.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@
</svg>
</a>
{{else if service '===' 'twitter'}}
<a class="socialLinks__link icon icon--{{service}}"
href="https://twitter.com/intent/tweet/?text={{getVar 'encodedTitle'}}&amp;url={{getVar 'encodedUrl'}}"
<a class="socialLinks__link icon icon--x"
href="https://x.com/intent/tweet/?text={{getVar 'encodedTitle'}}&amp;url={{getVar 'encodedUrl'}}"
target="_blank"
rel="noopener"
title="{{{capitalize service}}}"
title="X"
{{{annotation}}}
>
<span class="aria-description--hidden">{{{capitalize service}}}</span>
<span class="aria-description--hidden">X</span>
<svg>
<use href="#icon-twitter"/>
<use href="#icon-x"/>
</svg>
</a>
{{else if service '===' 'linkedin'}}
Expand Down
42 changes: 29 additions & 13 deletions templates/components/common/social-links.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
{{#if social_media}}
<ul class="socialLinks socialLinks--alt">
{{#each social_media}}
<li class="socialLinks-item">
<a class="icon icon--{{display_name}}"
href="{{url}}"
target="_blank"
rel="noopener"
title="{{{capitalize display_name}}}"
>
<span class="aria-description--hidden">{{{capitalize display_name}}}</span>
<svg>
<use href="#icon-{{display_name}}"/>
</svg>
</a>
</li>
{{#if display_name '===' 'twitter'}}
<li class="socialLinks-item">
<a class="icon icon--x"
href="{{url}}"
target="_blank"
rel="noopener"
title="X"
>
<span class="aria-description--hidden">X</span>
<svg>
<use href="#icon-x"/>
</svg>
</a>
</li>
{{else}}
<li class="socialLinks-item">
<a class="icon icon--{{display_name}}"
href="{{url}}"
target="_blank"
rel="noopener"
title="{{{capitalize display_name}}}"
>
<span class="aria-description--hidden">{{{capitalize display_name}}}</span>
<svg>
<use href="#icon-{{display_name}}"/>
</svg>
</a>
</li>
{{/if}}
{{/each}}
</ul>
{{/if}}