<!-- $Id: modules/arbre_3gen_photo.txt v7.1 19/08/2023 15:07:38 $ -->
%( Arbre 3 générations vertical avec photos ancêtres, sans individu principal si fratrie %)
%( TODO: W3C warning align and width elements on table are obsolete > use CSS instead %)
%( op 1 = small tree 85% size | 2 = normal size %)
%let;op_m;%if;(op_m!="")%op_m;%else;1%end;%in;
%if;has_parents;
  <table class="mx-auto text-center%if;(op_m=2) small%end;" style="line-height:0.9rem">
    <tr>%nn;
      %if;father.has_parents;
        <td colspan="4" class="align-bottom">%nn;
          %if;father.father.has_image;
            %if;(not cancel_links)
              <a href="%father.father.image_url;" target="_blank">
                <img class="rounded" %father.father.image_small_size; src="%father.father.image_url;"
                  alt="[image/images]0" title="%father.father; ([a grandfather/a grandmother/a grandparent]0)">
              </a>
            %else;
              <img class="rounded" %father.father.image_small_size; src="%father.father.image_url;"
                alt="[image/images]0" title="%father.father; ([a grandfather/a grandmother/a grandparent]0)">
            %end;
          %elseif;(b.default_image="yes")
            <img  height="75" src="%images_prefix;img_unknown_man.png" alt="[missing image]">
          %end;
          <br>
          %apply;short_display_person_tree("father.father")</td>
        <td></td>
        <td colspan="4" class="align-bottom">%nn;
          %if;father.mother.has_image;
            %if;(not cancel_links)
              <a href="%father.mother.image_url;" target="_blank">
                <img class="rounded" %father.mother.image_small_size; src="%father.mother.image_url;"
                  alt="[image/images]0" title="%father.mother; ([a grandfather/a grandmother/a grandparent]1)">
              </a>
            %else;
              <img class="rounded" %father.mother.image_small_size; src="%father.mother.image_url;"
                alt="[image/images]0" title="%father.mother; ([a grandfather/a grandmother/a grandparent]1)">
            %end;
          %elseif;(b.default_image="yes")
            <img height="75" src="%images_prefix;img_unknown_woman.png" alt="[missing image]">
          %end;
          <br>
          %apply;short_display_person_tree("father.mother")</td>
      %else;
        <td colspan="9" rowspan="4"></td>
      %end;
      <td></td>
      %if;mother.has_parents;
        <td colspan="4" class="align-bottom">%nn;
          %if;mother.father.has_image;
            %if;(not cancel_links)
              <a href="%mother.father.image_url;" target="_blank">
                <img class="rounded" %mother.father.image_small_size; src="%mother.father.image_url;"
                  alt="[image/images]0" title="%mother.father; ([a grandfather/a grandmother/a grandparent]0)">
              </a>
            %else;
              <img class="rounded" %mother.father.image_small_size; src="%mother.father.image_url;" 
                alt="[image/images]0" title="%mother.father; ([a grandfather/a grandmother/a grandparent]0)">
            %end;
          %elseif;(b.default_image="yes")
            <img height="75" src="%images_prefix;img_unknown_man.png" alt="[missing image]">
          %end;
          <br>
          %apply;short_display_person_tree("mother.father")</td>
        <td></td>
        <td colspan="4" class="align-bottom">%nn;
          %if;mother.mother.has_image;
            %if;(not cancel_links)
              <a href="%mother.mother.image_url;" target="_blank">
                <img class="rounded" %mother.mother.image_small_size; src="%mother.mother.image_url;"
                  alt="[image/images]0" title="%mother.mother; ([a grandfather/a grandmother/a grandparent]1)">
              </a>
            %else;
              <img class="rounded" %mother.mother.image_small_size; src="%mother.mother.image_url;"
                alt="[image/images]0" title="%mother.mother; ([a grandfather/a grandmother/a grandparent]1)">
            %end;
          %elseif;(b.default_image="yes")
            <img height="75" src="%images_prefix;img_unknown_woman.png" alt="[missing image]">
          %end;
          <br>
          %apply;short_display_person_tree("mother.mother")</td>
      %else;
        <td colspan="9" rowspan="4"></td>
      %end;
    </tr>
    <tr>
      %if;father.has_parents;
        <td></td>
        <td colspan="2">│<br>│</td>
        <td colspan="3" class="small align-text-center text-center font-italic col-1 px-1">%nn;
          %apply;display_date_marriage_parent("father")</td>
        <td colspan="2">│<br>│</td>
        <td></td>
      %end;
      <td></td>
      %if;mother.has_parents;
        <td></td>
        <td colspan="2">│<br>│</td>
        <td colspan="3" class="small align-text-center text-center font-italic col-1 px-1">%nn;
          %apply;display_date_marriage_parent("mother")</td>
        <td colspan="2">│<br>│</td>
        <td></td>
      %end;
    </tr>
    <tr>
      %if;father.has_parents;
        <td></td>
        <td colspan="2" class="p-0" align="%right;">
          <hr dir="ltr" width="50%%" align="%right;">
        </td>
        <td colspan="3" class="p-0">
          <hr width="100%%">
        </td>
        <td colspan="2" class="p-0" align="%left;">
          <hr dir="ltr" width="50%%" align="%left;">
        </td>
        <td></td>
      %end;
      <td></td>
      %if;mother.has_parents;
        <td></td>
        <td colspan="2" class="p-0" align="%right;">
          <hr dir="ltr" width="50%%" align="%right;">
        </td>
        <td colspan="3" class="p-0">
          <hr width="100%%">
        </td>
        <td colspan="2" class="p-0" align="%left;">
          <hr dir="ltr" width="50%%" align="%left;">
        </td>
        <td></td>
      %end;
    </tr>
    <tr>
      %if;father.has_parents;
        <td colspan="3"></td>
        <td colspan="3" class="pt-0">│</td>
        <td colspan="3"></td>
      %end;
      <td></td>
      %if;mother.has_parents;
        <td colspan="3"></td>
        <td colspan="3" class="pt-0">│</td>
        <td colspan="3"></td>
      %end;
    </tr>
    <tr>
      <td colspan="2"></td>
      <td colspan="5" class="align-bottom">%nn;
        %if;father.has_image;
          <a href="%father.image_url;" target="_blank">
            <img class="rounded" %father.image_small_size; src="%father.image_url;" alt="[image/images]0">
          </a>
          <br>
        %elseif;(father.has_parents and mother.has_image)
          %if;(b.default_image="yes")
            <img class="rounded image_small_size" src="%images_prefix;img_unknown_man.png" alt="[missing image]">
            <br>
          %else;
            <span class="image_small_size rounded px-3 pt-1 pb-2 text-muted" %father.image_small_size;>?</span>
            <br><br>
          %end;
        %end;
        %apply;short_display_person_tree("father")</td>
      <td colspan="2"></td>
      <td></td>
      <td colspan="2"></td>
      <td colspan="5" class="align-bottom">%nn;
        %if;mother.has_image;
          <a href="%mother.image_url;" target="_blank">
            <img class="rounded" %mother.image_small_size; src="%mother.image_url;" alt="[image/images]0">
          </a>
          <br>
        %elseif;(mother.has_parents and father.has_image)
          %if;(b.default_image="yes")
            <img class="rounded image_small_size" src="%images_prefix;img_unknown_woman.png" alt="[missing image]">
            <br>
          %else;
            <span class="image_small_size rounded px-3 pt-1 pb-2 text-muted" %father.image_small_size;>?</span>
            <br><br>
          %end;
        %end;
        %apply;short_display_person_tree("mother")</td>
        <td colspan="2"></td>
    </tr>
    <tr>
      <td colspan="3"></td>
      <td colspan="3">│</td>
      <td colspan="1"></td>
      <td colspan="5" class="small align-text-center text-center font-italic col-1 px-0">%nn;
        %apply;display_date_marriage_parent("self")%nn;
      </td>
      <td colspan="1"></td>
      <td colspan="3">│</td>
      <td colspan="3"></td>
    </tr>
    <tr>
      <td colspan="3"></td>
      <td colspan="3" class="p-0" align="%right;">
        <hr dir="ltr" width="50%%" align="%right;">
      </td>
      <td colspan="7" class="p-0">
        <hr width="100%%">
      </td>
      <td colspan="3" class="p-0" align="%left;">
        <hr dir="ltr" width="50%%" align="%left;">
      </td>
      <td colspan="3"></td>
    </tr>
    <tr>%( hack to justify the whole table, don't use colspan="9" instead %)
      <td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
      <td>│</td>
      <td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
    </tr>
    %if;(not has_siblings)
      <tr>
        <td colspan="5"></td>
        <td colspan="9">%nn;
          %apply;short_display_person_tree("self")</td>
        <td colspan="5"></td>
      </tr>
    %end;
  </table>
%end;
