Skip to content

Commit

Permalink
Moving model-viewer script to _templates/layout.html
Browse files Browse the repository at this point in the history
  • Loading branch information
gumyr committed Apr 9, 2024
1 parent 4dfcb44 commit 0f3fc8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% extends "!layout.html" %}

{%- block extraScript %}
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>
{% endblock extraScript %}
3 changes: 2 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ As an example, consider the design of a tea cup:
:start-after: [Code]
:end-before: [End]

.. <script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>
.. raw:: html

<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>
<model-viewer poster="_images/tea_cup.png" src="_static/tea_cup.glb" alt="A tea cup modelled in build123d" auto-rotate camera-controls style="width: 100%; height: 50vh;"></model-viewer>

.. .. image:: tea_cup.png
Expand Down

0 comments on commit 0f3fc8d

Please sign in to comment.