Skip to content

Commit

Permalink
Merge pull request #234 from OCHA-DAP/feature/HDX-9242-update-twitter…
Browse files Browse the repository at this point in the history
…-logo

HDX-9242 update twitter logo
  • Loading branch information
ccataalin authored Nov 14, 2023
2 parents c615ff0 + a7515eb commit d1eb69f
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 19 deletions.
23 changes: 15 additions & 8 deletions src/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,21 @@
<div class="row row-parent no-top-padding no-h-padding no-bottom-padding">
<div class="site-info uncell col-lg-4">
<div class="social-footer">
<div class="terms">
<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="https://github.com/OCHA-DAP" title="GitHub"><i class="fa fa-github"></i></a>
</div>
</div>
<div class="terms">
<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.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>
<div class="service">
<div class="provided-by">
Service provided by
Expand Down
20 changes: 13 additions & 7 deletions src/front-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,19 @@
<div class="row-inner">
<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>
<div class="tweet-content">
<p class="tweet-text"><span></span></p>
<p class="author"></p>
</div>
</div>
<div class="tweet">
<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>
</div>
</div>
</div>
<div class="col-lg-2"></div>
</div>
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: 45px;
margin-bottom: 30px;
margin-left: auto;
margin-right: auto;
}
.tweet-content {
position: absolute;
Expand Down
11 changes: 11 additions & 0 deletions src/scss/_menus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,17 @@
i {
color: $white;
font-size: 16px;
&.fa-github {
font-size: 20px;
}
&.x-icon {
display: inline-block;
width: 14px;
padding-bottom: 0;
svg {
padding-bottom: 0;
}
}
}
&:hover {
i {
Expand Down

0 comments on commit d1eb69f

Please sign in to comment.