forked from ZwiiCMS-Team/ZwiiCMS
[9.1.04] header responsive test continuing
This commit is contained in:
parent
5ca13a9b0d
commit
665b66f2bf
@ -1006,16 +1006,16 @@ class core extends common {
|
||||
$css .= ';height: 0; padding-top:';
|
||||
$css .= ( $sizes[1] / $sizes[0] )* 100;
|
||||
$css .= '%';
|
||||
} else {
|
||||
//} else {
|
||||
// Le fichier n'existe plus
|
||||
// largeur par défaut
|
||||
$css .= ';height: 150px;';
|
||||
// $css .= ';height: 150px; line-height: 150px;';
|
||||
}
|
||||
} else {
|
||||
// Valeur de hauteur traditionnelle
|
||||
$css .= ';height:' . $this->getData(['theme', 'header', 'height']);
|
||||
$css .= ';height:' . $this->getData(['theme', 'header', 'height']) . ';line-height:' . $this->getData(['theme', 'header', 'height']) ;
|
||||
}
|
||||
$css .= ';line-height:' . $this->getData(['theme', 'header', 'height']) . ';text-align:' . $this->getData(['theme', 'header', 'textAlign']) . '}';
|
||||
$css .= ';text-align:' . $this->getData(['theme', 'header', 'textAlign']) . '}';
|
||||
if($themeHeaderImage = $this->getData(['theme', 'header', 'image'])) {
|
||||
$css .= 'header{background-image:url("../file/source/' . $themeHeaderImage . '");background-position:' . $this->getData(['theme', 'header', 'imagePosition']) . ';background-repeat:' . $this->getData(['theme', 'header', 'imageRepeat']) . '}';
|
||||
}
|
||||
|
@ -23,16 +23,16 @@ $("input, select").on("change", function() {
|
||||
var css = "@import url('https://fonts.googleapis.com/css?family=" + headerFont + "');";
|
||||
|
||||
// Couleurs, image, alignement et hauteur de la bannière
|
||||
css += "header{background-color:" + $("#themeHeaderBackgroundColor").val() + ";text-align:" + $("#themeHeaderTextAlign").val() + ";line-height:" + $("#themeHeaderHeight").val();
|
||||
css += "header{background-color:" + $("#themeHeaderBackgroundColor").val() + ";text-align:" + $("#themeHeaderTextAlign").val() + ";";
|
||||
|
||||
// Hauteur proportionnelle
|
||||
var themeHeaderHeight = $("#themeHeaderHeight").val();
|
||||
var widthSize = $("#themeHeaderImageWidth").val();
|
||||
var heightSize = $("#themeHeaderImageHeight").val();
|
||||
if (themeHeaderHeight === "none" ) {
|
||||
css += ";height: 0; padding-top:" + (heightSize / widthSize ) * 100 + "%;}";
|
||||
css += "height: 0; padding-top:" + (heightSize / widthSize ) * 100 + "%}";
|
||||
} else {
|
||||
css += ";height:" + themeHeaderHeight + ";}";
|
||||
css += ";line-height:" + $("#themeHeaderHeight").val() + ";height:" + themeHeaderHeight + "}";
|
||||
}
|
||||
|
||||
var themeHeaderImage = $("#themeHeaderImage").val();
|
||||
@ -47,7 +47,7 @@ $("input, select").on("change", function() {
|
||||
css += "header{background-size:" + $("#themeHeaderImageContainer").val() + "}";
|
||||
|
||||
|
||||
console.log(css);
|
||||
console.log(widthSize + "-" + heightSize + ' ' + themeHeaderImage );
|
||||
|
||||
|
||||
// Taille, couleur, épaisseur et capitalisation du titre de la bannière
|
||||
@ -145,6 +145,7 @@ $("#themeHeaderImage").on("change", function() {
|
||||
});
|
||||
}
|
||||
}).trigger("change");
|
||||
|
||||
// Affiche / Cache les options de la position
|
||||
$("#themeHeaderPosition").on("change", function() {
|
||||
if($(this).val() === 'site') {
|
||||
|
@ -40,6 +40,9 @@
|
||||
<div class="block">
|
||||
<h4>Image</h4>
|
||||
<?php
|
||||
$imageFile = file_exists('site/file/source/'.$this->getData(['theme', 'header', 'image'])) ? $this->getData(['theme', 'header', 'image']) : "";
|
||||
if ($this->getData(['theme', 'header', 'image']) &&
|
||||
$imageFile !== '') {
|
||||
$sizes = getimagesize('site/file/source/'.$this->getData(['theme','header','image']));
|
||||
echo template::text('themeHeaderImageWidth', [
|
||||
'value' => $sizes [0],
|
||||
@ -49,7 +52,7 @@
|
||||
'value' => $sizes [1],
|
||||
'noDirty' => true
|
||||
]);
|
||||
$imageFile = file_exists('site/file/source/'.$this->getData(['theme', 'header', 'image'])) ? $this->getData(['theme', 'header', 'image']) : "";
|
||||
}
|
||||
echo template::file('themeHeaderImage', [
|
||||
'label' => 'Fond',
|
||||
'type' => 1,
|
||||
|
Loading…
Reference in New Issue
Block a user