Skip to content

Commit

Permalink
Add a new floating LinkedIn button on the site and the script that hi…
Browse files Browse the repository at this point in the history
…des it when the follow has been made

Signed-off-by: Karina Rodriguez <[email protected]>
  • Loading branch information
Karina Rodriguez committed May 21, 2024
1 parent 574c98d commit 0605498
Show file tree
Hide file tree
Showing 2 changed files with 11 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);
2 changes: 2 additions & 0 deletions linkerd.io/layouts/partials/javascript.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +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 0605498

Please sign in to comment.