From d7f7182579316eb8350265fe9a110de6a0e5db86 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Fri, 8 Sep 2006 02:32:19 -0500 Subject: [PATCH] Initial commit of theme for Planet Musings --- themes/musings/config.ini | 18 ++ themes/musings/default.css | 382 ++++++++++++++++++++++++++++++++ themes/musings/images/venus.ico | Bin 0 -> 894 bytes themes/musings/images/venus.png | Bin 0 -> 570 bytes themes/musings/index.html.xslt | 249 +++++++++++++++++++++ themes/musings/personalize.js | 220 ++++++++++++++++++ 6 files changed, 869 insertions(+) create mode 100644 themes/musings/config.ini create mode 100644 themes/musings/default.css create mode 100644 themes/musings/images/venus.ico create mode 100644 themes/musings/images/venus.png create mode 100644 themes/musings/index.html.xslt create mode 100644 themes/musings/personalize.js diff --git a/themes/musings/config.ini b/themes/musings/config.ini new file mode 100644 index 0000000..76f6ecc --- /dev/null +++ b/themes/musings/config.ini @@ -0,0 +1,18 @@ +[Planet] +template_files: + atom.xml.xslt + foafroll.xml.xslt + opml.xml.xslt + index.html.xslt + +template_directories: + ../common + +bill_of_materials: + default.css + personalize.js + images/feed-icon-10x10.png + images/opml.png + images/foaf.png + images/venus.png + images/venus.ico diff --git a/themes/musings/default.css b/themes/musings/default.css new file mode 100644 index 0000000..dc26fe4 --- /dev/null +++ b/themes/musings/default.css @@ -0,0 +1,382 @@ +/* + * Written by Stefano Mazzocchi + */ + +/* ----------------------------- Global Definitions -------------------- */ + +body { + margin: 0px; + padding: 0px; + color: #222; + background-color: #fff; + quotes: "\201C" "\201E" "\2018" "\2019"; +} + +a:link { + color: #222; +} + +a:visited { + color: #555; +} + +h1 { + font-size: 1.75em; + text-transform: uppercase; + letter-spacing: 0.25em; + padding: 10px; + margin: 0px 0px 0px 0px; + color: #FFF; + font-weight: normal; + background-color: #036; + border-bottom: 2px solid #bbb +} + +/* ----------------------------- Sidebar --------------------------- */ + +#sidebar { + float: right; + top: 150px; + right: 0px; + width: 11em; + background-color: white; + padding: 0px 10px 20px 0px; + margin: 0px 0px 20px 20px; + border-left: 1px solid #ccc; + border-bottom: 1px solid #ccc; +} + +#sidebar h2 { + letter-spacing: 0.15em; + text-transform: uppercase; + font-size: .9em; + background-color: #BCD; + color: #222; + font-weight: bold; + padding: 3px 0px 2px 4px; + margin: 15px 0px 5px 10px; + border: 1px solid #ccc; +} + +#sidebar p { + font-size: .8em; + padding-left: 20px; + padding-right: 5px; +} + +#sidebar ul { + font-family: sans-serif; + margin-left: 5px; + padding-left: 25px; +} + +#sidebar li { + margin-left: 0px; + text-indent: -15px; + list-style-type: none; + font-size: .8em; + line-height: 1.2em; +} + +#sidebar ul li a { + text-decoration: none; +} + +#sidebar ul li a:hover { + text-decoration: underline; +} + +#sidebar img { + border: 0; +} + +#sidebar dl { + font-size: .8em; + padding-left: 1.0em; +} + +#sidebar dl ul { + padding-left: 1em; +} + +#sidebar dt { + margin-top: 1em; + font-weight: bold; + padding-left: 1.0em; +} + +#sidebar dd { + margin-left: 2.5em; +} + +#sidebar .message { + cursor: help; + border-bottom: 1px dashed red; +} + +#sidebar a:active, +#sidebar a:hover { + color: #FFCC66; +} + +#sidebar a.message:hover { + cursor: help; + background-color: #ffD0D0; + color:#000; + border: 1px dashed red !important; + text-decoration: none !important; +} +#sidebar dl a { + text-decoration:none; +} + +/* ----------------------------- Body ---------------------------- */ + +#body { + margin-top: 10px; +} + +.admin { + text-align: right; +} + +#body h2.date { + text-transform: none; + font-size: 1em; + color: #222; + font-weight: bold; + text-align: right; + border-top: 1px solid #ccc; + background-color: #BCD; + border-bottom: 1px solid #ccc; + padding: 3px 15px 2px 5px; + max-width:43em; + margin: 0; +} + +/* ----------------------------- News ---------------------------- */ + +.news { + margin: 30px 10px 30px 10px; + clear: left; +} + +.news h3 { + margin: 0 0 .5em 0; + padding: 0px; + font-size: 1.5em; +} +.news h3 a { + color:#036; + text-decoration:none; +} + +.news .content { + margin: 5px 5px 5px 15px; + padding: 0px 1em 1em 1em; + border-left: 1px solid #ccc; + border-bottom: 1px solid #ccc; + border-right: 1px solid #ccc; + line-height: 1.5em; + font-size: 1em; + font-family: sans-serif; + max-width:40em; +} + +.news .links { + +} + +.news .permalink { + text-align: right; +} + +.news .icon { + height: 1em; + width: 1em; + border: 0; + bottom: 0; +} + +/* ----------------------------- News Content ---------------------------- */ + +.news .content p { + line-height: 1.2em; +} + +.news .content img { + margin: 5px; +} + +.news .content blockquote { + margin: 10px 35px 10px 35px; + padding: 5px; +} + +.news .content pre { + font-family: monospace; + border: 1px solid #ddd; + padding: 10px; + margin: 10px 20px 10px 20px; + background-color: #f8f8f8; + overflow: auto; +} +.news .content code { + font-family: monospace; +} + +.news .content ul, .news .content ol { + margin: 5px 35px 5px 35px; + padding: 5px; + counter-reset: item; +} + +.news .content ul > ul, .news .content ul > ol, .news .content ol > ul, .news .content ol > ol { + margin: 0px 0px 0px 35px; + padding: 0px; +} + +.news .content li { + padding: 1px; + line-height: 1.2em; +} + +.news code { + font-family: large; +} + +.news .content :link, +.news .content :visited { + text-decoration: none; + font-weight:bold; + color:#036; +} +.news .content p:hover a, +.news .content dt:hover a, +.news .content dd:hover a, +.news .content li:hover a { + text-decoration: underline; +} + +.news :link:active, +.news :visited:active, +.news :link:hover, +.news :visited:hover { + color: #FFCC66; +} + +/* --------------------------- Accomodations ----------------------- */ + +/* Cosmic Variance */ +.alignright { + float:right; +} +.alignleft { + float:left; +} +img.alignright { + padding: 4px; + margin: 0 0 2px 7px; + display: inline; +} +img.centered { + display: block; + margin-left: auto; + margin-right: auto; +} +/* Backreaction */ +div.content:hover a, +div.permalink:hover a { + text-decoration:underline; +} + +/* Musings/String Coffee Table */ +math[display=block] {overflow:auto;} +math { white-space: nowrap } +.eqno {float:right} +merror {display:inline;font-size:1em;} +img.mathlogo, img.svglogo { + float:right; + border:0 +} +.footnote {font-size: .9em} +.update h4 { + display:inline; + font-size:1em; + font-weight:bold; +} + +/* Bosker Blog */ +p.center {text-align:center} + +/* boing boing */ +br { + clear: none !important; +} + +/* engadget */ +h6 { + clear: left !important; +} + +/* cadenhead */ +p.sourcecode { + font-family: monospace; + border: 1px solid #ddd; + padding: 10px; + margin: 10px 20px 10px 20px; + background-color: #f8f8f8; + overflow: auto; +} + +/* programmableweb */ +.imgRight { + float: right; +} + +/* gizmodo */ +img.left { + float: left; +} + +/* gizmodo */ +img.right { + float: right; +} + +/* gizmodo */ +img.center { + display: block; + margin-left: auto; + margin-right: auto; +} + +/* wikipedia */ +table { + width: auto !important; +} + +/* del.icio.us */ +.delicious-tags { + font-size: .8em; + text-align: right; +} + +/* ----------------------------- Footer ---------------------------- */ + +#footer { + padding: 0px; + margin: 30px 0px 50px 50px; +} + +#footer p { + padding: 2px 2px 2px 5px; + background-color: #ccc; + border-top: 1px solid #aaa; + border-bottom: 1px solid #aaa; + border-left: 1px solid #aaa; + letter-spacing: 0.15em; + text-transform: uppercase; + text-align: left; +} + diff --git a/themes/musings/images/venus.ico b/themes/musings/images/venus.ico new file mode 100644 index 0000000000000000000000000000000000000000..59aebe6632c914c0770657ec8dc0aa19f259276f GIT binary patch literal 894 zcmZ`%TThY!82(y+psUtpH*H;2%YmXCOhgQmX~(T~vV*0W2TZ^~G%{2a2{jTBo>2NBCANnUk;n#D~#g$kr9-bxCw>wKE zLT*_xQ&h=P)HBseno3Ezc_U5Pl4CTT!@X^TBmTg|3*zm{^4F2kN1|r=QE??lCSAbhDKOLIp4?bo(4bqhsTt21DmDX-%G7nyYEcHR|@8Ol@{@sCpZ zJa$D%*445sNj0xgR;X+)?Ci?1SkqCIg5xP(Z;HpmK+xkLDuuoHz?i_)EzqitG>F+^ z0b5$jyCLVPRGE4`#qQXRV!Pa)6x79afaS2O$3J3m4m=Hqx;^j}bqil2WQl56QVFX` zk)hF0boxCO+a4!Ob;5i*Sl8F@3r@VATX^$+&g%2DSd8bDO?mR`8)3DYrq!nE4YXb} z)8^pXou^=|ZRp_x;?<{>)y3tdsqhTw?^oEYB?iM`lQG+7O9w$FjPNn+H14kO^(lsi zUC*b8g~)0w9*f5#(dcBDFyHm7U|fWu`7WH{_3`@sWrKsNz+=ngGe1GhEPPu0{(WtI zo%~XACAzfy>fPM<^h}Y;da=tvhdl@JyU5h^ScrHT{rqwD%a>SeBb-bEz^`8bP|`~B ba_>q#Ge0|09EUta?No4bAk%A_P)f=0>XZ6dBBH zu-r7?W7Tx0jdLv4Og324uQR1kW5c{=f}swP!V^)*3W$ke+Io25tgezcoi)?#)=joP zxWQ-7N{1!=*6pRHQ|rwZG?|{-HJ3aOV@(D4qZ*fXDtq|qrPF!QdW*ZwcP_Hsv)pNM zuWfOH@$#vTE4xjmR~S8ibd#8Tg*6T1&%>DUNxRbVKUyi>)0hK{ + + + + + + + + + + + <xsl:value-of select="atom:title"/> + + + + + + + + + + + + + +

+ + + + + +
+ + +
+ + +
+ + + + + + +

+ + , + +

+
+ + +
+ + + + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + +

+ + + +
+ + + + + + + + + + + + +
+
+ +
+ + + + + + + + + + + + + + + +
+ + + + + + +
+
+ + + + + + + + + + + + diff --git a/themes/musings/personalize.js b/themes/musings/personalize.js new file mode 100644 index 0000000..83db3a3 --- /dev/null +++ b/themes/musings/personalize.js @@ -0,0 +1,220 @@ +var entries = []; // list of news items + +var days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", + "Friday", "Saturday"]; +var months = ["January", "February", "March", "April", "May", "June", "July", + "August", "September", "October", "November", "December"]; + +// event complete: stop propagation of the event +function stopPropagation(event) { + if (event.preventDefault) { + event.preventDefault(); + event.stopPropagation(); + } else { + event.returnValue = false; + } +} + +// scroll back to the previous article +function prevArticle(event) { + for (var i=entries.length; --i>=0;) { + if (entries[i].anchor.offsetTop < document.documentElement.scrollTop) { + window.location.hash=entries[i].anchor.id; + stopPropagation(event); + break; + } + } +} + +// advance to the next article +function nextArticle(event) { + for (var i=1; i document.documentElement.scrollTop) { + window.location.hash=entries[i].anchor.id; + stopPropagation(event); + break; + } + } +} + +// process keypresses +function navkey(event) { + var checkbox = document.getElementById('navkeys'); + if (!checkbox || !checkbox.checked) return; + + if (!event) event=window.event; + key=event.keyCode; + + if (!document.documentElement) return; + if (!entries[0].anchor || !entries[0].anchor.offsetTop) return; + + if (key == 'J'.charCodeAt(0)) nextArticle(event); + if (key == 'K'.charCodeAt(0)) prevArticle(event); +} + +// create (or reset) a cookie +function createCookie(name,value,days) { + if (days) { + var date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + var expires = "; expires="+date.toGMTString(); + } + else expires = ""; + document.cookie = name+"="+value+expires+"; path=/"; +} + +// read a cookie +function readCookie(name) { + var nameEQ = name + "="; + var ca = document.cookie.split(';'); + for(var i=0;i < ca.length;i++) { + var c = ca[i]; + while (c.charAt(0)==' ') c = c.substring(1,c.length); + if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); + } + return null; +} + +// each time the value of the option changes, update the cookie +function selectOption() { + var checkbox = document.getElementById('navkeys'); + if (!checkbox) return; + createCookie("navkeys", checkbox.checked?'true':'false', 365); +} + +// add navkeys option to sidebar +function addOption(event) { + if (entries.length > 1 && entries[entries.length-1].parent.offsetTop > 0) { + var sidebar = document.getElementById('sidebar'); + if (!sidebar) return; + + for (var i=entries.length; --i>=0;) { + var a = entries[i].anchor = document.createElement('a'); + a.id = "news-" + i; + entries[i].parent.insertBefore(a, entries[i].parent.firstChild); + } + + var h2 = document.createElement('h2'); + h2.appendChild(document.createTextNode('Options')); + sidebar.appendChild(h2); + + var form = document.createElement('form'); + var p = document.createElement('p'); + var input = document.createElement('input'); + input.type = "checkbox"; + input.id = "navkeys"; + p.appendChild(input); + var a = document.createElement('a'); + a.title = "Navigate entries"; + a.appendChild(document.createTextNode('Enable ')); + var code = document.createElement('code'); + code.appendChild(document.createTextNode('J')); + a.appendChild(code); + a.appendChild(document.createTextNode(' and ')); + code = document.createElement('code'); + code.appendChild(document.createTextNode('K')); + a.appendChild(code); + a.appendChild(document.createTextNode(' keys')); + p.appendChild(a); + form.appendChild(p); + sidebar.appendChild(form); + + var cookie = readCookie("navkeys"); + if (cookie && cookie == 'true') input.checked = true; + input.onclick = selectOption; + document.onkeydown = navkey; + } +} + +// convert date to local time +var localere = /^(\w+) (\d+) (\w+) \d+ 0?(\d\d?:\d\d):\d\d ([AP]M) (EST|EDT|CST|CDT|MST|MDT|PST|PDT)/; +function localizeDate(element) { + var date = new Date(); + date.setTime(Date.parse(element.innerHTML + " GMT")); + + var local = date.toLocaleString(); + var match = local.match(localere); + if (match) { + element.innerHTML = match[4] + ' ' + match[5].toLowerCase(); + element.title = match[6] + " \u2014 " + + match[1] + ', ' + match[3] + ' ' + match[2]; + return days[date.getDay()] + ', ' + months[date.getMonth()] + ' ' + + date.getDate() + ', ' + date.getFullYear(); + } else { + element.title = element.innerHTML + ' GMT'; + element.innerHTML = local; + return days[date.getDay()] + ', ' + date.getDate() + ' ' + + months[date.getMonth()] + ' ' + date.getFullYear(); + } + +} + +// find entries (and localizeDates) +function findEntries() { + + var span = document.getElementsByTagName('span'); + + for (var i=0; i