Skip to content

Commit

Permalink
HDX-9242 update Twitter logo to X
Browse files Browse the repository at this point in the history
  • Loading branch information
ccataalin committed Oct 24, 2023
1 parent 710bf0c commit 1e13e21
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
6 changes: 5 additions & 1 deletion src/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@
<a href="<?php echo get_site_url() . '/category/blog/' ?>">Blogs</a>
<a href="<?php echo get_site_url() . '/contact-us' ?>">Contact Us</a>
<div class="social-actions">
<a href="http://www.twitter.com/humdata" title="Twitter"><i class="fa fa-twitter"></i></a>
<a href="http://www.x.com/humdata" title="X">
<i class="x-icon">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 1200 1227"><path fill="currentColor" d="M714.163 519.284 1160.89 0h-105.86L667.137 450.887 357.328 0H0l468.492 681.821L0 1226.37h105.866l409.625-476.152 327.181 476.152H1200L714.137 519.284h.026ZM569.165 687.828l-47.468-67.894-377.686-540.24h162.604l304.797 435.991 47.468 67.894 396.2 566.721H892.476L569.165 687.854v-.026Z"/></svg>
</i>
</a>
<a href="https://github.com/OCHA-DAP" title="GitHub"><i class="fa fa-github"></i></a>
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion src/front-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@
<div class="col-lg-2"></div>
<div class="col-lg-7">
<div class="tweet">
<a href="http://www.twitter.com/humdata" target="_blank" class="twitter-logo"><div class="fa fa-twitter twhite" aria-hidden="true"></div></a>
<a href="http://www.x.com/humdata" target="_blank" class="twitter-logo">
<span class="x-icon">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 1200 1227"><path fill="currentColor" d="M714.163 519.284 1160.89 0h-105.86L667.137 450.887 357.328 0H0l468.492 681.821L0 1226.37h105.866l409.625-476.152 327.181 476.152H1200L714.137 519.284h.026ZM569.165 687.828l-47.468-67.894-377.686-540.24h162.604l304.797 435.991 47.468 67.894 396.2 566.721H892.476L569.165 687.854v-.026Z"/></svg>
</span>
</a>
<div class="tweet-content">
<p class="tweet-text"><span></span></p>
<p class="author"></p>
Expand Down
4 changes: 2 additions & 2 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ function get_latest_tweets() {

// suitable for the old TwitterFetcher lib
$tweets[$i] = [
'author' => '<span class="TweetAuthor-avatar"><img src="'.$tweetUser['profile_image_url_https'].'" class="Avatar"></span><a href="https://twitter.com/'.$tweetUser['screen_name'].'" target="_blank" rel="nofollow" class="TweetAuthor-link"><span class="TweetAuthor-name">'.$tweetUser['name'].'</span><span class="TweetAuthor-screenname">@'.$tweetData['user']['screen_name'].'</span></a>',
'tweet' => '<a href="https://twitter.com'.$tweetData['permalink'].'" target="_blank" rel="nofollow">'.nl2br($tweetContent).'</a>'
'author' => '<span class="TweetAuthor-avatar"><img src="'.$tweetUser['profile_image_url_https'].'" class="Avatar"></span><a href="https://x.com/'.$tweetUser['screen_name'].'" target="_blank" rel="nofollow" class="TweetAuthor-link"><span class="TweetAuthor-name">'.$tweetUser['name'].'</span><span class="TweetAuthor-screenname">@'.$tweetData['user']['screen_name'].'</span></a>',
'tweet' => '<a href="https://x.com'.$tweetData['permalink'].'" target="_blank" rel="nofollow">'.nl2br($tweetContent).'</a>'
];
$i++;
}
Expand Down
7 changes: 5 additions & 2 deletions src/scss/_front.scss
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,13 @@
.tweet {
position: relative;
text-align: center;
.fa-twitter {
.x-icon {
display: block;
color: $white;
font-size: 55px;
width: 55px;
margin-bottom: 30px;
margin-left: auto;
margin-right: auto;
}
.tweet-content {
position: absolute;
Expand Down
8 changes: 8 additions & 0 deletions src/scss/_menus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,14 @@
i {
color: $white;
font-size: 16px;
&.x-icon {
display: inline-block;
width: 14px;
padding-bottom: 0;
svg {
padding-bottom: 0;
}
}
}
&:hover {
i {
Expand Down

0 comments on commit 1e13e21

Please sign in to comment.