changeset 273:714732e11d60

fixed and extended link icons imported from: moin--main--1.5--patch-277
author Thomas Waldmann <tw@waldmann-edv.de>
date Fri, 02 Dec 2005 22:48:57 +0000
parents d35743ee9865
children 85458b71e188
files MoinMoin/parser/wiki.py docs/CHANGES wiki/htdocs/classic/css/common.css wiki/htdocs/modern/css/common.css wiki/htdocs/rightsidebar/css/common.css
diffstat 5 files changed, 36 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/wiki.py	Fri Dec 02 21:44:18 2005 +0000
+++ b/MoinMoin/parser/wiki.py	Fri Dec 02 22:48:57 2005 +0000
@@ -379,7 +379,7 @@
             name = ''.join(name.split('.')[:-1])
             return self.formatter.image(src=word, alt=name)
         else:
-            return (self.formatter.url(1, word, css='www') +
+            return (self.formatter.url(1, word, css=scheme) +
                     self.formatter.text(word) +
                     self.formatter.url(0))
 
@@ -423,12 +423,11 @@
             return self.attachment(words, pretty_url=1)
 
         if wikiutil.isPicture(words[1]) and re.match(self.url_rule, words[1]):
-            return (self.formatter.url(1, words[0], 'external', unescaped=1) +
+            return (self.formatter.url(1, words[0], css='external', unescaped=1) +
                     self.formatter.image(title=words[0], alt=words[0], src=words[1]) +
                     self.formatter.url(0))
         else:
-            return (self.formatter.url(1, words[0], 'external',
-                                       type='www', unescaped=1) +
+            return (self.formatter.url(1, words[0], css='www', unescaped=1) +
                     self.formatter.text(words[1]) +
                     self.formatter.url(0))
 
--- a/docs/CHANGES	Fri Dec 02 21:44:18 2005 +0000
+++ b/docs/CHANGES	Fri Dec 02 22:48:57 2005 +0000
@@ -19,6 +19,8 @@
     * Fixed packaging system in the case of AddRevision that does not alter the page.
     * Fixed a few tests by moving the theme init from moin_dump to RequestCLI.
     * Fixed a few bugs in the XML formatters (dom_xml, text_xml, xml_docbook).
+    * Fixed link icons. We now just use a.xxx.before where xxx is the link scheme,
+      e.g. a.http.before. See theme's common.css.
 
   Other changes:
     * Added irc:// to the builtin supported link schemas. You can remove it
--- a/wiki/htdocs/classic/css/common.css	Fri Dec 02 21:44:18 2005 +0000
+++ b/wiki/htdocs/classic/css/common.css	Fri Dec 02 22:48:57 2005 +0000
@@ -11,9 +11,18 @@
 }
 
 a.www:before {content: url(../img/moin-www.png);}
+a.http:before {content: url(../img/moin-www.png);}
+a.https:before {content: url(../img/moin-www.png);}
+a.file:before {content: url(../img/moin-ftp.png);}
+a.ftp:before {content: url(../img/moin-ftp.png);}
+a.nntp:before {content: url(../img/moin-news.png);}
+a.news:before {content: url(../img/moin-news.png);}
+a.telnet:before {content: url(../img/moin-telnet.png);}
+a.irc:before {content: url(../img/moin-telnet.png);}
 a.mailto:before {content: url(../img/moin-email.png);}
+a.attachment:before {content: url(../img/moin-attach.png);}
+a.badinterwiki:before {content: url(../img/moin-inter.png);}
 a.interwiki:before {content: url(../img/moin-inter.png);}
-a.badinterwiki:before {content: url(../img/moin-inter.png);}
 
 /* Headings */
 
--- a/wiki/htdocs/modern/css/common.css	Fri Dec 02 21:44:18 2005 +0000
+++ b/wiki/htdocs/modern/css/common.css	Fri Dec 02 22:48:57 2005 +0000
@@ -23,7 +23,16 @@
 a.nonexistent, a.badinterwiki {color: gray;}
 
 a.www:before {content: url(../img/moin-www.png);}
+a.http:before {content: url(../img/moin-www.png);}
+a.https:before {content: url(../img/moin-www.png);}
+a.file:before {content: url(../img/moin-ftp.png);}
+a.ftp:before {content: url(../img/moin-ftp.png);}
+a.nntp:before {content: url(../img/moin-news.png);}
+a.news:before {content: url(../img/moin-news.png);}
+a.telnet:before {content: url(../img/moin-telnet.png);}
+a.irc:before {content: url(../img/moin-telnet.png);}
 a.mailto:before {content: url(../img/moin-email.png);}
+a.attachment:before {content: url(../img/moin-attach.png);}
 a.badinterwiki:before {content: url(../img/moin-inter.png);}
 a.interwiki:before {content: url(../img/moin-inter.png);}
 
--- a/wiki/htdocs/rightsidebar/css/common.css	Fri Dec 02 21:44:18 2005 +0000
+++ b/wiki/htdocs/rightsidebar/css/common.css	Fri Dec 02 22:48:57 2005 +0000
@@ -18,10 +18,21 @@
 a {color: maroon;}
 a:hover {color: red;}
 a.nonexistent, a.badinterwiki {color: #404040;}
+
 a.www:before {content: url(../img/moin-www.png);}
+a.http:before {content: url(../img/moin-www.png);}
+a.https:before {content: url(../img/moin-www.png);}
+a.file:before {content: url(../img/moin-ftp.png);}
+a.ftp:before {content: url(../img/moin-ftp.png);}
+a.nntp:before {content: url(../img/moin-news.png);}
+a.news:before {content: url(../img/moin-news.png);}
+a.telnet:before {content: url(../img/moin-telnet.png);}
+a.irc:before {content: url(../img/moin-telnet.png);}
 a.mailto:before {content: url(../img/moin-email.png);}
+a.attachment:before {content: url(../img/moin-attach.png);}
+a.badinterwiki:before {content: url(../img/moin-inter.png);}
 a.interwiki:before {content: url(../img/moin-inter.png);}
-a.badinterwiki:before {content: url(../img/moin-inter.png);}
+
 
 /* Headings */