##在这里详述 woodpecker-log/2007-04-13. <> = 升级FootNote特效 = {{attachment:snapIE_ubuntu.png}} == 仅IE全部效果 == * 在打印状态中支持以下效果 <> * CSS支持下,脚注部分使用外框标识 <> * 追加回到首部箭头 <> * 追加缀语 <> * 从注点到脚注列表时有颜色变化 <> == 补丁 == * for MoinMoin版本 1.5.5a * patch download :: [[attachment:CPyUG-friendlyFootNote_ZH.patch]] * attation: maybe user need fixed for local MoinMoin publish path for get go top icon pic;-) {{{ --- FootNote.py.orig 2006-10-25 15:47:44.000000000 +0800 +++ FootNote.py 2007-04-13 14:52:16.000000000 +0800 @@ -1,11 +1,12 @@ -# -*- coding: iso-8859-1 -*- +# coding: utf-8 +## -*- coding: iso-8859-1 -*- """ MoinMoin - FootNote Macro Collect and emit footnotes. Note that currently footnote text cannot contain wiki markup. - @copyright: 2002 by Jürgen Hermann + @copyright: 2002 by J黵gen Hermann @license: GNU GPL, see COPYING for details. """ @@ -14,7 +15,12 @@ from MoinMoin.parser import wiki Dependencies = ["time"] # footnote macro cannot be cached - +attaWord = u"注" +attaFootWord = """`FootNote + + [top] + + """ def execute(macro, args): # create storage for footnotes if not hasattr(macro.request, 'footnotes'): @@ -29,8 +35,11 @@ macro.request.footnotes.append((args, fn_id)) return "%s%s%s%s%s" % ( macro.formatter.sup(1), - macro.formatter.anchorlink(1, 'fndef' + fn_id, id = 'fnref' + fn_id), - macro.formatter.text(str(idx+1)), + macro.formatter.anchorlink(1, 'fndef' + fn_id, + id = 'fnref' + fn_id, + onFocus="this.style.backgroundColor='#933';this.style.color='#fff';", + onBlur="this.style.backgroundColor='transparent';this.style.color='#a9a';",), + macro.formatter.text(attaWord+str(idx+1)), macro.formatter.anchorlink(0), macro.formatter.sup(0),) @@ -44,6 +53,7 @@ result = [] result.append(formatter.div(1, css_class='footnotes')) + result.append(attaFootWord) # Add footnotes list result.append(formatter.bullet_list(1)) @@ -54,8 +64,10 @@ fn_id = request.footnotes[idx][1] result.append(formatter.anchorlink(1, 'fnref' + fn_id, - id='fndef' + fn_id)) - result.append(formatter.text(str(idx + 1))) + id='fndef' + fn_id, + onFocus="this.style.backgroundColor='#930';this.style.color='#fff';", + onBlur="this.style.backgroundColor='#fff';this.style.color='#9a9';",)) + result.append(formatter.text(attaWord+str(idx + 1))) result.append(formatter.anchorlink(0)) result.append(formatter.text(" ")) }}} ----