Add an alternative default theme with rounded corners.

This commit is contained in:
Michael Tremer
2014-01-05 21:07:41 +01:00
parent 8a39dd30e3
commit 935f311ed9
5 changed files with 150 additions and 121 deletions

View 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]$/) {

View File

@@ -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;
}

View 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;
}

View 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>

View 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