Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Vrac à retravailler
  • Loading branch information
lledieu committed Jun 14, 2019
1 parent fdd200b commit 18bdf58
Show file tree
Hide file tree
Showing 17 changed files with 188 additions and 164 deletions.
2 changes: 1 addition & 1 deletion bin/distrib/update_nldb/update_nldb.ml
Expand Up @@ -82,7 +82,7 @@ let compute base bdir =
flush stderr
with Sys_error _ -> ()
end;
let db = ref (NotesLinks.read_db bdir) in
let db = ref [] in
Printf.eprintf "--- misc notes\n";
flush stderr;
let ndir = Filename.concat bdir (base_notes_dir base) in
Expand Down
5 changes: 3 additions & 2 deletions hd/etc/copyr.txt
Expand Up @@ -21,7 +21,6 @@
%end;
%if;(not cancel_links)
<div class="d-flex justify-content-end mx-2 my-2" id="copyr">
%if;(connections!="")<div class="mr-auto align-self-center">%connections;</div>%end;
<div class="d-flex">
%if;(evar.templ="")
<div class="btn-group dropup align-self-center">
Expand Down Expand Up @@ -87,11 +86,13 @@
<a href="https://geneweb.tuxfamily.org/wiki/GeneWeb%if;(lang!="en")/%lang;%end;" class="ml-1"
target="_blank" rel="noreferrer" rel="noopener" title="Documentation GeneWeb">%nn;
<i class="fab fa-wikipedia-w"></i></a>%nn;
<a href="https://github.com/geneweb/geneweb" class="ml-1"
<a href="https://github.com/geneweb/geneweb/compare/master...lledieu:lledieu7" class="ml-1"
target="_blank" rel="noreferrer" rel="noopener" title="GeneWeb on Github">%nn;
<i class="fab fa-github"></i></a>
</div>
%if;(connections!="")<div class="mr-auto align-self-center">%connections;</div>%end;
</div>
<a href="%prefix;"><img src="%image_prefix;/gwlogo-orig.png" alt="Nostalgie" style="display: inline-block; height: 72px;"></a>
</div>
</div>
%end;
82 changes: 82 additions & 0 deletions hd/etc/css/lledieu.css
@@ -0,0 +1,82 @@
html body {
background-color: #fcfffa;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}

.container {
max-width: 100%;
}

h1, h2, h4, .h2 {
color: #2f6400;
}

hr {
color: #844404;
}

a {
color: inherit;
text-decoration-line: underline;
text-decoration-style: dotted;
}
a:link {
text-decoration-color: #0000EE;
}
a:visited {
text-decoration-color: #551A8B;
}
a:active {
text-decoration-color: #EE0000;
}

h1>a, a.place {
text-decoration-line: none;
}

.sources {
font-size: smaller;
}

.sosa {
background-color: #82af0b;
color: white;
padding: 1px 5px 1px 18px;
background-image: url(https://lledieu.org/gw/images/sosa_symbol.png);
background-repeat: no-repeat;
background-position: 0 0;
font-size: 12px;
}
nav a, .sosa>a {
text-decoration-line: none;
}

.btn-link {
color: #844404 !important;
}

.new7 {
border-style: groove;
border-width: 1px;
border-color: red;
}

.mark {
padding: 0;
background-color: #e4a160;
}

#surname_by_branch ul.posterity {
display: inline;
padding: 0;
}
#surname_by_branch ul.posterity li {
display: inline;
}

/* Expérience pour Sosa */
.is_sosa::before {
font-family: "Font Awesome 5 Free";
content: "\f192 ";
color: #7baa00;
}
2 changes: 1 addition & 1 deletion hd/etc/home.txt
Expand Up @@ -14,7 +14,7 @@
<i class="fa fa-search-plus fa-fw" title="[*advanced request]0" aria-hidden="true"></i>%nn;
</a>
%if;(referer!="")
<a role="button" class="btn btn-link text_primary ml-0 p-0" href="javascript:window.history.go(-1);" title="Revenir en arrière">%nn;
<a role="button" class="btn btn-link text-primary ml-0 p-0" href="javascript:window.history.go(-1);" title="Revenir en arrière">%nn;
<i class="fa fa-arrow-left fa-fw" title="[*back]" aria-hidden="true"></i>%nn;
<span class="sr-only">[*back]</span>%nn;
</a>
Expand Down
42 changes: 23 additions & 19 deletions hd/etc/modules/individu.txt
Expand Up @@ -76,6 +76,12 @@

%define;etat_civil()
<ul>
%if;has_occupation;
<li>%apply;capitalize(occupation)</li>%nl;
%end;
%if;(has_linked_page.OCCU and linked_page.OCCU!="")
<li>%apply;capitalize(linked_page.OCCU)</li>%nl;
%end;
%if;has_birth_date;
<li>%apply;capitalize(nth([born],sex)) %on_birth_date;
%if;birthday; ([happy birthday to you!])%end;
Expand Down Expand Up @@ -109,12 +115,6 @@
%if;has_cremation_date; %on_cremation_date;%end;
%if;has_cremation_place; - %apply;place_check(cremation_place)%end;</li>%nl;
%end;
%if;has_occupation;
<li>%apply;capitalize(occupation)</li>%nl;
%end;
%if;(has_linked_page.OCCU and linked_page.OCCU!="")
<li>%apply;capitalize(linked_page.OCCU)</li>%nl;
%end;
%if;(has_consanguinity and bvar.show_consang!="no")
%if;(cancel_links)
<li>[*consanguinity][:] %consanguinity;</li>%nl;
Expand Down Expand Up @@ -147,10 +147,8 @@
%if;(has_sosa and not cancel_links)
<div class="%if;(op_m=2 or op_m=3)text-center%end;">
<i class="fa fa-dot-circle-o text-success mr-1"></i>%nn;
[*Sosa]
%if;(sosa=1)%sosa;
%else;<a href="%prefix;%sosa_link;">%sosa;</a> %apply;a_of_b%with;%and;
%if;(sosa_ref.is_restricted)%sosa_ref;%else;<a href="%prefix;%sosa_ref.access;">%sosa_ref;</a>%end;%end;
%if;(sosa=1)<span class="sosa">[*Sosa] %sosa;</span>
%else;<a href="%prefix;%sosa_link;"><span class="sosa">[*Sosa] %sosa;</span></a>
%end;
</div>
%end;
Expand All @@ -163,8 +161,12 @@
%let;evm;%if;(evar.m="F")m=F;%end;%in;
%let;prefx;%if;(evar.m="F")%prefix_no_pmod;%else;%prefix;%end;%in;
%if;(evar.m!="MOD_IND")
%if;(bvar.show_invisible = "on" and wizard and is_invisible)
<img src="%image_prefix;/restricted.png"%wid_hei;restricted.png; alt=" (x)"%/>%nn;
%end;
%apply;link_pages()
<div class="col-12">
<h1 class="%if;(op_m=2)text-center%else;text-xs-center text-md-left%end;">
<h1 class="%if;(op_m=2 or op_m=3)text-center%else;text-xs-center text-md-left%end;">
%if;has_public_name;
%if;has_qualifiers;%public_name; <em>%qualifier;</em>
%else;%public_name; %surname;%end;
Expand All @@ -178,7 +180,7 @@
%end;
%end;
%end;
<span class="font-weight-light small">%dates;</span>
<span class="text-muted font-weight-light small">%dates;</span>
</h1>
</div> %( closing div just before h1 %)

Expand All @@ -205,13 +207,15 @@
%apply;etat_civil()

%elseif;(op_m=3)
<div class="d-flex">
%apply;portrait()
<div>
<div class="text-center mb-2 mx-2">
%apply;detailed_names()
%apply;sosa()
</div>
<div class="text-center col-12">
%apply;sosa()
%apply;detailed_names()
</div>
<div class="row">
<div class="text-center mx-5">
%apply;portrait()
</div>
<div class="text-left my-auto">
%apply;etat_civil()
</div>
</div>
Expand Down
39 changes: 2 additions & 37 deletions hd/etc/modules/notes.txt
Expand Up @@ -20,51 +20,16 @@
%if;has_marriage_note;%incr_count2;%end;
%end;

%define;link_pages()
%if;(not cancel_links and has_linked_pages)
<div id ="link_pages" class="ml-auto d-flex align-items-center">
(<a href="%prefix;m=LINKED;%access;">[linked pages]</a>)
</div>
%end;
%end;

%if;(op_m=1 and (wizard or friend or bvar.no_note_for_visitor = "" or bvar.no_note_for_visitor = "no") and
(has_notes or has_linked_page.BNOTE or has_linked_page.NOTE or count2>0))
%if;(count>0 or has_linked_page.BNOTE and linked_page.BNOTE!="")
<div class="d-flex justify-content-start">
<h2 class="mt-2">[*individual notes]</h2>
%apply;link_pages()
<h2 class="mt-2">[*note/notes]1</h2>
</div>
%if;(has_linked_page.BNOTE and linked_page.BNOTE!="")
<p>%apply;capitalize(linked_page.BNOTE).</p>
%end;
<div class="ml-3">
%notes;
</div>
%end;
%if;(count2>0 and has_families)
%( On remet les compteurs à zéro, on démarre à 1 - synchro avec unions.txt %)
%reset_count;
%foreach;family;
%incr_count;
%if;((wizard or friend or bvar.no_note_for_visitor="" or bvar.no_note_for_visitor="no") and has_comment)
%if;(count=1 or count2=1 and (has_notes or has_linked_page.BNOTE or has_linked_page.NOTE))
<h2>%if;(nb_families>1)[*marriage notes/marriages notes]1%else;[*marriage notes/marriages notes]0%end;</h2>
%end;
<dl>
<dt>
%if;(not cancel_links)
<a href="#wed-callnote-%count;" id="note-wed-%count;" style="text-decoration:none" title="[see] [marriage/marriages]0">^
</a>
%else;^
%end;
%if;(nb_families>1)%apply;nth([nth (generation)], count) [marriage with]%else;[*marriage with]%end; %spouse.first_name; %spouse.surname;
[:]
</dt>
<dd>%comment;</dd>
</dl>
%end;
%end;
%notes;
%end;
%if;(has_linked_page.NOTE and linked_page.NOTE!="")
<p>%apply;capitalize(linked_page.NOTE).</p>
Expand Down
36 changes: 16 additions & 20 deletions hd/etc/modules/relations.txt
Expand Up @@ -3,46 +3,31 @@
%( op_m=2 Relations complete (events) %)
%let;op_m;%if;(op_m!="")%op_m;%else;1%end;%in;

%define;relations_tree(z1)
%define;relations_tree()
%( relations, related, witness at his event %)
%reset_count;
href="%prefix;spouse=on;m=RLM;image=%evar.image;;%nn;
%foreach;relation;
%if;(has_relation_him)
%incr_count;i%count;=%relation_him.index;;%nn;
t%count;=%relation_him.type;;%nn;
%incr_count;i%count;=z1;%nn;
%end;
%if;(has_relation_her)
%incr_count;i%count;=%relation_her.index;;%nn;
t%count;=%relation_her.type;;%nn;
%incr_count;i%count;=z1;%nn;
%end;
%end;
%foreach;related;
%incr_count;i%count;=%related.index;;%nn;
t%count;=%related_type;;%nn;
%incr_count;i%count;=z1;%nn;
%end;
%foreach;event_witness_relation;
%incr_count;i%count;=%event_witness_relation.person.index;;%nn;
t%count;=%event_witness_relation.event.name;;%nn;
%incr_count;i%count;=z1;%nn;
%end;
%foreach;event;
%foreach;event_witness;%nn;
%incr_count;i%count;=%event_witness.index;;%nn;
t%count;=%event.name;;%nn;
%incr_count;i%count;=z1;%nn;
%end;%nn;
%end;
%incr_count;i%count;=%index;;%nn;
t%count;=%if;(sex=0)[him/her]0%elseif;(sex=1)[him/her]1%else;0%end;;%nn;
%if;browsing_with_sosa_ref;
%incr_count;i%count;=%sosa_ref.index;;%nn;
t%count;=sosa_1;%nn;
%end;
" title="[*relations tree] (and witness at his event)"
" title="[*relations tree]"
%reset_count;
%end;

Expand Down Expand Up @@ -76,11 +61,10 @@
%foreach;related;%incr_count;%end;
%foreach;event_witness_relation;%incr_count;%end;
%let;cnt;%count;%in;
%let;l_ref;%if;browsing_with_sosa_ref;%sosa_ref.index;%else;%index;%end;%in;
<h2>[*relation/relations]1%nn;
%if;(cnt>0)
%if;(not cancel_links)
<a %apply;relations_tree(l_ref)>%nn;
<a %apply;relations_tree()>%nn;
<img class="ml-2 mb-1" src="%image_prefix;/gui_create.png" height="18" alt="Tree"%/>%nn;
</a>%nn;
%end;
Expand Down Expand Up @@ -114,7 +98,19 @@
%apply;very_short_display_person_no_sex("related")
</li>
%end;
</ul>
%foreach;event_witness_relation;
%apply;li_SDC("event_witness_relation.person")
%apply;capitalize(event_witness_relation_kind)%sp;
%if;(event_witness_relation.event.date.year != "")
<em>(%event_witness_relation.event.date.year;)</em>%end;
[:]%sp;%event_witness_relation.event.name;,%sp;
%apply;short_display_person("event_witness_relation.person")
%if;(event_witness_relation.event.spouse != "")
%sp;[and]
%apply;short_display_person("event_witness_relation.event.spouse")
%end;
</li>
%end;</ul>

%( relation_complete includes witness of his events and witness at other's events %)
%elseif;(op_m=2 and rel_nbr>0)
Expand Down

0 comments on commit 18bdf58

Please sign in to comment.