]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Merge remote-tracking branch 'ms/fifteen-theme' into fifteen
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Jan 2014 20:16:17 +0000 (21:16 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Jan 2014 20:16:17 +0000 (21:16 +0100)
33 files changed:
config/cfgroot/header.pl
config/rootfiles/core/fifteen/filelists/files
config/rootfiles/core/fifteen/update.sh
doc/language_issues.de
doc/language_issues.en
doc/language_issues.es
doc/language_issues.fr
doc/language_issues.nl
doc/language_issues.pl
doc/language_issues.ru
doc/language_issues.tr
doc/language_missings
html/cgi-bin/gui.cgi
html/html/themes/darkdos/include/functions.pl
html/html/themes/ipfire-legacy/images/n1.gif [moved from html/html/themes/ipfire/images/n1.gif with 100% similarity]
html/html/themes/ipfire-legacy/images/n2.gif [new file with mode: 0644]
html/html/themes/ipfire-legacy/images/n3.gif [new file with mode: 0644]
html/html/themes/ipfire-legacy/images/n4.gif [moved from html/html/themes/ipfire/images/n4.gif with 100% similarity]
html/html/themes/ipfire-legacy/images/n5.gif [new file with mode: 0644]
html/html/themes/ipfire-legacy/images/n6.gif [new file with mode: 0644]
html/html/themes/ipfire-legacy/images/spacer.gif [moved from html/html/themes/ipfire/images/spacer.gif with 100% similarity]
html/html/themes/ipfire-legacy/include/colors.txt [new file with mode: 0644]
html/html/themes/ipfire-legacy/include/functions.pl [new file with mode: 0644]
html/html/themes/ipfire-legacy/include/style.css [moved from html/html/themes/ipfire/include/style.css with 91% similarity]
html/html/themes/ipfire/images/tux2.png [new file with mode: 0644]
html/html/themes/ipfire/include/css/style-rounded.css [new file with mode: 0644]
html/html/themes/ipfire/include/css/style.css [new file with mode: 0644]
html/html/themes/ipfire/include/functions.pl
html/html/themes/ipfire/include/js/refreshInetInfo.js [new file with mode: 0644]
html/html/themes/maniac/include/functions.pl
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl
lfs/apache2

index 299d7664599290d5a7a4c828746d58c820d0d633..bf92507fdfd6f1269903929cb7ae63b9e50d5c25 100644 (file)
@@ -12,6 +12,7 @@
 package Header;
 
 use CGI();
+use File::Basename;
 use HTML::Entities();
 use Socket;
 use Time::Local;
@@ -88,9 +89,11 @@ if ( -d "/var/ipfire/langs/${language}/" ) {
     };
 };
 
+our $THEME_NAME = $settings{'THEME'};
+
 require "${swroot}/langs/en.pl";
 require "${swroot}/langs/${language}.pl";
-eval `/bin/cat /srv/web/ipfire/html/themes/$settings{'THEME'}/include/functions.pl`;
+eval `/bin/cat /srv/web/ipfire/html/themes/$THEME_NAME/include/functions.pl`;
 
 sub orange_used () {
     if ($ethsettings{'CONFIG_TYPE'} =~ /^[24]$/) {
index 345521b16e1befecb5c9d21b1ee004c218db1bba..0f3a7e9c2ec70004db98727cbdd047d0d062c4dd 100644 (file)
@@ -2,6 +2,7 @@ etc/system-release
 etc/issue
 etc/rc.d/init.d/network
 srv/web/ipfire/cgi-bin/credits.cgi
+srv/web/ipfire/cgi-bin/gui.cgi
 srv/web/ipfire/cgi-bin/index.cgi
 srv/web/ipfire/cgi-bin/netinternal.cgi
 srv/web/ipfire/cgi-bin/ovpnmain.cgi
@@ -11,8 +12,9 @@ srv/web/ipfire/cgi-bin/speed.cgi
 srv/web/ipfire/cgi-bin/urlfilter.cgi
 srv/web/ipfire/cgi-bin/vpnmain.cgi
 srv/web/ipfire/html/themes/darkdos
-srv/web/ipfire/html/themes/ipfire/include/functions.pl
-srv/web/ipfire/html/themes/maniac/include/functions.pl
+srv/web/ipfire/html/themes/ipfire
+srv/web/ipfire/html/themes/ipfire-legacy
+srv/web/ipfire/html/themes/maniac
 var/ipfire/backup/bin/backup.pl
 var/ipfire/backup/exclude
 var/ipfire/backup/include
index d2f2fc268071c42682df9754745d7e9e103e2618..4a5697214c90578b6dcbf0e7101971a72946052c 100644 (file)
@@ -32,6 +32,9 @@ do
        rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
 done
 
+# Remove the old default theme
+rm -rf /srv/web/ipfire/html/themes/ipfire
+
 # Stop services
 
 
index 8b46d6f093e71b32816ad62b0d2102b2c2c20af5..bcc021423070a5a8b5a4ae8e99f34b6070975504 100644 (file)
@@ -133,6 +133,7 @@ WARNING: translation string unused: dial user password has been changed
 WARNING: translation string unused: dialup settings
 WARNING: translation string unused: disconnect
 WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
 WARNING: translation string unused: dmz pinhole configuration
 WARNING: translation string unused: dmz pinhole rule added
 WARNING: translation string unused: dmz pinhole rule removed
index d4281e09127ae43537d616844d6dd36412efbe99..1eccc80a2fdb9bfe2c33c67053f844b8869efa27 100644 (file)
@@ -155,6 +155,7 @@ WARNING: translation string unused: dial user password has been changed
 WARNING: translation string unused: dialup settings
 WARNING: translation string unused: disconnect
 WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
 WARNING: translation string unused: dmz pinhole configuration
 WARNING: translation string unused: dmz pinhole rule added
 WARNING: translation string unused: dmz pinhole rule removed
index 9ae2c0a3366872d76391143f125888bbed9b8f56..6b6424a33983c3b6899b1ece9ccfbb56ab4c20b7 100644 (file)
@@ -148,6 +148,7 @@ WARNING: translation string unused: dial user password has been changed
 WARNING: translation string unused: dialup settings
 WARNING: translation string unused: disconnect
 WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
 WARNING: translation string unused: dmz pinhole configuration
 WARNING: translation string unused: dmz pinhole rule added
 WARNING: translation string unused: dmz pinhole rule removed
@@ -828,6 +829,7 @@ WARNING: untranslated string: routing table
 WARNING: untranslated string: server restart
 WARNING: untranslated string: snat new source ip address
 WARNING: untranslated string: static routes
+WARNING: untranslated string: support donation
 WARNING: untranslated string: system information
 WARNING: untranslated string: tor
 WARNING: untranslated string: tor accounting
index 7e5a1f576b39fbcf2fdf6f9950d2bbdf8cb5248a..2f7f60d0098ca9ada5a303ce7a50b46e3638b55e 100644 (file)
@@ -148,6 +148,7 @@ WARNING: translation string unused: dial user password has been changed
 WARNING: translation string unused: dialup settings
 WARNING: translation string unused: disconnect
 WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
 WARNING: translation string unused: dmz pinhole configuration
 WARNING: translation string unused: dmz pinhole rule added
 WARNING: translation string unused: dmz pinhole rule removed
@@ -819,6 +820,7 @@ WARNING: untranslated string: server restart
 WARNING: untranslated string: snat new source ip address
 WARNING: untranslated string: snort working
 WARNING: untranslated string: static routes
+WARNING: untranslated string: support donation
 WARNING: untranslated string: system information
 WARNING: untranslated string: tor
 WARNING: untranslated string: tor accounting
index 10e12db540d991bb33ed491f8df45cb07ed968d5..d543069f313788ac5fd5a082536b592728b7316d 100644 (file)
@@ -150,6 +150,7 @@ WARNING: translation string unused: dial user password has been changed
 WARNING: translation string unused: dialup settings
 WARNING: translation string unused: disconnect
 WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
 WARNING: translation string unused: dmz pinhole configuration
 WARNING: translation string unused: dmz pinhole rule added
 WARNING: translation string unused: dmz pinhole rule removed
@@ -737,6 +738,7 @@ WARNING: untranslated string: routing config added
 WARNING: untranslated string: routing config changed
 WARNING: untranslated string: routing table
 WARNING: untranslated string: snat new source ip address
+WARNING: untranslated string: support donation
 WARNING: untranslated string: tor
 WARNING: untranslated string: tor accounting
 WARNING: untranslated string: tor accounting bytes
index 9ae2c0a3366872d76391143f125888bbed9b8f56..6b6424a33983c3b6899b1ece9ccfbb56ab4c20b7 100644 (file)
@@ -148,6 +148,7 @@ WARNING: translation string unused: dial user password has been changed
 WARNING: translation string unused: dialup settings
 WARNING: translation string unused: disconnect
 WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
 WARNING: translation string unused: dmz pinhole configuration
 WARNING: translation string unused: dmz pinhole rule added
 WARNING: translation string unused: dmz pinhole rule removed
@@ -828,6 +829,7 @@ WARNING: untranslated string: routing table
 WARNING: untranslated string: server restart
 WARNING: untranslated string: snat new source ip address
 WARNING: untranslated string: static routes
+WARNING: untranslated string: support donation
 WARNING: untranslated string: system information
 WARNING: untranslated string: tor
 WARNING: untranslated string: tor accounting
index f46ba7a055c36cc4ddc46b33658f2eee7c4cb08d..5a1296b544491529ed97465e3f19a408e0ad3f14 100644 (file)
@@ -147,6 +147,7 @@ WARNING: translation string unused: dial user password has been changed
 WARNING: translation string unused: dialup settings
 WARNING: translation string unused: disconnect
 WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
 WARNING: translation string unused: dmz pinhole configuration
 WARNING: translation string unused: dmz pinhole rule added
 WARNING: translation string unused: dmz pinhole rule removed
@@ -800,6 +801,7 @@ WARNING: untranslated string: routing table
 WARNING: untranslated string: server restart
 WARNING: untranslated string: snat new source ip address
 WARNING: untranslated string: static routes
+WARNING: untranslated string: support donation
 WARNING: untranslated string: tor
 WARNING: untranslated string: tor accounting
 WARNING: untranslated string: tor accounting bytes
index 5bd50a0200af98e2c36fcf5b0fb2544e8c1db513..299c74d64e568eb47794a8df4651cd9446c34b7c 100644 (file)
@@ -155,6 +155,7 @@ WARNING: translation string unused: dial user password has been changed
 WARNING: translation string unused: dialup settings
 WARNING: translation string unused: disconnect
 WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: display webinterface effects
 WARNING: translation string unused: dmz pinhole configuration
 WARNING: translation string unused: dmz pinhole rule added
 WARNING: translation string unused: dmz pinhole rule removed
@@ -742,6 +743,7 @@ WARNING: untranslated string: routing config added
 WARNING: untranslated string: routing config changed
 WARNING: untranslated string: routing table
 WARNING: untranslated string: snat new source ip address
+WARNING: untranslated string: support donation
 WARNING: untranslated string: tor directory port
 WARNING: untranslated string: tor errmsg invalid directory port
 WARNING: untranslated string: urlfilter redirect template
index e3e5c8efe1673b78421af826c521924185e25d19..86f45b004a3b4f0fed15b92ace404f7c623b7dc1 100644 (file)
 < snat new source ip address
 < snort working
 < static routes
+< support donation
 < system information
 < tor
 < tor 0 = disabled
 < Set time on boot
 < snat new source ip address
 < static routes
+< support donation
 < system information
 < tor
 < tor 0 = disabled
 < server restart
 < snat new source ip address
 < static routes
+< support donation
 < tor
 < tor 0 = disabled
 < tor accounting
 < server restart
 < snat new source ip address
 < static routes
+< support donation
 < tor
 < tor 0 = disabled
 < tor accounting
index 5abf88e99a419f9ffbf842e770c87b69312a9c8a..980461569ee03880719f5ab923f752351c92c52f 100644 (file)
@@ -36,7 +36,6 @@ my %checked=();
 my $errormessage='';
 
 
-$cgiparams{'FX'} = 'off';
 $cgiparams{'SPEED'} = 'off';
 $cgiparams{'WINDOWWITHHOSTNAME'} = 'off';
 $cgiparams{'REBOOTQUESTION'} = 'off';
@@ -90,7 +89,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
        $mainsettings{'WINDOWWITHHOSTNAME'} = $cgiparams{'WINDOWWITHHOSTNAME'};
        $mainsettings{'REBOOTQUESTION'} = $cgiparams{'REBOOTQUESTION'};
        $mainsettings{'PPPUPDOWNBEEP'} = $cgiparams{'PPPUPDOWNBEEP'};
-       $mainsettings{'FX'} = $cgiparams{'FX'};
        $mainsettings{'SPEED'} = $cgiparams{'SPEED'};
        $mainsettings{'THEME'} = $cgiparams{'theme'};
        $mainsettings{'REFRESHINDEX'} = $cgiparams{'REFRESHINDEX'};
@@ -101,7 +99,7 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
        if ($mainsettings{'WINDOWWITHHOSTNAME'}) {
                $cgiparams{'WINDOWWITHHOSTNAME'} = $mainsettings{'WINDOWWITHHOSTNAME'};
        } else {
-               $cgiparams{'WINDOWWITHHOSTNAME'} = 'off';
+               $cgiparams{'WINDOWWITHHOSTNAME'} = 'on';
        }
        
        if ($mainsettings{'REBOOTQUESTION'}) {
@@ -116,12 +114,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
                $cgiparams{'PPPUPDOWNBEEP'} = 'on';
        }
 
-       if ($mainsettings{'FX'}) {
-               $cgiparams{'FX'} = $mainsettings{'FX'};
-       } else {
-               $cgiparams{'FX'} = 'on';
-       }
-
        if ($mainsettings{'THEME'}) {
                $cgiparams{'THEME'} = $mainsettings{'THEME'};
        } else {
@@ -146,11 +138,10 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
 # Default settings
 if ($cgiparams{'ACTION'} eq "$Lang::tr{'restore defaults'}")
 {
-       $cgiparams{'WINDOWWITHHOSTNAME'} = 'off';
+       $cgiparams{'WINDOWWITHHOSTNAME'} = 'on';
        $cgiparams{'REBOOTQUESTION'} = 'on';
        $cgiparams{'PPPUPDOWNBEEP'} = 'on';
        $cgiparams{'REFRESHINDEX'} = 'off';
-       $cgiparams{'FX'} = 'on';
        $cgiparams{'SPEED'} = 'on';
        $cgiparams{'THEME'} = 'ipfire';
 }
@@ -171,10 +162,6 @@ $checked{'REFRESHINDEX'}{'off'} = '';
 $checked{'REFRESHINDEX'}{'on'} = '';
 $checked{'REFRESHINDEX'}{$cgiparams{'REFRESHINDEX'}} = "checked='checked'";
 
-$checked{'FX'}{'off'} = '';
-$checked{'FX'}{'on'} = '';
-$checked{'FX'}{$cgiparams{'FX'}} = "checked='checked'";
-
 $checked{'SPEED'}{'off'} = '';
 $checked{'SPEED'}{'on'} = '';
 $checked{'SPEED'}{$cgiparams{'SPEED'}} = "checked='checked'";
@@ -196,10 +183,6 @@ print <<END
 <tr>
     <td colspan='2'><p><b>$Lang::tr{'display'}</b></td>
 </tr>
-<tr>
-    <td><input type='checkbox' name='FX' $checked{'FX'}{'on'} /></td>
-    <td>$Lang::tr{'display webinterface effects'}</td>
-</tr>
 <tr>
     <td><input type='checkbox' name='WINDOWWITHHOSTNAME' $checked{'WINDOWWITHHOSTNAME'}{'on'} /></td>
     <td>$Lang::tr{'display hostname in window title'}</td>
index 82e9b0a514068149c21ebe91f4f397780abaa6e2..737e051e7abacc9569a060cd4380ff74a7217138 100644 (file)
@@ -149,16 +149,6 @@ sub openpage {
 <head>
                <title>$title</title>
     $extrahead
-END
-;
-    if ($settings{'FX'} ne 'off') {
-    print <<END
-    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5,Transition=12)" />
-    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5,Transition=12)" />
-END
-;
-    }
-    print <<END
     <link rel="shortcut icon" href="/favicon.ico" />
     <link rel="stylesheet" type="text/css" href="/themes/darkdos/include/style.css" />
     <script language="javascript" type="text/javascript">
diff --git a/html/html/themes/ipfire-legacy/images/n2.gif b/html/html/themes/ipfire-legacy/images/n2.gif
new file mode 100644 (file)
index 0000000..b92a19d
Binary files /dev/null and b/html/html/themes/ipfire-legacy/images/n2.gif differ
diff --git a/html/html/themes/ipfire-legacy/images/n3.gif b/html/html/themes/ipfire-legacy/images/n3.gif
new file mode 100644 (file)
index 0000000..6627c91
Binary files /dev/null and b/html/html/themes/ipfire-legacy/images/n3.gif differ
diff --git a/html/html/themes/ipfire-legacy/images/n5.gif b/html/html/themes/ipfire-legacy/images/n5.gif
new file mode 100644 (file)
index 0000000..a032242
Binary files /dev/null and b/html/html/themes/ipfire-legacy/images/n5.gif differ
diff --git a/html/html/themes/ipfire-legacy/images/n6.gif b/html/html/themes/ipfire-legacy/images/n6.gif
new file mode 100644 (file)
index 0000000..ed1781c
Binary files /dev/null and b/html/html/themes/ipfire-legacy/images/n6.gif differ
diff --git a/html/html/themes/ipfire-legacy/include/colors.txt b/html/html/themes/ipfire-legacy/include/colors.txt
new file mode 100644 (file)
index 0000000..6d7dd1c
--- /dev/null
@@ -0,0 +1,25 @@
+color1=#CD5B45
+color2=#EE6A50
+color3=#FF7256
+color4=#EE9572
+color5=#FFA07A
+color6=#CDAF95
+color7=#EECBAD
+color8=#FFDAB9
+color9=#FFE4C4
+color10=#FFCCCC
+color11=#0000FF
+color12=#00FF00
+color13=#FF0000
+color14=#FFD700
+color15=#CCCCCC
+color16=#40E0D0
+color17=#90EE90
+color18=#F4A460
+color19=#EAE9EE
+color20=#D6D6D6
+color21=#FFFFFF
+color22=#F0F0F0
+color23=#FF00FF
+color24=#6464FF
+color25=#FF6464
diff --git a/html/html/themes/ipfire-legacy/include/functions.pl b/html/html/themes/ipfire-legacy/include/functions.pl
new file mode 100644 (file)
index 0000000..1401030
--- /dev/null
@@ -0,0 +1,404 @@
+#!/usr/bin/perl
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+sub showmenu() {
+    print <<EOF
+                <div id="menu">
+                        <ul>
+EOF
+;
+    foreach my $k1 ( sort keys %$menu ) {
+        if (! $menu->{$k1}{'enabled'}) {
+            next;
+        }
+        my $link = getlink($menu->{$k1});
+        if ($link eq '') {
+            next;
+        }
+        if (! is_menu_visible($link)) {
+            next;
+        }
+        if ($menu->{$k1}->{'selected'}) {
+            print "<li><a href=\"$link\" class=\"active\">$menu->{$k1}{'caption'}</a></li>";
+        } else {
+            print "<li><a href=\"$link\">$menu->{$k1}{'caption'}</a></li>";
+        }
+    }
+    print <<EOF
+                        </ul>
+                </div>
+EOF
+;    
+}
+
+sub getselected($) {
+    my $root = shift;
+    if (!$root) {
+        return 0;
+    }
+
+    foreach my $item (%$root) {
+        if ($root->{$item}{'selected'}) {
+            return $root->{$item};
+        }
+    }
+}
+
+sub showsubsection($$) {
+    my $root = shift;
+
+    if (! $root) {
+        return;
+    }
+    my $selected = getselected($root);
+    if (! $selected) {
+        return;
+    }
+    my $submenus = $selected->{'subMenu'};
+    if (! $submenus) {
+        return;
+    }
+
+    print <<EOF
+        <h4><span>Side</span>menu</h4>
+        <ul class="links">
+EOF
+;
+    foreach my $item (sort keys %$submenus) {
+        my $hash = $submenus->{$item};
+        if (! $hash->{'enabled'}) {
+            next;
+        }
+        my $link = getlink($hash);
+        if ($link eq '') {
+            next;
+        }
+        if (! is_menu_visible($link)) {
+            next;
+        }
+        if ($hash->{'selected'}) {
+            print '<li class="selected">';
+        } else {
+            print '<li>';
+        }
+
+        print "<a href=\"$link\">$hash->{'caption'}</a></li>";
+    }
+
+    print <<EOF
+        </ul>
+EOF
+;
+}
+
+
+sub showsubsubsection($) {
+    my $root = shift;
+    if (!$root) {
+        return;
+    }
+    my $selected = getselected($root);
+    if (! $selected) {
+        return
+    }
+    if (! $selected->{'subMenu'}) {
+        return
+    }
+
+    showsubsection($selected->{'subMenu'}, 'menu-subtop');
+}
+
+sub openpage {
+    my $title = shift;
+    my $boh = shift;
+    my $extrahead = shift;
+
+    @URI=split ('\?',  $ENV{'REQUEST_URI'} );
+    &General::readhash("${swroot}/main/settings", \%settings);
+    &genmenu();
+
+    my $h2 = gettitle($menu);
+
+    $title = "IPFire - $title";
+    if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') {
+        $title =  "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; 
+    }
+
+    print <<END
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+               <title>$title</title>
+    $extrahead
+    <link rel="shortcut icon" href="/favicon.ico" />
+    <link rel="stylesheet" type="text/css" href="/themes/ipfire-legacy/include/style.css" />
+    <script language="javascript" type="text/javascript">
+      
+        function swapVisibility(id) {
+            el = document.getElementById(id);
+            if(el.style.display != 'block') {
+                el.style.display = 'block'
+            }
+            else {
+                el.style.display = 'none'
+            }
+        }
+    </script>
+END
+;
+if ($settings{'SPEED'} ne 'off') {
+print <<END
+    <script type="text/javascript" src="/include/jquery.js"></script>
+    <script type="text/javascript">
+        var t_current;
+        var t_last;
+        var rxb_current;
+        var rxb_last;
+        var txb_current;
+        var txb_last;
+       function refreshInetInfo() {
+               \$.ajax({
+                       url: '/cgi-bin/speed.cgi',
+                        success: function(xml){
+                        t_current = new Date();
+                        var t_diff = t_current - t_last;
+                        t_last = t_current;
+
+                        rxb_current = \$("rxb",xml).text();
+                        var rxb_diff = rxb_current - rxb_last;
+                        rxb_last = rxb_current;
+
+                        var rx_kbs = rxb_diff/t_diff;
+                        rx_kbs = Math.round(rx_kbs*10)/10;
+
+                        txb_current = \$("txb",xml).text();
+                        var txb_diff = txb_current - txb_last;
+                        txb_last = txb_current;
+
+                        var tx_kbs = txb_diff/t_diff;
+                        tx_kbs = Math.round(tx_kbs*10)/10;
+
+                        \$("#rx_kbs").text(rx_kbs + ' kb/s');
+                        \$("#tx_kbs").text(tx_kbs + ' kb/s');
+                        }
+               });
+                window.setTimeout("refreshInetInfo()", 3000);
+       }
+       \$(document).ready(function(){
+               refreshInetInfo();
+       });
+    </script>
+  </head>
+  <body>
+END
+;
+}
+else {
+print "</head><body>";}
+print <<END
+<!-- IPFIRE HEADER -->
+
+<div id="header">
+
+        <div id="header_inner" class="fixed">
+
+                <div id="logo">
+END
+;
+    if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') {
+        print "<h1><span>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</span></h1><br />"; 
+    } else {
+                                print "<h1><span>IPFire</span></h1><br />";
+                }
+                print <<END
+                        <h2>$h2</h2>
+                </div>
+
+END
+;
+        &showmenu();
+
+print <<END     
+        </div>
+</div>
+
+<div id="main">
+        <div id="main_inner" class="fixed">
+                <div id="primaryContent_2columns">
+                        <div id="columnA_2columns">
+END
+;
+}
+
+sub openpagewithoutmenu {
+    my $title = shift;
+    my $boh = shift;
+    my $extrahead = shift;
+
+    @URI=split ('\?',  $ENV{'REQUEST_URI'} );
+    &General::readhash("${swroot}/main/settings", \%settings);
+    &genmenu();
+
+    my $h2 = gettitle($menu);
+
+    $title = "IPFire - $title";
+    if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') {
+        $title =  "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; 
+    }
+
+    print <<END
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+               <title>$title</title>
+               $extrahead
+END
+;
+    if ($settings{'FX'} ne 'off') {
+    print <<END
+    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5,Transition=12)" />
+    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5,Transition=12)" />
+END
+;
+    }
+    print <<END
+    <link rel="shortcut icon" href="/favicon.ico" />
+    <link rel="stylesheet" type="text/css" href="/include/style.css" />
+    <script language="javascript" type="text/javascript">
+      
+        function swapVisibility(id) {
+            el = document.getElementById(id);
+            if(el.style.display != 'block') {
+                el.style.display = 'block'
+            }
+            else {
+                el.style.display = 'none'
+            }
+        }
+    </script>
+
+  </head>
+  <body>
+<!-- IPFIRE HEADER -->
+
+<div id="header">
+
+        <div id="header_inner" class="fixed">
+
+                <div id="logo">
+                        <h1><span>IPFire</span></h1>
+                        <h2>$h2</h2>
+                </div>  
+        </div>
+</div>
+
+<div id="main">
+        <div id="main_inner" class="fixed">
+                <div id="primaryContent_2columns">
+                        <div id="columnA_2columns">
+END
+;
+}
+
+sub closepage () {
+       my $status = &connectionstatus();
+       my $uptime = `/usr/bin/uptime|cut -d \" \" -f 4-`;
+       $uptime =~ s/year(s|)/$Lang::tr{'year'}/;
+       $uptime =~ s/month(s|)/$Lang::tr{'month'}/;
+       $uptime =~ s/day(s|)/$Lang::tr{'day'}/;
+       $uptime =~ s/user(s|)/$Lang::tr{'user'}/;
+       $uptime =~ s/load average/$Lang::tr{'uptime load average'}/;     
+                               
+    print <<END
+                        </div>
+                </div>
+
+                <div id="secondaryContent_2columns">
+                
+                        <div id="columnC_2columns">
+END
+;
+    &showsubsection($menu);
+    &showsubsubsection($menu);
+
+        print <<END                     
+                               </div>
+            </div>
+            <br class="clear" />    
+                       <div id="footer" class="fixed">
+                               <b>Status:</b> $status <b>Uptime:</b> $uptime
+END
+;
+if ($settings{'SPEED'} ne 'off') {
+print <<END                        
+                        <br />
+                                <b>$Lang::tr{'bandwidth usage'}:</b>
+                               $Lang::tr{'incoming'}: <span id="rx_kbs"></span>&nbsp;$Lang::tr{'outgoing'}: <span id="tx_kbs"></span>
+
+END
+;
+}
+print <<END
+                </div>
+        </div>
+</div>
+</body>
+</html>
+END
+;
+}
+
+sub openbigbox
+{
+}
+
+sub closebigbox
+{
+}
+
+sub openbox
+{
+        $width = $_[0];
+        $align = $_[1];
+        $caption = $_[2];
+
+        print <<END
+<!-- openbox -->
+        <div class="post" align="$align">
+END
+;
+
+        if ($caption) { print "<h3>$caption</h3>\n"; } else { print "&nbsp;"; }
+}
+
+sub closebox
+{
+        print <<END
+        </div>
+        <br class="clear" />
+        <!-- closebox -->
+END
+;
+}
+
+1;
similarity index 91%
rename from html/html/themes/ipfire/include/style.css
rename to html/html/themes/ipfire-legacy/include/style.css
index 2461a1499e1f6a8fd7e58aa401a0fbcff702802a..d2c458e51012025594181b91bed960092203e6b0 100644 (file)
@@ -119,7 +119,7 @@ line-height: 1.8em;
 {
 width:100%;
 height:122px;
-background: #440000 url('/themes/ipfire/images/n1.gif') repeat-x;
+background: #440000 url('../images/n1.gif') repeat-x;
 }
 
 #header_inner
@@ -177,7 +177,7 @@ float: left;
 margin-left: 0.5em;
 display: block;
 padding: 1.1em 1.4em 1.0em 1.4em;
-background: #fff url('/themes/ipfire/images/n4.gif') repeat-x;
+background: #fff url('../images/n4.gif') repeat-x;
 border: solid 1px #fff;
 color: #616161;
 font-weight: bold;
@@ -188,7 +188,7 @@ text-decoration: none;
 
 #menu li a.active
 {
-background: #CA2F2F url('/themes/ipfire/images/n3.gif') repeat-x;
+background: #CA2F2F url('../images/n3.gif') repeat-x;
 color: #fff;
 border: solid 1px #A94B4B;
 }
@@ -197,7 +197,7 @@ border: solid 1px #A94B4B;
 
 #main
 {
-background: #fff url('/themes/ipfire/images/n2.gif') 0px 1px repeat-x;
+background: #fff url('../images/n2.gif') 0px 1px repeat-x;
 }
 
 #main_inner p
@@ -270,12 +270,12 @@ padding-left: 18px;
 
 #main_inner .post ul.post_info li.date
 {
-background-image: url('/themes/ipfire/images/n5.gif');
+background-image: url('../images/n5.gif');
 }
 
 #main_inner .post ul.post_info li.comments
 {
-background-image: url('/themes/ipfire/images/n6.gif');
+background-image: url('../images/n6.gif');
 margin-left: 1.1em;
 }
 
@@ -303,7 +303,7 @@ margin: 0.2em;
 
 input.button
 {
-background: #CA2F2F url('/themes/ipfire/images/n3.gif') repeat-x;
+background: #CA2F2F url('../images/n3.gif') repeat-x;
 color: #fff;
 border: solid 1px #A94B4B;
 font-weight: bold;
diff --git a/html/html/themes/ipfire/images/tux2.png b/html/html/themes/ipfire/images/tux2.png
new file mode 100644 (file)
index 0000000..cd84ad5
Binary files /dev/null and b/html/html/themes/ipfire/images/tux2.png differ
diff --git a/html/html/themes/ipfire/include/css/style-rounded.css b/html/html/themes/ipfire/include/css/style-rounded.css
new file mode 100644 (file)
index 0000000..cfc7df5
--- /dev/null
@@ -0,0 +1,130 @@
+
+.bigbox {
+       margin-top: 1em;
+       border-radius: 8px 8px 8px 8px;
+       -webkit-border-radius: 8px 8px 8px 8px;
+}
+
+#main_inner .post {
+       border-radius: 8px 8px 8px 8px;
+       -webkit-border-radius: 8px 8px 8px 8px;
+}
+
+#cssmenu a {
+       border-radius: 8px 8px 8px 8px;
+       -webkit-border-radius: 8px 8px 8px 8px;
+}
+
+#cssmenu .has-sub ul li a {
+       border-radius: 7px 7px 7px 7px;
+}
+
+#cssmenu .has-sub ul li:hover a {
+       box-shadow: inset 0  5px 1px rgba(0, 0, 0, 0.15);
+       -webkit-box-shadow: inset 0  5px 1px rgba(0, 0, 0, 0.15);
+}
+
+/* Table */
+/* when using class='bordered' after tabletag */
+
+table {
+       *border-collapse: collapse; /* IE7 and lower */
+       border-spacing: 0;
+}
+
+.bordered th{
+       border-top: 1px solid grey;
+       border-bottom: 1px solid grey;
+       background: #cccccc;
+}
+
+.bordered th:first-child{
+       -moz-border-radius: 6px 0 0 0;
+       -webkit-border-radius: 6px 0 0 0;
+       border-radius: 6px 0 0 0;
+       border-left: 1px solid grey;
+       border-top: 1px solid grey;
+       border-bottom: 1px solid grey;
+}
+
+.bordered th:last-child {
+       -moz-border-radius: 0 6px 0 0;
+       -webkit-border-radius: 0 6px 0 0;
+       border-radius: 0 6px 0 0;
+       border-right: 1px solid grey;
+       border-top: 1px solid grey;
+       border-bottom: 1px solid grey;
+}
+
+.bordered th:only-child{
+       -moz-border-radius: 6px 6px 0 0;
+       -webkit-border-radius: 6px 6px 0 0;
+       border-radius: 6px 6px 0 0;
+       border: 1px solid grey;
+}
+
+.bordered tr:first-child td:first-child{
+       -moz-border-radius: 6px 0 0 0;
+       -webkit-border-radius: 6px 0 0 0;
+       border-radius: 6px 0 0 0;
+       border-left: 1px solid grey;
+       border-top: 1px solid grey;
+}
+
+.bordered tr:first-child td:last-child{
+       -moz-border-radius: 0 6px 0 0;
+       -webkit-border-radius: 0 6px 0 0;
+       border-radius: 0 6px 0 0;
+       border-top: 1px solid grey;
+}
+
+.bordered tr:first-child td:only-child{
+       -moz-border-radius: 6px 6px 0 0;
+       -webkit-border-radius: 6px 6px 0 0;
+       border-radius: 6px 6px 0 0;
+       border-left: 1px solid grey;
+       border-right: 1px solid grey;
+       border-top: 1px solid grey;
+}
+
+.bordered tr:first-child td{
+       border-top: 1px solid grey;
+}
+
+.bordered tr:last-child{
+       border-left: 1px solid grey;
+       border-right: 1px solid grey;
+}
+
+.bordered tr:last-child td:first-child {
+       -moz-border-radius: 0 0 0 6px;
+       -webkit-border-radius: 0 0 0 6px;
+       border-radius: 0 0 0 6px;
+       border-bottom: 1px solid grey;
+}
+
+.bordered tr:last-child td:last-child {
+       -moz-border-radius: 0 0 6px 0;
+       -webkit-border-radius: 0 0 6px 0;
+       border-radius: 0 0 6px 0;
+       border-bottom: 1px solid grey;
+}
+
+.bordered tr:last-child td:only-child {
+       -moz-border-radius: 0 0 6px 6px;
+       -webkit-border-radius: 0 0 6px 6px;
+       border-radius: 0 0 6px 6px;
+       border-bottom: 1px solid grey;
+}
+
+.bordered tr:last-child td {
+       border-bottom: 1px solid grey;
+}
+
+.bordered td:first-child {
+       border-left: 1px solid grey;
+}
+
+.bordered td:last-child {
+       border-right: 1px solid grey;
+}
diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css
new file mode 100644 (file)
index 0000000..02b3fed
--- /dev/null
@@ -0,0 +1,261 @@
+
+/* This controls the width of the fixed width layouts */
+
+.fixed {
+       width: 910px !important;
+}
+
+/* Basic Stuff */
+
+* {
+       margin: 0;
+       padding: 0;
+}
+
+html {
+       height: 100%;
+}
+
+body {
+       /* SVG as background image (IE9/Chrome/Safari/Opera) */
+       background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9Imc2ODQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMTAwJSIgeTE9IjEwMCUiIHgyPSIxMDAlIiB5Mj0iMCUiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMDAwMDAwIiBvZmZzZXQ9IjAiLz48c3RvcCBzdG9wLWNvbG9yPSIjODgwNDAwIiBvZmZzZXQ9IjU3JSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2c2ODQpIiAvPgo8L3N2Zz4=);
+
+       background-image: linear-gradient(
+               bottom,
+               #000000 0%,
+               #880400 57%
+       );
+       background-image: -o-linear-gradient(
+               bottom,
+               #000000 0%,
+               #880400 57%
+       );
+       background-image: -moz-linear-gradient(
+               bottom,
+               #000000 0%,
+               #880400 57%
+       );
+       background-image: -webkit-linear-gradient(
+               bottom,
+               #000000 0%,
+               #880400 57
+       );
+       background-image: -ms-linear-gradient(
+               bottom,
+               #000000 0%,
+               #880400 57%
+       );
+       background-image: -webkit-gradient(
+               linear,
+               left bottom,
+               left top,
+               color-stop(0, #000000),
+               color-stop(0.57, #880400)
+       );
+       background-attachment: fixed;
+
+       font-size: 9pt;
+       font-family: "trebuchet ms", helvetica, sans-serif;
+}
+
+h1, h2, h3, h4, h5, h6 {
+       font-size: 20px;
+       font-weight: normal;
+       letter-spacing: -1px;
+       text-align: left;
+}
+
+h2, h3, h4, h5, h6 {
+       color: #66000F;
+}
+
+br.clear {
+       clear: both;
+}
+
+img {
+       padding: 3px;
+}
+
+a {
+       text-decoration: underline;
+       color: #d90000;
+}
+
+a:hover {
+       text-decoration: none;
+}
+
+p {
+       line-height: 1.8em;
+}
+
+hr {
+       margin: 0.3em 0 0.3em 0;
+}
+
+iframe {
+       border: 0;
+}
+
+.pull-right {
+       float: right !important;
+}
+
+/* Header */
+
+#header {
+       height: 70px;
+       margin: 0 auto;
+}
+
+/* Logo */
+
+#logo {
+       height: 65px;
+       margin-top: 1em;
+       background: url('../../images/tux2.png') no-repeat;
+}
+
+#logo h1 {
+       color: #fff;
+       font-size: 3.6em;
+       font-weight: bold;
+       padding-left: 1.7em;
+}
+
+/* Main */
+
+.bigbox {
+       margin: 0 auto;
+       margin-top: 0.5em;
+       padding: 1.5em 2em 0 2em;
+       background: #fff url('../../images/n2.gif') 0px 0px repeat-x;
+       border: 1px solid black;
+
+       border-radius: 3px 3px 3px 3px;
+       -webkit-border-radius: 3px 3px 3px 3px;
+}
+
+#main_inner {
+       padding-bottom: 1.5em;
+}
+
+#main_inner p {
+       text-align: justify;
+       margin-bottom: 2em;
+}
+
+#main_inner ul {
+       margin-bottom: 2em;
+}
+
+#main_inner h1 {
+       font-size: 1.8em;
+       margin-bottom: 1em;
+}
+
+#main_inner .post {
+       border: 1px solid silver;
+       padding: 1em 2em 1em 2em;
+       margin-bottom: 1em;
+       clear: both;
+}
+
+#main_inner .post h2 {
+       border-bottom: dotted 1px #e1e1e1;
+       font-size: 1.7em;
+       margin-bottom: 1em;
+}
+
+#footer {
+       height: 2.5em;
+       margin-bottom: 1em;
+}
+
+#footer a {
+       color: inherit;
+       text-decoration: none;
+}
+
+#footer a:hover {
+       text-decoration: underline;
+}
+
+input {
+       margin: 0.2em;
+}
+
+input.button {
+       background: #ca2f2f url('../../images/n3.gif') repeat-x;
+       color: #fff;
+       border: solid 1px #a94b4b;
+       font-weight: bold;
+       font-size: 0.8em;
+       height: 2.0em;
+}
+
+input.text {
+       border: solid 1px #f1f1f1;
+       padding: 0.25em;
+}
+
+#traffic {
+       float: right;
+       min-width: 20em;
+       line-height: 32px;
+}
+
+/* Menu */
+#cssmenu {
+       margin: 0 auto;
+       margin-top: 0;
+       padding-top: 0;
+       font-weight: 600;
+       height: 32px;
+       border: 1px solid black;
+}
+
+#cssmenu a {
+       color: #111111;
+       display: inline-block;
+       line-height: 32px;
+       padding: 0 1em;
+       text-decoration: none;
+}
+
+#cssmenu ul {
+       list-style: none;
+}
+
+#cssmenu > ul > li {
+       display: inline-block;
+}
+
+#cssmenu > ul > li.active a, #cssmenu > ul > li:hover > a {
+       color: white;
+       background: #aaaaaa;
+}
+
+#cssmenu .has-sub:hover > ul {
+       display: block;
+}
+
+#cssmenu .has-sub ul {
+       display: none;
+       position: absolute;
+}
+
+#cssmenu .has-sub ul li a {
+       min-width: 12em;
+       background: #ffffff;
+       color: grey;
+       display: block;
+       line-height: 40%;
+       padding: 12px 5px;
+       border: 1px solid black;
+}
+
+#cssmenu .has-sub ul li:hover a {
+       background: #dddddd;
+}
index 2707593dbcd8e4a80c4dcf2e1f1881d1f45458da..0ead967ae1ef57c2b184842e015ac145ba8e704a 100644 (file)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
 #                                                                             #
 ###############################################################################
+#                                                                             #
+# Theme file for IPfire (based on ipfire theme)                               #
+# Author kay-michael köhler kmk <michael@koehler.tk>                          #
+#                                                                             #
+# Version 1.0  March, 6th 2013                                               #
+###############################################################################
+#                                                                             #
+# Modyfied theme by a.marx@ipfire.org January 2014                            #
+#                                                                             #
+# Cleanup code, deleted unused code and rewrote the rest to get a new working #
+# IPFire default theme.                                                       #
+###############################################################################
 
-sub showmenu() {
-    print <<EOF
-                <div id="menu">
-                        <ul>
-EOF
-;
-    foreach my $k1 ( sort keys %$menu ) {
-        if (! $menu->{$k1}{'enabled'}) {
-            next;
-        }
-        my $link = getlink($menu->{$k1});
-        if ($link eq '') {
-            next;
-        }
-        if (! is_menu_visible($link)) {
-            next;
-        }
-        if ($menu->{$k1}->{'selected'}) {
-            print "<li><a href=\"$link\" class=\"active\">$menu->{$k1}{'caption'}</a></li>";
-        } else {
-            print "<li><a href=\"$link\">$menu->{$k1}{'caption'}</a></li>";
-        }
-    }
-    print <<EOF
-                        </ul>
-                </div>
-EOF
-;    
-}
+require "${General::swroot}/lang.pl";
 
-sub getselected($) {
-    my $root = shift;
-    if (!$root) {
-        return 0;
-    }
-
-    foreach my $item (%$root) {
-        if ($root->{$item}{'selected'}) {
-            return $root->{$item};
-        }
-    }
+###############################################################################
+#
+# print menu html elements for submenu entries
+# @param submenu entries
+sub showsubmenu() {
+       my $submenus = shift;
+       
+       print "<ul>";
+       foreach my $item (sort keys %$submenus) {
+               $link = getlink($submenus->{$item});
+               next if (!is_menu_visible($link) or $link eq '');
+
+               my $subsubmenus = $submenus->{$item}->{'subMenu'};
+
+               if ($subsubmenus) {
+                       print '<li class="has-sub ">';
+               } else {
+                       print '<li>';
+               }
+               print '<a href="'.$link.'">'.$submenus->{$item}->{'caption'}.'</a>';
+
+               &showsubmenu($subsubmenus) if ($subsubmenus);
+               print '</li>';
+       }
+       print "</ul>"
 }
 
-sub showsubsection($$) {
-    my $root = shift;
-
-    if (! $root) {
-        return;
-    }
-    my $selected = getselected($root);
-    if (! $selected) {
-        return;
-    }
-    my $submenus = $selected->{'subMenu'};
-    if (! $submenus) {
-        return;
-    }
-
-    print <<EOF
-        <h4><span>Side</span>menu</h4>
-        <ul class="links">
-EOF
-;
-    foreach my $item (sort keys %$submenus) {
-        my $hash = $submenus->{$item};
-        if (! $hash->{'enabled'}) {
-            next;
-        }
-        my $link = getlink($hash);
-        if ($link eq '') {
-            next;
-        }
-        if (! is_menu_visible($link)) {
-            next;
-        }
-        if ($hash->{'selected'}) {
-            print '<li class="selected">';
-        } else {
-            print '<li>';
-        }
-
-        print "<a href=\"$link\">$hash->{'caption'}</a></li>";
-    }
-
-    print <<EOF
-        </ul>
+###############################################################################
+#
+# print menu html elements
+sub showmenu() {
+       print '<div id="cssmenu" class="bigbox fixed">';
+
+       if ($settings{'SPEED'} ne 'off') {
+               print <<EOF;
+                       <div id='traffic'>
+                               <strong>Traffic:</strong>
+                               In  <span id='rx_kbs'>--.-- Bit/s</span> &nbsp;
+                               Out <span id='tx_kbs'>--.-- Bit/s</span>
+                       </div>
 EOF
-;
-}
+       }
 
+       print "<ul>";
+       foreach my $k1 ( sort keys %$menu ) {
+               $link = getlink($menu->{$k1});
+               next if (!is_menu_visible($link) or $link eq '');
+               print '<li class="has-sub "><a><span>'.$menu->{$k1}->{'caption'}.'</span></a>';
+               my $submenus = $menu->{$k1}->{'subMenu'};
+               &showsubmenu($submenus) if ($submenus);
+               print "</li>";
+       }
 
-sub showsubsubsection($) {
-    my $root = shift;
-    if (!$root) {
-        return;
-    }
-    my $selected = getselected($root);
-    if (! $selected) {
-        return
-    }
-    if (! $selected->{'subMenu'}) {
-        return
-    }
-
-    showsubsection($selected->{'subMenu'}, 'menu-subtop');
+       print "</ul></div>";
 }
 
+###############################################################################
+#
+# print page opening html layout
+# @param page title
+# @param boh
+# @param extra html code for html head section
+# @param suppress menu option, can be numeric 1 or nothing.
+#               menu will be suppressed if param is 1
 sub openpage {
-    my $title = shift;
-    my $boh = shift;
-    my $extrahead = shift;
-
-    @URI=split ('\?',  $ENV{'REQUEST_URI'} );
-    &General::readhash("${swroot}/main/settings", \%settings);
-    &genmenu();
-
-    my $h2 = gettitle($menu);
-
-    $title = "IPFire - $title";
-    if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') {
-        $title =  "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; 
-    }
-
-    print <<END
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
-<html xmlns='http://www.w3.org/1999/xhtml'>
-<head>
-               <title>$title</title>
-    $extrahead
-END
-;
-    if ($settings{'FX'} ne 'off') {
-    print <<END
-    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5,Transition=12)" />
-    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5,Transition=12)" />
-END
-;
-    }
-    print <<END
-    <link rel="shortcut icon" href="/favicon.ico" />
-    <link rel="stylesheet" type="text/css" href="/themes/ipfire/include/style.css" />
-    <script language="javascript" type="text/javascript">
-      
-        function swapVisibility(id) {
-            el = document.getElementById(id);
-            if(el.style.display != 'block') {
-                el.style.display = 'block'
-            }
-            else {
-                el.style.display = 'none'
-            }
-        }
-    </script>
+       my $title = shift;
+       my $boh = shift;
+       my $extrahead = shift;
+       my $suppressMenu = shift;
+       my @tmp = split(/\./, basename($0));
+       my $scriptName = @tmp[0];
+
+       @URI=split ('\?',  $ENV{'REQUEST_URI'} );
+       &General::readhash("${swroot}/main/settings", \%settings);
+       &genmenu();
+
+       my $headline = "IPFire";
+       if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') {
+               $headline =  "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}";
+       }
+
+       my @stylesheets = ("style.css");
+       if ($THEME_NAME eq "ipfire-rounded") {
+               push(@stylesheets, "style-rounded.css");
+       }
+
+print <<END;
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+       <head>
+       <title>$headline - $title</title>
+       $extrahead
+       <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>
 END
-;
+
+       foreach my $stylesheet (@stylesheets) {
+               print "<link href=\"/themes/ipfire/include/css/$stylesheet\" rel=\"stylesheet\" type=\"text/css\" />\n";
+       }
+
 if ($settings{'SPEED'} ne 'off') {
 print <<END
-    <script type="text/javascript" src="/include/jquery.js"></script>
-    <script type="text/javascript">
-        var t_current;
-        var t_last;
-        var rxb_current;
-        var rxb_last;
-        var txb_current;
-        var txb_last;
-       function refreshInetInfo() {
-               \$.ajax({
-                       url: '/cgi-bin/speed.cgi',
-                        success: function(xml){
-                        t_current = new Date();
-                        var t_diff = t_current - t_last;
-                        t_last = t_current;
-
-                        rxb_current = \$("rxb",xml).text();
-                        var rxb_diff = rxb_current - rxb_last;
-                        rxb_last = rxb_current;
-
-                        var rx_kbs = rxb_diff/t_diff;
-                        rx_kbs = Math.round(rx_kbs*10)/10;
-
-                        txb_current = \$("txb",xml).text();
-                        var txb_diff = txb_current - txb_last;
-                        txb_last = txb_current;
-
-                        var tx_kbs = txb_diff/t_diff;
-                        tx_kbs = Math.round(tx_kbs*10)/10;
-
-                        \$("#rx_kbs").text(rx_kbs + ' kb/s');
-                        \$("#tx_kbs").text(tx_kbs + ' kb/s');
-                        }
-               });
-                window.setTimeout("refreshInetInfo()", 3000);
-       }
-       \$(document).ready(function(){
-               refreshInetInfo();
-       });
-    </script>
-  </head>
-  <body>
+       <script type="text/javascript" src="/themes/ipfire/include/js/refreshInetInfo.js"></script>
 END
 ;
 }
-else {
-print "</head><body>";}
-print <<END
-<!-- IPFIRE HEADER -->
 
-<div id="header">
-
-        <div id="header_inner" class="fixed">
-
-                <div id="logo">
+print <<END
+       </head>
+       <body>
+               <div id="header" class="fixed">
+                       <div id="logo">
 END
 ;
-    if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') {
-        print "<h1><span>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</span></h1><br />"; 
-    } else {
-                                print "<h1><span>IPFire</span></h1><br />";
-                }
-                print <<END
-                        <h2>$h2</h2>
-                </div>
+       if ($settings{'WINDOWWITHHOSTNAME'} ne 'off') {
+               print "<h1>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</h1>";
+       } else {
+               print "<h1>IPFire</h1>";
+       }
 
+print <<END
+                       </div>
+               </div>
 END
 ;
-        &showmenu();
 
-print <<END     
-        </div>
-</div>
+&showmenu() if ($suppressMenu != 1);
 
-<div id="main">
-        <div id="main_inner" class="fixed">
-                <div id="primaryContent_2columns">
-                        <div id="columnA_2columns">
+print <<END
+       <div class="bigbox fixed">
+               <div id="main_inner" class="fixed">
+                       <h1>$title</h1>
 END
 ;
 }
 
+###############################################################################
+#
+# print page opening html layout without menu
+# @param page title
+# @param boh
+# @param extra html code for html head section
 sub openpagewithoutmenu {
-    my $title = shift;
-    my $boh = shift;
-    my $extrahead = shift;
-
-    @URI=split ('\?',  $ENV{'REQUEST_URI'} );
-    &General::readhash("${swroot}/main/settings", \%settings);
-    &genmenu();
-
-    my $h2 = gettitle($menu);
-
-    $title = "IPFire - $title";
-    if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') {
-        $title =  "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; 
-    }
-
-    print <<END
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
-<html xmlns='http://www.w3.org/1999/xhtml'>
-<head>
-               <title>$title</title>
-               $extrahead
-END
-;
-    if ($settings{'FX'} ne 'off') {
-    print <<END
-    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5,Transition=12)" />
-    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5,Transition=12)" />
-END
-;
-    }
-    print <<END
-    <link rel="shortcut icon" href="/favicon.ico" />
-    <link rel="stylesheet" type="text/css" href="/include/style.css" />
-    <script language="javascript" type="text/javascript">
-      
-        function swapVisibility(id) {
-            el = document.getElementById(id);
-            if(el.style.display != 'block') {
-                el.style.display = 'block'
-            }
-            else {
-                el.style.display = 'none'
-            }
-        }
-    </script>
-
-  </head>
-  <body>
-<!-- IPFIRE HEADER -->
-
-<div id="header">
-
-        <div id="header_inner" class="fixed">
-
-                <div id="logo">
-                        <h1><span>IPFire</span></h1>
-                        <h2>$h2</h2>
-                </div>  
-        </div>
-</div>
-
-<div id="main">
-        <div id="main_inner" class="fixed">
-                <div id="primaryContent_2columns">
-                        <div id="columnA_2columns">
-END
-;
+       openpage(shift,shift,shift,1);
+       return;
 }
 
-sub closepage () {
-       my $status = &connectionstatus();
-       my $uptime = `/usr/bin/uptime|cut -d \" \" -f 4-`;
-       $uptime =~ s/year(s|)/$Lang::tr{'year'}/;
-       $uptime =~ s/month(s|)/$Lang::tr{'month'}/;
-       $uptime =~ s/day(s|)/$Lang::tr{'day'}/;
-       $uptime =~ s/user(s|)/$Lang::tr{'user'}/;
-       $uptime =~ s/load average/$Lang::tr{'uptime load average'}/;     
-                               
-    print <<END
-                        </div>
-                </div>
-
-                <div id="secondaryContent_2columns">
-                
-                        <div id="columnC_2columns">
-END
-;
-    &showsubsection($menu);
-    &showsubsubsection($menu);
-
-        print <<END                     
-                               </div>
-            </div>
-            <br class="clear" />    
-                       <div id="footer" class="fixed">
-                               <b>Status:</b> $status <b>Uptime:</b> $uptime
-END
-;
-if ($settings{'SPEED'} ne 'off') {
-print <<END                        
-                        <br />
-                                <b>$Lang::tr{'bandwidth usage'}:</b>
-                               $Lang::tr{'incoming'}: <span id="rx_kbs"></span>&nbsp;$Lang::tr{'outgoing'}: <span id="tx_kbs"></span>
+###############################################################################
+#
+# print page closing html layout
 
-END
-;
-}
-print <<END
-                </div>
-        </div>
-</div>
+sub closepage () {
+       open(FILE, "</etc/system-release");
+       my $system_release = <FILE>;
+       $system_release =~ s/core/Core Update/;
+       close(FILE);
+
+print <<END;
+               </div>
+       </div>
+
+       <div id="footer" class='bigbox fixed'>
+               <span class="pull-right">
+                       <a href="http://www.ipfire.org/" target="_blank"><strong>IPFire.org</strong></a> &bull;
+                       <a href="http://www.ipfire.org/donate" target="_blank">$Lang::tr{'support donation'}</a>
+               </span>
+
+               <strong>$system_release</strong>
+       </div>
 </body>
 </html>
 END
 ;
 }
 
-sub openbigbox
-{
+###############################################################################
+#
+# print big box opening html layout
+sub openbigbox {
 }
 
-sub closebigbox
-{
+###############################################################################
+#
+# print big box closing html layout
+sub closebigbox {
 }
 
-sub openbox
-{
-        $width = $_[0];
-        $align = $_[1];
-        $caption = $_[2];
-
-        print <<END
-<!-- openbox -->
-        <div class="post" align="$align">
-END
-;
-
-        if ($caption) { print "<h3>$caption</h3>\n"; } else { print "&nbsp;"; }
+###############################################################################
+#
+# print box opening html layout
+# @param page width
+# @param page align
+# @param page caption
+sub openbox {
+       $width = $_[0];
+       $align = $_[1];
+       $caption = $_[2];
+
+       print "<div class='post' align='$align'>\n";
+
+       if ($caption) {
+               print "<h2>$caption</h2>\n";
+       }
 }
 
-sub closebox
-{
-        print <<END
-        </div>
-        <br class="clear" />
-        <!-- closebox -->
-END
-;
+###############################################################################
+#
+# print box closing html layout
+sub closebox {
+       print "</div>";
 }
 
 1;
diff --git a/html/html/themes/ipfire/include/js/refreshInetInfo.js b/html/html/themes/ipfire/include/js/refreshInetInfo.js
new file mode 100644 (file)
index 0000000..259f86e
--- /dev/null
@@ -0,0 +1,69 @@
+/* refreshInetInfo.js
+* functions for retrieving status information via jQuery
+* Modified: March 6th, 2013 by michael@koehler.tk
+* Authors:     IPFire Team (info@ipfire.org)
+                       Kay-Michael Köhler (michael@koehler.tk)
+* Visit http://www.ipfire.org/
+*/
+
+var t_current;
+var t_last = 0;
+var rxb_current;
+var rxb_last = 0;
+var txb_current;
+var txb_last = 0;
+
+$(document).ready(function(){
+       refreshInetInfo();
+});
+
+function refreshInetInfo() {
+       $.ajax({
+               url: '/cgi-bin/speed.cgi',
+               success: function(xml) {
+                       t_current = new Date();
+                       var t_diff = t_current - t_last;
+
+                       rxb_current = $("rxb", xml).text();
+                       var rxb_diff = rxb_current - rxb_last;
+                       rxb_last = rxb_current;
+
+                       var rx_bits = rxb_diff * 8192 / t_diff;
+                       var rx_fmt = format_bytes(rx_bits);
+
+                       txb_current = $("txb", xml).text();
+                       var txb_diff = txb_current - txb_last;
+                       txb_last = txb_current;
+
+                       var tx_bits = txb_diff * 8192 / t_diff;
+                       var tx_fmt = format_bytes(tx_bits);
+
+                       if (t_last != 0) {
+                               $("#rx_kbs").text(rx_fmt);
+                               $("#tx_kbs").text(tx_fmt);
+                       }
+
+                       t_last = t_current;
+               }
+       });
+
+       window.setTimeout("refreshInetInfo()", 2000);
+}
+
+function format_bytes(bytes) {
+       var units = ["Bit/s", "kBit/s", "MBit/s", "GBit/s", "TBit/s"];
+
+       var unit = units[0];
+       for (var i = 1; i < units.length; i++) {
+               if (bytes < 1024)
+                       break;
+
+               unit = units[i];
+               bytes /= 1024;
+       }
+
+       // Round the output.
+       bytes = bytes.toFixed(2);
+
+       return bytes + " " + unit;
+}
index 0bb1d6e70d625dbb67b03ef2a3b0007d29ae51f6..47dbcb00138bf58bf4381cc7df8ad1014a3b5086 100644 (file)
@@ -149,16 +149,6 @@ sub openpage {
 <head>
                <title>$title</title>
     $extrahead
-END
-;
-    if ($settings{'FX'} ne 'off') {
-    print <<END
-    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5,Transition=12)" />
-    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5,Transition=12)" />
-END
-;
-    }
-    print <<END
     <link rel="shortcut icon" href="/favicon.ico" />
     <link rel="stylesheet" type="text/css" href="/themes/maniac/include/style.css" />
     <script language="javascript" type="text/javascript">
index d89a4bd3f4b271123442f70c49e621d268110cb1..01cd3f6831d4d3ea04e18aba0517116dcb28fdf6 100644 (file)
 'successfully refreshed updates list' => 'Update-Liste erfolgreich aktualisiert.',
 'summaries kept' => 'Zusammenfassungen aufheben für',
 'sunday' => 'Sonntag',
+'support donation' => 'Unterstützen Sie das IPFire-Projekt mit Ihrer Spende',
 'swap' => 'Swap',
 'swap usage per' => 'Nutzung von Auslagerungsspeicher (Swap) pro',
 'system' => 'System',
index 5754c7d82e7f1e06384173d4090001f0cfba039b..dc38129f3652ec334dbfc4a96c4a1ccc14b6dae7 100644 (file)
 'successfully refreshed updates list' => 'Successfully refreshed updates list.',
 'summaries kept' => 'Keep summaries for',
 'sunday' => 'Sunday',
+'support donation' => 'Support the IPFire project with your donation',
 'swap' => 'Swap',
 'swap usage per' => 'Swap usage per',
 'system' => 'System',
index f50332be97462207c12b22cd250cd6eb56e3d726..a3c7ada77d572a6857640db05ec3d2a0950c5550 100644 (file)
@@ -98,6 +98,7 @@ ifeq "$(PASS)" "C"
        chmod -R 755 /srv/web/ipfire/cgi-bin
        chmod -R 644 /srv/web/ipfire/html
        chmod 755 /srv/web/ipfire/html /srv/web/ipfire/html/{index.cgi,redirect.cgi,dial.cgi,images,include,themes,themes/*,themes/*/*}
+       ln -svf ipfire /srv/web/ipfire/html/themes/ipfire-rounded
 
        # Reset permissions of redirect templates directories
        find /srv/web/ipfire/html/redirect-templates -type d | xargs chmod -v 755