Skip to content

Commit

Permalink
New linkedin button (#1778)
Browse files Browse the repository at this point in the history
* Add new floating linkedin button on site
* Add script for linkedin button function
* Add new floating linkedin button on site
* Add a new floating LinkedIn button on the site and the script that hides it when the follow has been made
* Commented out console.log message

---------

Signed-off-by: Karina Rodriguez <karina.rodriguez11@gmail.com>
Co-authored-by: Travis Beckham <travis@buoyant.io>
  • Loading branch information
karr9 and travisbeckham committed May 21, 2024
1 parent 9b214af commit 2b649f8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions linkerd.io/assets/js/follow-linkedin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
setTimeout(function(){
var buttonWrapper = document.querySelector('.linkedin__btn');
widthOriginal = buttonWrapper.getBoundingClientRect().width;
//console.log("-"+widthOriginal);

if(widthOriginal>99){
buttonWrapper.style.display = 'none';
}
}, 2300);
4 changes: 4 additions & 0 deletions linkerd.io/assets/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -925,3 +925,7 @@ blockquote {
.modal-content {
width: 95%;
}

.linkedin__btn{
z-index: 999; display: block; top: 100px; right: -5px; position: fixed;
}
5 changes: 5 additions & 0 deletions linkerd.io/layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@

{{ $js := resources.Get "js/navbar.js" | resources.Minify | resources.Fingerprint }}
<script src="{{ $js.Permalink }}"></script>

<div class="linkedin__btn">
<script src="https://platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script>
<script data-proofer-ignore type="IN/FollowCompany" data-id="99659303"></script>
</div>
3 changes: 3 additions & 0 deletions linkerd.io/layouts/partials/javascript.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@
{{ $headingsLinkJs := resources.Get "js/docs-heading-link.js"}}
<script defer src="{{ $headingsLinkJs.Permalink }}"></script>

{{ $linkedinJs := resources.Get "js/follow-linkedin.js" }}
<script src="{{ $linkedinJs.Permalink }}"></script>

<script async defer src="https://buttons.github.io/buttons.js"></script>

0 comments on commit 2b649f8

Please sign in to comment.