Commit 0f7c15e2 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

Initial commit

parents
<div id="demo_presentation">
<h3>À propos</h3>
<p>
</p>
</div>
<div id="demo_presentation">
<h3>Édition de démonstration [XML-TEI]</h3>
<p>Texte de <span>présentation</span> <span>de</span> l'édition.Texte de présentation de l'édition. Texte de présentation de l'édition. Texte de présentation de l'édition. Texte de présentation de l'édition. Texte de présentation de l'édition. Texte de présentation de l'édition.Texte de présentation de l'édition. Texte de présentation de l'édition. Texte de présentation de l'édition. Texte de présentation de l'édition. Texte de présentation de l'édition.</p>
<p>Texte de présentation de l'édition.Texte de présentation de l'édition. Texte de présentation de l'édition. Texte de présentation de l'édition. Texte de présentation de l'édition. Texte de présentation de l'édition.</p>
<div class="container">
<div class="row">
<div id="r1" class="col-sm-3">
<a href="./demo_lorem.xml/c1">MaX</a>
<div class="demo_text">
Notes, corrections, ...
</div>
</div>
<div class="col-sm-1"></div>
<div id="r2" class="col-sm-3">
<a href="./demo_lorem_2.xml/c2.1">Démo</a>
<div class="demo_text">Apparat critique ...</div>
</div>
<div class="col-sm-1"></div>
<div id="r3" class="col-sm-3">
<a href="./demo_lorem_3.xml/c3.1">TEI</a>
<div class="demo_text">Images ...</div>
</div>
</div>
</div>
</div>
<div id="demo_presentation">
<h3>contacts</h3>
<p>
</p>
</div>
<div id="demo_presentation">
<h3>Demo Lorem</h3>
<p>Omitto iuris dictionem in libera civitate contra leges senatusque consulta; caedes relinquo; libidines praetereo, quarum acerbissimum extat indicium et ad
insignem memoriam turpitudinis et paene ad iustum odium imperii nostri, quod constat nobilissimas virgines
se in puteos abiecisse et morte voluntaria necessariam turpitudinem depulisse. Nec haec idcirco omitto, quod non gravissima sint, sed quia nunc sine teste dico.
</p>
</div>
<edition xml:id="demo_lorem" dbpath="max_demo_lorem" env="tei" prettyName="Démo Lorem">
<description>Édition Demo Lorem - Démonstrateur du moteur d'afficchage XML MaX.</description>
<author>Certic / Pôle Document Numérique / Université de Caen</author>
<textOptions>
<checkboxOptions>
<targetClass>pb</targetClass>
</checkboxOptions>
</textOptions>
<!-- attribut @align-xquery-file pour surchage de la XQUERY d'alignement-->
<alignment document="demo_align_fr.xml" first-prefix="fr" second-prefix="lat"/>
<!-- <layout template="editions/demo_lorem/ui/layout/template.html"/>-->
<plugins>
<plugin name="correction"/>
<plugin name="equations"/>
<plugin name="apparat_critique"/>
<plugin name="search">
<parameters>
<parameter key="tag" value="p"/>
<parameter key="backToTextID" value="(./ancestor::*:div[@*:type])[1]/@xml:id"/>
</parameters>
</plugin>
<plugin name="img_viewer">
<parameters>
<!--@xsl(default:false): added to xslt parameters map if true -->
<parameter key="imagesRepository" value="ui/images/" xsl="true"/>
</parameters>
</plugin>
<plugin name="breadcrumb">
<parameters>
<parameter key="topLabel" value="Démo. Max [TEI]"/>
</parameters>
</plugin>
</plugins>
</edition>
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<entry type="main" default="true">
<id>home</id>
<target>accueil</target>
</entry>
<entry type="main">
<id>sommaire</id>
<target>sommaire</target>
</entry>
<entry type="main">
<id>recherche</id>
<target>search</target>
</entry>
<entry type="main">
<id>project</id>
<target>projet</target>
<entry>
<id>about</id>
<target>about</target>
</entry>
<entry>
<id>contacts</id>
<target>contacts</target>
</entry>
</entry>
</menu>
#demo_presentation{
text-align: justify;
}
.figure{
display:inline;
clear:right;
float:left;
}
a {
color: rgba(0,0,0,.5);
}
.sic{
background-color: rgba(255,0,0,0.3);
}
.corr{
background-color: rgba(0,255,0,0.3);
}
.pb{
background-color: rgba(57,122,183,0.3);
}
.note{
font-variant-position: super;
}
.note:before{
content: '(';
}
.note:after{
content: ')';
}
#bas_de_page{
background-color: rgba(255,136,34,0.4);
padding: 5px
}
.lem{
background-color:pink;
}
/*colored square*/
#lem_item .witness_label:after{
content: "xx";
background-color:pink;
color: pink;
margin-left:2px;
}
.col-sm-3{
text-align:center;
min-height: 250px;
padding-top:90px;
color: #888;
}
.col-sm-3 a, .col-sm-3 a:visited{
cursor:pointer;
color: #888;
font-size:2.5rem;
text-decoration:none;
}
.demo_text{
display:none;
font-style: italic;
}
.row {margin:auto;}
#r1{
background-color: rgba(0, 255, 0, 0.3);
}
#r2{
background-color: rgba(255, 136, 34, 0.4);
}
#r3{
background-color: rgba(57, 122, 183, 0.3);
}
#rootDocs{
line-height: 300%;
}
#rootDocs:before{
font-weight: bold;
content:"Documents de démonstration: ";
}
body.max-menu-left{
flex-direction:row;
padding-top:60px;
}
body.max-menu-left nav{
width: 20vw;
background-color: #ccc;
height: 100vh;
position: fixed;
left: 0px;
top: 0px;
padding-top:150px;
padding-left:15px;
}
body.max-menu-left nav ul.flex-row{
flex-direction:column !important;
}
body.max-menu-left nav #text-tools{
position: fixed;
top:0px;
width:100%;
text-align:center;
display:flex;
justify-content: space-around;
}
body.max-menu-left nav > div{
padding-left:15px;
}
body.max-menu-left nav ul{
list-style-type: square;
}
body.max-menu-left .nav-item{
text-align: left !important;
}
body.max-menu-left .no-list-style{
list-style-type: none;
padding:0;
margin:0;
margin-left: -15px;
}
body.max-menu-left nav a{
padding: 5px;
}
body.max-menu-left nav .active a{
background-color: #eee;
}
details{
margin :0;
}
.nav-fill summary.nav-item{
margin: 0;
padding: 0;
}
body.max-menu-left .navbar-nav > li{
float:none;
}
body.max-menu-left #main-max-container{
width: 75vw;
margin-left:20vw;
padding:10px;
padding-top:50px;
}
body.max-menu-left footer{
position: absolute;
bottom:0px;
left:0px;
width: 100vw;
background-color:black;
}
/*SEARCH*/
div.hit > div, div.hit > div p{
white-space: nowrap;
overflow: hidden;
width: 500px;
text-overflow: ellipsis;
}
div.hit blockquote, div.hit .appel_note_marge{
display: none;
}
$(document).ready(function(){
$(".row a").hover(
function() {
$( this ).siblings('.demo_text').show();
}, function() {
$( this ).siblings('.demo_text').hide();
}
);
});
<!DOCTYPE html>
<html lang="en">
{$head}
<body class="max-menu-left">
<header id="topbar" class="navbar fixed-top navbar-light bg-light">
<a class="navbar-brand" href="#">
{$projectId}
</a>
<div id="text-options">
{$textOptions}
</div>
</header>
<nav>
{$menu}
</nav>
<div id="main-max-container">
{$content}
</div>
{$jsImports}
</body>
</html>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="baseURI"/>
<xsl:param name="selectedTarget"/>
<xsl:param name="projectId"/>
<xsl:template match="/">
<xsl:variable name="topEntry" select="/menu//entry[target/text()=$selectedTarget]/ancestor-or-self::entry[@type='main']"/>
<div>
<!-- top menu -->
<ul class="navbar-nav nav-fill flex-row mr-auto">
<xsl:for-each select="/menu/entry[@type='main']">
<xsl:choose>
<xsl:when test="count(./entry) > 0">
<li class="no-list-style">
<details open="'true">
<xsl:if test="./id/text()=$topEntry/id/text()">
<xsl:attribute name="class">nav-item active</xsl:attribute>
</xsl:if>
<summary class='nav-item'>
<a href="{$baseURI}{$projectId}/{./target/text()}"><xsl:value-of select="./label/text()"/></a>
</summary>
<ul>
<xsl:for-each select="./entry">
<li class='nav-item'>
<xsl:if test="./target/text()=$selectedTarget">
<xsl:attribute name="class">active</xsl:attribute>
</xsl:if>
<a href="{$baseURI}{$projectId}/{./target/text()}">
<xsl:value-of select="./label/text()"/>
</a>
</li>
</xsl:for-each>
</ul>
</details>
</li>
</xsl:when>
<xsl:otherwise>
<li class='nav-item'>
<xsl:if test="./id/text()=$topEntry/id/text()">
<xsl:attribute name="class">nav-item active</xsl:attribute>
</xsl:if>
<a href="{$baseURI}{$projectId}/{./target/text()}">
<xsl:value-of select="./label/text()"/>
</a>
<ul>
<xsl:for-each select="./entry">
<li class='nav-item'>
<xsl:if test="./target/text()=$selectedTarget">
<xsl:attribute name="class">active</xsl:attribute>
</xsl:if>
<a href="{$baseURI}{$projectId}/{./target/text()}">
<xsl:value-of select="./label/text()"/>
</a>
</li>
</xsl:for-each>
</ul>
</li>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</ul>
<!-- sub menu -->
<!-- <xsl:if test="count($topEntry/entry) > 0">-->
<!-- <div id="sub-navbar">-->
<!-- <ul class="nav navbar-nav flex-row mr-auto">-->
<!-- <xsl:for-each select="$topEntry/entry">-->
<!-- <li class='nav-item'>-->
<!-- <xsl:if test="./target/text()=$selectedTarget">-->
<!-- <xsl:attribute name="class">active</xsl:attribute>-->
<!-- </xsl:if>-->
<!-- <a href="{$baseURI}{$projectId}/{./target/text()}">-->
<!-- <xsl:value-of select="./label/text()"/>-->
<!-- </a>-->
<!-- </li>-->
<!-- </xsl:for-each>-->
<!-- </ul>-->
<!-- </div>-->
<!-- </xsl:if>-->
</div>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
declare default element namespace "http://www.tei-c.org/ns/1.0";
declare variable $baseURI external;
declare variable $dbPath external; (:path du document dans la db:)
declare variable $project external; (: id du projet :)
declare variable $doc external; (: nom du document :)
(: xquery listant les items du sommaire du document $doc:)
<ul>
<li id="..." data-href="..."><head>test</head></li>
[ ... ]
</ul>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment