Skip to content

Commit

Permalink
added pygeoweaver command to landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
gokulprathin8 committed Feb 9, 2024
1 parent 4530d02 commit d3beac1
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/landing-page/clipboard-copy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions assets/js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

const installIcon = document.getElementById('copy-install-text');

installIcon.addEventListener('click', () => {
"use strict";
const originalLogoSrc = installIcon.querySelector('img').src;
const tickIcon = installIcon.getAttribute('data-image-url');

installIcon.querySelector('img').src = tickIcon;
navigator.clipboard.writeText('pip install pygeoweaver').then(() => {
console.log('Text copied to clipboard');
}).catch(err => {
console.error('Failed to copy text: ', err);
});
setTimeout(() => {
installIcon.querySelector('img').src = originalLogoSrc;
}, 3000);
});
44 changes: 44 additions & 0 deletions assets/scss/custom.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions assets/scss/custom.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions content/english/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ banner:
nasaLogo: "/images/landing-page/nasa-logo.webp"
nsfLogo: "/images/landing-page/nsf-logo.png"
gmuLogo: "/images/landing-page/gmu-logo.png"
clipboardCopyIcon: "/images/landing-page/clipboard-copy.png"
clipboardTickIcon: "/images/landing-page/clipboard-copy-done-tick.png"
noaaLogo: "/images/landing-page/noaa-logo.png"
pythonLogo: "/images/landing-page/python-logo.png"
button:
Expand Down
15 changes: 11 additions & 4 deletions themes/geoweaver/layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ <h1 class='pl-80 geoweaver-landing-text'>Geoweaver</h1>
</div>
</a>
</div>




</div>
</section>
<section>
Expand Down Expand Up @@ -240,6 +236,17 @@ <h1 class="pt-1 font-mono tracking-wide">Pygeoweaver</h1>
<p class="font-bold font-heebo text-center max-w-[500px]">Geoweaver can now run directly inside your Jupyter notebooks and Python scripts, empowering you to effortlessly navigate complex scientific workflows with ease.</p>
</div>

<div class="flex items-center justify-center mt-4">
<div class="flex bg-white rounded pt-2 pb-2 pl-4 pr-4 max-w-[450px] border-2 border-[#FEC600]">
<div>
<p class="font-mono"><a class="font-bold">$ </a>pip install pygeoweaver</p>
</div>
{{ $image := resources.Get "images/landing-page/clipboard-copy-done-tick.png" }}
<div id="copy-install-text" class="h-[20px] w-[20px] cursor-pointer ml-5 pt-1" data-image-url="{{ $image.Permalink }}">
{{ partial "image" (dict "Src" .clipboardCopyIcon "Alt" "python logo" "Loading" "eager")}}
</div>
</div>
</div>

<a href="https://pygeoweaver.readthedocs.io/en/latest/">
<button class='transition ease-in-out delay-150 hover:-translate-y-1 hover:scale-110 duration-300 pygeoweaver-learn-more text-white p-2 rounded w-36 mt-8 mb-10 max-w-full'>
Expand Down

0 comments on commit d3beac1

Please sign in to comment.