Adding interactivity
Adding some basic interactivity using Law Widgets.
In this section
Table of Contents
<html>
<head>
<title>{{ expression.title }}</title>
<!-- add the law widgets javascript -->
<script
type="module"
src="https://cdn.jsdelivr.net/npm/@lawsafrica/law-widgets@latest/dist/lawwidgets/lawwidgets.esm.js"
></script>
</head>
<body>
<a href="{% url 'home' %}">Home</a>
<h1>{{ expression.title }}</h1>
<div style="display: flex">
<aside style="flex: 1">
<la-table-of-contents-controller
items="{{ toc_json }}"
style="position: sticky; top: 0; max-height: 100vh; overflow-y: auto;"
></la-table-of-contents-controller>
</aside>
<div style="flex: 3">
<!-- use la-akoma-ntoso law widget to apply styles -->
<la-akoma-ntoso frbr-expression-uri="{{ expression.frbr_uri }}">
{{ expression.content|safe }}
</la-akoma-ntoso>
</div>
</div>
</body>Popups for defined terms

Popups for internal references

Last updated