Loading Makefile +1 Changes for Makefile: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ install-basex: # BaseX & dépendances: Téléchargement, installation et défini ./.max/basex/bin/basex -c"CREATE DB max";\ echo 'Création du fichier de configuration par défaut "config.xml"';\ cp config.xml.sample config.xml;\ cp src/resources/max.css .max/basex/webapp/static/;\ echo 'Installation de BaseX terminée.';\ fi .PHONY: install-basex Loading src/main/core/routes.xqm +6 −11 Changes for src/main/core/routes.xqm: 6 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -169,7 +169,7 @@ declare %output:method("html") %output:html-version('5') %rest:path("/about.html") function routes:max-infos(){ function routes:max-infos() as element(){ if(conf:is-dev-mode()) then <html> Loading @@ -177,12 +177,15 @@ function routes:max-infos(){ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta charset="UTF-8"/> <title>MaX - infos</title> <link rel='stylesheet' type='text/css' href='static/max.css'/> <style> </style> </head> <body> <h1> <a href="/{$conf:default-lang}/pages/index.html">MaX</a></h1> <h2>Version <code>{conf:get-max-version()}</code></h2> <h3>BaseX {db:system()//*:version}</h3> <section> <h2>Base de données XML <strong>{$database:max-db} </strong></h2> {if(db:exists($database:max-db)) Loading Loading @@ -222,15 +225,6 @@ function routes:max-infos(){ <a href="/doc/functions.html">Consulter l'API XQuery de MaX</a> </div> </section> <!--<section> <h2>Modules</h2> <ul> { for $package in repo:list() return <li>{$package}<strong>{string($package/@*:name)}</strong> : {string($package/@*:version)}</li> } </ul> </section>--> </body> </html> else errors:not-found('', $conf:default-lang) Loading Loading @@ -287,6 +281,7 @@ function routes:file( declare %rest:GET %output:method("html") %output:html-version('5') %rest:path("/doc/functions.html") function routes:functions-documentation(){ if(conf:is-dev-mode()) Loading src/main/core/templating.xqm +1 −1 Changes for src/main/core/templating.xqm: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ declare function templating:render($template as xs:string, $map as map(*)){ return if(conf:is-dev-mode()) then let $devLink :=<a style="position: fixed; bottom :5px; left: 5px; background-color: #333; padding: 2px 5px; color: white" href="/max-infos.html">?</a> style="position: fixed; bottom :5px; left: 5px; background-color: #333; padding: 2px 5px; color: white" href="/about.html">?</a> return copy $c := $render modify ( Loading src/resources/doc-2-html.xsl +7 −98 Changes for src/resources/doc-2-html.xsl: 7 added lines, 98 removed lines. Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xqdoc="http://www.xqdoc.org/1.0"> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xqdoc="http://www.xqdoc.org/1.0" exclude-result-prefixes="#all" > <xsl:output method="xml" encoding="UTF-8"/> <!-- The root template that matches the <xqdoc:xqdoc> element --> <xsl:template match="/"> <html> <head> <title>MaX XQuery Documentation</title> <style> body { font-family: Arial, sans-serif; line-height: 1.6; margin: 20px; overflow: hidden; height: 100vh; } body { } main { overflow-y: auto; padding:2rem; } aside { flex: 1 0 15%; border-right: 1px solid #efefef; } .wrapper { display: flex; height: 100%; } main ul { padding-left: 0; } h1 { padding-bottom: 5px; } h2, h3 { color: #333; } h3{ margin-top:15px; } h4 { color: #777; margin-top: 0; } h3,h4 { margin-bottom:0; } .description, .parameters, .return { display: flex; } .function { border-top: 1px dashed #aaa; } .description, .parameters, .return { /*margin-top: 10px;*/ align-items: center; } .description h4, .parameters h4, .return h4 { margin-right:2rem; } .parameter { margin-left: 20px; } pre{ display: inline-block; padding: 0.5rem; background-color: #efefef; border: 1px solid #ddd; font-size: 1rem; } .examples pre { font-size: 0.8rem; background-color: #f8f8f8; } </style> <link rel='stylesheet' type='text/css' href='/static/max.css'/> </head> <body> <body class="h-100"> <div class="wrapper"> <!-- modules nav menu --> <aside> Loading Loading @@ -131,7 +54,7 @@ </xsl:template> <!-- Template for each function --> <xsl:template match="xqdoc:function"> <div class="function"> <h3> Loading Loading @@ -185,20 +108,6 @@ <p><xsl:copy-of select="xqdoc:comment/xqdoc:custom"/></p> </div> </xsl:if> <!--<xsl:if test="xqdoc:annotations/xqdoc:annotation"> <div class="annotations"> <h3>Annotations</h3> <ul> <xsl:for-each select="xqdoc:annotations/xqdoc:annotation"> <li> <strong><xsl:value-of select="xqdoc:name"/>:</strong> <xsl:value-of select="xqdoc:literal"/> </li> </xsl:for-each> </ul> </div> </xsl:if>--> </div> </xsl:template> Loading src/resources/max.css +74 Changes for src/resources/max.css: 74 added lines, 0 removed lines. Original line number Diff line number Diff line body { font-family: Arial, sans-serif; line-height: 1.6; margin: 20px; } body.h-100{ overflow: hidden; height: 100vh; } main { overflow-y: auto; padding:2rem; } aside { flex: 1 0 15%; border-right: 1px solid #efefef; } .wrapper { display: flex; height: 100%; } main ul { padding-left: 0; } h1 { padding-bottom: 5px; } h2, h3 { color: #333; } h3{ margin-top:15px; } h4 { color: #777; margin-top: 0; } h3,h4 { margin-bottom:0; } .description, .parameters, .return { display: flex; } .function { border-top: 1px dashed #aaa; } .description, .parameters, .return { align-items: center; } .description h4, .parameters h4, .return h4 { margin-right:2rem; } .parameter { margin-left: 20px; } pre{ display: inline-block; padding: 0.5rem; background-color: #efefef; border: 1px solid #ddd; font-size: 1rem; } .examples pre { font-size: 0.8rem; background-color: #f8f8f8; } No newline at end of file Loading
Makefile +1 Changes for Makefile: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ install-basex: # BaseX & dépendances: Téléchargement, installation et défini ./.max/basex/bin/basex -c"CREATE DB max";\ echo 'Création du fichier de configuration par défaut "config.xml"';\ cp config.xml.sample config.xml;\ cp src/resources/max.css .max/basex/webapp/static/;\ echo 'Installation de BaseX terminée.';\ fi .PHONY: install-basex Loading
src/main/core/routes.xqm +6 −11 Changes for src/main/core/routes.xqm: 6 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -169,7 +169,7 @@ declare %output:method("html") %output:html-version('5') %rest:path("/about.html") function routes:max-infos(){ function routes:max-infos() as element(){ if(conf:is-dev-mode()) then <html> Loading @@ -177,12 +177,15 @@ function routes:max-infos(){ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta charset="UTF-8"/> <title>MaX - infos</title> <link rel='stylesheet' type='text/css' href='static/max.css'/> <style> </style> </head> <body> <h1> <a href="/{$conf:default-lang}/pages/index.html">MaX</a></h1> <h2>Version <code>{conf:get-max-version()}</code></h2> <h3>BaseX {db:system()//*:version}</h3> <section> <h2>Base de données XML <strong>{$database:max-db} </strong></h2> {if(db:exists($database:max-db)) Loading Loading @@ -222,15 +225,6 @@ function routes:max-infos(){ <a href="/doc/functions.html">Consulter l'API XQuery de MaX</a> </div> </section> <!--<section> <h2>Modules</h2> <ul> { for $package in repo:list() return <li>{$package}<strong>{string($package/@*:name)}</strong> : {string($package/@*:version)}</li> } </ul> </section>--> </body> </html> else errors:not-found('', $conf:default-lang) Loading Loading @@ -287,6 +281,7 @@ function routes:file( declare %rest:GET %output:method("html") %output:html-version('5') %rest:path("/doc/functions.html") function routes:functions-documentation(){ if(conf:is-dev-mode()) Loading
src/main/core/templating.xqm +1 −1 Changes for src/main/core/templating.xqm: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ declare function templating:render($template as xs:string, $map as map(*)){ return if(conf:is-dev-mode()) then let $devLink :=<a style="position: fixed; bottom :5px; left: 5px; background-color: #333; padding: 2px 5px; color: white" href="/max-infos.html">?</a> style="position: fixed; bottom :5px; left: 5px; background-color: #333; padding: 2px 5px; color: white" href="/about.html">?</a> return copy $c := $render modify ( Loading
src/resources/doc-2-html.xsl +7 −98 Changes for src/resources/doc-2-html.xsl: 7 added lines, 98 removed lines. Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xqdoc="http://www.xqdoc.org/1.0"> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xqdoc="http://www.xqdoc.org/1.0" exclude-result-prefixes="#all" > <xsl:output method="xml" encoding="UTF-8"/> <!-- The root template that matches the <xqdoc:xqdoc> element --> <xsl:template match="/"> <html> <head> <title>MaX XQuery Documentation</title> <style> body { font-family: Arial, sans-serif; line-height: 1.6; margin: 20px; overflow: hidden; height: 100vh; } body { } main { overflow-y: auto; padding:2rem; } aside { flex: 1 0 15%; border-right: 1px solid #efefef; } .wrapper { display: flex; height: 100%; } main ul { padding-left: 0; } h1 { padding-bottom: 5px; } h2, h3 { color: #333; } h3{ margin-top:15px; } h4 { color: #777; margin-top: 0; } h3,h4 { margin-bottom:0; } .description, .parameters, .return { display: flex; } .function { border-top: 1px dashed #aaa; } .description, .parameters, .return { /*margin-top: 10px;*/ align-items: center; } .description h4, .parameters h4, .return h4 { margin-right:2rem; } .parameter { margin-left: 20px; } pre{ display: inline-block; padding: 0.5rem; background-color: #efefef; border: 1px solid #ddd; font-size: 1rem; } .examples pre { font-size: 0.8rem; background-color: #f8f8f8; } </style> <link rel='stylesheet' type='text/css' href='/static/max.css'/> </head> <body> <body class="h-100"> <div class="wrapper"> <!-- modules nav menu --> <aside> Loading Loading @@ -131,7 +54,7 @@ </xsl:template> <!-- Template for each function --> <xsl:template match="xqdoc:function"> <div class="function"> <h3> Loading Loading @@ -185,20 +108,6 @@ <p><xsl:copy-of select="xqdoc:comment/xqdoc:custom"/></p> </div> </xsl:if> <!--<xsl:if test="xqdoc:annotations/xqdoc:annotation"> <div class="annotations"> <h3>Annotations</h3> <ul> <xsl:for-each select="xqdoc:annotations/xqdoc:annotation"> <li> <strong><xsl:value-of select="xqdoc:name"/>:</strong> <xsl:value-of select="xqdoc:literal"/> </li> </xsl:for-each> </ul> </div> </xsl:if>--> </div> </xsl:template> Loading
src/resources/max.css +74 Changes for src/resources/max.css: 74 added lines, 0 removed lines. Original line number Diff line number Diff line body { font-family: Arial, sans-serif; line-height: 1.6; margin: 20px; } body.h-100{ overflow: hidden; height: 100vh; } main { overflow-y: auto; padding:2rem; } aside { flex: 1 0 15%; border-right: 1px solid #efefef; } .wrapper { display: flex; height: 100%; } main ul { padding-left: 0; } h1 { padding-bottom: 5px; } h2, h3 { color: #333; } h3{ margin-top:15px; } h4 { color: #777; margin-top: 0; } h3,h4 { margin-bottom:0; } .description, .parameters, .return { display: flex; } .function { border-top: 1px dashed #aaa; } .description, .parameters, .return { align-items: center; } .description h4, .parameters h4, .return h4 { margin-right:2rem; } .parameter { margin-left: 20px; } pre{ display: inline-block; padding: 0.5rem; background-color: #efefef; border: 1px solid #ddd; font-size: 1rem; } .examples pre { font-size: 0.8rem; background-color: #f8f8f8; } No newline at end of file