Commit 8ff1f456 authored by Arnaud Daret's avatar Arnaud Daret Committed by Jerome Chauveau
Browse files

Proposition d'ajout d'un fragment copyright_footer distinct du footer de la...

Proposition d'ajout d'un fragment copyright_footer distinct du footer de la page courante (lié au contenu courant)
parent d1102c8a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -70,5 +70,8 @@ declare variable $max.cons:EDITION_ROUTE_TOC_FUNC := "getRouteTOC";
(:Edition's Footer path:)
declare variable $max.cons:EDITION_FOOTER_PATH := "fragments/footer.frag.html";

(:Edition's Copyright Footer path:)
declare variable $max.cons:EDITION_COPYRIGHT_FOOTER_PATH := "fragments/copyright_footer.frag.html";

(:Default XSL for alignment - automatically executed on aligned routes :)
declare variable $max.cons:ALIGNMENT_XSL := "alignment.xsl";
 No newline at end of file
+15 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ declare function max.html:render(
                    'textOptions' : $textOptions,
                    'head' : $head,
                    'content' : $wrapped,
                    'copyright' : max.html:getCopyrightFooter($projectId),
                    'jsImports' : $jsImports,
                    'data' : max.config:getProjectData($projectId)
                    })
@@ -252,6 +253,20 @@ declare function max.html:getFooter($project){
    }
};

(:builds and returns default MaX HTML copyright footer:)
declare function max.html:getCopyrightFooter($project){
    try {
        let $copyrightFooterPath := max.util:maxHome() || "/editions/" || $project || "/" || $max.cons:EDITION_COPYRIGHT_FOOTER_PATH
        let $content := fetch:xml($copyrightFooterPath, map {'chop' : false()})
        return $content
    }
    catch * {
        <footer>
          Réalisé avec <a href="https://git.unicaen.fr/pdn-certic/MaX" target="_blank">MaX</a> © 2020 Université de Caen Normandie
        </footer>
    }
};


(:get text navigation bar for a specific route:)
declare function max.html:getNavbarForDocument($project, $doc, $selectedId){
+4 −3
Original line number Diff line number Diff line
@@ -170,11 +170,12 @@ mark {
#target {
  background-color: rgba(200, 200, 200, 0.4);
}
footer {

footer.copyright {
  text-align: center;
  position:fixed;
  bottom:0px;
  left:0px;
  bottom:0;
  left:0;
  width:100%;
  background-color:black;
}