Removed php code from css files and removed CSS variables

This commit is contained in:
Christian Wolf 2017-11-09 10:20:00 +01:00
parent 55e0ca91fd
commit 53ffafa009
4 changed files with 123 additions and 76 deletions

View File

@ -193,17 +193,11 @@ body
Additional content
*/
body {
background-color: var(--bgcolorside);
}
#topmenu a {
color: inherit;
}
#topmenu {
background-color: var(--bgcolor1);
color: var(--fgcolor1);
font-weight: bold;
text-align: center;
}
@ -221,35 +215,10 @@ body {
background-color: inherit;
}
#topmenu > .nav > li:hover {
background-color: var(--bgcolor3);
color: var(--fgcolor3);
}
#topmenu > .nav > li > .nav-child {
background-color: var(--bgcolor3);
color: var(--fgcolor3);
}
#topmenu > .nav > li > .nav-child > li:hover > a {
background-color: var(--bgcolor2);
color: var(--fgcolor2);
}
#topmenu > .nav > li > .nav-child > li:hover > a:hover {
text-decoration: none;
}
#left_side
{
background-image: var(--imgleft);
}
#right_side
{
background-image: var(--imgright);
}
#left_side, #right_side
{
background-repeat: no-repeat;

View File

@ -136,16 +136,9 @@ body {
#mobile_menu li > a {
margin: 5px 0px 5px 0px;
background-color: var(--bgcolor2);
padding: 2px 5px;
display: block;
flex: 0;
color: var(--fgcolor2);
}
#mobile_menu li.active > a {
background-color: var(--bgcolor1);
color: var(--fgcolor1);
}
#mobile_menu .nav {

View File

@ -1,19 +1,3 @@
<?php
define( '_JEXEC', 1 );
define('JPATH_BASE',
// '../../..'
'/home/christian/public_html/joomla'
);
require_once ( JPATH_BASE .'/includes/defines.php' );
require_once ( JPATH_BASE .'/includes/framework.php' );
/* Create the Application */
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
$params = JFactory::getApplication()->getTemplate(true)->params;
header("content-type: text/css");
?>
body {
font-size: 12px;
@ -75,31 +59,9 @@ li.row-fluid {
.page-header
{
border-bottom-color: var(--fgcolor4);
padding-bottom: 0px;
}
#page {
background-color: var(--bgcolor4);
color: var(--fgcolor4);
}
#left_menu > ul.menu {
background-color: var(--bgcolor3);
color: var(--fgcolor3);
}
#left_menu > ul.menu li.active > a {
background-color: var(--bgcolor2);
color: var(--fgcolor2);
}
#left_menu > ul.menu li.current > a
{
background-color: var(--bgcolor1);
color: var(--fgcolor1);
}
ul.nav > li > a:hover,
ul.nav-child > li > a:hover
@ -108,3 +70,45 @@ ul.nav-child > li > a:hover
text-decoration: none;
}
#topmenu a {
color: inherit;
}
#topmenu {
font-weight: bold;
text-align: center;
}
#topmenu > .nav > li {
text-align: left;
}
#topmenu .nav > li > a {
font-size: large;
}
#topmenu .nav > li > a,
#topmenu .nav > li:hover > a {
background-color: inherit;
}
#topmenu > .nav > li > .nav-child > li:hover > a:hover {
text-decoration: none;
}
#left_side, #right_side
{
background-repeat: no-repeat;
background-size: cover;
}
/*
<?php
print_r($params);
?>
*/

View File

@ -19,6 +19,11 @@ JHtml::_('bootstrap.loadCss', true, $this->direction);
JHtml::_('stylesheet', 'templates/system/css/system.css', array('version' => 'auto', 'relative' => false));
JHtml::_('stylesheet', 'main.css', array('version' => 'auto', 'relative' => true));
$params = $this->params;
$leftImageValue = (empty($this->params{'imgleft'}) ? "none" : "url(\"" . $this->baseurl . "/" . $this->params{'imgleft'} . "\")") ;
$rightImageValue = (empty($this->params{'imgright'}) ? "none" : "url(\"" . $this->baseurl . "/" . $this->params{'imgright'} . "\")") ;
?>
<?php echo '<!DOCTYPE html>'; ?>
@ -54,6 +59,82 @@ if($this->params{'titlepage'} === '1')
--imgleft: <?php echo (empty($this->params{'imgleft'}) ? "none" : "url(\"" . $this->baseurl . "/" . $this->params{'imgleft'} . "\")") ; ?>;
--imgright: <?php echo (empty($this->params{'imgright'}) ? "none" : "url(\"" . $this->baseurl . "/" . $this->params{'imgright'} . "\")") ; ?>;
}
body
{
background-color: <?php echo $this->params{'bgcolorside'}; ?>;
}
.page-header
{
border-bottom-color: <?php echo $params{'fgcolor4'}; ?>;
}
#page {
background-color: <?php echo $params{'bgcolor4'}; ?>;
color: <?php echo $params{'fgcolor4'}; ?>;
}
#mobile_menu li > a {
background-color: var(--bgcolor2);
color: var(--fgcolor2);
}
#mobile_menu li.active > a {
background-color: var(--bgcolor1);
color: var(--fgcolor1);
}
ul.menu {
background-color: <?php echo $params{'bgcolor3'}; ?>;
color: <?php echo $params{'fgcolor3'}; ?>;
}
ul.menu li.active > a {
background-color: <?php echo $params{'bgcolor2'}; ?>;
color: <?php echo $params{'fgcolor2'}; ?>;
}
ul.menu li.current > a
{
background-color: <?php echo $params{'bgcolor1'}; ?>;
color: <?php echo $params{'fgcolor1'}; ?>;
}
ul.nav > li > a:hover,
ul.nav-child > li > a:hover
{
background-color: <?php echo $params{'bgcolor2'}; ?>;
color: <?php echo $params{'fgcolor2'}; ?>;
}
#topmenu, #topmenu > ul.menu {
background-color: <?php echo $params{'bgcolor1'}; ?>;
color: <?php echo $params{'fgcolor1'}; ?>;
}
#topmenu > .nav > li:hover {
background-color: <?php echo $params{'bgcolor2'}; ?>;
color: <?php echo $params{'fgcolor2'}; ?>;
}
#topmenu > .nav > li > .nav-child {
background-color: <?php echo $params{'bgcolor3'}; ?>;
color: <?php echo $params{'fgcolor3'}; ?>;
}
#topmenu > .nav > li > .nav-child > li:hover > a {
background-color: <?php echo $params{'bgcolor2'}; ?>;
color: <?php echo $params{'fgcolor2'}; ?>;
}
#left_side
{
background-image: <?php echo $leftImageValue; ?>;
}
#right_side
{
background-image: <?php echo $rightImageValue; ?>;
}
</style>