<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
- <component name="PublishConfigData" autoUpload="Always" serverName="alphaville.cubedesigners.com" remoteFilesAllowedToDisappearOnAutoupload="false" confirmBeforeUploading="false" autoUploadExternalChanges="true" showAutoUploadSettingsWarning="false">
+ <component name="PublishConfigData" autoUpload="Always" serverName="toolbox.fluidbook.com" remoteFilesAllowedToDisappearOnAutoupload="false" confirmBeforeUploading="false" autoUploadExternalChanges="true" showAutoUploadSettingsWarning="false">
<option name="confirmBeforeUploading" value="false" />
<serverData>
<paths name="alpha.toolbox.fluidbook.com">
</mappings>
</serverdata>
</paths>
+ <paths name="extranet.cubedesigners.com (Host)">
+ <serverdata>
+ <mappings>
+ <mapping local="$PROJECT_DIR$" web="/" />
+ </mappings>
+ </serverdata>
+ </paths>
<paths name="extranet.preventicom.com">
<serverdata>
<mappings>
use Cubist\Util\CSS;
use Cubist\Util\Files\Files;
use Cubist\Util\Files\RecursiveDirectoryIterator;
+use Cubist\Util\Graphics\Lottie;
use Cubist\Util\Json;
use Cubist\Util\ObjectUtil;
use Cubist\Util\Text;
{
$f = $this->compiler->working_path($html);
if (Files::isNotEmpty($f)) {
- $c = file_get_contents($f);
$res = array('width' => $this->video_width, 'height' => $this->video_height);
- if (stristr($c, '<div id="lottie"></div>')) {
- if (preg_match('/var animationData = (\{.*\})/', $c, $m)) {
- $ad = json_decode(trim($m[1]), true);
- $res['width'] = $ad['w'];
- $res['height'] = $ad['h'];
- }
+
+ $lottie = Lottie::getAnimationDataFromHTMLFile($f);
+ if ($lottie) {
+ $res['width'] = $lottie['w'];
+ $res['height'] = $lottie['h'];
}
$r = ['type' => 'html', 'html' => $html, 'inject' => array(), 'injectcss' => array(), 'injectjs' => array()];
use Cubist\Util\Files\Files;
use Cubist\Util\Graphics\Color;
use Cubist\Util\Json;
+use Cubist\Util\Text;
use Illuminate\Support\Facades\Cache;
use SplFileInfo;
} else if ($ext === 'json') {
$jsonFile = $this->compiler->working_path($this->to);
- $jsonContent = file_get_contents($jsonFile);
+ $jsonContent = Text::fileGetContentsNormalizedLines($jsonFile);
$o = json_decode($jsonContent, true);
$fdir = 'data/links';
$d = array('fdir' => $fdir, 'dir' => $this->compiler->working_path());
}
if ($replaceHTML) {
- $html = file_get_contents($htmlfile);
+ $html = Text::fileGetContentsNormalizedLines($htmlfile);
$html = preg_replace('/background-color:.*$/m', 'background-color:' . $data['background'] . ';', $html);
$html = preg_replace('/loop:\s*(true|false),\s*$/m', 'loop: ' . $data['loop'] . ',', $html);