Add autocompletion to city and tankstelle elements
[infodrom.org/service.infodrom.org] / Styles / basic.style
1 #include <colors.style>
2
3 # <imgdot-fname>
4 #       Insert the filename for the imgdot file
5 #
6 # <page-footer>
7 #       Compute the page footer
8
9 # ========== Abstand berechnen ==========
10 # in ePerl: $root_prefix
11 # in WML: <get-var root_prefix>
12 <:
13   $root_prefix = "<get-var WML_SRC_DIRNAME>";
14   $root_prefix =~ s/^.*src\/?(.*)$/$1/;
15   @foo = split (/\//, $root_prefix);
16   $root_prefix = "../"x($#foo+1);
17 :>
18 <if <not <get-var root_prefix>>
19   <define-tag root_prefix><: print "$root_prefix"; :></define-tag>
20   "<: $root_var = \"<get-var root_prefix>\"; :>"
21 >
22
23 <define-tag imgdot-fname whitespace=delete>
24 <root_prefix>pix/imgdot-1x1-transp.gif
25 </define-tag>
26
27 <define-tag page-footer>
28 <:
29   $giturl = "http://git.infodrom.org/?p=infodrom.org/service.infodrom.org;a=%s;f=%s%s";
30   @months = ("Dummy", "January","February","March","April","May","June",
31              "July","August","September","October","November","December");
32
33   "<get-var WML_SRC_ISOTIME>" =~ /^(\d+)-(\d+)-(\d+)\s/;
34   $date = sprintf ("%s %d, %d", $months[$2], $3, $1);
35
36   if (length ("<get-var source>")) {
37     $url_history = '';
38   } else {
39     "<get-var WML_SRC_DIRNAME>/" =~ /.*\/(src\/.*)$/;
40     $url_history = sprintf($giturl, "history", $1, "<get-var WML_SRC_FILENAME>");
41     $url_source = sprintf($giturl, "blob_plain", $1, "<get-var WML_SRC_FILENAME>");
42   }
43   if (length ($url_history)) {
44     $url = sprintf(', page <a href="%s">source</a> <a href="%s">history</a>', $url_source, $url_history);
45   }
46 :>
47
48 <div class=footer>
49 <div class=footerleft>&copy; <a href="http://www.infodrom.org/Infodrom/impressum.html">Infodrom Oldenburg</a><:=$url:></div>
50 <div class=footerright>Last modified: <:=$date:></div>
51 </div>
52
53 </define-tag>