From 935f311ed9dc4c67d7e603f6b08a45d1225422c8 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 5 Jan 2014 21:07:41 +0100 Subject: [PATCH] Add an alternative default theme with rounded corners. --- config/cfgroot/header.pl | 4 +- .../ipfire/include/css/style-rounded.css | 130 ++++++++++++++++++ html/html/themes/ipfire/include/css/style.css | 121 +--------------- html/html/themes/ipfire/include/functions.pl | 15 +- lfs/apache2 | 1 + 5 files changed, 150 insertions(+), 121 deletions(-) create mode 100644 html/html/themes/ipfire/include/css/style-rounded.css diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index 318d2e7f4..bf92507fd 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -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 index 000000000..cfc7df556 --- /dev/null +++ b/html/html/themes/ipfire/include/css/style-rounded.css @@ -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 index 59d8fcce8..02b3fed3e 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -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; } diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index cf5f77c05..0ead967ae 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -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 < @@ -121,10 +127,13 @@ print < - END -; + + foreach my $stylesheet (@stylesheets) { + print "\n"; + } + if ($settings{'SPEED'} ne 'off') { print < diff --git a/lfs/apache2 b/lfs/apache2 index f50332be9..a3c7ada77 100644 --- a/lfs/apache2 +++ b/lfs/apache2 @@ -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 -- 2.39.2