Skip to content

Commit

Permalink
Reversed loading of leaflet css and import lunr
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristineTham committed Sep 6, 2022
1 parent f5f62bb commit b7c8eb9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/components/map.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
import 'leaflet/dist/leaflet.css'
export interface Props {
loc: [number, number]
zoom: number
Expand Down
5 changes: 1 addition & 4 deletions src/components/search.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
import { Icon } from 'astro-icon'
---


<script>
import lunr from 'lunr'
</script>
<script is:inline src="https://unpkg.com/lunr/lunr.min.js"></script>
<div x-data={`
{
searchResults: false,
Expand Down
5 changes: 4 additions & 1 deletion src/layouts/base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ const { frontmatter } = Astro.props
</script>
<style is:inline>
[x-cloak] { display: none !important; }
</style>
</style>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-hoalWLoI8r4UszCkZ5kL8vayOGVae1oxXe/2A4AO6J9+580uKHDO3JdHb7NzwwzK5xr/Fs0W40kiNHxM9vyTtQ=="
crossorigin=""/>
{frontmatter.extra?.includes('math') &&
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-pe7s+HmY6KvqRkrRRUr4alQJ0SkmzCft3RpK1ttGMa7qk8Abp/MEa/4wgceRHloO" crossorigin="anonymous">
}
Expand Down

0 comments on commit b7c8eb9

Please sign in to comment.