uccser/cs-field-guide

View on GitHub
csfieldguide/templates/interactives/action-menu.html

Summary

Maintainability
Test Coverage
{% extends interactive_mode_template %}

{% load i18n %}
{% load static %}

{% block interactive_html %}
  <div id="interactive-action-menu" class="container-fluid my-2">
    <div class="row justify-content-center">
      <div class="dropdown">
        <button class="btn btn-secondary dropdown-toggle" type="button" id="interactive-action-menu-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
          {% trans "Menu" %}
        </button>
        <div class="dropdown-menu" aria-labelledby="interactive-action-menu-button">
          <a class="dropdown-item" data-feedback="{% trans 'Pizza ordered!' %}">
            {% trans "Order a pizza" %}
          </a>
          <a class="dropdown-item" data-feedback="{% trans 'TV turned on!' %}">
            {% trans "Turn on TV" %}
          </a>
          <a class="dropdown-item" data-feedback="{% trans 'Nuclear attack launched... why did you do that?' %}">
            {% trans "Launch nuclear attack" %}
          </a>
          <a class="dropdown-item" data-feedback="{% trans 'Water boiled!' %}">
            {% trans "Boil Water" %}
          </a>
        </div>
      </div>
    </div>
    <p id="interactive-action-menu-feedback"></p>
  </div>
{% endblock interactive_html %}

{% block interactive_js %}
  <script type="text/javascript" src="{% static 'interactives/action-menu/js/action-menu.js' %}"></script>
{% endblock interactive_js %}