Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedThahir authored Mar 1, 2024
1 parent 5eef453 commit 8f69aaa
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions owid/grapher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,18 +396,23 @@ def generate_iframe(config: Dict[str, Any]) -> str:
iframe_name = "".join(random.choice(string.ascii_lowercase) for _ in range(20))
iframe_contents = f"""
<!DOCTYPE html>
<!-- https://ourworldindata.org/assets -->
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
href="https://fonts.googleapis.com/css?family=Lato:300,400,400i,700,700i|Playfair+Display:400,700&amp;display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://ourworldindata.org/assets/common.css"
href="./common.css"
/>
<link
rel="stylesheet"
href="./owid.css"
/>
<link rel="stylesheet" href="https://ourworldindata.org/assets/owid.css" />
<meta property="og:image:width" content="850" />
<meta property="og:image:height" content="600" />
<script>
Expand All @@ -422,8 +427,8 @@ def generate_iframe(config: Dict[str, Any]) -> str:
</main>
<div class="site-tools"></div>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6,fetch,URL,IntersectionObserver,IntersectionObserverEntry"></script>
<script type="module" src="https://ourworldindata.org/assets/common.mjs"></script>
<script type="module" src="https://ourworldindata.org/assets/owid.mjs"></script>
<script type="module" src="./common.mjs"></script>
<script type="module" src="./owid.mjs"></script>
<script type="module">
var jsonConfig = {json.dumps(config)};
jsonConfig.owidDataset = new Map(Object.entries(jsonConfig.owidDataset).map(([key, value]) => [parseInt(key), value]));
Expand Down

0 comments on commit 8f69aaa

Please sign in to comment.