$lessVariables['menu-field-background'] = wsHTML5::colorToCSS($this->theme->parametres->subFieldColor);
$lessVariables['menu-field-text'] = wsHTML5::colorToCSS($this->theme->parametres->subTextFieldColor);
+
$menuMultiply = $menuColor->multiply($menuColor);
$menuMultiply2 = $menuMultiply->multiply($menuColor);
# Index
$ratio = $this->width / $this->height;
$thumbh = round(100 / $ratio);
- $res[] = '#indexView .thumb img{width:100px;height:' . $thumbh . 'px;}';
- $res[] = '#indexView .doubleThumb{height:' . $thumbh . 'px;' . wsHTML5::writeCSSUA('box-shadow', '0 0 3px ' . $shadowColor) . '}';
- $res[] = '#indexView .doubleThumb .overlay{height:' . $thumbh . 'px;}';
- $res[] = '#indexView .doubleThumb .hits.yes{background-color:' . wsHTML5::colorToCSS($this->theme->parametres->subSelectColor) . ';color:' . wsHTML5::colorToCSS($this->theme->parametres->subTextSelectColor) . '}';
+ $lessVariables['thumb-height'] = $thumbh . 'px';
# Tooltip
$res[] = '#tooltip{background-color:' . wsHTML5::colorToCSS($this->theme->parametres->tooltipBackColor) . ';color:' . wsHTML5::colorToCSS($this->theme->parametres->tooltipTextColor) . ';}';
}
public function getHTMLContent() {
- $w = $this->width * $this->getCssScale();
- $h = $this->height * $this->getCssScale();
+ $w = $this->width;
+ $h = $this->height;
$this->copyExternalFile($this->alternative);
- $alt = '<img src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $w . '" height="' . $h . '" />';
+ $alt = '<img data-width="' . $w . '" data-height="' . $h . '" src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $w . '" height="' . $h . '" />';
return $alt;
}
$i['width'] = $i['video_width'];
$i['height'] = $i['video_height'];
- $l = wsHTML5Link::getMultimediaInstance($this->id . '_content', $i, $this->compiler);
+ $l = self::getMultimediaInstance($this->id . '_content', $i, $this->compiler);
$markup = $l->getHTMLContainer();
return ' data-multimedia="' . rawurlencode($markup) . '" ';
}
public function getAdditionnalContent() {
$dim = getimagesize($this->wdir . '/' . $this->alternative);
- $markup = '<div class="multimediaContainer"><img src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $dim[0] . '" height="' . $dim[1] . '" class="multimedia" /></div>';
+ $markup = '<div class="multimediaContainer"><img data-width="' . $dim[0] . '" data-height="' . $dim[1] . '" src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $dim[0] . '" height="' . $dim[1] . '" class="multimedia" /></div>';
return ' data-multimedia="' . rawurlencode($markup) . '" ';
}
if (!is_null($w) && !is_null($h)) {
$res .= 'data-width="' . $w . '" data-height="' . $h . '" ';
} else if (!is_null($compiler)) {
-
$path = WS_BOOKS . '/working/' . $compiler->book_id . '/' . $basename . '.jpg';
$dim = getimagesize($path);
$res .= 'data-width="' . $dim[0] . '" data-height="' . $dim[1] . '" ';
}
public function getAdditionnalContent() {
- return ' data-video="' . rawurlencode(videoLink::makeVideoTag($this, $this->video_width, $this->video_height, $this->compiler)) . '" ';
+ return ' data-video="' . rawurlencode(videoLink::makeVideoTag($this, null, null, $this->compiler)) . '" ';
}
public function keep() {
}
public function getEmbed() {
- return '<iframe width="' . $this->width * $this->getCssScale() . '" height="' . $this->height * $this->getCssScale() . '" src="' . $this->getEmbedURL() . '" frameborder="0" allowfullscreen></iframe>';
+ return '<iframe width="' . $this->width . '" height="' . $this->height . '" src="' . $this->getEmbedURL() . '" frameborder="0" allowfullscreen></iframe>';
}
public function getEmbedURL() {
$iw = $this->_config['width'];
$ih = $this->_config['height'];
- $res = '<iframe width="' . $iw . '" height="' . $ih . '" src="' . $this->_url . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
+ $res = '<iframe data-width="' . $iw . '" data-height="' . $ih . '" width="' . $iw . '" height="' . $ih . '" src="' . $this->_url . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
}
if (isset($externalIframe)) {
$iw = $this->_config['width'];
$ih = $this->_config['height'];
- $res = '<iframe width="' . $iw . '" height="' . $ih . '" src="' . $externalIframe . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
+ $res = '<iframe data-width="' . $iw . '" data-height="' . $ih . '" width="' . $iw . '" height="' . $ih . '" src="' . $externalIframe . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
}
foreach ($this->_config['inject'] as $i) {