Skip to content
Myr

default.html.j2

This file

Path

docs/templates/default.html.j2

31 lines · 1.2 KiB

Last changed by

Fix buttons in tutorial to toggle labels when clicked on (#3493)itchynybefore adoptionc3d3e7d

History of this file

Take it

1<!DOCTYPE html>2<html lang="en">3{% include "shared/_head.html.j2" %}45  <body>6{% include "shared/_navbar.html.j2" %}78    <main id="main" class="container-lg">9      <h1>{{ headline }}</h1>10      {%- for item in body %}11      {%- if item.text %}12      {{ item.text | markdownify }}13      {%- endif %}1415      {%- if item.command %}16      {%- set resultID = unique_id() %}17      <div class="tutorial-example mb-3">18        <div class="d-flex accordion-heading me-2">19          <pre class="flex-grow-1 me-0 mb-0" tabindex="0">{{ item.command }}</pre>20          <button type="button" class="btn btn-sm btn-secondary text-body-secondary bg-secondary-subtle link-body-emphasis flex-shrink-0 d-flex align-items-center border border-start-0 d-print-none"21            data-bs-toggle="collapse" data-bs-target="#result{{ resultID }}" aria-expanded="false" aria-controls="result{{ resultID }}"><span class="show-result-text">Show result</span><span class="hide-result-text">Hide result</span></button>22        </div>23        <pre id="result{{ resultID }}" class="accordion-body collapse p-3 border-top-0 d-print-block" tabindex="0">{{ item.result }}</pre>24      </div>25      {%- endif %}26      {%- endfor %}27    </main>2829{% include "shared/_footer.html.j2" %}30  </body>31</html>