# HG changeset patch # User Patrick PIERRE # Date 1340239551 -7200 # Node ID a0b8294a5a998450730d9871a2e2213b4c1bbd20 # Parent f3e221b25f64370cd332ba2a60609e0828a2c446 Ajout des hotspots diff -r f3e221b25f64 -r a0b8294a5a99 RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc dim. juin 17 19:55:34 2012 +0200 +++ b/RelaxNG/publidoc.rnc jeu. juin 21 02:45:51 2012 +0200 @@ -111,9 +111,10 @@ topic = element topic { topic.attributes, topic.content } topic.attributes = - topic.id.attribute? + (topic.id.attribute | topic.xmlid.attribute)? & topic.type.attribute? & lang.attribute? +topic.xmlid.attribute = attribute xml:id { xsd:ID } topic.content = component.head?, @@ -322,6 +323,7 @@ image.content = copyright?, + hotspot*, tooltip* # ~~~~~~ audio @@ -338,6 +340,22 @@ video.attributes = media.id.attribute +# ~~~~~~ hotspot + +hotspot = element hotspot { hotspot.attributes, hotspot.content } + +hotspot.attributes = + x.attribute + & y.attribute + & (width.attribute & height.attribute)? +x.attribute = attribute x { xsd:token {pattern = "\d{1,2}(\.\d)?%"} } +y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d)?%"} } +width.attribute = attribute width { xsd:token {pattern = "\d{1,2}(\.\d)?%"} } +height.attribute = attribute height { xsd:token {pattern = "\d{1,2}(\.\d)?%"} } + +hotspot.content = + (link | audio | video) + # ~~~~~~ tooltip tooltip = element tooltip { tooltip.attributes, tooltip.content } @@ -347,13 +365,11 @@ & y.attribute & dx.attribute? & dy.attribute? -x.attribute = attribute x { xsd:token {pattern = "\d{1,2}(\.\d)?%"} } -y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d)?%"} } dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} } dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d)?"} } tooltip.content = - (p | image)+ + (p+ | image) # ~~~~~~ media.caption media.caption = element caption { caption.attributes, caption.content } diff -r f3e221b25f64 -r a0b8294a5a99 RelaxNG/publiquiz.rnc --- a/RelaxNG/publiquiz.rnc dim. juin 17 19:55:34 2012 +0200 +++ b/RelaxNG/publiquiz.rnc jeu. juin 21 02:45:51 2012 +0200 @@ -50,8 +50,9 @@ quiz = element quiz { quiz.attributes, quiz.content } quiz.attributes = - quiz.id.attribute? + (quiz.id.attribute | quiz.xmlid.attribute)? & lang.attribute? +quiz.xmlid.attribute = attribute xml:id { xsd:ID } quiz.content = component.head?, diff -r f3e221b25f64 -r a0b8294a5a99 Xxe/Css/publidoc.css --- a/Xxe/Css/publidoc.css dim. juin 17 19:55:34 2012 +0200 +++ b/Xxe/Css/publidoc.css jeu. juin 21 02:45:51 2012 +0200 @@ -464,13 +464,6 @@ insert-after-button(color, #7f7f7f, icon, icon(right-half-disc)); } -tooltip image:before { - content: ""; -} -tooltip > image { - content: concatenate("image('Images/", attr(id), ".png', -128, -96, smooth)"); -} - media image { margin-bottom: .8em; } @@ -481,6 +474,24 @@ font-style: italic; } +/* Hotspot */ + +hotspot { + display: block; + padding: .5em; + background-color: #ffefd8; + border-radius: 1.5em; +} + +/* Tooltip */ + +tooltip image:before { + content: ""; +} +tooltip > image { + content: concatenate("image('Images/", attr(id), ".png', -128, -96, smooth)"); +} + tooltip { display: block; padding: .5em;