{{ define "bodyclass" }}page-openbureau{{ end }}
{{ define "main" }}
{{ $rapport := .Site.GetPage "/ob/rapport" }}
{{ $dossier := .Site.GetPage "/ob/dossier" }}
<div class="tui tui--files filebrowser">
  <p class="tui__cmd"><span class="tui__sym">$</span> ls</p>
  {{ $total := 1 }}{{ if $rapport }}{{ $total = add $total 1 }}{{ end }}{{ if $dossier }}{{ $total = add $total 1 }}{{ end }}
  <p class="tui__cmd tui__total">total {{ $total }}</p>
  <ul class="tui__ls">
    <li><a href="{{ "/" | relURL }}" data-name="..">
      <span class="tui__perm">drwxr-xr-x</span><span class="tui__name">..</span>
    </a></li>
    <li><a data-name="info.md" data-text="info.md" class="is-selected">
      <span class="tui__perm">-rw-r--r--</span><span class="tui__name">info.md</span>
    </a></li>
    {{ if $rapport }}
    <li><a data-name="rapport.md" data-text="rapport.md">
      <span class="tui__perm">-rw-r--r--</span><span class="tui__name">rapport.md</span>
    </a></li>
    {{ end }}
    {{ if $dossier }}
    <li><a data-name="dossier.md" data-text="dossier.md">
      <span class="tui__perm">-rw-r--r--</span><span class="tui__name">dossier.md</span>
    </a></li>
    {{ end }}
  </ul>

  <figure class="tui__preview">
    <div class="tui__text" data-text="info.md">{{ .Content }}</div>
    {{ if $rapport }}<div class="tui__text" data-text="rapport.md" hidden>{{ $rapport.Content }}</div>{{ end }}
    {{ if $dossier }}<div class="tui__text" data-text="dossier.md" hidden>{{ $dossier.Content }}</div>{{ end }}
    <figcaption class="tui__status">info.md</figcaption>
  </figure>
</div>
{{ end }}
