Canalblog
Suivre ce blog Administration + Créer mon blog
Publicité
solomio
4 juillet 2006

page d'accueil + css

Une expérience de la blogosphère, Personnaliser sonBlog.
Publicité
4 juillet 2006

page d'accueil

Une expérience de la blogosphère,... </div> </div> </a> <div class="article_footer"> <div class="article_footer_info"> Posté par adjaya à 08:49 - <a href="http://solomio.canalblog.com/archives/2006/07/04/2228386.html#ob-comments"><span>Commentaires [<span id="comment-count-1145177">…</span><script> ob.commentCount(document.querySelector("#comment-count-1145177"), { resource: "http://solomio.canalblog.com/api/comment-count/1145177", format: (count) => { const string = count === 0 ? "0" : count === 1 ? "%c" : "%c" return string.replace("%c", count) } }) </script>]</span></a> - Permalien [<a href="http://solomio.canalblog.com/archives/2006/07/04/2228386.html">#</a>] </div> <div class="rating-wrapper"> <div class="rating-wording">Vous aimez ?</div> <svg aria-hidden="true" style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <symbol id="icon-star" viewBox="0 0 26 28"> <path d="M26 10.109c0 0.281-0.203 0.547-0.406 0.75l-5.672 5.531 1.344 7.812c0.016 0.109 0.016 0.203 0.016 0.313 0 0.406-0.187 0.781-0.641 0.781-0.219 0-0.438-0.078-0.625-0.187l-7.016-3.687-7.016 3.687c-0.203 0.109-0.406 0.187-0.625 0.187-0.453 0-0.656-0.375-0.656-0.781 0-0.109 0.016-0.203 0.031-0.313l1.344-7.812-5.688-5.531c-0.187-0.203-0.391-0.469-0.391-0.75 0-0.469 0.484-0.656 0.875-0.719l7.844-1.141 3.516-7.109c0.141-0.297 0.406-0.641 0.766-0.641s0.625 0.344 0.766 0.641l3.516 7.109 7.844 1.141c0.375 0.063 0.875 0.25 0.875 0.719z"></path> </symbol> <linearGradient id="grad"> <stop offset="50%" stop-color="#ffc41f"/> <stop offset="50%" stop-color="#9f9f9f"/> </linearGradient> </defs> </svg> <form class="stars"> <input class="stars-input" type="radio" name="rating" value="5" id="rating-5-1145177" > <label class="stars-view stars-view-5-1145177 " for="rating-5-1145177" onclick="handleRate(1145177, 5, 0, 'stars-view-5-1145177', this)"> <svg class="icon icon-star"> <use xlink:href="#icon-star"></use> </svg> </label> <input class="stars-input" type="radio" name="rating" value="4" id="rating-4-1145177" > <label class="stars-view stars-view-4-1145177 " for="rating-4-1145177" onclick="handleRate(1145177, 4, 0, 'stars-view-4-1145177', this)"> <svg class="icon icon-star"> <use xlink:href="#icon-star"></use> </svg> </label> <input class="stars-input" type="radio" name="rating" value="3" id="rating-3-1145177" > <label class="stars-view stars-view-3-1145177 " for="rating-3-1145177" onclick="handleRate(1145177, 3, 0, 'stars-view-3-1145177', this)"> <svg class="icon icon-star"> <use xlink:href="#icon-star"></use> </svg> </label> <input class="stars-input" type="radio" name="rating" value="2" id="rating-2-1145177" > <label class="stars-view stars-view-2-1145177 " for="rating-2-1145177" onclick="handleRate(1145177, 2, 0, 'stars-view-2-1145177', this)"> <svg class="icon icon-star"> <use xlink:href="#icon-star"></use> </svg> </label> <input class="stars-input" type="radio" name="rating" value="1" id="rating-1-1145177" > <label class="stars-view stars-view-1-1145177 " for="rating-1-1145177" onclick="handleRate(1145177, 1, 0, 'stars-view-1-1145177', this)"> <svg class="icon icon-star"> <use xlink:href="#icon-star"></use> </svg> </label> </form> <div class="rating-raters-1145177"> 0 vote </div> </div> <script defer async> function setFullStar(halfStarElement) { halfStarElement.classList.add('star-chosen') } function setRaters(ratersElement, raters) { ratersElement.textContent = raters > 1 ? `${raters} votes` : `${raters} vote` } function createToaster() { const toaster = document.createElement('div') toaster.classList.add('rating-toaster') document.body.appendChild(toaster) return toaster } function showToast(message, status) { const toaster = createToaster() toaster.textContent = message toaster.classList.add('show-rating-toaster') if (status === "success") { toaster.style.backgroundColor = "#E5F4EF" toaster.style.color = "#1D8C65" } else { toaster.style.backgroundColor = "#FFB5B5" toaster.style.color = "#6F0000" } setTimeout(() => { toaster.classList.remove('show-rating-toaster') }, 3000) } async function rate(postID, value, halfStarClass, node) { const res = await fetch(`/api/section-container/rate/${postID}/${value}`, { method: "POST", headers: { "Content-Type": "application/json", }, credentials: 'include', }) if (res.ok) { const data = await res.json() const ratersNumber = document.querySelector(`.rating-raters-${postID}`) setRaters(ratersNumber, data.raters) showToast("Votre vote est pris en compte","success") if (node.classList.contains("half-star")) { const halfStarElement = document.querySelector(`.${halfStarClass}`) setFullStar(halfStarElement) } } return res } function handleUserLogin() { return window.open( `${window.location.origin}/comments/fr/fetch/user`, "loginob", "width=400,height=450,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0,titlebar=0" ) } async function handleRate(postID, value, halfStar, halfStarClass, node) { const isPreview = /\/preview\/|\.preview\./.test(window.location.href) if (isPreview) { showToast("Vous ne pouvez pas votez sur une preview de votre blog.","error") return } try { const rateResponse = await rate(postID, value, halfStarClass, node) if (rateResponse.status === 401) { const loginWindow = handleUserLogin() const checkWindowClosed = setInterval(() => { if (loginWindow && loginWindow.closed) { clearInterval(checkWindowClosed) const res = rate(postID, value, halfStarClass) if (res.status !== 200) { showToast("Une erreur est survenue lors du vote","error") } } }, 1000) } } catch (e) { showToast("Une erreur est survenue lors du vote","error") } } </script> </div> </div> <div class="ads_container-atf"> </div> <div class="article article_1145175"> <div class="date-header">4 juillet 2006</div> <a class="article_link" href="http://solomio.canalblog.com/archives/2006/07/04/2228338.html"> <h2 class="article_title title">feuille de style</h2> <div class="article_content"> <div class="article_snippet"> /*-----------------------------------------------Blogger Template StyleName: Minim/*-----------------------------------------------Blogger Template StyleName: MinimaDesigner: Douglas BowmanURL: www.stopdesign.comDate: 26 Feb 2004( Adaptation et modifications... </div> </div> </a> <div class="article_footer"> <div class="article_footer_info"> Posté par adjaya à 08:27 - <a href="http://solomio.canalblog.com/archives/2006/07/04/2228338.html#ob-comments"><span>Commentaires [<span id="comment-count-1145175">…</span><script> ob.commentCount(document.querySelector("#comment-count-1145175"), { resource: "http://solomio.canalblog.com/api/comment-count/1145175", format: (count) => { const string = count === 0 ? "0" : count === 1 ? "%c" : "%c" return string.replace("%c", count) } }) </script>]</span></a> - Permalien [<a href="http://solomio.canalblog.com/archives/2006/07/04/2228338.html">#</a>] </div> <div class="rating-wrapper"> <div class="rating-wording">Vous aimez ?</div> <svg aria-hidden="true" style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <symbol id="icon-star" viewBox="0 0 26 28"> <path d="M26 10.109c0 0.281-0.203 0.547-0.406 0.75l-5.672 5.531 1.344 7.812c0.016 0.109 0.016 0.203 0.016 0.313 0 0.406-0.187 0.781-0.641 0.781-0.219 0-0.438-0.078-0.625-0.187l-7.016-3.687-7.016 3.687c-0.203 0.109-0.406 0.187-0.625 0.187-0.453 0-0.656-0.375-0.656-0.781 0-0.109 0.016-0.203 0.031-0.313l1.344-7.812-5.688-5.531c-0.187-0.203-0.391-0.469-0.391-0.75 0-0.469 0.484-0.656 0.875-0.719l7.844-1.141 3.516-7.109c0.141-0.297 0.406-0.641 0.766-0.641s0.625 0.344 0.766 0.641l3.516 7.109 7.844 1.141c0.375 0.063 0.875 0.25 0.875 0.719z"></path> </symbol> <linearGradient id="grad"> <stop offset="50%" stop-color="#ffc41f"/> <stop offset="50%" stop-color="#9f9f9f"/> </linearGradient> </defs> </svg> <form class="stars"> <input class="stars-input" type="radio" name="rating" value="5" id="rating-5-1145175" > <label class="stars-view stars-view-5-1145175 " for="rating-5-1145175" onclick="handleRate(1145175, 5, 0, 'stars-view-5-1145175', this)"> <svg class="icon icon-star"> <use xlink:href="#icon-star"></use> </svg> </label> <input class="stars-input" type="radio" name="rating" value="4" id="rating-4-1145175" > <label class="stars-view stars-view-4-1145175 " for="rating-4-1145175" onclick="handleRate(1145175, 4, 0, 'stars-view-4-1145175', this)"> <svg class="icon icon-star"> <use xlink:href="#icon-star"></use> </svg> </label> <input class="stars-input" type="radio" name="rating" value="3" id="rating-3-1145175" > <label class="stars-view stars-view-3-1145175 " for="rating-3-1145175" onclick="handleRate(1145175, 3, 0, 'stars-view-3-1145175', this)"> <svg class="icon icon-star"> <use xlink:href="#icon-star"></use> </svg> </label> <input class="stars-input" type="radio" name="rating" value="2" id="rating-2-1145175" > <label class="stars-view stars-view-2-1145175 " for="rating-2-1145175" onclick="handleRate(1145175, 2, 0, 'stars-view-2-1145175', this)"> <svg class="icon icon-star"> <use xlink:href="#icon-star"></use> </svg> </label> <input class="stars-input" type="radio" name="rating" value="1" id="rating-1-1145175" > <label class="stars-view stars-view-1-1145175 " for="rating-1-1145175" onclick="handleRate(1145175, 1, 0, 'stars-view-1-1145175', this)"> <svg class="icon icon-star"> <use xlink:href="#icon-star"></use> </svg> </label> </form> <div class="rating-raters-1145175"> 0 vote </div> </div> <script defer async> function setFullStar(halfStarElement) { halfStarElement.classList.add('star-chosen') } function setRaters(ratersElement, raters) { ratersElement.textContent = raters > 1 ? `${raters} votes` : `${raters} vote` } function createToaster() { const toaster = document.createElement('div') toaster.classList.add('rating-toaster') document.body.appendChild(toaster) return toaster } function showToast(message, status) { const toaster = createToaster() toaster.textContent = message toaster.classList.add('show-rating-toaster') if (status === "success") { toaster.style.backgroundColor = "#E5F4EF" toaster.style.color = "#1D8C65" } else { toaster.style.backgroundColor = "#FFB5B5" toaster.style.color = "#6F0000" } setTimeout(() => { toaster.classList.remove('show-rating-toaster') }, 3000) } async function rate(postID, value, halfStarClass, node) { const res = await fetch(`/api/section-container/rate/${postID}/${value}`, { method: "POST", headers: { "Content-Type": "application/json", }, credentials: 'include', }) if (res.ok) { const data = await res.json() const ratersNumber = document.querySelector(`.rating-raters-${postID}`) setRaters(ratersNumber, data.raters) showToast("Votre vote est pris en compte","success") if (node.classList.contains("half-star")) { const halfStarElement = document.querySelector(`.${halfStarClass}`) setFullStar(halfStarElement) } } return res } function handleUserLogin() { return window.open( `${window.location.origin}/comments/fr/fetch/user`, "loginob", "width=400,height=450,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0,titlebar=0" ) } async function handleRate(postID, value, halfStar, halfStarClass, node) { const isPreview = /\/preview\/|\.preview\./.test(window.location.href) if (isPreview) { showToast("Vous ne pouvez pas votez sur une preview de votre blog.","error") return } try { const rateResponse = await rate(postID, value, halfStarClass, node) if (rateResponse.status === 401) { const loginWindow = handleUserLogin() const checkWindowClosed = setInterval(() => { if (loginWindow && loginWindow.closed) { clearInterval(checkWindowClosed) const res = rate(postID, value, halfStarClass) if (res.status !== 200) { showToast("Une erreur est survenue lors du vote","error") } } }, 1000) } } catch (e) { showToast("Une erreur est survenue lors du vote","error") } } </script> </div> </div> <div class="ads_container-atf"> </div> </div> </div> <div class="right-zone"> <div class="side-zone"> <div class="ob-widgets"> <div class="ob-widget ob-widget_search" > <div class="ob-h3 ob-widget_search_title ob-widget_title"> Recherche </div> <form action="/search" method="post"> <input type="text" name="q" placeholder="Recherche..." class="ob-widget_search_input" /> <input type="submit" value="Recherche" class="ob-widget_search_submit" /> </form> </div> <div class="ads-container half_page"> <div class="ads-placeholder"> <span>Publicité</span> </div> <div id="_d9711b1"></div> </div> <div class="ob-widget ob-widget_archives"> <div class="ob-widget_archives_title ob-widget_title ob-h3"> Archives </div> <ul id="ob-widget_archives_list"> <li class="ob-widget_archives_year-list" data-year="2006"> <div class="ob-widget_archives_year">2006<span class="ob-widget_archives_trigger"></span></div> <ul class="ob-widget_archives_month-list"> <li><a href="/archive/2006-09/">Septembre</a> (1)</li> <li><a href="/archive/2006-07/">Juillet</a> (3)</li> </ul> </li> </ul> </div> <script> var years = document.querySelectorAll(".ob-widget_archives_year") var monthList = document.querySelectorAll(".ob-widget_archives_month-list") function setMaxHeight(month) { month.style.maxHeight = month.clientHeight + "px" } function handleClick(e) { var target = e.target.nextElementSibling if (target) { e.target.classList.toggle("ob-widget_archives--open") target.classList.toggle("ob-archives-hidden") } } document.addEventListener("DOMContentLoaded", function() { monthList.forEach(function(month) { setMaxHeight(month) month.classList.add("ob-archives-hidden") }) years.forEach((year) => { year.addEventListener("click", handleClick) }) }) </script> <div class="ob-widget ob-widget_rss"> <div class="ob-widget_rss_element ob-widget_social-share"> <a class="ob-widget_rss_link" href="/rss" target="_blank"> <i class="fa-solid fa-rss"></i> <span>Flux RSS</span> </a> </div> </div> </div> </div> </div> </div> </div> </div> <div class="ads-container super_leaderboard"> <div class="ads-placeholder"> <span>Publicité</span> </div> <div id="_149b41a"></div> </div> <script> document.addEventListener("DOMContentLoaded", function () { function createDropdownTrigger() { var trigger = document.createElement("span") trigger.classList.add("trigger") return trigger } function addTriggers() { var elementsToTriggers = document.querySelectorAll(".menu-main .branch > a, .menu-main .branch > span") elementsToTriggers.forEach(function (elementToTrigger) { elementToTrigger.insertAdjacentElement("afterend", createDropdownTrigger()) }) } addTriggers() }) </script> <div class="ob-footer ob-footer-padded" id="legals" > <ul> <li class="ob-footer-item"><a href="https://www.canalblog.com/" target="_blank">Créer un blog gratuit sur CanalBlog</a></li> <li class="ob-footer-item"><a href="/top">Top articles</a></li> <li class="ob-footer-item"><a href="/contact">Contact</a></li> <li class="ob-footer-item"><a href="https://www.canalblog.com/abuse/49104"> Signaler un abus </a></li> <li class="ob-footer-item"><a href="https://www.canalblog.com/cf/tos.cfm" target="_blank">C.G.U.</a></li> <li class="ob-footer-item"><a href="https://www.canalblog.com/cf/cookies.cfm" target="_blank">Cookies et données personnelles</a></li> <li class="ob-footer-item"><a href="javascript:Didomi.notice.show()">Préférences cookies</a></li> </ul> </div> <script defer async> document.addEventListener('DOMContentLoaded', function() { async function syncRating() { const isPreview = /\/preview\/|\.preview\./.test(window.location.href) if (isPreview) { return } const res = await fetch(`/api/section-container/rates`, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ id: [1145178,1145177,1145175], }) }) if (res.ok) { const data = await res.json() Object.keys(data).forEach(function(key) { const postRate = data[key] const input = document.querySelector(`#rating-${Math.ceil(postRate.rate)}-${key}`) input.checked = true // check if it's half-star rate if (!Number.isInteger(postRate.rate)) { const label = document.querySelector(`.stars-view-${Math.ceil(postRate.rate)}-${key}`) label.classList.add("half-star") } const ratersEl = document.querySelector(`.rating-raters-${key}`) ratersEl.textContent = postRate.raters > 1 ? `${postRate.raters} votes` : `${postRate.raters} vote` }) } } syncRating() }) </script> <div id="_f9f4407"></div><div id="_fed06be"></div> <script> (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer', "GTM-WG3SK3P"); </script> </body> </html>