From 3bfec155aa04840ff3c4198f7bb4145d176d1607 Mon Sep 17 00:00:00 2001 From: gdetrez Date: Sun, 16 Apr 2006 21:37:29 +0200 Subject: [PATCH] imports initiaux aussi darcs-hash:20060416193729-f46e9-8266479d864f4a2e2a7d12d598935233f0721101.gz --- wiki/static/common/boxes/boxes.css | 78 ++++++++++++++++++++++++++++++ wiki/static/common/pagesPersos.css | 25 ++++++++++ wiki/static/common/toc/toc.css | 35 ++++++++++++++ wiki/static/common/toc/toc.js | 62 ++++++++++++++++++++++++ 4 files changed, 200 insertions(+) create mode 100644 wiki/static/common/boxes/boxes.css create mode 100644 wiki/static/common/pagesPersos.css create mode 100644 wiki/static/common/toc/toc.css create mode 100644 wiki/static/common/toc/toc.js diff --git a/wiki/static/common/boxes/boxes.css b/wiki/static/common/boxes/boxes.css new file mode 100644 index 00000000..3f231d32 --- /dev/null +++ b/wiki/static/common/boxes/boxes.css @@ -0,0 +1,78 @@ +/* les boites */ + +/* Show only to IE PC \*/ +* html .boxhead h2 {height: 1%;} /* For IE 5 PC */ + + +.sidebox { + margin: 0 auto; /* center for now */ + padding:0; + font-size: 100%; + float:left; + max-width:600px; +} +.boxhead { + background: url(sbhead-l-orange.png) no-repeat top left; + margin: 0; + padding: 0 0 0 35px; + text-align: center; +} +.boxhead h4 { + background:transparent url(sbhead-r-orange.png) no-repeat top right; + border:none; + margin: 0; + padding: 22px 55px 5px 5px; + color: white; + font-weight: bold; + font-size: 1.2em; + line-height: 1em; + + /* Safari-only, but cool */ + text-shadow: black 0px 2px 5px ;/* valeur originale non valide : rgba(0,0,0,.4) 0px 2px 5px;*/ + + overflow:hidden; +} + +.boxbody1 { + background: url(sbbody-l.png) no-repeat bottom left; + padding: 0 0 0 42px; +} +.boxbody2 { + background: transparent url(sbbody-r.png) no-repeat bottom right; + margin: 0; + padding: 5px 47px 47px 5px; + color:black; + +} + +.orange_box .boxhead {background-image: url(sbhead-l-orange.png);} +.orange_box .boxhead h4 {background-image: url(sbhead-r-orange.png);} + +.blue_box .boxhead {background-image: url(sbhead-l-blue.png);} +.blue_box .boxhead h4 {background-image: url(sbhead-r-blue.png);} + + +.black_box .boxhead {background-image: url(sbhead-l-black.png);} +.black_box .boxhead h4 {background-image: url(sbhead-r-black.png);} + + +.green_box .boxhead {background-image: url(sbhead-l-green.png);} +.green_box .boxhead h4 {background-image: url(sbhead-r-green.png);} + + +.red_box .boxhead {background-image: url(sbhead-l-red.png);} +.red_box .boxhead h4 {background-image: url(sbhead-r-red.png);} + + +.gray_box .boxhead {background-image: url(sbhead-l-gray.png);} +.gray_box .boxhead h4 {background-image: url(sbhead-r-gray.png);} + +/* on est oblige de mettre des clear aux titres pour respecter une certaine cohérence */ + +h2, h3, h4, h5, hr {clear:left;} + +hr { width:100%; } + +.visualclear, #bottom, #bottom_preview { + clear:both; +} diff --git a/wiki/static/common/pagesPersos.css b/wiki/static/common/pagesPersos.css new file mode 100644 index 00000000..10d814e5 --- /dev/null +++ b/wiki/static/common/pagesPersos.css @@ -0,0 +1,25 @@ +div.vignetteperso { + text-align: center; + height: 150px; + width: 100px; + border: 0px; + float: left; + padding: 10px; + overflow:show; +} + + +div.vignetteperso a { + height:100px; + width:100%; + display: table-cell; + vertical-align: middle; +} + +/* redimentionnement proportionnel des images : on wuppose que l'image est plus large que haute */ +/* /!\ si on ecrit a la foi max-width et max-heigth au lieu de width et height, le redimentionnement n'est plus proportionnel */ +div.vignetteperso img { + width:100px; + max-height:100px; + margin: auto auto; +} diff --git a/wiki/static/common/toc/toc.css b/wiki/static/common/toc/toc.css new file mode 100644 index 00000000..02cd1213 --- /dev/null +++ b/wiki/static/common/toc/toc.css @@ -0,0 +1,35 @@ +/**/ +#tableOfContents, #tableOfContents p { + display:block; + } +#tableOfContents { + display:block; + float:left; + border: 1px solid #aaaaaa; + padding:5px; + background:#e9e9e9; + margin:20px; +} + +#tableOfContents ol { + margin:0; + padding:0 0 0 20px; +} +#tableOfContents ol li { + margin:2px; +} +#tableOfContents h2 { + border:none; + font-size:110%; + font-weight:bold; + padding:0; + margin:5px 0; + text-align:center; +} + +#tableOfContents span.toctoggle { + font-size:x-small; + font-weight:normal; +} + +.visualClear {clear:both;} diff --git a/wiki/static/common/toc/toc.js b/wiki/static/common/toc/toc.js new file mode 100644 index 00000000..2444cfe0 --- /dev/null +++ b/wiki/static/common/toc/toc.js @@ -0,0 +1,62 @@ +var TOCState = "visible" + +function replaceChildNodes(node/*, nodes...*/) { + var elem = document.getElementById(node); + elem.firstChild = "ee"; + return +}; + +function showTocToggle() { + if (document.createTextNode) { + // Uses DOM calls to avoid document.write + XHTML issues + + var linkHolder = document.getElementById('toctitle') + if (!linkHolder) + return; + + var outerSpan = document.createElement('span'); + outerSpan.className = 'toctoggle'; + + var toggleLink = document.createElement('a'); + toggleLink.id = 'togglelink'; + toggleLink.className = 'internal'; + toggleLink.href = 'javascript:toggleToc()'; + toggleLink.appendChild(document.createTextNode('masquer')); + + outerSpan.appendChild(document.createTextNode('[')); + outerSpan.appendChild(toggleLink); + outerSpan.appendChild(document.createTextNode(']')); + + linkHolder.appendChild(document.createTextNode(' ')); + linkHolder.appendChild(outerSpan); + + var cookiePos = document.cookie.indexOf("hidetoc="); + if (cookiePos > -1 && document.cookie.charAt(cookiePos + 8) == 1) + toggleToc(); + } +} + +function changeText(el, newText) { + // Safari work around + if (el.innerText) + el.innerText = newText; + else if (el.firstChild && el.firstChild.nodeValue) + el.firstChild.nodeValue = newText; +} + +function toggleToc() { + var toc = document.getElementById('tableOfContentsList'); + var toggleLink = document.getElementById('togglelink') + + if (toc && toggleLink && toc.style.display == 'none') { + changeText(toggleLink, 'masquer'); + toc.style.display = 'block'; + document.cookie = "hidetoc=0"; + } else { + changeText(toggleLink, 'afficher'); + toc.style.display = 'none'; + document.cookie = "hidetoc=1"; + } +} + +showTocToggle(); \ No newline at end of file