<!-- $Id: modules/arbre_9gen.txt v7.0 04/03/2023 09:51:04 $ -->
%( Set of parameters generated by H-Tree.py -o m (version 2.9) %)
%define;left9m(xx)
  %apply;nth%with;
  //8//4//12//4//4//12//12//2//6//2//6//10//14//10//14//2//2//6//6//2//2//6//6//10//10//14//14//10//10//14//14//1//3//1//3//5//7//5//7//1//3//1//3//5//7//5//7//9//11//9//11//13//15//13//15//9//11//9//11//13//15//13//15//1//1//3//3//1//1//3//3//5//5//7//7//5//5//7//7//1//1//3//3//1//1//3//3//5//5//7//7//5//5//7//7//9//9//11//11//9//9//11//11//13//13//15//15//13//13//15//15//9//9//11//11//9//9//11//11//13//13//15//15//13//13//15//15//1//1//1//1//3//3//3//3//1//1//1//1//3//3//3//3//5//5//5//5//7//7//7//7//5//5//5//5//7//7//7//7//1//1//1//1//3//3//3//3//1//1//1//1//3//3//3//3//5//5//5//5//7//7//7//7//5//5//5//5//7//7//7//7//9//9//9//9//11//11//11//11//9//9//9//9//11//11//11//11//13//13//13//13//15//15//15//15//13//13//13//13//15//15//15//15//9//9//9//9//11//11//11//11//9//9//9//9//11//11//11//11//13//13//13//13//15//15//15//15//13//13//13//13//15//15//15//15//
  %and;xx%end;
%end;
%define;top9m(xx)
  %apply;nth%with;
  //8//8//8//4//12//4//12//4//4//12//12//4//4//12//12//2//6//2//6//10//14//10//14//2//6//2//6//10//14//10//14//2//2//6//6//2//2//6//6//10//10//14//14//10//10//14//14//2//2//6//6//2//2//6//6//10//10//14//14//10//10//14//14//1//3//1//3//5//7//5//7//1//3//1//3//5//7//5//7//9//11//9//11//13//15//13//15//9//11//9//11//13//15//13//15//1//3//1//3//5//7//5//7//1//3//1//3//5//7//5//7//9//11//9//11//13//15//13//15//9//11//9//11//13//15//13//15//1//1//3//3//1//1//3//3//5//5//7//7//5//5//7//7//1//1//3//3//1//1//3//3//5//5//7//7//5//5//7//7//9//9//11//11//9//9//11//11//13//13//15//15//13//13//15//15//9//9//11//11//9//9//11//11//13//13//15//15//13//13//15//15//1//1//3//3//1//1//3//3//5//5//7//7//5//5//7//7//1//1//3//3//1//1//3//3//5//5//7//7//5//5//7//7//9//9//11//11//9//9//11//11//13//13//15//15//13//13//15//15//9//9//11//11//9//9//11//11//13//13//15//15//13//13//15//15//
  %and;xx%end;
%end;
%define;left9mw(xx)
  %apply;nth%with;
  /0/30/60/90/340/370/400/430/680/710/740/770/1020/1050/1080/1110/1110/
  %and;xx%end;
%end;
%define;top9mh(xx)
  %apply;nth%with;
  /50/75/105/80/180/205/235/280/450/475/505/480/580/605/635/710/710/
  %and;xx%end;
%end;
%define;top9mw(xx)
  %apply;nth%with;
  /30/30/30/250/30/30/30/250/30/30/30/250/30/30/30/0/0/
  %and;xx%end;
%end;
%define;bhig9l(xx)
  %apply;nth%with;
  /0/150/150/150/30/30/30/25/25/
  %and;xx%end;
%end;
%define;bwid9l(xx)
  %apply;nth%with;
  /0/250/250/250/30/30/30/30/0/
  %and;xx%end;
%end;
%define;left9mdx(xx)
  %apply;nth%with;
  ////250//90//125//125//125//125//30//30//30//30//30//30//30//30//15//15//15//15//15//15//15//15//15//15//15//15//15//15//15//15//15/
  %and;xx%end;
%end;
%define;top9mdy(xx)
  %apply;nth%with;
  ////75//75//150//80//150//80//75//75//75//75//75//75//75//75//30//25//30//25//30//25//30//25//30//25//30//25//30//25//30//25//30/
  %and;xx%end;
%end;
%define;dy1()60%end;
%define;dy2()10%end;
%define;dy3()30%end;

%define;wl(xx)
  %apply;nth%with;
  ///90/2/30/2/
  %and;xx%end;
%end;
%define;hl(xx)
  %apply;nth%with;
  ///2/50/2/35/
  %and;xx%end;
%end;
%( ----- %)
%define;top9m_(xx)
  %apply;nth%with;
 //7//7//7//3//11//3//
  %and;xx%end;
%end;
%define;left9m_(xx)
  %apply;nth%with;
     //15//7//23//7//7//23//
  %and;xx%end;
%end;
%define;bg(xx)
  %apply;nth%with;
    /FFC8E3/F0CBFE/DDCEFF/FFA8D3/E7A9FE/FF86C2/DD88FD/FF62B0/C4ABFE
  %and;xx%end;
%end;

<script type="text/javascript">
 <!--

  function over1(xx)
  {
   document.getElementById(xx).style.outline="#00F solid 4px";
   return false;
  }
  function out1(xx)
  {
   document.getElementById(xx).style.outline="none";
   return false;
  }
 -->
</script>

<style type="text/css">
  #hi-tree1 {position:relative;left:10px;}
  #hi-tree1 tt{position:absolute;font-family:monospace;font-size:10pt;line-height:10pt;%if;(evar.sosa="on")margin:2px 6px;%end;}
  #hi-tree1 a{position:absolute;font-family:monospace;font-size:10pt;line-height:10pt;}
</style>

%define;implex()
  %if;(evar.implx="on")
    <script type="text/javascript">
    $(function() {
      $('#hi-tree1').line(%left1;, %top1;, %left2;, %top2;, {color:"red", stroke:1, opacity:0.3, zindex:1});
      });
    </script>
  %end;
%end;

%define;implex1(xx)
  onmouseover="over1('sxx')" onmouseout="out1('sxx')" %nn;
%end;

%let;evarv;%if;(evar.v!="")%evar.v;%else;3%end;%in;

<div class="d-flex justify-content-between">
<h2 id="a">
%if;((evar.t = "T" and evar.t1="m") or p_mod="a7")Arbre 8 générations (256 sosa) et indication de la génération 9 (☐)
%end;</h2><br>
%if;not cancel_links;
  <div class="form-inline">
    <div class="mx-2">
        <a href="%prefix_base_password;%if;(evar.image!="off")image=off;%end;%nn;
          %foreach;env_binding;%if;(env.key!="image")%env.key=%env.val;;%end;%end;"
          class="btn btn-outline-secondary btn-sm border-0 px-0"
          title="%if;(evar.image="off")[*visualize/show/hide/summary]1%else;%nn;
             [*visualize/show/hide/summary]2%end; [image/images]0"
        ><i class="fa fa-image fa-fw"></i>
          <i class="fa fa-toggle-%if;(evar.image="off")off%else;on%end; text-muted"></i>
        </a>
    </div>
    %if;(evarv>1 and evar.t="T")
      <div class="mx-2">
          <a href="%prefix_base_password;%if;(evar.marriage!="on")marriage=on;%end;%nn;
            %foreach;env_binding;%if;(env.key!="marriage")%env.key=%env.val;;%end;%end;"
            class="btn btn-outline-secondary btn-sm border-0 px-0"
            title="%if;(evar.marriage!="on")[*visualize/show/hide/summary]1%else;%nn;
               [*visualize/show/hide/summary]2%end; [date of marriage]"
          ><i class="fa fa-image fa-fw"></i>
            <i class="fa fa-toggle-%if;(evar.marriage!="on")off%else;on%end; text-muted"></i>
          </a>
      </div>
    %end;
  </div>
%end;
</div>

<div style="position:relative; left:20px; top:-0px; width:1110px; height:640px; border:solid 0px;">
<h3>
<div style="left:20px; width:1110px; text-align:center">
%if;(evar.cgl!="on")<a href="%prefix;%access;">%end;%first_name; %surname;<br>
%if;(birth_date.year != "")%birth_date.year;%end
%if;(birth_date.year != "" and is_dead) – %end;
%if;(birth_date.year = "" and death_date.year != "")†%else;%death_date.year;%end;&#10;
%if;(evar.cgl!="on")</a>%end;
</div>
</h3>

  %foreach;ancestor_level(0)
    %foreach;ancestor;
      %ancestor.first_name %ancestor.surname; xxx<br>
      %if;(ancestor.birth_date.year != "")° %ancestor.birth_date.year;%end
      %if;(ancestor.birth_date.year != "" and ancestor.is_dead) – %end;
      %if;(ancestor.birth_date.year = "" and ancestor.death_date.year != "")†%else;%ancestor.death_date.year;%end;&#10;
    %end;
  %end;

  %foreach;ancestor_level(8)
    %foreach;ancestor;
     %if;ancestor.is_male;
      %let;dy11;%apply;dy1()%in;
      %let;dy12;%apply;dy2()%in;
      %let;dy13;%apply;dy3()%in;
      %let;fsiz;%if;(evar.fs!="")%evar.fs;%else;14%end;%in;
      %let;left;%apply;left9mw%with;%apply;left9m(ancestor.anc_sosa.v)%end;%in;
      %let;top1;%apply;top9mh%with;%apply;top9m(ancestor.anc_sosa.v)%end;%in;
      %let;top;%if;(level=5)%expr(top1+dy11)
                %else;%top1;
                %end;
      %in;
      %let;dt;%apply;left9mdx(ancestor.anc_sosa.v)%in;
      %let;dx;%if;(dt!="")%dt;%else;0%end;%in;
      %let;dt;%apply;top9mdy(ancestor.anc_sosa.v)%in;
      %let;dy;%if;(dt!="")%dt;%else;0%end;%in;
      %(dx=%dx;;%ancestor.anc_sosa.v;<br>%)
      %let;leftl;%if;(ancestor.anc_sosa.v=6 or
                      ancestor.anc_sosa.v=18 or ancestor.anc_sosa.v=22 or
                      ancestor.anc_sosa.v=26 or ancestor.anc_sosa.v=30)%expr(left-dx)%else;%expr(left+dx)%end;%in;
      %let;topl1;%if; (ancestor.anc_sosa.v=10 or ancestor.anc_sosa.v=14)
                         %expr(top1-dy)
                  %elseif;
                      (ancestor.anc_sosa.v=34 or ancestor.anc_sosa.v=38 or
                      ancestor.anc_sosa.v=42 or ancestor.anc_sosa.v=46 or
                      ancestor.anc_sosa.v=50 or ancestor.anc_sosa.v=54 or
                      ancestor.anc_sosa.v=58 or ancestor.anc_sosa.v=62)
                  %expr(top1-dy-dy12)
              %else;%expr(top1+dy)%end;%in;
      %let;wid;%apply;bwid9l(level)%in;
      %let;hig;%apply;bhig9l(level)%in;
      %let;widl;%apply;wl(level)%in;
      %let;higl;%apply;hl(level)%in;
      %let;font;%if;(level>1 and level<5) %fsiz;px
            %elseif;(level> 4 and level<7) %fsiz;px %else; %fsiz;px %end;%in;
      %let;bg;%if;(ancestor.same != "")CBFECE%else;%apply;bg(level)%end;%in;
      %let;bord;%if;(level=8 and ancestor.has_parents)1%else;0%end;%in;
      %let;topl;%if;(ancestor.anc_sosa.v=10 or ancestor.anc_sosa.v=14)
                   %expr(topl1+dy13)
                %else;%topl1;
                %end;
      %in;

    %( draw lines %)
     %if;(level>2 and level<7)
      <div style="position:absolute;top:%topl;px;left:%leftl;px;width:%widl;px;height:%higl;px;
                  background-color:#FF00FF; ">
      </div>
      %end;
    %(draw box %)
      <div id="s%ancestor.anc_sosa.v;"
           style="position:absolute;top:%top;px;left:%left;px;width:%wid;px;
                  background-color:#%bg;;padding:0px;text-align:center;border:solid %bord;px;
                  font-family:monospace;font-size:%font;;"
                  %if;(ancestor.same != "")%apply;implex1(ancestor.same.v)%end; %nn;
          >
      <div style="position:relative; top:4px; width:%wid;px; height:%hig;px; border:solid 0px;">
      %if;(level>1)
      %end;
      %if;(level>1 and level<5)
        %if;(evar.cgl!="on")
          %if;(evar.nav="on")
        <a href="%prefix_set.pmod;m=A;p=%ancestor.first_name;;n=%ancestor.surname;;oc=%ancestor.occ;;%nn;
               maxv=;v=7;t=T;marriage=on;image=on;bd=;color=on;t1=m;nav=on"%nn;
        title="Sosa %if;(ancestor.same != "")%ancestor.same;%else;%ancestor.anc_sosa;%end;[:] ♂%nn;
      %ancestor.first_name; %ancestor.surname; (%ancestor.occ) – [*generation/generations]0 %level;">
      %else;
        <a href="%prefix_set.pmod;%ancestor.access;">
      %end;
    %end;
      %ancestor.first_name; %ancestor.surname;%if;(evar.cgl!="on")</a>%end;<br>
      %if;(ancestor.birth_date.year != "")%ancestor.birth_date.year;%end
          %if;(ancestor.birth_date.year != "" and ancestor.is_dead) – %end;
          %if;(ancestor.birth_date.year = "" and ancestor.death_date.year != "")†%else;%ancestor.death_date.year;%end;&#10;<br>
      <table style="width:%wid;px; align:center"><tr>
      <td style="width:35%%">%if;(evar.image!="off")
        %if;(ancestor.has_image)<img src="%ancestor.image_url;" height="50px">%end;
      %end;</td>
      <td style="width:30%%">&nbsp;&amp;%if;(evar.marriage="on")%ancestor.family.marriage_date.year;%end;&nbsp;</td>
      <td style="width:35%%">%if;(evar.image!="off")
        %if;(ancestor.spouse.has_image)<img src="%ancestor.spouse.image_url;" height="50px">%end;
      %end;</td>
      </tr></table>
        %if;(evar.cgl!="on")
          %if;(evar.nav="on")
            <a href="%prefix_set.pmod;m=A;p=%ancestor.spouse.first_name;;n=%ancestor.spouse.surname;;oc=%ancestor.spouse.occ;;%nn;
              maxv=;v=7;t=T;marriage=on;image=on;bd=;color=on;t1=m;nav=on"%nn;
              title="Sosa %expr(ancestor.anc_sosa+1)[:] ♀%nn;
              %ancestor.spouse.first_name; %ancestor.spouse.surname; (%ancestor.spouse.occ) – [*generation/generations]0 %level;">
          %else;
            <a href="%prefix_set.pmod;%ancestor.spouse.access;">
          %end;
        %end;
        %ancestor.spouse.first_name; %ancestor.spouse.surname;
        %if;(evar.cgl!="on")</a>%end;<br>
        %if;(ancestor.spouse.birth_date.year != "")%ancestor.spouse.birth_date.year;%end
        %if;(ancestor.spouse.birth_date.year != "" and ancestor.spouse.is_dead) – %end;
        %if;(ancestor.spouse.birth_date.year = "" and ancestor.spouse.death_date.year != "")†%else;%ancestor.spouse.death_date.year;%end;&#10;
      %end;
      %if;(level> 4)
        %if;(evar.cgl!="on")
          %if;(evar.nav="on")
        <a href="%prefix_set.pmod;m=A;p=%ancestor.first_name;;n=%ancestor.surname;;oc=%ancestor.occ;;%nn;
               maxv=;v=7;t=T;marriage=on;image=on;bd=;color=on;t1=m;nav=on"%nn;
        title="Sosa %if;(ancestor.same != "")%ancestor.same;%else;%ancestor.anc_sosa;%end;[:] ♂%nn;
      %ancestor.first_name; %ancestor.surname; (%ancestor.occ) – [*generation/generations]0 %level;">
      %else;
        <a href="%prefix_set.pmod;%ancestor.access;">
      %end;
    %end;
      %if;(ancestor.same != "")%ancestor.same;%else;%ancestor.anc_sosa;%end;%if;(evar.cgl!="on")</a>%end;
    %end;
      </div>
      </div>
     %end; %( is_male %)
    %end;
  %end;
</div>
