From: joerg Date: Sat, 20 Dec 2008 20:15:28 +0000 (+0000) Subject: - Use django template for index.html X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=64c0de03b96e78b62ba1190ceb5fcffe909c16d3;p=deb%2Fhackedgotchi.git - Use django template for index.html - move files into a common/ dir which we can easily symlink to new planets - add a template config for language based planets git-svn-id: svn+ssh://svn.debian.org/svn/planet-debian/trunk@1057 c2f067bf-98e0-425f-9c98-e76020cfa380 --- diff --git a/config/config.ini b/config/config.ini index 0bf7ed1..afd0126 100644 --- a/config/config.ini +++ b/config/config.ini @@ -2,54 +2,68 @@ # Every planet needs a [Planet] section [Planet] -# name: Your planet's name -# link: Link to the main page -# owner_name: Your name -# owner_email: Your e-mail address +# name: Your planet's name. +# link: Link to the main planet page name = Planet Debian link = http://planet.debian.org/ + +# output_dir: Directory to place output files. Add your 2letter Language code +# date_format: strftime format for the default 'date' template variable +# new_date_format: strftime format for the 'new_date' template variable +# cache_directory: Where cached feeds are stored. Add your 2letter Language code +output_dir = www +date_format = %d %B, %Y %I:%M%p +new_date_format = %B %d, %Y +cache_directory = cache + +# Translate the following to your language. Do not change the names, just the +# text after the = +syndicationtext = A complete feed is available in any of your favourite syndication formats linked by the buttons below. +searchtext = Search +lastupdatetext = Last updated: +utctext = All times are UTC. +contacttext = Contact: +hiddenfeedstext = Hidden Feeds +hiddenfeedstext2 = You currently have hidden entries. +showalltext = Show all +subscriptionstext = Subscriptions +feedtext = feed + + +# Do not change config values below here, just skip to the feeds +# Do not change config values below here, just skip to the feeds owner_name = Debian Planet Maintainers owner_email = planet@debian.org -# cache_directory: Where cached feeds are stored +search = true # new_feed_items: Number of items to take from new feeds # log_level: One of DEBUG, INFO, WARNING, ERROR or CRITICAL -cache_directory = cache new_feed_items = 1 log_level = DEBUG spider_threads = 15 # template_files: Space-separated list of output template files -template_files = templates/index.html.tmpl templates/atom.xml.tmpl templates/rss20.xml.tmpl templates/rss10.xml.tmpl templates/opml.xml.tmpl templates/foafroll.xml.tmpl +template_files = templates/index.html.dj templates/atom.xml.tmpl templates/rss20.xml.tmpl templates/rss10.xml.tmpl templates/opml.xml.tmpl templates/foafroll.xml.tmpl # The following provide defaults for each template: -# output_dir: Directory to place output files # items_per_page: How many items to put on each page # days_per_page: How many complete days of posts to put on each page # This is the absolute, hard limit (over the item limit) -# date_format: strftime format for the default 'date' template variable -# new_date_format: strftime format for the 'new_date' template variable # encoding: output encoding for the file, Python 2.3+ users can use the # special "xml" value to output ASCII with XML character references # locale: locale to use for (e.g.) strings in dates, default is taken from your # system -output_dir = www items_per_page = 60 days_per_page = 0 -date_format = %d %B, %Y %I:%M%p -new_date_format = %B %d, %Y encoding = utf-8 # locale = C - -# To define a different value for a particular template you may create -# a section with the same name as the template file's filename (as given -# in template_files). - -# Provide no more than 7 days articles on the front page [templates/index.html.tmpl] date_format = %I:%M%P +[templates/index.html.dj] +date_format = %I:%M%P + # Options placed in the [DEFAULT] section provide defaults for the feed # sections. Placing a default here means you only need to override the diff --git a/config/config.ini.tmpl b/config/config.ini.tmpl new file mode 100644 index 0000000..b5238b0 --- /dev/null +++ b/config/config.ini.tmpl @@ -0,0 +1,120 @@ +# Planet configuration file + +# The following rules apply for a new language planet: +# +# * The feeds contain the same content as one would put on planet.debian.org, +# ie. mostly Debian related / from people involved in Debian +# +# * The feeds provide an own category with only the language for this planet. +# +# * At least 10 feeds have to be there before a new language gets added. +# +# * Language planets will appear as planet.debian.org/$LANGUAGE, +# where $LANGUAGE will be the two-letter code for it. + + +# Little documentation for multi-language planet: + +# In the following, above "Do not change", replace $LANGUAGE with the +# name of your language, $2LETTERCODE with the 2 letter iso code. +# For example, a german planet would use Deutsch and DE. +# Feel free to edit the other values as shown. +# Please do not touch the config values below "Do not change", just +# skip to the feed list. + +# When you are done, send this file to planet@debian.org and ask for the +# addition of the new language planet. Do NOT just commit it, it won't get +# picked up by the scripts. + +# After the new language is activated, feel free to edit this file following +# the normal rules for all planet config.ini files. + +# Hint: You can use hackergotchis the same way as on main planet. But it is +# *one* central storage for hackergotchis, not one per different language. + + +# Every planet needs a [Planet] section +[Planet] +# name: Your planet's name. +name = Planet Debian $LANGUAGE +# link: Link to the main planet page +link = http://planet.debian.org/$2LETTERCODE/ + +# output_dir: Directory to place output files. Add your 2letter Language code +output_dir = www/$2LETTERCODE +# date_format: strftime format for the default 'date' template variable +date_format = %d %B, %Y %I:%M%p +# new_date_format: strftime format for the 'new_date' template variable +new_date_format = %B %d, %Y +# cache_directory: Where cached feeds are stored. Add your 2letter Language code +cache_directory = cache/$2LETTERCODE + +# Translate the following to your language. Do not change the names, just the +# text after the = +syndicationtext = A complete feed is available in any of your favourite syndication formats linked by the buttons below. +searchtext = Search +lastupdatetext = Last updated: +utctext = All times are UTC. +contacttext = Contact: +hiddenfeedstext = Hidden Feeds +hiddenfeedstext2 = You currently have hidden entries. +showalltext = Show all +subscriptionstext = Subscriptions +feedtext = feed + + +# Do not change config values below here, just skip to the feeds +# Do not change config values below here, just skip to the feeds +owner_name = Debian Planet Maintainers +owner_email = planet@debian.org + +# Currently no search for Language planets +search = false +# new_feed_items: Number of items to take from new feeds +# log_level: One of DEBUG, INFO, WARNING, ERROR or CRITICAL +new_feed_items = 1 +log_level = DEBUG +spider_threads = 15 + +# template_files: Space-separated list of output template files +template_files = templates/index.html.dj templates/atom.xml.tmpl templates/rss20.xml.tmpl templates/rss10.xml.tmpl templates/opml.xml.tmpl templates/foafroll.xml.tmpl + +# The following provide defaults for each template: +# items_per_page: How many items to put on each page +# days_per_page: How many complete days of posts to put on each page +# This is the absolute, hard limit (over the item limit) +# encoding: output encoding for the file, Python 2.3+ users can use the +# special "xml" value to output ASCII with XML character references +# locale: locale to use for (e.g.) strings in dates, default is taken from your +# system +items_per_page = 60 +days_per_page = 0 +encoding = utf-8 +# locale = C + +[templates/index.html.dj] +date_format = %I:%M%P + + +# Options placed in the [DEFAULT] section provide defaults for the feed +# sections. Placing a default here means you only need to override the +# special cases later. +[DEFAULT] +# Hackergotchi default size. +# If we want to put a face alongside a feed, and it's this size, we +# can omit these variables. +facewidth = 65 +faceheight = 85 +future_dates = ignore_date + + +############################## FEEDS ############################## +# +# ADD YOURSELF IN ALPHABETICAL ORDER BELOW +# +################################################################### + +# The URL of the feed goes in the []s. +# name = Your name +# face = filename of your hackergotchi in heads (or leave out entirely) +# facewidth/faceheight = size of your hackergotchi, if not default diff --git a/templates/index.html.dj b/templates/index.html.dj new file mode 100644 index 0000000..951e0bb --- /dev/null +++ b/templates/index.html.dj @@ -0,0 +1,110 @@ + + + + {{ name }} + + + + + + + + + + + + + + +{% for item in Items %} +{% ifchanged item.new_date %} +

{{ item.new_date }}

+{% endifchanged %} + +
+ {% ifchanged item.channel_name %} + {% if item.channel_face %} + + hackergotchi for {{ item.channel_author|safe }} + + {% endif %} +

+ {{ item.channel_name|safe }} + +

+ + {% endifchanged %} +
+{% endfor %} + + + + + diff --git a/templates/index.html.tmpl b/templates/index.html.tmpl deleted file mode 100644 index 6719f6c..0000000 --- a/templates/index.html.tmpl +++ /dev/null @@ -1,118 +0,0 @@ - - - - - -<TMPL_VAR name> -"> - - - - - - - - - - - - - - - - - - - - - -

-
- - -
- -">" width="" height="" alt=""> - -

" title=""> - -

- - - -
- - - - - - diff --git a/www/atom.png b/www/atom.png deleted file mode 100644 index f181b35..0000000 Binary files a/www/atom.png and /dev/null differ diff --git a/www/boxless.css b/www/boxless.css deleted file mode 100644 index 69b1919..0000000 --- a/www/boxless.css +++ /dev/null @@ -1,209 +0,0 @@ -/* CSS for Planet Debian - * - * Yes, Planet *DEBIAN* ... please stop stealing our CSS for use on - * your own Planet! I'd like this to have a fairly distinctive look - * and there's a perfectly good CSS example included with the Planet - * source now. - * - * THIEVES! ADMINS! WE HATES THEM FOREVER! - * - * I'll set Andrew Suffield on you... - */ - -body { - /*font-size: 90%;*/ - - padding: 0 10px; - padding-top: 1px; - padding-bottom: 1em; - - border-right: 1px solid rgb(128, 128, 128); - - background-color: white; - color: black; - - margin: 0; - margin-right: 185px; -} - -h1 { - font-family: "Lucida Sans Unicode", sans-serif; - font-size: 175%; - - letter-spacing: -2px; - - color: rgb(215, 7, 81); - - padding: 0; - margin: 0; - margin-top: 1em; -} - - -div.channel { - padding: 0; - padding-bottom: 0.1em; - - margin: 0; - margin-top: 20px; -} - -div.channel img.face { - float: right; - border: none; -} - -div.channel h2 { - font-family: "Lucida Sans Unicode", sans-serif; - font-size: 150%; - - letter-spacing: -2px; - - padding: 0 0.25em; - - border-bottom: 1px solid black; - - margin: 0; -} - -div.channel h2 a { - text-decoration: none; - color: inherit; -} - - -div.entry { - padding: 0 5px; - - margin: 0; - margin-bottom: 20px; -} - -div.entry h3 { - font-family: "Bitstream Vera Sans", sans-serif; - font-size: 110%; - - color: rgb(32, 32, 32); - - padding: 0; - - border-bottom: 1px dashed black; - - margin: 0; - margin-top: 2px; -} - -div.entry h3 a { - text-decoration: none; - color: inherit; -} - -div.entry p.date { - font-family: sans-serif; - - color: rgb(64, 64, 64); - - padding: 0 10px; - - margin: 10px 0; -} - -div.entry p.date a { - text-decoration: none; - color: inherit; -} - - -div.content { - text-align: justify; - - padding: 0 20px; - - margin: 0; - margin-top: 5px; -} - -div.content h1 { font-size: 100%; } -div.content h2 { font-size: 100%; } -div.content h3 { font-size: 100%; } -div.content h4 { font-size: 100%; } -div.content h5 { font-size: 100%; } -div.content h6 { font-size: 100%; } - - -div#sidebar { - position: absolute; - top: 0px; - right: 0px; - width: 165px; - - font-family: sans-serif; - font-size: 80%; - - text-align: justify; - - padding: 0 10px; - - background-color: white; - - margin: 0; -} - -div#sidebar h1 { - font-family: "Bitstream Vera Sans", sans-serif; - font-size: 20px !important; - - text-transform: lowercase; - - margin-top: 30px; -} - -div#sidebar div#logo { - padding: 2px 0; - padding-left: 10px; - - border-top: 1px solid black; - border-bottom: 1px solid black; - - margin-left: -10px; -} - -div#sidebar h2 { - font-size: 100%; - - text-transform: uppercase; - - border-bottom: 1px dashed rgb(128, 128, 128); - - margin-top: 2em; -} - -div#sidebar img.button { - border: none; -} - -div#sidebar ul { - list-style-type: square; - - text-align: left; - - padding-left: 1.5em; - - margin-left: 0px; -} - -div#sidebar li a { - text-decoration: none; - color: inherit; -} - - -a:hover { - text-decoration: underline !important; - color: blue !important; -} - -/* Suggested by Daniel Silverstone */ -span.ljuser img { - border: 0px; -} diff --git a/www/common/atom.png b/www/common/atom.png new file mode 100644 index 0000000..f181b35 Binary files /dev/null and b/www/common/atom.png differ diff --git a/www/common/boxless.css b/www/common/boxless.css new file mode 100644 index 0000000..69b1919 --- /dev/null +++ b/www/common/boxless.css @@ -0,0 +1,209 @@ +/* CSS for Planet Debian + * + * Yes, Planet *DEBIAN* ... please stop stealing our CSS for use on + * your own Planet! I'd like this to have a fairly distinctive look + * and there's a perfectly good CSS example included with the Planet + * source now. + * + * THIEVES! ADMINS! WE HATES THEM FOREVER! + * + * I'll set Andrew Suffield on you... + */ + +body { + /*font-size: 90%;*/ + + padding: 0 10px; + padding-top: 1px; + padding-bottom: 1em; + + border-right: 1px solid rgb(128, 128, 128); + + background-color: white; + color: black; + + margin: 0; + margin-right: 185px; +} + +h1 { + font-family: "Lucida Sans Unicode", sans-serif; + font-size: 175%; + + letter-spacing: -2px; + + color: rgb(215, 7, 81); + + padding: 0; + margin: 0; + margin-top: 1em; +} + + +div.channel { + padding: 0; + padding-bottom: 0.1em; + + margin: 0; + margin-top: 20px; +} + +div.channel img.face { + float: right; + border: none; +} + +div.channel h2 { + font-family: "Lucida Sans Unicode", sans-serif; + font-size: 150%; + + letter-spacing: -2px; + + padding: 0 0.25em; + + border-bottom: 1px solid black; + + margin: 0; +} + +div.channel h2 a { + text-decoration: none; + color: inherit; +} + + +div.entry { + padding: 0 5px; + + margin: 0; + margin-bottom: 20px; +} + +div.entry h3 { + font-family: "Bitstream Vera Sans", sans-serif; + font-size: 110%; + + color: rgb(32, 32, 32); + + padding: 0; + + border-bottom: 1px dashed black; + + margin: 0; + margin-top: 2px; +} + +div.entry h3 a { + text-decoration: none; + color: inherit; +} + +div.entry p.date { + font-family: sans-serif; + + color: rgb(64, 64, 64); + + padding: 0 10px; + + margin: 10px 0; +} + +div.entry p.date a { + text-decoration: none; + color: inherit; +} + + +div.content { + text-align: justify; + + padding: 0 20px; + + margin: 0; + margin-top: 5px; +} + +div.content h1 { font-size: 100%; } +div.content h2 { font-size: 100%; } +div.content h3 { font-size: 100%; } +div.content h4 { font-size: 100%; } +div.content h5 { font-size: 100%; } +div.content h6 { font-size: 100%; } + + +div#sidebar { + position: absolute; + top: 0px; + right: 0px; + width: 165px; + + font-family: sans-serif; + font-size: 80%; + + text-align: justify; + + padding: 0 10px; + + background-color: white; + + margin: 0; +} + +div#sidebar h1 { + font-family: "Bitstream Vera Sans", sans-serif; + font-size: 20px !important; + + text-transform: lowercase; + + margin-top: 30px; +} + +div#sidebar div#logo { + padding: 2px 0; + padding-left: 10px; + + border-top: 1px solid black; + border-bottom: 1px solid black; + + margin-left: -10px; +} + +div#sidebar h2 { + font-size: 100%; + + text-transform: uppercase; + + border-bottom: 1px dashed rgb(128, 128, 128); + + margin-top: 2em; +} + +div#sidebar img.button { + border: none; +} + +div#sidebar ul { + list-style-type: square; + + text-align: left; + + padding-left: 1.5em; + + margin-left: 0px; +} + +div#sidebar li a { + text-decoration: none; + color: inherit; +} + + +a:hover { + text-decoration: underline !important; + color: blue !important; +} + +/* Suggested by Daniel Silverstone */ +span.ljuser img { + border: 0px; +} diff --git a/www/common/debian.png b/www/common/debian.png new file mode 100644 index 0000000..731736e Binary files /dev/null and b/www/common/debian.png differ diff --git a/www/common/favicon.ico b/www/common/favicon.ico new file mode 100644 index 0000000..8f4e75c Binary files /dev/null and b/www/common/favicon.ico differ diff --git a/www/common/foaf.png b/www/common/foaf.png new file mode 100644 index 0000000..df4d80e Binary files /dev/null and b/www/common/foaf.png differ diff --git a/www/common/hacker.png b/www/common/hacker.png new file mode 100644 index 0000000..5a2e185 Binary files /dev/null and b/www/common/hacker.png differ diff --git a/www/common/hide.js b/www/common/hide.js new file mode 100644 index 0000000..b659691 --- /dev/null +++ b/www/common/hide.js @@ -0,0 +1,186 @@ +/* Log to the console if we can: firebug firefox extension will view these */ +function log( txt) +{ + if ( window.console && window.console.log ) + { + window.console.log( txt ); + } +} + +/* create a cookie */ +function createCookie(name,value,days) +{ + var expires = ""; + if (days) + { + var date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + expires = "; expires="+date.toGMTString(); + } + document.cookie = name+"="+value+expires+"; path=/"; + log( "Created cookie: " + document.cookie ); +} + +/* 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; +} + +/* erase a cookie */ +function eraseCookie(name) +{ + log( "erasingCookie" ); + createCookie(name,"",-1); +} + +/* exclude entries from the same domain as the given URL */ +function exclude( site ) +{ + log( "Excluding: " + site ); + + domain = site.match( /:\/\/(\.*)([^/:]+)/ ); + domain = domain[2]?domain[2]:''; + + var val=readCookie('excludes'); + if ( !val ) + { + val = ''; + } + if ( val.length > 0 ) + { + val = val + ","; + } + val = val + domain + createCookie('excludes',val, 10); +} + +/* un-exclude host */ +function show( site ) +{ + domain = site.match( /:\/\/(\.*)([^/:]+)/ ); + domain = domain[2]?domain[2]:''; + + log( "Showing " + site ); + + /* get the cookie */ + var val=readCookie('excludes'); + if ( !val ) { val = ''; } + + /* new cookie value */ + var n = ''; + + hosts=val.split( ',' ); + for( var i=0 ; i < hosts.length; i++ ) + { + /* the currently excluded host isn't the one we're to show now - so keep it */ + if ( hosts[i] != domain ) + { + if ( n.length > 0 ) { n = n + ',' ; } + n += hosts[i]; + } + else + { + /* the currently excluded host is now supposed to be visible.. */ + c = getElementsByClassNamePrefix( hosts[i] ); + for ( var j = 0; j < c.length; j++ ) + { + showDiv(c[j].id ); + showInlineDiv( ( c[j].id + "_hide" ) ) + hideDiv( ( c[j].id + "_show" ) ) + } + } + } + /* set new cookie */ + createCookie('excludes',n, 10); +} + +/* avoid excluding any sites : clear the cookie */ +function excludeNone() +{ + eraseCookie( 'excludes' ); + window.location.reload(); + hideDiv( 'unhide-all' ); +} + +/* hide the given div, if possible */ +function hideDiv( id ) { + i = document.getElementById(id); + if ( i ) + { + log( "Setting div " + id + " -> display:none;" ); + i.style.display="none"; + } +} + +/* show the given div */ +function showDiv( id ) { + i = document.getElementById(id); + if ( i ) + { + log( "Setting div " + id + " -> display:block;" ); + i.style.display="block"; + } +} +function showInlineDiv( id ) { + i = document.getElementById(id); + if ( i ) + { + log( "Setting div " + id + " -> display:inline;" ); + i.style.display="inline"; + } +} + +/* get elements with a class starting with the given name */ +function getElementsByClassNamePrefix(classname) { + var els = document.getElementsByTagName("*"); + var c = new RegExp("/b^|" + classname ); + final = new Array(); + var n=0; + for (var i=0; i < els.length; i++) { + if (els[i].className) { + if(c.test(els[i].className)) { + final[n] = els[i]; + n++; + } + } + } + return final; +} + +/* hide all the hosts we're supposed to */ +function hideHosts() +{ + var excl=readCookie( 'excludes'); + if ( ! excl ) { excl='' ; } + hosts=excl.split( ',' ); + + for ( var i = 0; i < hosts.length; i++ ) + { + // ok so we have a host. should we hide it? + if ( hosts[i] ) + { + c = getElementsByClassNamePrefix( hosts[i] ); + for ( var j = 0; j < c.length; j++ ) + { + hideDiv(c[j].id ); + showInlineDiv( ( c[j].id + "_show" ) ) + hideDiv( ( c[j].id + "_hide" ) ) + + showDiv( 'unhide-all' ); + } + } + } +} + diff --git a/www/common/minus-8.png b/www/common/minus-8.png new file mode 100644 index 0000000..8fe9a8d Binary files /dev/null and b/www/common/minus-8.png differ diff --git a/www/common/opml.png b/www/common/opml.png new file mode 100644 index 0000000..cf7ff01 Binary files /dev/null and b/www/common/opml.png differ diff --git a/www/common/planet.png b/www/common/planet.png new file mode 100644 index 0000000..9606a0c Binary files /dev/null and b/www/common/planet.png differ diff --git a/www/common/plus-8.png b/www/common/plus-8.png new file mode 100644 index 0000000..c4b2097 Binary files /dev/null and b/www/common/plus-8.png differ diff --git a/www/common/rss10.png b/www/common/rss10.png new file mode 100644 index 0000000..60b60ff Binary files /dev/null and b/www/common/rss10.png differ diff --git a/www/common/rss20.png b/www/common/rss20.png new file mode 100644 index 0000000..93c1dec Binary files /dev/null and b/www/common/rss20.png differ diff --git a/www/debian.png b/www/debian.png deleted file mode 100644 index 731736e..0000000 Binary files a/www/debian.png and /dev/null differ diff --git a/www/favicon.ico b/www/favicon.ico deleted file mode 100644 index 8f4e75c..0000000 Binary files a/www/favicon.ico and /dev/null differ diff --git a/www/foaf.png b/www/foaf.png deleted file mode 100644 index df4d80e..0000000 Binary files a/www/foaf.png and /dev/null differ diff --git a/www/hacker.png b/www/hacker.png deleted file mode 100644 index 5a2e185..0000000 Binary files a/www/hacker.png and /dev/null differ diff --git a/www/hide.js b/www/hide.js deleted file mode 100644 index b659691..0000000 --- a/www/hide.js +++ /dev/null @@ -1,186 +0,0 @@ -/* Log to the console if we can: firebug firefox extension will view these */ -function log( txt) -{ - if ( window.console && window.console.log ) - { - window.console.log( txt ); - } -} - -/* create a cookie */ -function createCookie(name,value,days) -{ - var expires = ""; - if (days) - { - var date = new Date(); - date.setTime(date.getTime()+(days*24*60*60*1000)); - expires = "; expires="+date.toGMTString(); - } - document.cookie = name+"="+value+expires+"; path=/"; - log( "Created cookie: " + document.cookie ); -} - -/* 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; -} - -/* erase a cookie */ -function eraseCookie(name) -{ - log( "erasingCookie" ); - createCookie(name,"",-1); -} - -/* exclude entries from the same domain as the given URL */ -function exclude( site ) -{ - log( "Excluding: " + site ); - - domain = site.match( /:\/\/(\.*)([^/:]+)/ ); - domain = domain[2]?domain[2]:''; - - var val=readCookie('excludes'); - if ( !val ) - { - val = ''; - } - if ( val.length > 0 ) - { - val = val + ","; - } - val = val + domain - createCookie('excludes',val, 10); -} - -/* un-exclude host */ -function show( site ) -{ - domain = site.match( /:\/\/(\.*)([^/:]+)/ ); - domain = domain[2]?domain[2]:''; - - log( "Showing " + site ); - - /* get the cookie */ - var val=readCookie('excludes'); - if ( !val ) { val = ''; } - - /* new cookie value */ - var n = ''; - - hosts=val.split( ',' ); - for( var i=0 ; i < hosts.length; i++ ) - { - /* the currently excluded host isn't the one we're to show now - so keep it */ - if ( hosts[i] != domain ) - { - if ( n.length > 0 ) { n = n + ',' ; } - n += hosts[i]; - } - else - { - /* the currently excluded host is now supposed to be visible.. */ - c = getElementsByClassNamePrefix( hosts[i] ); - for ( var j = 0; j < c.length; j++ ) - { - showDiv(c[j].id ); - showInlineDiv( ( c[j].id + "_hide" ) ) - hideDiv( ( c[j].id + "_show" ) ) - } - } - } - /* set new cookie */ - createCookie('excludes',n, 10); -} - -/* avoid excluding any sites : clear the cookie */ -function excludeNone() -{ - eraseCookie( 'excludes' ); - window.location.reload(); - hideDiv( 'unhide-all' ); -} - -/* hide the given div, if possible */ -function hideDiv( id ) { - i = document.getElementById(id); - if ( i ) - { - log( "Setting div " + id + " -> display:none;" ); - i.style.display="none"; - } -} - -/* show the given div */ -function showDiv( id ) { - i = document.getElementById(id); - if ( i ) - { - log( "Setting div " + id + " -> display:block;" ); - i.style.display="block"; - } -} -function showInlineDiv( id ) { - i = document.getElementById(id); - if ( i ) - { - log( "Setting div " + id + " -> display:inline;" ); - i.style.display="inline"; - } -} - -/* get elements with a class starting with the given name */ -function getElementsByClassNamePrefix(classname) { - var els = document.getElementsByTagName("*"); - var c = new RegExp("/b^|" + classname ); - final = new Array(); - var n=0; - for (var i=0; i < els.length; i++) { - if (els[i].className) { - if(c.test(els[i].className)) { - final[n] = els[i]; - n++; - } - } - } - return final; -} - -/* hide all the hosts we're supposed to */ -function hideHosts() -{ - var excl=readCookie( 'excludes'); - if ( ! excl ) { excl='' ; } - hosts=excl.split( ',' ); - - for ( var i = 0; i < hosts.length; i++ ) - { - // ok so we have a host. should we hide it? - if ( hosts[i] ) - { - c = getElementsByClassNamePrefix( hosts[i] ); - for ( var j = 0; j < c.length; j++ ) - { - hideDiv(c[j].id ); - showInlineDiv( ( c[j].id + "_show" ) ) - hideDiv( ( c[j].id + "_hide" ) ) - - showDiv( 'unhide-all' ); - } - } - } -} - diff --git a/www/minus-8.png b/www/minus-8.png deleted file mode 100644 index 8fe9a8d..0000000 Binary files a/www/minus-8.png and /dev/null differ diff --git a/www/opml.png b/www/opml.png deleted file mode 100644 index cf7ff01..0000000 Binary files a/www/opml.png and /dev/null differ diff --git a/www/planet.png b/www/planet.png deleted file mode 100644 index 9606a0c..0000000 Binary files a/www/planet.png and /dev/null differ diff --git a/www/plus-8.png b/www/plus-8.png deleted file mode 100644 index c4b2097..0000000 Binary files a/www/plus-8.png and /dev/null differ diff --git a/www/rss10.png b/www/rss10.png deleted file mode 100644 index 60b60ff..0000000 Binary files a/www/rss10.png and /dev/null differ diff --git a/www/rss20.png b/www/rss20.png deleted file mode 100644 index 93c1dec..0000000 Binary files a/www/rss20.png and /dev/null differ