]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/html/themes/ipfire/include/functions.pl
ipfire theme: Use div align for center
[people/teissler/ipfire-2.x.git] / html / html / themes / ipfire / include / functions.pl
index f4c241a55252bd75ed192eed2a05113f6a18b81e..f71181e6323f27b25fd2bdc98552fd79dea7d17f 100644 (file)
@@ -128,6 +128,12 @@ print <<END;
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <link rel="shortcut icon" href="/favicon.ico" />
        <script type="text/javascript" src="/include/jquery.js"></script>
+
+       <script type="text/javascript">
+               function swapVisibility(id) {
+                       \$('#' + id).toggle();
+               }
+       </script>
 END
 
        foreach my $stylesheet (@stylesheets) {
@@ -232,7 +238,12 @@ sub openbox {
        $align = $_[1];
        $caption = $_[2];
 
-       print "<div class='post' align='$align'>\n";
+       if($align eq 'center') {
+               print "<div class='post' align='center'>\n"
+       }
+       else {
+               print "<div class='post'>\n";
+       }
 
        if ($caption) {
                print "<h2>$caption</h2>\n";