Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update libs "clipboard" and "marked" #401

Merged
merged 12 commits into from
Aug 11, 2021

Conversation

rebeccawong7
Copy link
Contributor

Three small changes which contribute towards optimizations listed in #331

  • Async load Google Maps JS
  • Update 3rd party libs: clipboard + marked
  • Remove unused markdown component

@@ -21,22 +21,6 @@
{{/each}}
</style>

{{#if !@shared.isServer && !@shared.googleMapsLoaded}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no difference here, the scripts are already dynamically inserted and therefore async. Please revert this part.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Out of curiosity where is the dynamic insertion happening from?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole file is a Ractive component so the rendering is handled by Ractive and this section is specifically restricted from server rendering (!@shared.isServer) so it happens on the client.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I'll look into how Mustaches is used, I haven't come across it before

@MartinKolarik MartinKolarik changed the title Async load Google Maps, and update libs "clipboard" and "marked" Update libs "clipboard" and "marked" Aug 8, 2021
@@ -109,10 +109,10 @@ <h3>Big network in China</h3>

<div class="china-banner">
<div class="china-bg">
<img width="1140" height="328" src="{{@shared.assetsHost}}/img/network/china-bg.jpg" srcset="{{@shared.assetsHost}}/img/network/china-bg@2x.jpg 2x" loading="lazy">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be a mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did one too many ctrl+z, reverted :)

@MartinKolarik MartinKolarik merged commit f98357b into jsdelivr:master Aug 11, 2021
@MartinKolarik
Copy link
Member

Looks good now 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants