Commit e4e99fd4 authored by Nyashes's avatar Nyashes

ajout d'un frontend de démo

parent 371d8dbb
<html>
<head>
<title>page principale</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js" ></script>
<script type="text/javascript">
jQuery("document").ready(function () {
var myData = [{
"title":
"XSLT (oprations avances): expressions rgulires et fichiers texte"
,
"authors":
"Karim El Aktaa (Contributions: Stphane Crozat et les tudiants de NF29)"
,
"keywords":
[
"XSL"
,
"XSLT"
,
"XSL-XSLT"
,
"Expression rgulire"
]
,
"rights":
"by-sa"
,
"introduction":
"XSL-XSLT est un langage de programmation qui permet notamment de manipuler des documents XML. Ce module a pour but de vous apporter des connaissances plus approfondies sur ce langage que vous connaissez dj: l'utilisation de document non XML et d'expressions rgulires."
},
{
"title":
"XSLT (oprations avances): expressions rgulires et fichiers texte"
,
"authors":
"Karim El Aktaa (Contributions: Stphane Crozat et les tudiants de NF29)"
,
"keywords":
[
"XSL"
,
"XSLT"
,
"XSL-XSLT"
,
"Expression rgulire"
]
,
"rights":
"by-sa"
,
"introduction":
"XSL-XSLT est un langage de programmation qui permet notamment de manipuler des documents XML. Ce module a pour but de vous apporter des connaissances plus approfondies sur ce langage que vous connaissez dj: l'utilisation de document non XML et d'expressions rgulires."
}]
for (var item in myData) {
var model = jQuery("div[name='toFill']").first().clone();
model.find("a[name='link']").attr("href", "title.html#" + encodeURI(JSON.stringify(myData[item])));
model.find("span[name='title']").text(myData[item].title);
model.css("display", "block")
model.appendTo(jQuery("body").first());
}
});
</script>
</head>
<body>
<input type="text" id="search" style="width:100%"/>
<div name="toFill" style="display:none;">
<a href="" name="link">
<div style="width:100%; text-align: center; border: solid 1px black; padding: 5px; margin: 3px;">
<span name="title">
</span>
</div>
</a>
</div>
</body>
</html>
\ No newline at end of file
<html>
<head>
<title>page secondaire</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js" ></script>
<script type="text/javascript">
jQuery("document").ready(function () {
var myData = JSON.parse(decodeURI(document.location.href.split("#")[1]));
jQuery("#title").text(myData.title);
jQuery("#spData").append("<p>Auteur(s) : " + myData.authors + "</p>");
jQuery("#spData").append("<p>License de droits d'usage : " + myData.rights + "</p>");
jQuery("#spData").append("");
jQuery("#rwData").append("<p>non classs : " + myData.keywords.join(", ") + "</p>");
jQuery("#introduction").text(myData.introduction);
});
function loadFullText() {
jQuery("#preview").empty();
jQuery("#preview").text("TODO");
}
</script>
<style type="text/css">
div {
border: solid 1px black;
}
</style>
</head>
<body>
<div id="toFill">
<h1 id="title"></h1>
<div>
<div style="width: 62%; display:inline-block">
<p id="spData">
</p>
<div style="text-align:center;"><a href="#todo">Lien de tlchargement</a></div>
</div>
<div id="rwData" style="width: 35%; margin-top:0px; float:right;%">
<h2>Tags</h2>
</div>
</div>
<div id="preview" style="clear:both">
<div id="introduction" ></div>
<div style="text-align:center;">
<a href="#" onclick="loadFullText()">Lire plus ...</a>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
......@@ -6,7 +6,7 @@
<xsl:import href="../xsl-import/string.xsl"/>
<xsl:template name="title-main">
<xsl:choose>
<xsl:when test="../section">
<xsl:when test="name() = 'section'">
<xsl:call-template name="title-section"></xsl:call-template>
</xsl:when>
<xsl:otherwise>
......
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