toast.html 1.1 KB

123456789101112131415161718192021222324
  1. {% assign toast-id = include.toast-id | default: 'simple' %}
  2. {% assign person-id = include.person-id | default: 2 %}
  3. {% assign person = site.data.people[person-id] %}
  4. <div class="toast {% if include.show %}show{% endif %}" id="toast-{{ toast-id }}" role="alert" aria-live="assertive" aria-atomic="true" data-bs-autohide="false">
  5. {% unless include.hide-header %}
  6. <div class="toast-header">
  7. {% include ui/avatar.html person=person class="me-2" size="xs" %}
  8. <strong class="me-auto">{{ person.full_name }}</strong>
  9. <small>{{ include.date | default: '11 mins ago' }}</small>
  10. <button type="button" class="ms-2 btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
  11. </div>
  12. {% endunless %}
  13. <div class="toast-body">
  14. {% if include.cookies %}
  15. πŸͺ&nbsp;Our site uses cookies. By continuing to use our site, you agree to our Cookie Policy.
  16. <div class="mt-2 pt-2 border-top">
  17. <a href="#" class="btn btn-primary btn-sm">I understand</a>
  18. </div>
  19. {% else %}
  20. {{ include.text | default: 'Hello, world! This is a toast message.' }}
  21. {% endif %}
  22. </div>
  23. </div>