]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Add an alternative default theme with rounded corners.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Jan 2014 20:07:41 +0000 (21:07 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Jan 2014 20:07:41 +0000 (21:07 +0100)
config/cfgroot/header.pl
html/html/themes/ipfire/include/css/style-rounded.css [new file with mode: 0644]
html/html/themes/ipfire/include/css/style.css
html/html/themes/ipfire/include/functions.pl
lfs/apache2

index 318d2e7f47ee680942d224071fc2251306ff1dfc..bf92507fdfd6f1269903929cb7ae63b9e50d5c25 100644 (file)
@@ -89,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]$/) {
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;
+}
index 59d8fcce8a809f2c9d7293637f48486516650d58..02b3fed3e1188ff810bdbb4c9b97440c36423ccf 100644 (file)
@@ -128,12 +128,13 @@ iframe {
 
 .bigbox {
        margin: 0 auto;
-       margin-top: 1em;
+       margin-top: 0.5em;
        padding: 1.5em 2em 0 2em;
-       border-radius: 8px 8px 8px 8px;
-       -webkit-border-radius: 8px 8px 8px 8px;
        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 {
@@ -155,8 +156,6 @@ iframe {
 }
 
 #main_inner .post {
-       border-radius: 8px 8px 8px 8px;
-       -webkit-border-radius: 8px 8px 8px 8px;
        border: 1px solid silver;
        padding: 1em 2em 1em 2em;
        margin-bottom: 1em;
@@ -212,16 +211,12 @@ input.text {
        margin: 0 auto;
        margin-top: 0;
        padding-top: 0;
-       border-radius: 8px 8px 8px 8px;
-       -webkit-border-radius: 8px 8px 8px 8px;
        font-weight: 600;
        height: 32px;
        border: 1px solid black;
 }
 
 #cssmenu a {
-       border-radius: 8px 8px 8px 8px;
-       -webkit-border-radius: 8px 8px 8px 8px;
        color: #111111;
        display: inline-block;
        line-height: 32px;
@@ -253,7 +248,6 @@ input.text {
 
 #cssmenu .has-sub ul li a {
        min-width: 12em;
-       border-radius: 7px 7px 7px 7px;
        background: #ffffff;
        color: grey;
        display: block;
@@ -264,111 +258,4 @@ input.text {
 
 #cssmenu .has-sub ul li:hover a {
        background: #dddddd;
-       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;
 }
index cf5f77c05f9d9e26ccd04bf734304b7c139e413f..0ead967ae1ef57c2b184842e015ac145ba8e704a 100644 (file)
@@ -32,6 +32,7 @@
 ###############################################################################
 
 require "${General::swroot}/lang.pl";
+
 ###############################################################################
 #
 # print menu html elements for submenu entries
@@ -113,7 +114,12 @@ sub openpage {
                $headline =  "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}";
        }
 
-print <<END
+       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>
@@ -121,10 +127,13 @@ print <<END
        $extrahead
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <link rel="shortcut icon" href="/favicon.ico" />
-       <link href="/themes/ipfire/include/css/style.css" rel="stylesheet" type="text/css"  />
        <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="/themes/ipfire/include/js/refreshInetInfo.js"></script>
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