From 2a7cce13a5e7f2bc93f5495c0136f9b26abf01bd Mon Sep 17 00:00:00 2001 From: "Adolfo R. Brandes" Date: Wed, 11 Dec 2024 09:45:04 -0300 Subject: [PATCH] feat: Reimplement zooming image tool --- xmodule/templates/html/zooming_image.yaml | 301 ++++++++++++++++++++++ 1 file changed, 301 insertions(+) create mode 100644 xmodule/templates/html/zooming_image.yaml diff --git a/xmodule/templates/html/zooming_image.yaml b/xmodule/templates/html/zooming_image.yaml new file mode 100644 index 000000000000..9798a118399b --- /dev/null +++ b/xmodule/templates/html/zooming_image.yaml @@ -0,0 +1,301 @@ +--- +metadata: + display_name: Zooming Image Tool +data: | +

Zooming Image Tool

+

Use the Zooming Image Tool to enable learners to see details of large, complex images.

+

With the Zooming Image Tool, the learner can move the mouse pointer over a part of the image to enlarge it and see more detail.

+

To use the Zooming Image Tool, add both the regular and magnified image files to your course.

+

The following HTML code shows the format required to use the Zooming Image tool. For the example in this template, you must replace the values in italics.

+
+        <div class="zooming-image-place" style="position: relative;">
+          <a class="loupe" href="path to the magnified version of the image">
+            <img alt="Text for screen readers"
+              src="path to the image you want to display in the unit" />
+          </a>
+        
+ +

You can modify the example below for your own use.

+
    +
  1. Replace the value of the link's href attribute with the path to the magnified image. Do not change the value of the class attribute.
  2. +
  3. Replace the value of the image's src attribute with the path to the image that will appear in the unit.
  4. +
  5. Replace the value of the image's alt attribute with text that both describes the image and the action or destination of clicking on the image. You must include alt text to provide an accessible label.
  6. +
+

The example below shows a subset of the biochemical reactions that cells carry out.

+

You can view the chemical structures of the molecules by clicking on them. The magnified view also lists the enzymes involved in each step.

+

Press spacebar to open the magnifier.

+
+ + magnify + +
+ +