]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/Add_a_footer_div_on_all_pages_to_improve_theming.mdwn
add perlmagick to build deps
[ikiwiki.git] / doc / bugs / Add_a_footer_div_on_all_pages_to_improve_theming.mdwn
1 The following patch adds a footer div on all pages to ease CSS themeing.
2 Indeed, the misc.tmpl, recentchanges.tmpl and editpage.tmpl templates lack such a div.
3
4 > So, the problem with this is that the default css inserts a horizontal
5 > line at the top of the footer div, and putting an empty footer on these
6 > other pages looks a bit weird. Any idea how to get around that?
7 > --[[Joey]]
8
9 >> Sorry I didn't see that. It definitely looks weird. We could add text  
10 >> in all footers or change the CSS stylesheet, but it's not clean IMHO.
11
12 >> The idea was about to ease themeing by giving all the pages the same
13 >> structure. The current structure is the following one:
14
15 >> div header - div actions ... div content - div footer (sometimes)
16
17 >> So we could add some new divs in all templates. By default, they will  
18 >> be empty and no CSS will be defined for them. This way ikiwiki
19 >> standard appearance is not changed but themeing will be eased.
20 >> The new page structure could be:
21
22 >> * div banner (to show up a logo for example)
23
24 >> * div content-wrap containing div header, div actions, ... div content
25 >> and div footer
26
27 >> * div realfooter (to put credits, "Powered by ikiwiki", "Valid XHTML"...)
28
29 >> From my tests, it works: Just adding the divs, without touching the stylesheet,
30 >> doesn't change ikiwiki appearance. And themeing is eased :-)
31
32 >> I can update the patch, if you want to follow and test this idea. --Fred
33
34 >>> Sure, go ahead --[[Joey]]
35
36 >>>>Here is an updated patch against current svn. --Fred
37
38         Index: templates/recentchanges.tmpl
39         ===================================================================
40         --- templates/recentchanges.tmpl        (révision 3575)
41         +++ templates/recentchanges.tmpl        (copie de travail)
42         @@ -12,7 +12,11 @@
43          </TMPL_IF>
44          </head>
45          <body>
46         +<div id="banner">
47         +</div>
48          
49         +<div id="content-wrap">
50         +
51          <div class="header">
52          <span>
53          <TMPL_VAR INDEXLINK>/ <TMPL_VAR TITLE>
54         @@ -65,5 +69,10 @@
55          
56          <!-- from <TMPL_VAR NAME=WIKINAME> -->
57          
58         +</div>
59         +
60         +<div id="realfooter">
61         +</div>
62         +
63          </body>
64          </html>
65         Index: templates/page.tmpl
66         ===================================================================
67         --- templates/page.tmpl (révision 3575)
68         +++ templates/page.tmpl (copie de travail)
69         @@ -13,7 +13,11 @@
70          <TMPL_IF NAME="META"><TMPL_VAR META></TMPL_IF>
71          </head>
72          <body>
73         +<div id="banner">
74         +</div>
75          
76         +<div id="content-wrap">
77         +
78          <div class="header">
79          <span>
80          <TMPL_LOOP NAME="PARENTLINKS">
81         @@ -95,5 +99,10 @@
82          <TMPL_IF EXTRAFOOTER><TMPL_VAR EXTRAFOOTER></TMPL_IF>
83          </div>
84          
85         +</div>
86         +
87         +<div id="realfooter">
88         +</div>
89         +
90          </body>
91          </html>
92         Index: templates/editpage.tmpl
93         ===================================================================
94         --- templates/editpage.tmpl     (révision 3575)
95         +++ templates/editpage.tmpl     (copie de travail)
96         @@ -12,6 +12,11 @@
97          </TMPL_IF>
98          </head>
99          <body>
100         +<div id="banner">
101         +</div>
102         +
103         +<div id="content-wrap">
104         +
105          <TMPL_IF NAME="PAGE_CONFLICT">
106          <p>
107          <b>Your changes conflict with other changes made to the page.</b>
108         @@ -86,5 +91,11 @@
109          <TMPL_VAR PAGE_PREVIEW>
110          </div>
111          </TMPL_IF>
112         +
113         +</div>
114         +
115         +<div id="realfooter">
116         +</div>
117         +
118          </body>
119          </html>
120         Index: templates/misc.tmpl
121         ===================================================================
122         --- templates/misc.tmpl (révision 3575)
123         +++ templates/misc.tmpl (copie de travail)
124         @@ -12,7 +12,11 @@
125          </TMPL_IF>
126          </head>
127          <body>
128         +<div id="banner">
129         +</div>
130          
131         +<div id="content-wrap">
132         +
133          <div class="header">
134          <span>
135          <TMPL_VAR INDEXLINK>/ <TMPL_VAR TITLE>
136         @@ -23,5 +27,10 @@
137          <TMPL_VAR PAGEBODY>
138          </div>
139          
140         +</div>
141         +
142         +<div id="realfooter">
143         +</div>
144         +
145          </body>
146          </html>
147
148 > I took a more intrusive approach to avoid ugly names like "realfooter".
149 > [[done]] --[[Joey]]