<meta name="twitter:image" content="' . $socialImage . '">
<meta name="twitter:site" content="@Fluidbook">
<meta name="twitter:card" content="summary_large_image">';
-
$opengraph = '<meta property="og:title" content="' . $socialTitle . '"/>
<meta property="og:description" content="' . $socialDescription . '"/>
<meta property="og:image" content="' . $socialImage . '"/>
// General theme
$cssWidth = $this->cssWidth;
-
$cssHeight = $this->cssHeight;
$cssScale = $this->cssScale;
$w2 = ($cssWidth * 2) . 'px';
+
$h = $cssHeight . 'px';
$wm = ($this->width * $this->multiply) . 'px';
$hm = ($this->height * $this->multiply) . 'px';
- $wpage = $w = $cssWidth . 'px';
- if ($this->book->parametres->correctCenter) {
- $wpage = ($cssWidth + 3) . 'px';
- }
-
+ $w = $cssWidth . 'px';
$offsetLeft = round(($this->optimalWidth - $cssWidth) / 2, 3);
$offsetLeft2 = $offsetLeft * 2;
$offsetTop = round(($this->optimalHeight - $cssHeight) / 2, 3);
$navTop = ($cssHeight - 40 - 100) / 2;
$leftOfRightPage = (floor($cssWidth) - 1) . 'px';
-
-
$lessVariables['z'] = $this->z;
$lessVariables['book-page-width'] = $w;
$lessVariables['book-page-height'] = $h;
$lessVariables['shadow-opacity'] = wsHTML5::colorToArray($this->theme->parametres->bookShadeColor)['opacity'] * 1.2;
$lessVariables['edges-display'] = $this->_lessBoolean($this->theme->parametres->usePageEdges);
- $res[] = '.portrait #pages,.portrait .doublePage.page,.page,.doublePage._3d{width:' . $wpage . ';max-width:' . $wpage . ';height:' . $h . ';max-height:' . $h . '}';
+ $res[] = '.portrait #pages,.portrait .doublePage.page,.page,.doublePage._3d{width:' . $w . ';max-width:' . $w . ';height:' . $h . ';max-height:' . $h . '}';
$res[] = '.doublePage,#pages,#links,#searchHighlights{width:' . $w2 . ';max-width:' . $w2 . ';height:' . $h . ';max-height:' . $h . '}';
$res[] = '.landscape .doublePage._2d.axis_x.next{' . wsHTML5::writeCSSUA('transform', 'translate3d(' . $w2 . ',0,0)') . '}';
$res[] = '.landscape .doublePage._2d.axis_x.prev{' . wsHTML5::writeCSSUA('transform', 'translate3d(-' . $w2 . ',0,0)') . '}';
$res[] = '.doublePage._2d.axis_y.next{' . wsHTML5::writeCSSUA('transform', 'translate3d(0,' . $h . ',0)') . '}';
$res[] = '.doublePage._2d.axis_y.prev{' . wsHTML5::writeCSSUA('transform', 'translate3d(0,-' . $h . ',0)') . '}';
- $res[] = '.doublePage._3d{left:' . $wpage . ';}';
- $res[] = '#links.right{left:-' . $w . ';}';
- $res[] = '.landscape .page.right{left:' . $w . '}';
+
+ $left = $w;
+ if ($this->book->parametres->correctCenter) {
+ $centerOffset = 3;
+ $left = ($cssWidth - $centerOffset) . 'px';
+ $res[] = '.doublePage._3d .page.left{left:-' . ($centerOffset + 1) . 'px !important;}';
+ }
+
+ $res[] = '.doublePage._3d{left:' . $left . ';}';
+ $res[] = '#links.right{left:-' . $left . ';}';
+ $res[] = '.landscape .page.right{left:' . $left . '}';
$lessVariables['page-number-color'] = wsHTML5::colorToCSS($this->theme->parametres->colorPageNumber);
$lessVariables['display-page-number'] = $this->_lessBoolean($this->theme->parametres->displayPageNumber);