diff options
author | embeddedt <42941056+embeddedt@users.noreply.github.com> | 2021-06-15 09:13:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-15 09:13:47 -0400 |
commit | 918d94801f2ee4ad7b6c075d96d2e9195459fbb8 (patch) | |
tree | 1b7c7ba14e461154c60fb937f3f812a7e61cef97 /docs/_ext/lv_example.py | |
parent | cd600d105650bae08f9732a654c6a2c85e610cd5 (diff) | |
download | lvgl-918d94801f2ee4ad7b6c075d96d2e9195459fbb8.tar.gz lvgl-918d94801f2ee4ad7b6c075d96d2e9195459fbb8.zip |
feat(docs) lazy load individual examples as well
Diffstat (limited to 'docs/_ext/lv_example.py')
-rw-r--r-- | docs/_ext/lv_example.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/_ext/lv_example.py b/docs/_ext/lv_example.py index ec53f2d18..4679d76d8 100644 --- a/docs/_ext/lv_example.py +++ b/docs/_ext/lv_example.py @@ -50,7 +50,7 @@ class LvExample(Directive): env = self.state.document.settings.env - iframe_node = nodes.raw(text=f"<iframe class='lv-example' src='/{env.config.version}/_static/built_lv_examples?example={example_name}&w=320&h=240'></iframe>", format='html') + iframe_node = nodes.raw(text=f"<iframe loading='lazy' class='lv-example' src='/{env.config.version}/_static/built_lv_examples?example={example_name}&w=320&h=240'></iframe>", format='html') micropython_node = nodes.raw(text=f"<a style='display: inline-block; margin-bottom: 1rem;' target='_blank' href='https://sim.lvgl.io/v{env.config.version}/micropython/ports/javascript/index.html?script_startup=https://raw.githubusercontent.com/lvgl/lvgl/{env.config.repo_commit_hash}/examples/header.py&script=https://raw.githubusercontent.com/lvgl/lvgl/{env.config.repo_commit_hash}/examples/{example_path}.py'>Click to try in the MicroPython simulator!</a>", format='html') c_path = self.get_example_code_path(example_path, 'c') |