080600
@@ -1,139 +1,139 @@
|
||||
<?php
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
//===========================================================
|
||||
// givecss.php
|
||||
//===========================================================
|
||||
// PAGELAYER
|
||||
// Inspired by the DESIRE to be the BEST OF ALL
|
||||
// ----------------------------------------------------------
|
||||
// Started by: Pulkit Gupta
|
||||
// Date: 23rd Jan 2017
|
||||
// Time: 23:00 hrs
|
||||
// Site: http://pagelayer.com/wordpress (PAGELAYER)
|
||||
// ----------------------------------------------------------
|
||||
// Please Read the Terms of use at http://pagelayer.com/tos
|
||||
// ----------------------------------------------------------
|
||||
//===========================================================
|
||||
// (c)Pagelayer Team
|
||||
//===========================================================
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// Read the file
|
||||
$data = '';
|
||||
$data_premium = '';
|
||||
$self_path = dirname(__FILE__);
|
||||
$files = array(
|
||||
// Admin CSS
|
||||
'pagelayer-editor.css',
|
||||
'pagelayer-icons.css',
|
||||
'pagelayer-editor-frontend.css',
|
||||
// Enduser CSS
|
||||
'font-awesome5.min.css',
|
||||
'font-awesome5-v4shims.css',
|
||||
'nivo-lightbox.css',
|
||||
'owl.carousel.min.css',
|
||||
'owl.theme.default.min.css',
|
||||
'pagelayer-frontend.css',
|
||||
'premium-frontend.css',
|
||||
'animate.min.css',
|
||||
'chartist.min.css',
|
||||
'pagelayer-pen.css'
|
||||
);
|
||||
|
||||
// What files to give
|
||||
$give = @$_REQUEST['give'];
|
||||
|
||||
// Premium
|
||||
$premium = @$_REQUEST['premium'];
|
||||
|
||||
if(!empty($give)){
|
||||
|
||||
$give = explode(',', $give);
|
||||
|
||||
// Check all files are in the supported list
|
||||
foreach($give as $file){
|
||||
if(in_array($file, $files)){
|
||||
$final[md5($file)] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!empty($premium)){
|
||||
|
||||
$premium = explode(',', trim($premium, ','));
|
||||
|
||||
// Check all files are in the supported list
|
||||
foreach($premium as $file){
|
||||
if(in_array($file, $files)){
|
||||
$final_premium[md5($file)] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Give all
|
||||
if(empty($final)){
|
||||
$final = $files;
|
||||
}
|
||||
|
||||
foreach($final as $k => $v){
|
||||
//echo $k.'<br>';
|
||||
$data .= file_get_contents($self_path.'/'.$v)."\n\n";
|
||||
}
|
||||
|
||||
if(!empty($final_premium)){
|
||||
|
||||
foreach($final_premium as $k => $v){
|
||||
//echo $k.'<br>';
|
||||
$data_premium .= file_get_contents($self_path.'/'.$v)."\n\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// We are zipping if possible
|
||||
if(function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')){
|
||||
ob_start('ob_gzhandler');
|
||||
}
|
||||
|
||||
// Type CSS
|
||||
header("Content-type: text/css; charset: UTF-8");
|
||||
|
||||
// Set a zero Mtime
|
||||
$filetime = filemtime($self_path.'/pagelayer-editor.css');
|
||||
|
||||
// Cache Control
|
||||
header("Cache-Control: must-revalidate");
|
||||
|
||||
// Checking if the client is validating his cache and if it is current.
|
||||
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && (@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $filetime)) {
|
||||
|
||||
// Client's cache IS current, so we just respond '304 Not Modified'.
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filetime).' GMT', true, 304);
|
||||
|
||||
return;
|
||||
|
||||
}else{
|
||||
|
||||
// Image not cached or cache outdated, we respond '200 OK' and output the image.
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filetime).' GMT', true, 200);
|
||||
|
||||
}
|
||||
|
||||
if(defined('DOING_AJAX') && !defined('SITEPAD')){
|
||||
$data = str_replace('../fonts/', '../wp-content/plugins/'.(basename(dirname(dirname(__FILE__)))).'/fonts/', $data);
|
||||
}
|
||||
|
||||
echo $data;
|
||||
echo $data_premium;
|
||||
|
||||
// Write if we are front-end only then
|
||||
$dev = dirname(dirname(__FILE__)).'/dev.php';
|
||||
if(!empty($_REQUEST['write']) && file_exists($dev)){
|
||||
include_once($dev);
|
||||
write_css();
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
//===========================================================
|
||||
// givecss.php
|
||||
//===========================================================
|
||||
// PAGELAYER
|
||||
// Inspired by the DESIRE to be the BEST OF ALL
|
||||
// ----------------------------------------------------------
|
||||
// Started by: Pulkit Gupta
|
||||
// Date: 23rd Jan 2017
|
||||
// Time: 23:00 hrs
|
||||
// Site: http://pagelayer.com/wordpress (PAGELAYER)
|
||||
// ----------------------------------------------------------
|
||||
// Please Read the Terms of use at http://pagelayer.com/tos
|
||||
// ----------------------------------------------------------
|
||||
//===========================================================
|
||||
// (c)Pagelayer Team
|
||||
//===========================================================
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// Read the file
|
||||
$data = '';
|
||||
$data_premium = '';
|
||||
$self_path = dirname(__FILE__);
|
||||
$files = array(
|
||||
// Admin CSS
|
||||
'pagelayer-editor.css',
|
||||
'pagelayer-icons.css',
|
||||
'pagelayer-editor-frontend.css',
|
||||
// Enduser CSS
|
||||
'font-awesome5.min.css',
|
||||
'font-awesome5-v4shims.css',
|
||||
'nivo-lightbox.css',
|
||||
'owl.carousel.min.css',
|
||||
'owl.theme.default.min.css',
|
||||
'pagelayer-frontend.css',
|
||||
'premium-frontend.css',
|
||||
'animate.min.css',
|
||||
'chartist.min.css',
|
||||
'pagelayer-pen.css'
|
||||
);
|
||||
|
||||
// What files to give
|
||||
$give = @$_REQUEST['give'];
|
||||
|
||||
// Premium
|
||||
$premium = @$_REQUEST['premium'];
|
||||
|
||||
if(!empty($give)){
|
||||
|
||||
$give = explode(',', $give);
|
||||
|
||||
// Check all files are in the supported list
|
||||
foreach($give as $file){
|
||||
if(in_array($file, $files)){
|
||||
$final[md5($file)] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!empty($premium)){
|
||||
|
||||
$premium = explode(',', trim($premium, ','));
|
||||
|
||||
// Check all files are in the supported list
|
||||
foreach($premium as $file){
|
||||
if(in_array($file, $files)){
|
||||
$final_premium[md5($file)] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Give all
|
||||
if(empty($final)){
|
||||
$final = $files;
|
||||
}
|
||||
|
||||
foreach($final as $k => $v){
|
||||
//echo $k.'<br>';
|
||||
$data .= file_get_contents($self_path.'/'.$v)."\n\n";
|
||||
}
|
||||
|
||||
if(!empty($final_premium)){
|
||||
|
||||
foreach($final_premium as $k => $v){
|
||||
//echo $k.'<br>';
|
||||
$data_premium .= file_get_contents($self_path.'/'.$v)."\n\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// We are zipping if possible
|
||||
if(function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')){
|
||||
ob_start('ob_gzhandler');
|
||||
}
|
||||
|
||||
// Type CSS
|
||||
header("Content-type: text/css; charset: UTF-8");
|
||||
|
||||
// Set a zero Mtime
|
||||
$filetime = filemtime($self_path.'/pagelayer-editor.css');
|
||||
|
||||
// Cache Control
|
||||
header("Cache-Control: must-revalidate");
|
||||
|
||||
// Checking if the client is validating his cache and if it is current.
|
||||
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && (@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $filetime)) {
|
||||
|
||||
// Client's cache IS current, so we just respond '304 Not Modified'.
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filetime).' GMT', true, 304);
|
||||
|
||||
return;
|
||||
|
||||
}else{
|
||||
|
||||
// Image not cached or cache outdated, we respond '200 OK' and output the image.
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filetime).' GMT', true, 200);
|
||||
|
||||
}
|
||||
|
||||
if(defined('DOING_AJAX') && !defined('SITEPAD')){
|
||||
$data = str_replace('../fonts/', '../wp-content/plugins/'.(basename(dirname(dirname(__FILE__)))).'/fonts/', $data);
|
||||
}
|
||||
|
||||
echo $data;
|
||||
echo $data_premium;
|
||||
|
||||
// Write if we are front-end only then
|
||||
$dev = dirname(dirname(__FILE__)).'/dev.php';
|
||||
if(!empty($_REQUEST['write']) && file_exists($dev)){
|
||||
include_once($dev);
|
||||
write_css();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,306 +1,306 @@
|
||||
/*!
|
||||
* Nivo Lightbox v1.3.1
|
||||
* http://dev7studios.com/nivo-lightbox
|
||||
*
|
||||
* Copyright 2013, Dev7studios
|
||||
* Free to use and abuse under the MIT license.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
.nivo-lightbox-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 99998;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.nivo-lightbox-overlay.nivo-lightbox-open {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
.nivo-lightbox-wrap {
|
||||
position: absolute;
|
||||
top: 10%;
|
||||
bottom: 10%;
|
||||
left: 10%;
|
||||
right: 10%;
|
||||
}
|
||||
.nivo-lightbox-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.nivo-lightbox-title-wrap {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 99999;
|
||||
text-align: center;
|
||||
}
|
||||
.nivo-lightbox-nav { display: none; }
|
||||
.nivo-lightbox-prev {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
}
|
||||
.nivo-lightbox-next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
}
|
||||
.nivo-lightbox-close {
|
||||
position: absolute;
|
||||
top: 2%;
|
||||
right: 2%;
|
||||
}
|
||||
|
||||
.nivo-lightbox-image { text-align: center; }
|
||||
.nivo-lightbox-image img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
width: auto;
|
||||
height: auto;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
}
|
||||
.nivo-lightbox-content iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.nivo-lightbox-inline,
|
||||
.nivo-lightbox-ajax {
|
||||
max-height: 100%;
|
||||
overflow: auto;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
/* https://bugzilla.mozilla.org/show_bug.cgi?id=308801 */
|
||||
}
|
||||
.nivo-lightbox-error {
|
||||
display: table;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #fff;
|
||||
text-shadow: 0 1px 1px #000;
|
||||
}
|
||||
.nivo-lightbox-error p {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Effects
|
||||
**********************************************/
|
||||
.nivo-lightbox-notouch .nivo-lightbox-effect-fade,
|
||||
.nivo-lightbox-notouch .nivo-lightbox-effect-fadeScale,
|
||||
.nivo-lightbox-notouch .nivo-lightbox-effect-slideLeft,
|
||||
.nivo-lightbox-notouch .nivo-lightbox-effect-slideRight,
|
||||
.nivo-lightbox-notouch .nivo-lightbox-effect-slideUp,
|
||||
.nivo-lightbox-notouch .nivo-lightbox-effect-slideDown,
|
||||
.nivo-lightbox-notouch .nivo-lightbox-effect-fall {
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
-moz-transition: all 0.2s ease-in-out;
|
||||
-ms-transition: all 0.2s ease-in-out;
|
||||
-o-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
/* fadeScale */
|
||||
.nivo-lightbox-effect-fadeScale .nivo-lightbox-wrap {
|
||||
-webkit-transition: all 0.3s;
|
||||
-moz-transition: all 0.3s;
|
||||
-ms-transition: all 0.3s;
|
||||
-o-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
-webkit-transform: scale(0.7);
|
||||
-moz-transform: scale(0.7);
|
||||
-ms-transform: scale(0.7);
|
||||
transform: scale(0.7);
|
||||
}
|
||||
.nivo-lightbox-effect-fadeScale.nivo-lightbox-open .nivo-lightbox-wrap {
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
/* slideLeft / slideRight / slideUp / slideDown */
|
||||
.nivo-lightbox-effect-slideLeft .nivo-lightbox-wrap,
|
||||
.nivo-lightbox-effect-slideRight .nivo-lightbox-wrap,
|
||||
.nivo-lightbox-effect-slideUp .nivo-lightbox-wrap,
|
||||
.nivo-lightbox-effect-slideDown .nivo-lightbox-wrap {
|
||||
-webkit-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
-moz-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
-ms-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
-o-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
}
|
||||
.nivo-lightbox-effect-slideLeft .nivo-lightbox-wrap {
|
||||
-webkit-transform: translateX(-10%);
|
||||
-moz-transform: translateX(-10%);
|
||||
-ms-transform: translateX(-10%);
|
||||
transform: translateX(-10%);
|
||||
}
|
||||
.nivo-lightbox-effect-slideRight .nivo-lightbox-wrap {
|
||||
-webkit-transform: translateX(10%);
|
||||
-moz-transform: translateX(10%);
|
||||
-ms-transform: translateX(10%);
|
||||
transform: translateX(10%);
|
||||
}
|
||||
.nivo-lightbox-effect-slideLeft.nivo-lightbox-open .nivo-lightbox-wrap,
|
||||
.nivo-lightbox-effect-slideRight.nivo-lightbox-open .nivo-lightbox-wrap {
|
||||
-webkit-transform: translateX(0);
|
||||
-moz-transform: translateX(0);
|
||||
-ms-transform: translateX(0);
|
||||
transform: translateX(0);
|
||||
}
|
||||
.nivo-lightbox-effect-slideDown .nivo-lightbox-wrap {
|
||||
-webkit-transform: translateY(-10%);
|
||||
-moz-transform: translateY(-10%);
|
||||
-ms-transform: translateY(-10%);
|
||||
transform: translateY(-10%);
|
||||
}
|
||||
.nivo-lightbox-effect-slideUp .nivo-lightbox-wrap {
|
||||
-webkit-transform: translateY(10%);
|
||||
-moz-transform: translateY(10%);
|
||||
-ms-transform: translateY(10%);
|
||||
transform: translateY(10%);
|
||||
}
|
||||
.nivo-lightbox-effect-slideUp.nivo-lightbox-open .nivo-lightbox-wrap,
|
||||
.nivo-lightbox-effect-slideDown.nivo-lightbox-open .nivo-lightbox-wrap {
|
||||
-webkit-transform: translateY(0);
|
||||
-moz-transform: translateY(0);
|
||||
-ms-transform: translateY(0);
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
/* fall */
|
||||
.nivo-lightbox-body-effect-fall .nivo-lightbox-effect-fall {
|
||||
-webkit-perspective: 1000px;
|
||||
-moz-perspective: 1000px;
|
||||
perspective: 1000px;
|
||||
}
|
||||
.nivo-lightbox-effect-fall .nivo-lightbox-wrap {
|
||||
-webkit-transition: all 0.3s ease-out;
|
||||
-moz-transition: all 0.3s ease-out;
|
||||
-ms-transition: all 0.3s ease-out;
|
||||
-o-transition: all 0.3s ease-out;
|
||||
transition: all 0.3s ease-out;
|
||||
-webkit-transform: translateZ(300px);
|
||||
-moz-transform: translateZ(300px);
|
||||
-ms-transform: translateZ(300px);
|
||||
transform: translateZ(300px);
|
||||
}
|
||||
.nivo-lightbox-effect-fall.nivo-lightbox-open .nivo-lightbox-wrap {
|
||||
-webkit-transform: translateZ(0);
|
||||
-moz-transform: translateZ(0);
|
||||
-ms-transform: translateZ(0);
|
||||
transform: translateZ(0);
|
||||
}
|
||||
/*
|
||||
* Nivo Lightbox Default Theme v1.0
|
||||
* http://dev7studios.com/nivo-lightbox
|
||||
*
|
||||
* Copyright 2013, Dev7studios
|
||||
* Free to use and abuse under the MIT license.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
.nivo-lightbox-theme-default.nivo-lightbox-overlay {
|
||||
background: #666;
|
||||
background: rgba(0,0,0,0.6);
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-content.nivo-lightbox-loading { background: url(../images/nivo-icons/loading.gif) no-repeat 50% 50%; }
|
||||
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-nav {
|
||||
top: 10%;
|
||||
width: 8%;
|
||||
height: 80%;
|
||||
text-indent: -9999px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50% 50%;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-nav:hover {
|
||||
opacity: 1;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-prev {
|
||||
background-image: url(../images/nivo-icons/prev.png);
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-next {
|
||||
background-image: url(../images/nivo-icons/next.png);
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-close {
|
||||
display: block;
|
||||
background: url(../images/nivo-icons/close.png) no-repeat;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
text-indent: -9999px;
|
||||
padding: 5px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-close:hover { opacity: 1; }
|
||||
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-title-wrap { bottom: -7%; }
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-title {
|
||||
font: 14px/20px 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
padding: 7px 15px;
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-image img {
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
|
||||
box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-ajax,
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-inline {
|
||||
background: #fff;
|
||||
padding: 40px;
|
||||
-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
|
||||
box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
@media (-webkit-min-device-pixel-ratio: 1.3),
|
||||
(-o-min-device-pixel-ratio: 2.6/2),
|
||||
(min--moz-device-pixel-ratio: 1.3),
|
||||
(min-device-pixel-ratio: 1.3),
|
||||
(min-resolution: 1.3dppx) {
|
||||
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-content.nivo-lightbox-loading {
|
||||
background-image: url(../images/nivo-icons/loading@2x.gif);
|
||||
-webkit-background-size: 32px 32px;
|
||||
background-size: 32px 32px;
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-prev {
|
||||
background-image: url(../images/nivo-icons/prev@2x.png);
|
||||
-webkit-background-size: 48px 48px;
|
||||
background-size: 48px 48px;
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-next {
|
||||
background-image: url(../images/nivo-icons/next@2x.png);
|
||||
-webkit-background-size: 48px 48px;
|
||||
background-size: 48px 48px;
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-close {
|
||||
background-image: url(../images/nivo-icons/close@2x.png);
|
||||
-webkit-background-size: 16px 16px;
|
||||
background-size: 16px 16px;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Nivo Lightbox v1.3.1
|
||||
* http://dev7studios.com/nivo-lightbox
|
||||
*
|
||||
* Copyright 2013, Dev7studios
|
||||
* Free to use and abuse under the MIT license.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
.nivo-lightbox-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 99998;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.nivo-lightbox-overlay.nivo-lightbox-open {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
.nivo-lightbox-wrap {
|
||||
position: absolute;
|
||||
top: 10%;
|
||||
bottom: 10%;
|
||||
left: 10%;
|
||||
right: 10%;
|
||||
}
|
||||
.nivo-lightbox-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.nivo-lightbox-title-wrap {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 99999;
|
||||
text-align: center;
|
||||
}
|
||||
.nivo-lightbox-nav { display: none; }
|
||||
.nivo-lightbox-prev {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
}
|
||||
.nivo-lightbox-next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
}
|
||||
.nivo-lightbox-close {
|
||||
position: absolute;
|
||||
top: 2%;
|
||||
right: 2%;
|
||||
}
|
||||
|
||||
.nivo-lightbox-image { text-align: center; }
|
||||
.nivo-lightbox-image img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
width: auto;
|
||||
height: auto;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
}
|
||||
.nivo-lightbox-content iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.nivo-lightbox-inline,
|
||||
.nivo-lightbox-ajax {
|
||||
max-height: 100%;
|
||||
overflow: auto;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
/* https://bugzilla.mozilla.org/show_bug.cgi?id=308801 */
|
||||
}
|
||||
.nivo-lightbox-error {
|
||||
display: table;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #fff;
|
||||
text-shadow: 0 1px 1px #000;
|
||||
}
|
||||
.nivo-lightbox-error p {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Effects
|
||||
**********************************************/
|
||||
.nivo-lightbox-notouch .nivo-lightbox-effect-fade,
|
||||
.nivo-lightbox-notouch .nivo-lightbox-effect-fadeScale,
|
||||
.nivo-lightbox-notouch .nivo-lightbox-effect-slideLeft,
|
||||
.nivo-lightbox-notouch .nivo-lightbox-effect-slideRight,
|
||||
.nivo-lightbox-notouch .nivo-lightbox-effect-slideUp,
|
||||
.nivo-lightbox-notouch .nivo-lightbox-effect-slideDown,
|
||||
.nivo-lightbox-notouch .nivo-lightbox-effect-fall {
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
-moz-transition: all 0.2s ease-in-out;
|
||||
-ms-transition: all 0.2s ease-in-out;
|
||||
-o-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
/* fadeScale */
|
||||
.nivo-lightbox-effect-fadeScale .nivo-lightbox-wrap {
|
||||
-webkit-transition: all 0.3s;
|
||||
-moz-transition: all 0.3s;
|
||||
-ms-transition: all 0.3s;
|
||||
-o-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
-webkit-transform: scale(0.7);
|
||||
-moz-transform: scale(0.7);
|
||||
-ms-transform: scale(0.7);
|
||||
transform: scale(0.7);
|
||||
}
|
||||
.nivo-lightbox-effect-fadeScale.nivo-lightbox-open .nivo-lightbox-wrap {
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
/* slideLeft / slideRight / slideUp / slideDown */
|
||||
.nivo-lightbox-effect-slideLeft .nivo-lightbox-wrap,
|
||||
.nivo-lightbox-effect-slideRight .nivo-lightbox-wrap,
|
||||
.nivo-lightbox-effect-slideUp .nivo-lightbox-wrap,
|
||||
.nivo-lightbox-effect-slideDown .nivo-lightbox-wrap {
|
||||
-webkit-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
-moz-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
-ms-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
-o-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
}
|
||||
.nivo-lightbox-effect-slideLeft .nivo-lightbox-wrap {
|
||||
-webkit-transform: translateX(-10%);
|
||||
-moz-transform: translateX(-10%);
|
||||
-ms-transform: translateX(-10%);
|
||||
transform: translateX(-10%);
|
||||
}
|
||||
.nivo-lightbox-effect-slideRight .nivo-lightbox-wrap {
|
||||
-webkit-transform: translateX(10%);
|
||||
-moz-transform: translateX(10%);
|
||||
-ms-transform: translateX(10%);
|
||||
transform: translateX(10%);
|
||||
}
|
||||
.nivo-lightbox-effect-slideLeft.nivo-lightbox-open .nivo-lightbox-wrap,
|
||||
.nivo-lightbox-effect-slideRight.nivo-lightbox-open .nivo-lightbox-wrap {
|
||||
-webkit-transform: translateX(0);
|
||||
-moz-transform: translateX(0);
|
||||
-ms-transform: translateX(0);
|
||||
transform: translateX(0);
|
||||
}
|
||||
.nivo-lightbox-effect-slideDown .nivo-lightbox-wrap {
|
||||
-webkit-transform: translateY(-10%);
|
||||
-moz-transform: translateY(-10%);
|
||||
-ms-transform: translateY(-10%);
|
||||
transform: translateY(-10%);
|
||||
}
|
||||
.nivo-lightbox-effect-slideUp .nivo-lightbox-wrap {
|
||||
-webkit-transform: translateY(10%);
|
||||
-moz-transform: translateY(10%);
|
||||
-ms-transform: translateY(10%);
|
||||
transform: translateY(10%);
|
||||
}
|
||||
.nivo-lightbox-effect-slideUp.nivo-lightbox-open .nivo-lightbox-wrap,
|
||||
.nivo-lightbox-effect-slideDown.nivo-lightbox-open .nivo-lightbox-wrap {
|
||||
-webkit-transform: translateY(0);
|
||||
-moz-transform: translateY(0);
|
||||
-ms-transform: translateY(0);
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
/* fall */
|
||||
.nivo-lightbox-body-effect-fall .nivo-lightbox-effect-fall {
|
||||
-webkit-perspective: 1000px;
|
||||
-moz-perspective: 1000px;
|
||||
perspective: 1000px;
|
||||
}
|
||||
.nivo-lightbox-effect-fall .nivo-lightbox-wrap {
|
||||
-webkit-transition: all 0.3s ease-out;
|
||||
-moz-transition: all 0.3s ease-out;
|
||||
-ms-transition: all 0.3s ease-out;
|
||||
-o-transition: all 0.3s ease-out;
|
||||
transition: all 0.3s ease-out;
|
||||
-webkit-transform: translateZ(300px);
|
||||
-moz-transform: translateZ(300px);
|
||||
-ms-transform: translateZ(300px);
|
||||
transform: translateZ(300px);
|
||||
}
|
||||
.nivo-lightbox-effect-fall.nivo-lightbox-open .nivo-lightbox-wrap {
|
||||
-webkit-transform: translateZ(0);
|
||||
-moz-transform: translateZ(0);
|
||||
-ms-transform: translateZ(0);
|
||||
transform: translateZ(0);
|
||||
}
|
||||
/*
|
||||
* Nivo Lightbox Default Theme v1.0
|
||||
* http://dev7studios.com/nivo-lightbox
|
||||
*
|
||||
* Copyright 2013, Dev7studios
|
||||
* Free to use and abuse under the MIT license.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
.nivo-lightbox-theme-default.nivo-lightbox-overlay {
|
||||
background: #666;
|
||||
background: rgba(0,0,0,0.6);
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-content.nivo-lightbox-loading { background: url(../images/nivo-icons/loading.gif) no-repeat 50% 50%; }
|
||||
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-nav {
|
||||
top: 10%;
|
||||
width: 8%;
|
||||
height: 80%;
|
||||
text-indent: -9999px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50% 50%;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-nav:hover {
|
||||
opacity: 1;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-prev {
|
||||
background-image: url(../images/nivo-icons/prev.png);
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-next {
|
||||
background-image: url(../images/nivo-icons/next.png);
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-close {
|
||||
display: block;
|
||||
background: url(../images/nivo-icons/close.png) no-repeat;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
text-indent: -9999px;
|
||||
padding: 5px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-close:hover { opacity: 1; }
|
||||
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-title-wrap { bottom: -7%; }
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-title {
|
||||
font: 14px/20px 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
padding: 7px 15px;
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-image img {
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
|
||||
box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-ajax,
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-inline {
|
||||
background: #fff;
|
||||
padding: 40px;
|
||||
-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
|
||||
box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
@media (-webkit-min-device-pixel-ratio: 1.3),
|
||||
(-o-min-device-pixel-ratio: 2.6/2),
|
||||
(min--moz-device-pixel-ratio: 1.3),
|
||||
(min-device-pixel-ratio: 1.3),
|
||||
(min-resolution: 1.3dppx) {
|
||||
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-content.nivo-lightbox-loading {
|
||||
background-image: url(../images/nivo-icons/loading@2x.gif);
|
||||
-webkit-background-size: 32px 32px;
|
||||
background-size: 32px 32px;
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-prev {
|
||||
background-image: url(../images/nivo-icons/prev@2x.png);
|
||||
-webkit-background-size: 48px 48px;
|
||||
background-size: 48px 48px;
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-next {
|
||||
background-image: url(../images/nivo-icons/next@2x.png);
|
||||
-webkit-background-size: 48px 48px;
|
||||
background-size: 48px 48px;
|
||||
}
|
||||
.nivo-lightbox-theme-default .nivo-lightbox-close {
|
||||
background-image: url(../images/nivo-icons/close@2x.png);
|
||||
-webkit-background-size: 16px 16px;
|
||||
background-size: 16px 16px;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
1) Rename all CSS .owl to .pagelayer-owl
|
||||
1) Rename all CSS .owl to .pagelayer-owl
|
||||
2) Rename owlCarousel to pagelayerowlCarousel in JS
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Owl Carousel v2.3.4
|
||||
* Copyright 2013-2018 David Deutsch
|
||||
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
|
||||
*/
|
||||
/**
|
||||
* Owl Carousel v2.3.4
|
||||
* Copyright 2013-2018 David Deutsch
|
||||
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
|
||||
*/
|
||||
.pagelayer-owl-carousel,.pagelayer-owl-carousel .pagelayer-owl-item{-webkit-tap-highlight-color:transparent;position:relative}.pagelayer-owl-carousel{display:none;width:100%;z-index:1}.pagelayer-owl-carousel .pagelayer-owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.pagelayer-owl-carousel .pagelayer-owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.pagelayer-owl-carousel .pagelayer-owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.pagelayer-owl-carousel .pagelayer-owl-item,.pagelayer-owl-carousel .pagelayer-owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.pagelayer-owl-carousel .pagelayer-owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.pagelayer-owl-carousel .pagelayer-owl-item img{display:block;width:100%}.pagelayer-owl-carousel .pagelayer-owl-dots.disabled,.pagelayer-owl-carousel .pagelayer-owl-nav.disabled{display:none}.no-js .pagelayer-owl-carousel,.pagelayer-owl-carousel.pagelayer-owl-loaded{display:block}.pagelayer-owl-carousel .pagelayer-owl-dot,.pagelayer-owl-carousel .pagelayer-owl-nav .pagelayer-owl-next,.pagelayer-owl-carousel .pagelayer-owl-nav .pagelayer-owl-prev{cursor:pointer;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pagelayer-owl-carousel .pagelayer-owl-nav button.pagelayer-owl-next,.pagelayer-owl-carousel .pagelayer-owl-nav button.pagelayer-owl-prev,.pagelayer-owl-carousel button.pagelayer-owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.pagelayer-owl-carousel.pagelayer-owl-loading{opacity:0;display:block}.pagelayer-owl-carousel.pagelayer-owl-hidden{opacity:0}.pagelayer-owl-carousel.pagelayer-owl-refresh .pagelayer-owl-item{visibility:hidden}.pagelayer-owl-carousel.pagelayer-owl-drag .pagelayer-owl-item{-ms-touch-action:pan-y;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pagelayer-owl-carousel.pagelayer-owl-grab{cursor:move;cursor:grab}.pagelayer-owl-carousel.pagelayer-owl-rtl{direction:rtl}.pagelayer-owl-carousel.pagelayer-owl-rtl .pagelayer-owl-item{float:right}.pagelayer-owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.pagelayer-owl-carousel .pagelayer-owl-animated-in{z-index:0}.pagelayer-owl-carousel .pagelayer-owl-animated-out{z-index:1}.pagelayer-owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.pagelayer-owl-height{transition:height .5s ease-in-out}.pagelayer-owl-carousel .pagelayer-owl-item .pagelayer-owl-lazy{opacity:0;transition:opacity .4s ease}.pagelayer-owl-carousel .pagelayer-owl-item .pagelayer-owl-lazy:not([src]),.pagelayer-owl-carousel .pagelayer-owl-item .pagelayer-owl-lazy[src^=""]{max-height:0}.pagelayer-owl-carousel .pagelayer-owl-item img.pagelayer-owl-lazy{transform-style:preserve-3d}.pagelayer-owl-carousel .pagelayer-owl-video-wrapper{position:relative;height:100%;background:#000}.pagelayer-owl-carousel .pagelayer-owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.pagelayer-owl-carousel .pagelayer-owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.pagelayer-owl-carousel .pagelayer-owl-video-playing .pagelayer-owl-video-play-icon,.pagelayer-owl-carousel .pagelayer-owl-video-playing .pagelayer-owl-video-tn{display:none}.pagelayer-owl-carousel .pagelayer-owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.pagelayer-owl-carousel .pagelayer-owl-video-frame{position:relative;z-index:1;height:100%;width:100%}
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Owl Carousel v2.3.4
|
||||
* Copyright 2013-2018 David Deutsch
|
||||
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
|
||||
*/
|
||||
/**
|
||||
* Owl Carousel v2.3.4
|
||||
* Copyright 2013-2018 David Deutsch
|
||||
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
|
||||
*/
|
||||
.pagelayer-owl-theme .pagelayer-owl-dots,.pagelayer-owl-theme .pagelayer-owl-nav{text-align:center;-webkit-tap-highlight-color:transparent}.pagelayer-owl-theme .pagelayer-owl-nav{margin-top:10px}.pagelayer-owl-theme .pagelayer-owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px}.pagelayer-owl-theme .pagelayer-owl-nav [class*=owl-]:hover{background:#869791;color:#FFF;text-decoration:none}.pagelayer-owl-theme .pagelayer-owl-nav .disabled{opacity:.5;cursor:default}.pagelayer-owl-theme .pagelayer-owl-nav.disabled+.pagelayer-owl-dots{margin-top:10px}.pagelayer-owl-theme .pagelayer-owl-dots .pagelayer-owl-dot{display:inline-block;zoom:1}.pagelayer-owl-theme .pagelayer-owl-dots .pagelayer-owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}.pagelayer-owl-theme .pagelayer-owl-dots .pagelayer-owl-dot.active span,.pagelayer-owl-theme .pagelayer-owl-dots .pagelayer-owl-dot:hover span{background:#869791}
|
||||
@@ -1,152 +1,152 @@
|
||||
.pagelayer-tab-panel{
|
||||
padding:20px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.pagelayer-setting-form th, .pagelayer-setting-form td{
|
||||
padding:10px 20px 10px 0px;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.pagelayer-internal-table th, .pagelayer-internal-table td{
|
||||
padding:3px;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.pagelayer-acc-wrapper{
|
||||
width:90%;
|
||||
}
|
||||
|
||||
.pagelayer-acc-wrapper .pagelayer-acc-tab{
|
||||
width:100%;
|
||||
float:unset;
|
||||
display:block;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
.pagelayer-acc-wrapper .pagelayer-acc-panel{
|
||||
padding:0px 20px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.pagelayer-setting-form td .pagelayer-app-id{
|
||||
width:350px;
|
||||
}
|
||||
|
||||
.pagelayer-cf table{
|
||||
width: 80%;
|
||||
}
|
||||
.pagelayer-cf table label,
|
||||
.pagelayer-cf table input:not([type="checkbox"]):not([type="radio"]),
|
||||
.pagelayer-cf table textarea{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pagelayer-show-vanilla{
|
||||
border: 1px solid #0495ce;
|
||||
display: block;
|
||||
padding: 4px;
|
||||
text-decoration: none;
|
||||
position: relative;
|
||||
width: 40px;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.pagelayer-show-vanilla .dashicons{
|
||||
position: absolute;
|
||||
right:0px;
|
||||
top: 0px;
|
||||
font-size: 14px;
|
||||
background: #686868;
|
||||
color: #fff;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.pagelayer-color-div{
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.pagelayer-color-none{
|
||||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgBAMAAAB54XoeAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAC1QTFRFAAAAAQEBBQUFDAwM9PT0+vr6/////v7+BAQE+/v7AgIC/f39AwMDDQ0N8/Pzb6ggJQAAAZ5JREFUeJztlr1twzAQhU+tK7ELDDdBNsgO2SAznAr3JAJXWSJp49YLuPAW2cJbhEdSQZBCEMRHgMVj5U80HnkSfz4Ra06eXjSoTvr6HKGGU94o8vBpqPr2LjLUcAr8ikNEnLx6jT93VZxneBn1Zg9uOlxsxO0suTkXfJywTsG5Ok5x9hK0NKM6bhEosh+nq+HJD+c6TmvG2r8RtrMb9g4aOKY3CA0ElyyHcbAHIXNw5Q9bWeLG2aUH80ItU97K8ihlhmmIUFb+dpZvOceNE7fOnz/UsNztHAMEzSwf6idEqTOLHv0R8THc7/o72Qzrl8vMwAVdmreDFhloLxQcCC65QSC45AYfBV0yfGGjtx78cLjrVaHHF/yAhV8B8EsKfo3CL/pRHFZFnIBlCa5z9EP6If1wBdMPe5QleMkNAumHuZ9+SD9cYPphjzpHP6Qf0g9XMP2wR1mCl9wgkH6Y++mH9MMFph/2qHP0Q/oh/XAF0w97lCV4yQ0C6Ye5n35IP1xg+mGPOkc/pB/SD1cw/bBHWYKX3CCQfpj76Yfr+QfwnsxmcLvdhQAAAABJRU5ErkJggg==') !important;
|
||||
background-size: cover !important;
|
||||
}
|
||||
|
||||
.pagelayer-heading-tab-panel{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.pagelayer-styles-screens > li{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.pagelayer-heading-tab{
|
||||
background: #fff !important;
|
||||
border: 1px solid #ccc;
|
||||
border-bottom: 0px;
|
||||
border-radius:0px;
|
||||
}
|
||||
|
||||
.pagelayer-heading-wrapper{
|
||||
margin-right: 20px;
|
||||
border-bottom: unset;
|
||||
}
|
||||
|
||||
.pagelayer-heading-wrapper .nav-tab{
|
||||
display:block;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.pagelayer-website-padding{
|
||||
width:65px;
|
||||
}
|
||||
|
||||
.pagelayer-notice{
|
||||
padding: 10px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.pagelayer-notice-info{
|
||||
border-left: 5px solid #00a0d2 !important;
|
||||
}
|
||||
|
||||
.button-pagelayer{
|
||||
padding: 12px 25px !important;
|
||||
font-size: 15px !important;
|
||||
font-weight: bold;
|
||||
background: #7444fd !important;
|
||||
color: #fff !important;
|
||||
border: 1px solid #7444fd !important;
|
||||
transition: all .3s linear;
|
||||
pointer: cursor;
|
||||
}
|
||||
|
||||
.button-pagelayer:hover{
|
||||
background: #fff !important;
|
||||
color: #7444fd !important;
|
||||
}
|
||||
|
||||
.pagelayer-pro-div{
|
||||
margin: 50px auto;
|
||||
display: block;
|
||||
max-width: 700px;
|
||||
padding: 20px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.pagelayer-pro-head{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pagelayer-pro-message{
|
||||
margin: 25px auto;
|
||||
font-size: 15px;
|
||||
padding: 2px 25px;
|
||||
text-align: center;
|
||||
line-height: 1.8;
|
||||
.pagelayer-tab-panel{
|
||||
padding:20px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.pagelayer-setting-form th, .pagelayer-setting-form td{
|
||||
padding:10px 20px 10px 0px;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.pagelayer-internal-table th, .pagelayer-internal-table td{
|
||||
padding:3px;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.pagelayer-acc-wrapper{
|
||||
width:90%;
|
||||
}
|
||||
|
||||
.pagelayer-acc-wrapper .pagelayer-acc-tab{
|
||||
width:100%;
|
||||
float:unset;
|
||||
display:block;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
.pagelayer-acc-wrapper .pagelayer-acc-panel{
|
||||
padding:0px 20px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.pagelayer-setting-form td .pagelayer-app-id{
|
||||
width:350px;
|
||||
}
|
||||
|
||||
.pagelayer-cf table{
|
||||
width: 80%;
|
||||
}
|
||||
.pagelayer-cf table label,
|
||||
.pagelayer-cf table input:not([type="checkbox"]):not([type="radio"]),
|
||||
.pagelayer-cf table textarea{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pagelayer-show-vanilla{
|
||||
border: 1px solid #0495ce;
|
||||
display: block;
|
||||
padding: 4px;
|
||||
text-decoration: none;
|
||||
position: relative;
|
||||
width: 40px;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.pagelayer-show-vanilla .dashicons{
|
||||
position: absolute;
|
||||
right:0px;
|
||||
top: 0px;
|
||||
font-size: 14px;
|
||||
background: #686868;
|
||||
color: #fff;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.pagelayer-color-div{
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.pagelayer-color-none{
|
||||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgBAMAAAB54XoeAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAC1QTFRFAAAAAQEBBQUFDAwM9PT0+vr6/////v7+BAQE+/v7AgIC/f39AwMDDQ0N8/Pzb6ggJQAAAZ5JREFUeJztlr1twzAQhU+tK7ELDDdBNsgO2SAznAr3JAJXWSJp49YLuPAW2cJbhEdSQZBCEMRHgMVj5U80HnkSfz4Ra06eXjSoTvr6HKGGU94o8vBpqPr2LjLUcAr8ikNEnLx6jT93VZxneBn1Zg9uOlxsxO0suTkXfJywTsG5Ok5x9hK0NKM6bhEosh+nq+HJD+c6TmvG2r8RtrMb9g4aOKY3CA0ElyyHcbAHIXNw5Q9bWeLG2aUH80ItU97K8ihlhmmIUFb+dpZvOceNE7fOnz/UsNztHAMEzSwf6idEqTOLHv0R8THc7/o72Qzrl8vMwAVdmreDFhloLxQcCC65QSC45AYfBV0yfGGjtx78cLjrVaHHF/yAhV8B8EsKfo3CL/pRHFZFnIBlCa5z9EP6If1wBdMPe5QleMkNAumHuZ9+SD9cYPphjzpHP6Qf0g9XMP2wR1mCl9wgkH6Y++mH9MMFph/2qHP0Q/oh/XAF0w97lCV4yQ0C6Ye5n35IP1xg+mGPOkc/pB/SD1cw/bBHWYKX3CCQfpj76Yfr+QfwnsxmcLvdhQAAAABJRU5ErkJggg==') !important;
|
||||
background-size: cover !important;
|
||||
}
|
||||
|
||||
.pagelayer-heading-tab-panel{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.pagelayer-styles-screens > li{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.pagelayer-heading-tab{
|
||||
background: #fff !important;
|
||||
border: 1px solid #ccc;
|
||||
border-bottom: 0px;
|
||||
border-radius:0px;
|
||||
}
|
||||
|
||||
.pagelayer-heading-wrapper{
|
||||
margin-right: 20px;
|
||||
border-bottom: unset;
|
||||
}
|
||||
|
||||
.pagelayer-heading-wrapper .nav-tab{
|
||||
display:block;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.pagelayer-website-padding{
|
||||
width:65px;
|
||||
}
|
||||
|
||||
.pagelayer-notice{
|
||||
padding: 10px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.pagelayer-notice-info{
|
||||
border-left: 5px solid #00a0d2 !important;
|
||||
}
|
||||
|
||||
.button-pagelayer{
|
||||
padding: 12px 25px !important;
|
||||
font-size: 15px !important;
|
||||
font-weight: bold;
|
||||
background: #7444fd !important;
|
||||
color: #fff !important;
|
||||
border: 1px solid #7444fd !important;
|
||||
transition: all .3s linear;
|
||||
pointer: cursor;
|
||||
}
|
||||
|
||||
.button-pagelayer:hover{
|
||||
background: #fff !important;
|
||||
color: #7444fd !important;
|
||||
}
|
||||
|
||||
.pagelayer-pro-div{
|
||||
margin: 50px auto;
|
||||
display: block;
|
||||
max-width: 700px;
|
||||
padding: 20px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.pagelayer-pro-head{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pagelayer-pro-message{
|
||||
margin: 25px auto;
|
||||
font-size: 15px;
|
||||
padding: 2px 25px;
|
||||
text-align: center;
|
||||
line-height: 1.8;
|
||||
}
|
||||
@@ -1,365 +1,365 @@
|
||||
/* Pagelayer Pen editor*/
|
||||
.pagelayer-pen{
|
||||
-webkit-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.pagelayer-pen-holder{
|
||||
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
|
||||
background-color: #ffffff;
|
||||
position: fixed;
|
||||
z-index: 9999999999;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
transform: translateY(-100%);
|
||||
box-shadow: 0 4px 5px 0 rgb(0 0 0 / 14%), 0 1px 10px 0 rgb(0 0 0 / 12%), 0 2px 4px -1px rgb(0 0 0 / 20%);
|
||||
border-radius: 2px;
|
||||
line-height: 1;
|
||||
padding: 8px 2px;
|
||||
font-size: 15px !important;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pagelayer-pen-toolbar{
|
||||
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
|
||||
box-sizing: border-box;
|
||||
width: max-content;
|
||||
max-width: 90vw;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pagelayer-pen-toolbar .pagelayer-pen-formats{
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
padding-right: 7px;
|
||||
padding-left: 7px;
|
||||
border-left:1px solid #ccc;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.pagelayer-pen-toolbar button{
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
height: 24px;
|
||||
padding: 3px 5px;
|
||||
width: 28px;
|
||||
font-size: 14px !important;
|
||||
font-weight: 700 !important;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.pagelayer-pen-toolbar button strong{
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.pagelayer-pen-toolbar .pagelayer-pen-formats:first-child {
|
||||
padding-left: 0px !important;
|
||||
border-left: 0px;
|
||||
}
|
||||
/* Start Dropdown picker*/
|
||||
.pagelayer-pen-picker{
|
||||
color: #444;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
height: 24px;
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
padding:3px 5px;
|
||||
font-size: 14px !important;
|
||||
font-weight: 500 !important;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-label {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker .pagelayer-pen-picker-label:after {
|
||||
content: "\f0dc";
|
||||
padding-left: 15px;
|
||||
font-weight: 600;
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker.pagelayer-pen-font .pagelayer-pen-picker-label:after,
|
||||
.pagelayer-pen-picker.pagelayer-pen-lineheight .pagelayer-pen-picker-label:after,
|
||||
.pagelayer-pen-picker.pagelayer-pen-color-picker .pagelayer-pen-picker-label:after {
|
||||
content: "";
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-label::before {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-options {
|
||||
background-color: #fff;
|
||||
display: none;
|
||||
min-width: 100%;
|
||||
padding: 4px 8px;
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
margin-left: -8px;
|
||||
max-height: 200px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-options::-webkit-scrollbar {
|
||||
width:3px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-options::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-options::-webkit-scrollbar-thumb {
|
||||
background: #888;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-options::-webkit-scrollbar-thumb:hover {
|
||||
background: #555;
|
||||
cursor:context-menu;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-options .pagelayer-pen-picker-item {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
padding-bottom: 5px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker.pagelayer-pen-expanded .pagelayer-pen-picker-label {
|
||||
color: #ccc;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker.pagelayer-pen-expanded .pagelayer-pen-picker-label .pagelayer-pen-fill {
|
||||
fill: #ccc;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker.pagelayer-pen-expanded .pagelayer-pen-picker-label .pagelayer-pen-stroke {
|
||||
stroke: #ccc;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker.pagelayer-pen-expanded .pagelayer-pen-picker-options {
|
||||
display: block;
|
||||
margin-top: -1px;
|
||||
top: 100%;
|
||||
z-index: 1;
|
||||
box-shadow: 0px 0px 1px 1px #e4e4e4;
|
||||
}
|
||||
|
||||
.pagelayer-pen-color-picker .pagelayer-pen-picker-labe{
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-icon-picker .pagelayer-pen-picker-options {
|
||||
padding: 4px 0px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-icon-picker .pagelayer-pen-picker-item {
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-color-picker .pagelayer-pen-picker-options {
|
||||
padding: 3px 5px;
|
||||
width: 152px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-color-picker .pagelayer-pen-picker-item {
|
||||
border: 1px solid transparent;
|
||||
float: left;
|
||||
height: 16px;
|
||||
margin: 2px;
|
||||
padding: 0px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-size-picker .pagelayer-pen-picker-label:before,
|
||||
.pagelayer-pen-picker:not(.pagelayer-pen-color-picker) .pagelayer-pen-picker-item:empty:before{
|
||||
content: attr(data-value);
|
||||
}
|
||||
|
||||
.pagelayer-pen-link-tooltip > *{
|
||||
margin:0 2px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-link-tooltip input{
|
||||
min-width: 300px;
|
||||
font-size: 13px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-unlink-btn,
|
||||
.pagelayer-pen-link-btn{
|
||||
padding: 7px;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* End Dropdown picker*/
|
||||
/* Start HTML viewer*/
|
||||
.pagelayer-pen-html-viewer{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: none;
|
||||
background: #0000009c;
|
||||
z-index:999999;
|
||||
}
|
||||
|
||||
.pagelayer-pen-html-viewer .pagelayer-pen-html-holder{
|
||||
width: 90%;
|
||||
height: 80vh;
|
||||
margin: auto;
|
||||
top: 50%;
|
||||
position: relative;
|
||||
transform: translateY(-50%);
|
||||
background: #fff;
|
||||
box-shadow: 0px 0px 7px 0px #fff;
|
||||
}
|
||||
|
||||
.pagelayer-pen-html-viewer .pagelayer-pen-html-area{
|
||||
resize: none;
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
border-radius: 0;
|
||||
padding: 10px;
|
||||
font-family: courier, courier new, serif;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.pagelayer-pen-html-viewer .pagelayer-pen-html-btn{
|
||||
height: 40px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.pagelayer-pen-html-viewer .pagelayer-pen-html-btn button{
|
||||
margin-right: 10px;
|
||||
padding: 7px 20px !important;
|
||||
font-size: 15px !important;
|
||||
}
|
||||
|
||||
.pagelayer-pen-html-viewer .pagelayer-pen-html-area:focus{
|
||||
border:none;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
/* End HTML viewer*/
|
||||
.pagelayer-pen-toolbar .pagelayer-pen-close{
|
||||
background: #e6e6e6;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.pagelayer-pen-toolbar .pagelayer-pen-close .fas{
|
||||
font-size: 10px !important;
|
||||
color: #fb0101;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.pagelayer-pen-toolbar svg{
|
||||
width:18px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.pagelayer-pen-stroke{
|
||||
fill: none;
|
||||
stroke: #444;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
stroke-width: 2;
|
||||
}
|
||||
|
||||
.pagelayer-pen-active,
|
||||
.pagelayer-pen-toolbar button:hover,
|
||||
.pagelayer-pen-picker-label:hover,
|
||||
.pagelayer-pen-picker-item:hover,
|
||||
.pagelayer-pen-active .fas,
|
||||
.pagelayer-pen-toolbar button:hover .fas,
|
||||
.pagelayer-pen-picker-label:hover .fas,
|
||||
.pagelayer-pen-picker-item:hover .fas{
|
||||
color: #06c;
|
||||
}
|
||||
|
||||
.pagelayer-pen-active .pagelayer-pen-fill,
|
||||
.pagelayer-pen-toolbar button:hover .pagelayer-pen-fill,
|
||||
.pagelayer-pen-picker-label:hover .pagelayer-pen-fill,
|
||||
.pagelayer-pen-picker-item:hover .pagelayer-pen-fill{
|
||||
fill: #06c;
|
||||
}
|
||||
|
||||
.pagelayer-pen-active .pagelayer-pen-stroke,
|
||||
.pagelayer-pen-toolbar button:hover .pagelayer-pen-stroke,
|
||||
.pagelayer-pen-picker-label:hover .pagelayer-pen-stroke,
|
||||
.pagelayer-pen-picker-item:hover .pagelayer-pen-stroke{
|
||||
stroke: #06c;
|
||||
}
|
||||
|
||||
.pagelayer-pen-custom-input{
|
||||
display: block;
|
||||
width: 100%;
|
||||
min-width: 75px;
|
||||
height: 25px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="h1"]:before{
|
||||
content: "Heading 1" !important;
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="h2"]:before{
|
||||
content: "Heading 2" !important;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="h3"]:before{
|
||||
content: "Heading 3" !important;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="h4"]:before{
|
||||
content: "Heading 4" !important;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="h5"]:before{
|
||||
content: "Heading 5" !important;
|
||||
font-size: 0.83em;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="h6"]:before{
|
||||
content: "Heading 6" !important;
|
||||
font-size: 0.67em;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="p"]:before{
|
||||
content: "Paragraph" !important;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="blockquote"]:before{
|
||||
content: "Blockquote" !important;
|
||||
/* Pagelayer Pen editor*/
|
||||
.pagelayer-pen{
|
||||
-webkit-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.pagelayer-pen-holder{
|
||||
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
|
||||
background-color: #ffffff;
|
||||
position: fixed;
|
||||
z-index: 9999999999;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
transform: translateY(-100%);
|
||||
box-shadow: 0 4px 5px 0 rgb(0 0 0 / 14%), 0 1px 10px 0 rgb(0 0 0 / 12%), 0 2px 4px -1px rgb(0 0 0 / 20%);
|
||||
border-radius: 2px;
|
||||
line-height: 1;
|
||||
padding: 8px 2px;
|
||||
font-size: 15px !important;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pagelayer-pen-toolbar{
|
||||
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
|
||||
box-sizing: border-box;
|
||||
width: max-content;
|
||||
max-width: 90vw;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pagelayer-pen-toolbar .pagelayer-pen-formats{
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
padding-right: 7px;
|
||||
padding-left: 7px;
|
||||
border-left:1px solid #ccc;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.pagelayer-pen-toolbar button{
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
height: 24px;
|
||||
padding: 3px 5px;
|
||||
width: 28px;
|
||||
font-size: 14px !important;
|
||||
font-weight: 700 !important;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.pagelayer-pen-toolbar button strong{
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.pagelayer-pen-toolbar .pagelayer-pen-formats:first-child {
|
||||
padding-left: 0px !important;
|
||||
border-left: 0px;
|
||||
}
|
||||
/* Start Dropdown picker*/
|
||||
.pagelayer-pen-picker{
|
||||
color: #444;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
height: 24px;
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
padding:3px 5px;
|
||||
font-size: 14px !important;
|
||||
font-weight: 500 !important;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-label {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker .pagelayer-pen-picker-label:after {
|
||||
content: "\f0dc";
|
||||
padding-left: 15px;
|
||||
font-weight: 600;
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker.pagelayer-pen-font .pagelayer-pen-picker-label:after,
|
||||
.pagelayer-pen-picker.pagelayer-pen-lineheight .pagelayer-pen-picker-label:after,
|
||||
.pagelayer-pen-picker.pagelayer-pen-color-picker .pagelayer-pen-picker-label:after {
|
||||
content: "";
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-label::before {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-options {
|
||||
background-color: #fff;
|
||||
display: none;
|
||||
min-width: 100%;
|
||||
padding: 4px 8px;
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
margin-left: -8px;
|
||||
max-height: 200px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-options::-webkit-scrollbar {
|
||||
width:3px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-options::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-options::-webkit-scrollbar-thumb {
|
||||
background: #888;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-options::-webkit-scrollbar-thumb:hover {
|
||||
background: #555;
|
||||
cursor:context-menu;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker-options .pagelayer-pen-picker-item {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
padding-bottom: 5px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker.pagelayer-pen-expanded .pagelayer-pen-picker-label {
|
||||
color: #ccc;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker.pagelayer-pen-expanded .pagelayer-pen-picker-label .pagelayer-pen-fill {
|
||||
fill: #ccc;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker.pagelayer-pen-expanded .pagelayer-pen-picker-label .pagelayer-pen-stroke {
|
||||
stroke: #ccc;
|
||||
}
|
||||
|
||||
.pagelayer-pen-picker.pagelayer-pen-expanded .pagelayer-pen-picker-options {
|
||||
display: block;
|
||||
margin-top: -1px;
|
||||
top: 100%;
|
||||
z-index: 1;
|
||||
box-shadow: 0px 0px 1px 1px #e4e4e4;
|
||||
}
|
||||
|
||||
.pagelayer-pen-color-picker .pagelayer-pen-picker-labe{
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-icon-picker .pagelayer-pen-picker-options {
|
||||
padding: 4px 0px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-icon-picker .pagelayer-pen-picker-item {
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-color-picker .pagelayer-pen-picker-options {
|
||||
padding: 3px 5px;
|
||||
width: 152px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-color-picker .pagelayer-pen-picker-item {
|
||||
border: 1px solid transparent;
|
||||
float: left;
|
||||
height: 16px;
|
||||
margin: 2px;
|
||||
padding: 0px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-size-picker .pagelayer-pen-picker-label:before,
|
||||
.pagelayer-pen-picker:not(.pagelayer-pen-color-picker) .pagelayer-pen-picker-item:empty:before{
|
||||
content: attr(data-value);
|
||||
}
|
||||
|
||||
.pagelayer-pen-link-tooltip > *{
|
||||
margin:0 2px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-link-tooltip input{
|
||||
min-width: 300px;
|
||||
font-size: 13px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.pagelayer-pen-unlink-btn,
|
||||
.pagelayer-pen-link-btn{
|
||||
padding: 7px;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* End Dropdown picker*/
|
||||
/* Start HTML viewer*/
|
||||
.pagelayer-pen-html-viewer{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: none;
|
||||
background: #0000009c;
|
||||
z-index:999999;
|
||||
}
|
||||
|
||||
.pagelayer-pen-html-viewer .pagelayer-pen-html-holder{
|
||||
width: 90%;
|
||||
height: 80vh;
|
||||
margin: auto;
|
||||
top: 50%;
|
||||
position: relative;
|
||||
transform: translateY(-50%);
|
||||
background: #fff;
|
||||
box-shadow: 0px 0px 7px 0px #fff;
|
||||
}
|
||||
|
||||
.pagelayer-pen-html-viewer .pagelayer-pen-html-area{
|
||||
resize: none;
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
border-radius: 0;
|
||||
padding: 10px;
|
||||
font-family: courier, courier new, serif;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.pagelayer-pen-html-viewer .pagelayer-pen-html-btn{
|
||||
height: 40px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.pagelayer-pen-html-viewer .pagelayer-pen-html-btn button{
|
||||
margin-right: 10px;
|
||||
padding: 7px 20px !important;
|
||||
font-size: 15px !important;
|
||||
}
|
||||
|
||||
.pagelayer-pen-html-viewer .pagelayer-pen-html-area:focus{
|
||||
border:none;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
/* End HTML viewer*/
|
||||
.pagelayer-pen-toolbar .pagelayer-pen-close{
|
||||
background: #e6e6e6;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.pagelayer-pen-toolbar .pagelayer-pen-close .fas{
|
||||
font-size: 10px !important;
|
||||
color: #fb0101;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.pagelayer-pen-toolbar svg{
|
||||
width:18px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.pagelayer-pen-stroke{
|
||||
fill: none;
|
||||
stroke: #444;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
stroke-width: 2;
|
||||
}
|
||||
|
||||
.pagelayer-pen-active,
|
||||
.pagelayer-pen-toolbar button:hover,
|
||||
.pagelayer-pen-picker-label:hover,
|
||||
.pagelayer-pen-picker-item:hover,
|
||||
.pagelayer-pen-active .fas,
|
||||
.pagelayer-pen-toolbar button:hover .fas,
|
||||
.pagelayer-pen-picker-label:hover .fas,
|
||||
.pagelayer-pen-picker-item:hover .fas{
|
||||
color: #06c;
|
||||
}
|
||||
|
||||
.pagelayer-pen-active .pagelayer-pen-fill,
|
||||
.pagelayer-pen-toolbar button:hover .pagelayer-pen-fill,
|
||||
.pagelayer-pen-picker-label:hover .pagelayer-pen-fill,
|
||||
.pagelayer-pen-picker-item:hover .pagelayer-pen-fill{
|
||||
fill: #06c;
|
||||
}
|
||||
|
||||
.pagelayer-pen-active .pagelayer-pen-stroke,
|
||||
.pagelayer-pen-toolbar button:hover .pagelayer-pen-stroke,
|
||||
.pagelayer-pen-picker-label:hover .pagelayer-pen-stroke,
|
||||
.pagelayer-pen-picker-item:hover .pagelayer-pen-stroke{
|
||||
stroke: #06c;
|
||||
}
|
||||
|
||||
.pagelayer-pen-custom-input{
|
||||
display: block;
|
||||
width: 100%;
|
||||
min-width: 75px;
|
||||
height: 25px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="h1"]:before{
|
||||
content: "Heading 1" !important;
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="h2"]:before{
|
||||
content: "Heading 2" !important;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="h3"]:before{
|
||||
content: "Heading 3" !important;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="h4"]:before{
|
||||
content: "Heading 4" !important;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="h5"]:before{
|
||||
content: "Heading 5" !important;
|
||||
font-size: 0.83em;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="h6"]:before{
|
||||
content: "Heading 6" !important;
|
||||
font-size: 0.67em;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="p"]:before{
|
||||
content: "Paragraph" !important;
|
||||
}
|
||||
|
||||
.pagelayer-pen-formating .pagelayer-pen-picker-item[data-value="blockquote"]:before{
|
||||
content: "Blockquote" !important;
|
||||
}
|
||||
@@ -1,165 +1,165 @@
|
||||
/*! Licensed under MIT, https://github.com/sofish/pen */
|
||||
|
||||
/* basic reset */
|
||||
.pen, .pen-menu, .pen-input, .pen textarea{font:400 1.16em/1.45 Palatino, Optima, Georgia, serif;color:#331;}
|
||||
.pen:focus{outline:none;}
|
||||
.pen fieldset, img {border: 0;}
|
||||
.pen blockquote{padding-left:10px;margin-left:-14px;border-left:4px solid #1abf89;}
|
||||
.pen a{color:#1abf89;}
|
||||
.pen del{text-decoration:line-through;}
|
||||
.pen sub, .pen sup {font-size:75%;position:relative;vertical-align:text-top;}
|
||||
:root .pen sub, :root .pen sup{vertical-align:baseline; /* for ie9 and other mordern browsers */}
|
||||
.pen sup {top:-0.5em;}
|
||||
.pen sub {bottom:-0.25em;}
|
||||
.pen hr{border:none;border-bottom:1px solid #cfcfcf;margin-bottom:25px;*color:pink;*filter:chroma(color=pink);height:10px;*margin:-7px 0 15px;}
|
||||
.pen small{font-size:0.8em;color:#888;}
|
||||
.pen em, .pen b, .pen strong{font-weight:700;}
|
||||
.pen pre{white-space:pre-wrap;padding:0.85em;background:#f8f8f8;}
|
||||
|
||||
/* block-level element margin */
|
||||
.pen p, .pen pre, .pen ul, .pen ol, .pen dl, .pen form, .pen table, .pen blockquote{margin-bottom:16px;}
|
||||
|
||||
/* headers */
|
||||
.pen h1, .pen h2, .pen h3, .pen h4, .pen h5, .pen h6{margin-bottom:16px;font-weight:700;line-height:1.2;}
|
||||
.pen h1{font-size:2em;}
|
||||
.pen h2{font-size:1.8em;}
|
||||
.pen h3{font-size:1.6em;}
|
||||
.pen h4{font-size:1.4em;}
|
||||
.pen h5, .pen h6{font-size:1.2em;}
|
||||
|
||||
/* list */
|
||||
.pen ul, .pen ol{margin-left:1.2em;}
|
||||
.pen ul, .pen-ul{list-style:disc;}
|
||||
.pen ol, .pen-ol{list-style:decimal;}
|
||||
.pen li ul, .pen li ol, .pen-ul ul, .pen-ul ol, .pen-ol ul, .pen-ol ol{margin:0 2em 0 1.2em;}
|
||||
.pen li ul, .pen-ul ul, .pen-ol ul{list-style: circle;}
|
||||
|
||||
/* pen menu */
|
||||
.pen-menu [class^="icon-"], .pen-menu [class*=" icon-"] { /* reset to avoid conflicts with Bootstrap */
|
||||
background: transparent;
|
||||
background-image: none;
|
||||
}
|
||||
.pen-menu { min-width: 320px; }
|
||||
.pen-menu, .pen-input{font-size:14px;line-height:1;}
|
||||
.pen-menu{white-space:nowrap;box-shadow:1px 2px 3px -2px #222;background:#333;background-image:linear-gradient(to bottom, #222, #333);opacity:0.9;position:fixed;height:36px;border:1px solid #333;border-radius:3px;display:none;z-index:1000;}
|
||||
.pen-menu:after {top:100%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;}
|
||||
.pen-menu:after {border-color:rgba(51, 51, 51, 0);border-top-color:#333;border-width:6px;left:50%;margin-left:-6px;}
|
||||
.pen-menu-below:after {top: -11px; display:block; -moz-transform: rotate(180deg); -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); -o-transform: rotate(180deg); transform: rotate(180deg);}
|
||||
.pen-icon{font:normal 900 16px/40px Georgia serif;min-width:20px;display:inline-block;padding:0 10px;height:36px;overflow:hidden;color:#fff;text-align:center;cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}
|
||||
.pen-icon:first-of-type{border-top-left-radius:3px;border-bottom-left-radius:3px;}
|
||||
.pen-icon:last-of-type{border-top-right-radius:3px;border-bottom-right-radius:3px;}
|
||||
.pen-icon:hover{background:#000;}
|
||||
.pen-icon.active{color:#1abf89;background:#000;box-shadow:inset 2px 2px 4px #000;}
|
||||
.pen-input{position:absolute;width:100%;left:0;top:0;height:36px;line-height:20px;background:#333;color:#fff;border:none;text-align:center;display:none;font-family:arial, sans-serif;}
|
||||
.pen-input:focus{outline:none;}
|
||||
|
||||
.pen-textarea{display:block;background:#f8f8f8;padding:20px;}
|
||||
.pen textarea{font-size:14px;border:none;background:none;width:100%;_height:200px;min-height:200px;resize:none;}
|
||||
|
||||
.pen-menu [class^="icon-"]:before, .pen-menu [class*=" icon-"]:before {
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
speak: none;
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1em;
|
||||
margin-left: .2em;
|
||||
}
|
||||
.pen-menu .icon-location:before { content: '\e815'; } /* '' */
|
||||
.pen-menu .icon-fit:before { content: '\e80f'; } /* '' */
|
||||
.pen-menu .icon-bold:before { content: "\f032"; } /* '' */
|
||||
.pen-menu .icon-italic:before { content: "\f033"; } /* '' */
|
||||
.pen-menu .icon-justifyleft:before { content: '\e80a'; } /* '' */
|
||||
.pen-menu .icon-justifycenter:before { content: '\e80b'; } /* '' */
|
||||
.pen-menu .icon-justifyright:before { content: '\e80c'; } /* '' */
|
||||
.pen-menu .icon-justifyfull:before { content: '\e80d'; } /* '' */
|
||||
.pen-menu .icon-outdent:before { content: '\e800'; } /* '' */
|
||||
.pen-menu .icon-indent:before { content: '\e801'; } /* '' */
|
||||
.pen-menu .icon-mode:before { content: '\e813'; } /* '' */
|
||||
.pen-menu .icon-fullscreen:before { content: '\e80e'; } /* '' */
|
||||
.pen-menu .icon-insertunorderedlist:before { content: '\e802'; } /* '' */
|
||||
.pen-menu .icon-insertorderedlist:before { content: '\e803'; } /* '' */
|
||||
.pen-menu .icon-strikethrough:before { content: "\f0cc"; } /* '' */
|
||||
.pen-menu .icon-strike:before { content: "\f0cc"; } /* '' */
|
||||
.pen-menu .icon-underline:before { content: "\f0cd"; } /* '' */
|
||||
.pen-menu .icon-blockquote:before { content: '\e814'; } /* '' */
|
||||
.pen-menu .icon-undo:before { content: '\e817'; } /* '' */
|
||||
.pen-menu .icon-code:before { content: '\e816'; } /* '' */
|
||||
.pen-menu .icon-pre:before { content: '\e816'; } /* '' */
|
||||
.pen-menu .icon-unlink:before { content: '\e811'; } /* '' */
|
||||
.pen-menu .icon-superscript:before { content: '\e808'; } /* '' */
|
||||
.pen-menu .icon-subscript:before { content: '\e809'; } /* '' */
|
||||
.pen-menu .icon-inserthorizontalrule:before { content: '\e818'; } /* '' */
|
||||
.pen-menu .icon-pin:before { content: '\e812'; } /* '' */
|
||||
.pen-menu .icon-createlink:before { content: '\e810'; } /* '' */
|
||||
.pen-menu .icon-h1:before { content: 'H1'; }
|
||||
.pen-menu .icon-h2:before { content: 'H2'; }
|
||||
.pen-menu .icon-h3:before { content: 'H3'; }
|
||||
.pen-menu .icon-h4:before { content: 'H4'; }
|
||||
.pen-menu .icon-h5:before { content: 'H5'; }
|
||||
.pen-menu .icon-h6:before { content: 'H6'; }
|
||||
.pen-menu .icon-p:before { content: 'P'; }
|
||||
.pen-menu .icon-insertimage:before { width:1.8em;margin:0;position:relative;top:-2px;content:'IMG';font-size:12px;border:1px solid #fff;padding:2px;border-radius:2px; }
|
||||
.pen {
|
||||
position: relative;
|
||||
}
|
||||
.pen.hinted h1:before,
|
||||
.pen.hinted h2:before,
|
||||
.pen.hinted h3:before,
|
||||
.pen.hinted h4:before,
|
||||
.pen.hinted h5:before,
|
||||
.pen.hinted h6:before,
|
||||
.pen.hinted blockquote:before,
|
||||
.pen.hinted hr:before {
|
||||
color: #eee;
|
||||
position: absolute;
|
||||
right: 100%;
|
||||
white-space: nowrap;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.pen.hinted blockquote { border-left: 0; margin-left: 0; padding-left: 0; }
|
||||
.pen.hinted blockquote:before {
|
||||
color: #1abf89;
|
||||
content: ">";
|
||||
font-weight: bold;
|
||||
vertical-align: center;
|
||||
}
|
||||
.pen.hinted h1:before { content: "#";}
|
||||
.pen.hinted h2:before { content: "##";}
|
||||
.pen.hinted h3:before { content: "###";}
|
||||
.pen.hinted h4:before { content: "####";}
|
||||
.pen.hinted h5:before { content: "#####";}
|
||||
.pen.hinted h6:before { content: "######";}
|
||||
.pen.hinted hr:before { content: "﹘﹘﹘"; line-height: 1.2; vertical-align: bottom; }
|
||||
|
||||
.pen.hinted pre:before, .pen.hinted pre:after {
|
||||
content: "```";
|
||||
display: block;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.pen.hinted ul { list-style: none; }
|
||||
.pen.hinted ul li:before {
|
||||
content: "*";
|
||||
color: #999;
|
||||
line-height: 1;
|
||||
vertical-align: bottom;
|
||||
margin-left: -1.2em;
|
||||
display: inline-block;
|
||||
width: 1.2em;
|
||||
}
|
||||
|
||||
.pen.hinted b:before, .pen.hinted b:after { content: "**"; color: #eee; font-weight: normal; }
|
||||
.pen.hinted i:before, .pen.hinted i:after { content: "*"; color: #eee; }
|
||||
|
||||
.pen.hinted a { text-decoration: none; }
|
||||
.pen.hinted a:before {content: "["; color: #ddd; }
|
||||
.pen.hinted a:after { content: "](" attr(href) ")"; color: #ddd; }
|
||||
|
||||
.pen-placeholder:after { position: absolute; top: 0; left: 0; content: attr(data-placeholder); color: #999; cursor: text; }
|
||||
/*! Licensed under MIT, https://github.com/sofish/pen */
|
||||
|
||||
/* basic reset */
|
||||
.pen, .pen-menu, .pen-input, .pen textarea{font:400 1.16em/1.45 Palatino, Optima, Georgia, serif;color:#331;}
|
||||
.pen:focus{outline:none;}
|
||||
.pen fieldset, img {border: 0;}
|
||||
.pen blockquote{padding-left:10px;margin-left:-14px;border-left:4px solid #1abf89;}
|
||||
.pen a{color:#1abf89;}
|
||||
.pen del{text-decoration:line-through;}
|
||||
.pen sub, .pen sup {font-size:75%;position:relative;vertical-align:text-top;}
|
||||
:root .pen sub, :root .pen sup{vertical-align:baseline; /* for ie9 and other mordern browsers */}
|
||||
.pen sup {top:-0.5em;}
|
||||
.pen sub {bottom:-0.25em;}
|
||||
.pen hr{border:none;border-bottom:1px solid #cfcfcf;margin-bottom:25px;*color:pink;*filter:chroma(color=pink);height:10px;*margin:-7px 0 15px;}
|
||||
.pen small{font-size:0.8em;color:#888;}
|
||||
.pen em, .pen b, .pen strong{font-weight:700;}
|
||||
.pen pre{white-space:pre-wrap;padding:0.85em;background:#f8f8f8;}
|
||||
|
||||
/* block-level element margin */
|
||||
.pen p, .pen pre, .pen ul, .pen ol, .pen dl, .pen form, .pen table, .pen blockquote{margin-bottom:16px;}
|
||||
|
||||
/* headers */
|
||||
.pen h1, .pen h2, .pen h3, .pen h4, .pen h5, .pen h6{margin-bottom:16px;font-weight:700;line-height:1.2;}
|
||||
.pen h1{font-size:2em;}
|
||||
.pen h2{font-size:1.8em;}
|
||||
.pen h3{font-size:1.6em;}
|
||||
.pen h4{font-size:1.4em;}
|
||||
.pen h5, .pen h6{font-size:1.2em;}
|
||||
|
||||
/* list */
|
||||
.pen ul, .pen ol{margin-left:1.2em;}
|
||||
.pen ul, .pen-ul{list-style:disc;}
|
||||
.pen ol, .pen-ol{list-style:decimal;}
|
||||
.pen li ul, .pen li ol, .pen-ul ul, .pen-ul ol, .pen-ol ul, .pen-ol ol{margin:0 2em 0 1.2em;}
|
||||
.pen li ul, .pen-ul ul, .pen-ol ul{list-style: circle;}
|
||||
|
||||
/* pen menu */
|
||||
.pen-menu [class^="icon-"], .pen-menu [class*=" icon-"] { /* reset to avoid conflicts with Bootstrap */
|
||||
background: transparent;
|
||||
background-image: none;
|
||||
}
|
||||
.pen-menu { min-width: 320px; }
|
||||
.pen-menu, .pen-input{font-size:14px;line-height:1;}
|
||||
.pen-menu{white-space:nowrap;box-shadow:1px 2px 3px -2px #222;background:#333;background-image:linear-gradient(to bottom, #222, #333);opacity:0.9;position:fixed;height:36px;border:1px solid #333;border-radius:3px;display:none;z-index:1000;}
|
||||
.pen-menu:after {top:100%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;}
|
||||
.pen-menu:after {border-color:rgba(51, 51, 51, 0);border-top-color:#333;border-width:6px;left:50%;margin-left:-6px;}
|
||||
.pen-menu-below:after {top: -11px; display:block; -moz-transform: rotate(180deg); -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); -o-transform: rotate(180deg); transform: rotate(180deg);}
|
||||
.pen-icon{font:normal 900 16px/40px Georgia serif;min-width:20px;display:inline-block;padding:0 10px;height:36px;overflow:hidden;color:#fff;text-align:center;cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}
|
||||
.pen-icon:first-of-type{border-top-left-radius:3px;border-bottom-left-radius:3px;}
|
||||
.pen-icon:last-of-type{border-top-right-radius:3px;border-bottom-right-radius:3px;}
|
||||
.pen-icon:hover{background:#000;}
|
||||
.pen-icon.active{color:#1abf89;background:#000;box-shadow:inset 2px 2px 4px #000;}
|
||||
.pen-input{position:absolute;width:100%;left:0;top:0;height:36px;line-height:20px;background:#333;color:#fff;border:none;text-align:center;display:none;font-family:arial, sans-serif;}
|
||||
.pen-input:focus{outline:none;}
|
||||
|
||||
.pen-textarea{display:block;background:#f8f8f8;padding:20px;}
|
||||
.pen textarea{font-size:14px;border:none;background:none;width:100%;_height:200px;min-height:200px;resize:none;}
|
||||
|
||||
.pen-menu [class^="icon-"]:before, .pen-menu [class*=" icon-"]:before {
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
speak: none;
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1em;
|
||||
margin-left: .2em;
|
||||
}
|
||||
.pen-menu .icon-location:before { content: '\e815'; } /* '' */
|
||||
.pen-menu .icon-fit:before { content: '\e80f'; } /* '' */
|
||||
.pen-menu .icon-bold:before { content: "\f032"; } /* '' */
|
||||
.pen-menu .icon-italic:before { content: "\f033"; } /* '' */
|
||||
.pen-menu .icon-justifyleft:before { content: '\e80a'; } /* '' */
|
||||
.pen-menu .icon-justifycenter:before { content: '\e80b'; } /* '' */
|
||||
.pen-menu .icon-justifyright:before { content: '\e80c'; } /* '' */
|
||||
.pen-menu .icon-justifyfull:before { content: '\e80d'; } /* '' */
|
||||
.pen-menu .icon-outdent:before { content: '\e800'; } /* '' */
|
||||
.pen-menu .icon-indent:before { content: '\e801'; } /* '' */
|
||||
.pen-menu .icon-mode:before { content: '\e813'; } /* '' */
|
||||
.pen-menu .icon-fullscreen:before { content: '\e80e'; } /* '' */
|
||||
.pen-menu .icon-insertunorderedlist:before { content: '\e802'; } /* '' */
|
||||
.pen-menu .icon-insertorderedlist:before { content: '\e803'; } /* '' */
|
||||
.pen-menu .icon-strikethrough:before { content: "\f0cc"; } /* '' */
|
||||
.pen-menu .icon-strike:before { content: "\f0cc"; } /* '' */
|
||||
.pen-menu .icon-underline:before { content: "\f0cd"; } /* '' */
|
||||
.pen-menu .icon-blockquote:before { content: '\e814'; } /* '' */
|
||||
.pen-menu .icon-undo:before { content: '\e817'; } /* '' */
|
||||
.pen-menu .icon-code:before { content: '\e816'; } /* '' */
|
||||
.pen-menu .icon-pre:before { content: '\e816'; } /* '' */
|
||||
.pen-menu .icon-unlink:before { content: '\e811'; } /* '' */
|
||||
.pen-menu .icon-superscript:before { content: '\e808'; } /* '' */
|
||||
.pen-menu .icon-subscript:before { content: '\e809'; } /* '' */
|
||||
.pen-menu .icon-inserthorizontalrule:before { content: '\e818'; } /* '' */
|
||||
.pen-menu .icon-pin:before { content: '\e812'; } /* '' */
|
||||
.pen-menu .icon-createlink:before { content: '\e810'; } /* '' */
|
||||
.pen-menu .icon-h1:before { content: 'H1'; }
|
||||
.pen-menu .icon-h2:before { content: 'H2'; }
|
||||
.pen-menu .icon-h3:before { content: 'H3'; }
|
||||
.pen-menu .icon-h4:before { content: 'H4'; }
|
||||
.pen-menu .icon-h5:before { content: 'H5'; }
|
||||
.pen-menu .icon-h6:before { content: 'H6'; }
|
||||
.pen-menu .icon-p:before { content: 'P'; }
|
||||
.pen-menu .icon-insertimage:before { width:1.8em;margin:0;position:relative;top:-2px;content:'IMG';font-size:12px;border:1px solid #fff;padding:2px;border-radius:2px; }
|
||||
.pen {
|
||||
position: relative;
|
||||
}
|
||||
.pen.hinted h1:before,
|
||||
.pen.hinted h2:before,
|
||||
.pen.hinted h3:before,
|
||||
.pen.hinted h4:before,
|
||||
.pen.hinted h5:before,
|
||||
.pen.hinted h6:before,
|
||||
.pen.hinted blockquote:before,
|
||||
.pen.hinted hr:before {
|
||||
color: #eee;
|
||||
position: absolute;
|
||||
right: 100%;
|
||||
white-space: nowrap;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.pen.hinted blockquote { border-left: 0; margin-left: 0; padding-left: 0; }
|
||||
.pen.hinted blockquote:before {
|
||||
color: #1abf89;
|
||||
content: ">";
|
||||
font-weight: bold;
|
||||
vertical-align: center;
|
||||
}
|
||||
.pen.hinted h1:before { content: "#";}
|
||||
.pen.hinted h2:before { content: "##";}
|
||||
.pen.hinted h3:before { content: "###";}
|
||||
.pen.hinted h4:before { content: "####";}
|
||||
.pen.hinted h5:before { content: "#####";}
|
||||
.pen.hinted h6:before { content: "######";}
|
||||
.pen.hinted hr:before { content: "﹘﹘﹘"; line-height: 1.2; vertical-align: bottom; }
|
||||
|
||||
.pen.hinted pre:before, .pen.hinted pre:after {
|
||||
content: "```";
|
||||
display: block;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.pen.hinted ul { list-style: none; }
|
||||
.pen.hinted ul li:before {
|
||||
content: "*";
|
||||
color: #999;
|
||||
line-height: 1;
|
||||
vertical-align: bottom;
|
||||
margin-left: -1.2em;
|
||||
display: inline-block;
|
||||
width: 1.2em;
|
||||
}
|
||||
|
||||
.pen.hinted b:before, .pen.hinted b:after { content: "**"; color: #eee; font-weight: normal; }
|
||||
.pen.hinted i:before, .pen.hinted i:after { content: "*"; color: #eee; }
|
||||
|
||||
.pen.hinted a { text-decoration: none; }
|
||||
.pen.hinted a:before {content: "["; color: #ddd; }
|
||||
.pen.hinted a:after { content: "](" attr(href) ")"; color: #ddd; }
|
||||
|
||||
.pen-placeholder:after { position: absolute; top: 0; left: 0; content: attr(data-placeholder); color: #999; cursor: text; }
|
||||
|
||||
|
Before Width: | Height: | Size: 730 KiB After Width: | Height: | Size: 734 KiB |
|
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 898 KiB After Width: | Height: | Size: 902 KiB |
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="50px" viewBox="0 0 100 50" enable-background="new 0 0 100 50" xml:space="preserve">
|
||||
<polyline fill="none" stroke="#4D4D4D" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
|
||||
26.232,35.01 15.039,23.817 25.865,12.99 "/>
|
||||
<polyline fill="none" stroke="#4D4D4D" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
|
||||
73.693,35.69 85.578,23.805 74.083,12.31 "/>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="100px" height="50px" viewBox="0 0 100 50" enable-background="new 0 0 100 50" xml:space="preserve">
|
||||
<polyline fill="none" stroke="#4D4D4D" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
|
||||
26.232,35.01 15.039,23.817 25.865,12.99 "/>
|
||||
<polyline fill="none" stroke="#4D4D4D" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
|
||||
73.693,35.69 85.578,23.805 74.083,12.31 "/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 834 B After Width: | Height: | Size: 844 B |
@@ -1,3 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 10" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M350 0L340 10h20L350 0z"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 10" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M350 0L340 10h20L350 0z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 161 B After Width: | Height: | Size: 163 B |
@@ -1,3 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 10" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M350 10L340 0h20L350 10z"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 10" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M350 10L340 0h20L350 10z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 164 B |
@@ -1,3 +1,3 @@
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 102' preserveAspectRatio='none'>
|
||||
<path class="pagelayer-shape-fill" d="M0 102 L50 0 L100 102 Z"></path>
|
||||
</svg>
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 102' preserveAspectRatio='none'>
|
||||
<path class="pagelayer-shape-fill" d="M0 102 L50 0 L100 102 Z"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 173 B |
@@ -1,3 +1,3 @@
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 102' preserveAspectRatio='none'>
|
||||
<path class="pagelayer-shape-fill" d="M0 0 L50 100 L100 0 Z"></path>
|
||||
</svg>
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 102' preserveAspectRatio='none'>
|
||||
<path class="pagelayer-shape-fill" d="M0 0 L50 100 L100 0 Z"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 168 B After Width: | Height: | Size: 171 B |
@@ -1,6 +1,6 @@
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 100 L50 0 L100 100 Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 100 L50 20 L100 100 Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 100 L50 40 L100 100 Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 100 L50 60 L100 100 Z"></path>
|
||||
</svg>
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 100 L50 0 L100 100 Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 100 L50 20 L100 100 Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 100 L50 40 L100 100 Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 100 L50 60 L100 100 Z"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 477 B |
@@ -1,6 +1,6 @@
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 0 L50 40 L100 0 Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 0 L50 60 L100 0 Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 0 L50 80 L100 0 Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 0 L50 100 L100 0 Z"></path>
|
||||
</svg>
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 0 L50 40 L100 0 Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 0 L50 60 L100 0 Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 0 L50 80 L100 0 Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0 0 L50 100 L100 0 Z"></path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 457 B After Width: | Height: | Size: 463 B |
@@ -1,4 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1118 110" preserveAspectRatio='none'>
|
||||
<path class="pagelayer-shape-fill" d="M689.96,89.39c-30.84,-2.6 -56.31,-21.05 -65.29,-45.81c-5.91,1.26 -12.08,1.95 -18.45,1.95c-21.57,0 -41.02,-7.71 -54.86,-20.09c-7.32,19.18 -28.23,32.99 -52.9,32.99c-29.08,0 -53,-19.27 -55.46,-43.86c-3.06,0.6 -6.22,0.95 -9.48,0.95c-8.22,0 -15.84,-2.08 -22.26,-5.59c-10.74,12.6 -28.03,20.78 -47.59,20.78c-15.54,0 -29.68,-5.2 -40.21,-13.64c-12.79,27.27 -43.78,46.54 -79.98,46.54c-19.36,0 -37.21,-5.49 -51.55,-14.76c-8.97,14.63 -26.82,24.63 -47.33,24.63c-15.44,0 -29.38,-5.67 -39.16,-14.72c-13.59,35.07 -50.95,45.66 -96.13,45.66c-6.97,0 -15.74,-2.33 -22.31,-3.46l-1,9.04l705,0l-1,-20.64z" />
|
||||
<path class="pagelayer-shape-fill" d="M687,89.36l-1,20.64l705,0l-1,-9.04c-6.57,1.13 -15.34,3.46 -22.31,3.46c-45.18,0 -82.54,-10.59 -96.13,-45.66c-9.78,9.05 -23.72,14.72 -39.16,14.72c-20.5,0 -38.35,-10 -47.33,-24.63c-14.34,9.26 -32.19,14.76 -51.55,14.76c-36.21,0 -67.19,-19.26 -79.98,-46.54c-10.53,8.44 -24.67,13.64 -40.21,13.64c-19.56,0 -36.86,-8.18 -47.59,-20.78c-6.41,3.51 -14.04,5.59 -22.26,5.59c-3.26,0 -6.42,-0.34 -9.48,-0.95c-2.46,24.59 -26.38,43.86 -55.46,43.86c-24.67,0 -45.58,-13.81 -52.9,-32.99c-13.84,12.38 -33.3,20.09 -54.86,20.09c-6.37,0 -12.53,-0.69 -18.45,-1.95c-8.98,24.77 -34.45,43.21 -65.29,45.81z" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1118 110" preserveAspectRatio='none'>
|
||||
<path class="pagelayer-shape-fill" d="M689.96,89.39c-30.84,-2.6 -56.31,-21.05 -65.29,-45.81c-5.91,1.26 -12.08,1.95 -18.45,1.95c-21.57,0 -41.02,-7.71 -54.86,-20.09c-7.32,19.18 -28.23,32.99 -52.9,32.99c-29.08,0 -53,-19.27 -55.46,-43.86c-3.06,0.6 -6.22,0.95 -9.48,0.95c-8.22,0 -15.84,-2.08 -22.26,-5.59c-10.74,12.6 -28.03,20.78 -47.59,20.78c-15.54,0 -29.68,-5.2 -40.21,-13.64c-12.79,27.27 -43.78,46.54 -79.98,46.54c-19.36,0 -37.21,-5.49 -51.55,-14.76c-8.97,14.63 -26.82,24.63 -47.33,24.63c-15.44,0 -29.38,-5.67 -39.16,-14.72c-13.59,35.07 -50.95,45.66 -96.13,45.66c-6.97,0 -15.74,-2.33 -22.31,-3.46l-1,9.04l705,0l-1,-20.64z" />
|
||||
<path class="pagelayer-shape-fill" d="M687,89.36l-1,20.64l705,0l-1,-9.04c-6.57,1.13 -15.34,3.46 -22.31,3.46c-45.18,0 -82.54,-10.59 -96.13,-45.66c-9.78,9.05 -23.72,14.72 -39.16,14.72c-20.5,0 -38.35,-10 -47.33,-24.63c-14.34,9.26 -32.19,14.76 -51.55,14.76c-36.21,0 -67.19,-19.26 -79.98,-46.54c-10.53,8.44 -24.67,13.64 -40.21,13.64c-19.56,0 -36.86,-8.18 -47.59,-20.78c-6.41,3.51 -14.04,5.59 -22.26,5.59c-3.26,0 -6.42,-0.34 -9.48,-0.95c-2.46,24.59 -26.38,43.86 -55.46,43.86c-24.67,0 -45.58,-13.81 -52.9,-32.99c-13.84,12.38 -33.3,20.09 -54.86,20.09c-6.37,0 -12.53,-0.69 -18.45,-1.95c-8.98,24.77 -34.45,43.21 -65.29,45.81z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -1,4 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1118 110" preserveAspectRatio='none'>
|
||||
<path class="pagelayer-shape-fill" d="M691,20.55l1,-20.64l-705,0l1,9.04c6.57,-1.13 15.34,-3.46 22.31,-3.46c45.18,0 82.54,10.59 96.13,45.66c9.78,-9.05 23.72,-14.72 39.16,-14.72c20.51,0 38.36,10 47.33,24.63c14.34,-9.27 32.19,-14.76 51.55,-14.76c36.2,0 67.19,19.27 79.98,46.54c10.53,-8.44 24.67,-13.64 40.21,-13.64c19.56,0 36.85,8.18 47.59,20.78c6.42,-3.51 14.04,-5.59 22.26,-5.59c3.26,0 6.42,0.35 9.48,0.95c2.46,-24.59 26.38,-43.86 55.46,-43.86c24.67,0 45.58,13.81 52.9,32.99c13.84,-12.38 33.29,-20.09 54.86,-20.09c6.37,0 12.54,0.69 18.45,1.95c8.98,-24.76 34.45,-43.21 65.29,-45.81z" />
|
||||
<path class="pagelayer-shape-fill" d="M690.05,20.64c30.84,2.6 56.31,21.04 65.29,45.81c5.92,-1.26 12.08,-1.95 18.45,-1.95c21.56,0 41.02,7.71 54.86,20.09c7.32,-19.18 28.23,-32.99 52.9,-32.99c29.08,0 53,19.27 55.46,43.86c3.06,-0.61 6.22,-0.95 9.48,-0.95c8.22,0 15.85,2.08 22.26,5.59c10.73,-12.6 28.03,-20.78 47.59,-20.78c15.54,0 29.68,5.2 40.21,13.64c12.79,-27.28 43.77,-46.54 79.98,-46.54c19.36,0 37.21,5.5 51.55,14.76c8.98,-14.63 26.83,-24.63 47.33,-24.63c15.44,0 29.38,5.67 39.16,14.72c13.59,-35.07 50.95,-45.66 96.13,-45.66c6.97,0 15.74,2.33 22.31,3.46l1,-9.04l-705,0l1,20.64z" />
|
||||
</svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1118 110" preserveAspectRatio='none'>
|
||||
<path class="pagelayer-shape-fill" d="M691,20.55l1,-20.64l-705,0l1,9.04c6.57,-1.13 15.34,-3.46 22.31,-3.46c45.18,0 82.54,10.59 96.13,45.66c9.78,-9.05 23.72,-14.72 39.16,-14.72c20.51,0 38.36,10 47.33,24.63c14.34,-9.27 32.19,-14.76 51.55,-14.76c36.2,0 67.19,19.27 79.98,46.54c10.53,-8.44 24.67,-13.64 40.21,-13.64c19.56,0 36.85,8.18 47.59,20.78c6.42,-3.51 14.04,-5.59 22.26,-5.59c3.26,0 6.42,0.35 9.48,0.95c2.46,-24.59 26.38,-43.86 55.46,-43.86c24.67,0 45.58,13.81 52.9,32.99c13.84,-12.38 33.29,-20.09 54.86,-20.09c6.37,0 12.54,0.69 18.45,1.95c8.98,-24.76 34.45,-43.21 65.29,-45.81z" />
|
||||
<path class="pagelayer-shape-fill" d="M690.05,20.64c30.84,2.6 56.31,21.04 65.29,45.81c5.92,-1.26 12.08,-1.95 18.45,-1.95c21.56,0 41.02,7.71 54.86,20.09c7.32,-19.18 28.23,-32.99 52.9,-32.99c29.08,0 53,19.27 55.46,43.86c3.06,-0.61 6.22,-0.95 9.48,-0.95c8.22,0 15.85,2.08 22.26,5.59c10.73,-12.6 28.03,-20.78 47.59,-20.78c15.54,0 29.68,5.2 40.21,13.64c12.79,-27.28 43.77,-46.54 79.98,-46.54c19.36,0 37.21,5.5 51.55,14.76c8.98,-14.63 26.83,-24.63 47.33,-24.63c15.44,0 29.38,5.67 39.16,14.72c13.59,-35.07 50.95,-45.66 96.13,-45.66c6.97,0 15.74,2.33 22.31,3.46l1,-9.04l-705,0l1,20.64z" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -1,4 +1,4 @@
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'>
|
||||
<path class='pagelayer-shape-fill' d="M0 100 C 20 0 50 0 100 100 Z">
|
||||
</path>
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'>
|
||||
<path class='pagelayer-shape-fill' d="M0 100 C 20 0 50 0 100 100 Z">
|
||||
</path>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 174 B After Width: | Height: | Size: 177 B |
@@ -1,4 +1,4 @@
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'>
|
||||
<path class='pagelayer-shape-fill' d="M0 0 C 50 100 80 100 100 0 Z">
|
||||
</path>
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'>
|
||||
<path class='pagelayer-shape-fill' d="M0 0 C 50 100 80 100 100 0 Z">
|
||||
</path>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 174 B After Width: | Height: | Size: 177 B |
@@ -1,5 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.66" d="M329.7,73.79c-50.4,-4 -99.94,-6.49 -123.24,-23.79c-13,-9.8 -76.7,-33.75 -109.5,-30.45c-32.8,3.2 -96.96,54 -96.96,54v36.44l1070.7,-18.74c0,0 -91.5,-38.45 -115.5,-50c-27.71,-13.33 -54.97,-41.63 -154.74,24.81c-60,39.95 -119.86,-113.11 -323.76,-24.81c-19.4,8.3 -96.6,36.55 -147,32.55z" />
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.33" d="M81.59,75.05c-63.9,0 -81.59,-37.5 -81.59,-37.5v62.45h1000l7.46,-57.95c0,0 -7.46,-22.5 -94.5,7.95c-63.25,22.13 -106.3,-42.15 -210,7.05c-103.7,49.2 -241.4,1.65 -270,-7.05c-51.9,-15.9 -61,-27.45 -106.5,-27.45c-41.7,0 -144.17,52.4 -241.87,52.5z" />
|
||||
<path class="pagelayer-shape-fill" d="M78.5,50c-73.7,7.2 -97.5,50 -97.5,50h1053c0,0 -49.7,-73.65 -111,-62.45c-42.4,7.6 -30.2,11.8 -87,27c-57.2,15.2 -55.5,32.05 -184.5,-14.55c-129.1,-46 -227.41,70.55 -427.41,13.05c-63.5,-18.1 -71.89,-20.25 -145.59,-13.05z" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.66" d="M329.7,73.79c-50.4,-4 -99.94,-6.49 -123.24,-23.79c-13,-9.8 -76.7,-33.75 -109.5,-30.45c-32.8,3.2 -96.96,54 -96.96,54v36.44l1070.7,-18.74c0,0 -91.5,-38.45 -115.5,-50c-27.71,-13.33 -54.97,-41.63 -154.74,24.81c-60,39.95 -119.86,-113.11 -323.76,-24.81c-19.4,8.3 -96.6,36.55 -147,32.55z" />
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.33" d="M81.59,75.05c-63.9,0 -81.59,-37.5 -81.59,-37.5v62.45h1000l7.46,-57.95c0,0 -7.46,-22.5 -94.5,7.95c-63.25,22.13 -106.3,-42.15 -210,7.05c-103.7,49.2 -241.4,1.65 -270,-7.05c-51.9,-15.9 -61,-27.45 -106.5,-27.45c-41.7,0 -144.17,52.4 -241.87,52.5z" />
|
||||
<path class="pagelayer-shape-fill" d="M78.5,50c-73.7,7.2 -97.5,50 -97.5,50h1053c0,0 -49.7,-73.65 -111,-62.45c-42.4,7.6 -30.2,11.8 -87,27c-57.2,15.2 -55.5,32.05 -184.5,-14.55c-129.1,-46 -227.41,70.55 -427.41,13.05c-63.5,-18.1 -71.89,-20.25 -145.59,-13.05z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1008 B After Width: | Height: | Size: 1012 B |
@@ -1,5 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.33" d="M670.3,26.21c50.4,4 99.94,6.49 123.24,23.79c13,9.8 76.7,33.75 109.5,30.45c32.8,-3.2 96.96,-54 96.96,-54v-36.44l-1070.7,18.74c0,0 91.5,38.45 115.5,50c27.71,13.33 54.97,41.63 154.74,-24.81c60,-39.95 119.86,113.11 323.76,24.81c19.4,-8.3 96.6,-36.55 147,-32.55z" />
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.66" d="M918.41,24.95c63.9,0 81.59,37.5 81.59,37.5v-62.45l-1000,0l-7.46,57.95c0,0 7.46,22.5 94.5,-7.95c63.25,-22.13 106.3,42.15 210,-7.05c103.7,-49.2 241.4,-1.65 270,7.05c51.9,15.9 61,27.45 106.5,27.45c41.7,0 144.17,-52.4 241.87,-52.5z" />
|
||||
<path class="pagelayer-shape-fill" d="M921.5,50c73.7,-7.2 97.5,-50 97.5,-50l-1053,0c0,0 49.7,73.65 111,62.45c42.4,-7.6 30.2,-11.8 87,-27c57.2,-15.2 55.5,-32.05 184.5,14.55c129.1,46 227.41,-70.55 427.41,-13.05c63.5,18.1 71.89,20.25 145.59,13.05z" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.33" d="M670.3,26.21c50.4,4 99.94,6.49 123.24,23.79c13,9.8 76.7,33.75 109.5,30.45c32.8,-3.2 96.96,-54 96.96,-54v-36.44l-1070.7,18.74c0,0 91.5,38.45 115.5,50c27.71,13.33 54.97,41.63 154.74,-24.81c60,-39.95 119.86,113.11 323.76,24.81c19.4,-8.3 96.6,-36.55 147,-32.55z" />
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.66" d="M918.41,24.95c63.9,0 81.59,37.5 81.59,37.5v-62.45l-1000,0l-7.46,57.95c0,0 7.46,22.5 94.5,-7.95c63.25,-22.13 106.3,42.15 210,-7.05c103.7,-49.2 241.4,-1.65 270,7.05c51.9,15.9 61,27.45 106.5,27.45c41.7,0 144.17,-52.4 241.87,-52.5z" />
|
||||
<path class="pagelayer-shape-fill" d="M921.5,50c73.7,-7.2 97.5,-50 97.5,-50l-1053,0c0,0 49.7,73.65 111,62.45c42.4,-7.6 30.2,-11.8 87,-27c57.2,-15.2 55.5,-32.05 184.5,14.55c129.1,46 227.41,-70.55 427.41,-13.05c63.5,18.1 71.89,20.25 145.59,13.05z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 963 B After Width: | Height: | Size: 967 B |
@@ -1,3 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M0,1v99h1000v-99h-0.1l-333.8,92.8l-309.2,-69.8l-118.8,16.6" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M0,1v99h1000v-99h-0.1l-333.8,92.8l-309.2,-69.8l-118.8,16.6" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 200 B After Width: | Height: | Size: 202 B |
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<svg class="pagelayer-shape-top-fill" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M1000,99v-99l-1000,0v99h0.1l333.8,-92.8l309.2,69.8l118.8,-16.6" />
|
||||
<?xml version="1.0"?>
|
||||
<svg class="pagelayer-shape-top-fill" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M1000,99v-99l-1000,0v99h0.1l333.8,-92.8l309.2,69.8l118.8,-16.6" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 258 B After Width: | Height: | Size: 261 B |
@@ -1,5 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.5" d="M50 0 L47 100 40 100 C47 100 49 20 50 0Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.5" d="M50 0 L53 100 60 100 C53 100 51 20 50 0Z"></path>
|
||||
<path class="pagelayer-shape-fill" d="M47 100 L50 0 L53 100 Z"></path>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.5" d="M50 0 L47 100 40 100 C47 100 49 20 50 0Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.5" d="M50 0 L53 100 60 100 C53 100 51 20 50 0Z"></path>
|
||||
<path class="pagelayer-shape-fill" d="M47 100 L50 0 L53 100 Z"></path>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 391 B |
@@ -1,5 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.5" d="M50 100 C49 80 47 0 40 0 L47 0 Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.5" d="M50 100 C51 80 53 0 60 0 L53 0 Z"></path>
|
||||
<path class="pagelayer-shape-fill" d="M47 0 L50 100 L53 0 Z"></path>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.5" d="M50 100 C49 80 47 0 40 0 L47 0 Z"></path>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.5" d="M50 100 C51 80 53 0 60 0 L53 0 Z"></path>
|
||||
<path class="pagelayer-shape-fill" d="M47 0 L50 100 L53 0 Z"></path>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 368 B After Width: | Height: | Size: 372 B |
@@ -1,3 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 20" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M1000,20v-1c0,0 -393.8,0 -483.4,0c-9.2,0 -16.6,-7.4 -16.6,-16.6c0,9.1 -7.4,16.6 -16.6,16.6c-89.6,0 -483.4,0 -483.4,0v1z"></path>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 20" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M1000,20v-1c0,0 -393.8,0 -483.4,0c-9.2,0 -16.6,-7.4 -16.6,-16.6c0,9.1 -7.4,16.6 -16.6,16.6c-89.6,0 -483.4,0 -483.4,0v1z"></path>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 266 B |
@@ -1,4 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 20" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="
|
||||
M0,0v1c0,0 393.8,0 483.4,0c9.2,0 16.6,7.4 16.6,16.6c0,-9.1 7.4,-16.6 16.6,-16.6c89.6,0 483.4,0 483.4,0v-1z" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 20" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="
|
||||
M0,0v1c0,0 393.8,0 483.4,0c9.2,0 16.6,7.4 16.6,16.6c0,-9.1 7.4,-16.6 16.6,-16.6c89.6,0 483.4,0 483.4,0v-1z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 251 B |
@@ -1,4 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M0 100 Q 2.5 40 5 100Q 7.5 40 10 100Q 12.5 40 15 100Q 17.5 40 20 100Q 22.5 40 25 100Q 27.5 40 30 100Q 32.5 40 35 100Q 37.5 40 40 100Q 42.5 40 45 100Q 47.5 40 50 100Q 52.5 40 55 100Q 57.5 40 60 100Q 62.5 40 65 100Q 67.5 40 70 100Q 72.5 40 75 100Q 77.5 40 80 100Q 82.5 40 85 100Q 87.5 40 90 100Q 92.5 40 95 100Q 97.5 40 100 100 Z">
|
||||
</path>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M0 100 Q 2.5 40 5 100Q 7.5 40 10 100Q 12.5 40 15 100Q 17.5 40 20 100Q 22.5 40 25 100Q 27.5 40 30 100Q 32.5 40 35 100Q 37.5 40 40 100Q 42.5 40 45 100Q 47.5 40 50 100Q 52.5 40 55 100Q 57.5 40 60 100Q 62.5 40 65 100Q 67.5 40 70 100Q 72.5 40 75 100Q 77.5 40 80 100Q 82.5 40 85 100Q 87.5 40 90 100Q 92.5 40 95 100Q 97.5 40 100 100 Z">
|
||||
</path>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 477 B |
@@ -1,4 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M0 0 Q 2.5 40 5 0 Q 7.5 40 10 0Q 12.5 40 15 0Q 17.5 40 20 0Q 22.5 40 25 0Q 27.5 40 30 0Q 32.5 40 35 0Q 37.5 40 40 0Q 42.5 40 45 0Q 47.5 40 50 0Q 52.5 40 55 0Q 57.5 40 60 0Q 62.5 40 65 0Q 67.5 40 70 0Q 72.5 40 75 0Q 77.5 40 80 0Q 82.5 40 85 0Q 87.5 40 90 0Q 92.5 40 95 0Q 97.5 40 100 0 Z">
|
||||
</path>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M0 0 Q 2.5 40 5 0 Q 7.5 40 10 0Q 12.5 40 15 0Q 17.5 40 20 0Q 22.5 40 25 0Q 27.5 40 30 0Q 32.5 40 35 0Q 37.5 40 40 0Q 42.5 40 45 0Q 47.5 40 50 0Q 52.5 40 55 0Q 57.5 40 60 0Q 62.5 40 65 0Q 67.5 40 70 0Q 72.5 40 75 0Q 77.5 40 80 0Q 82.5 40 85 0Q 87.5 40 90 0Q 92.5 40 95 0Q 97.5 40 100 0 Z">
|
||||
</path>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 433 B After Width: | Height: | Size: 436 B |
@@ -1,3 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M0,95V100h1000v-5L0,5z"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M0,95V100h1000v-5L0,5z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 164 B |
@@ -1,3 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M0,5V0h1000v100L0,5z"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M0,5V0h1000v100L0,5z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 160 B After Width: | Height: | Size: 162 B |
@@ -1,5 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0,95V100h1000V20L0,95z"/>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0,95V100h1000V50L0,95z"/>
|
||||
<path class="pagelayer-shape-fill" d="M0,95V100h1000V80L0,95z"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0,95V100h1000V20L0,95z"/>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0,95V100h1000V50L0,95z"/>
|
||||
<path class="pagelayer-shape-fill" d="M0,95V100h1000V80L0,95z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 339 B |
@@ -1,5 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0,5V0h1000v90L0,5z"/>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0,5V0h1000v60L0,5z"/>
|
||||
<path class="pagelayer-shape-fill" d="M0,5V0h1000v30L0,5z"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0,5V0h1000v90L0,5z"/>
|
||||
<path class="pagelayer-shape-fill" style="opacity:0.3" d="M0,5V0h1000v60L0,5z"/>
|
||||
<path class="pagelayer-shape-fill" d="M0,5V0h1000v30L0,5z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 327 B |
@@ -1,3 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M790.5,93.1c-59.3-5.3-116.8-18-192.6-50c-29.6-12.7-76.9-31-100.5-35.9c-23.6-4.9-52.6-7.8-75.5-5.3c-10.2,1.1-22.6,1.4-50.1,7.4c-27.2,6.3-58.2,16.6-79.4,24.7c-41.3,15.9-94.9,21.9-134,22.6C72,58.2,0,25.8,0,25.8V100h1000V65.3c0,0-51.5,19.4-106.2,25.7C839.5,97,814.1,95.2,790.5,93.1z"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none">
|
||||
<path class="pagelayer-shape-fill" d="M790.5,93.1c-59.3-5.3-116.8-18-192.6-50c-29.6-12.7-76.9-31-100.5-35.9c-23.6-4.9-52.6-7.8-75.5-5.3c-10.2,1.1-22.6,1.4-50.1,7.4c-27.2,6.3-58.2,16.6-79.4,24.7c-41.3,15.9-94.9,21.9-134,22.6C72,58.2,0,25.8,0,25.8V100h1000V65.3c0,0-51.5,19.4-106.2,25.7C839.5,97,814.1,95.2,790.5,93.1z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 420 B |
@@ -1,3 +1,3 @@
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'>
|
||||
<path class='pagelayer-shape-fill' d='M421.9,6.5c22.6-2.5,51.5,0.4,75.5,5.3c23.6,4.9,70.9,23.5,100.5,35.7c75.8,32.2,133.7,44.5,192.6,49.7c23.6,2.1,48.7,3.5,103.4-2.5c54.7-6,106.2-25.6,106.2-25.6V0H0v30.3c0,0,72,32.6,158.4,30.5c39.2-0.7,92.8-6.7,134-22.4c21.2-8.1,52.2-18.2,79.7-24.2C399.3,7.9,411.6,7.5,421.9,6.5z'/>
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'>
|
||||
<path class='pagelayer-shape-fill' d='M421.9,6.5c22.6-2.5,51.5,0.4,75.5,5.3c23.6,4.9,70.9,23.5,100.5,35.7c75.8,32.2,133.7,44.5,192.6,49.7c23.6,2.1,48.7,3.5,103.4-2.5c54.7-6,106.2-25.6,106.2-25.6V0H0v30.3c0,0,72,32.6,158.4,30.5c39.2-0.7,92.8-6.7,134-22.4c21.2-8.1,52.2-18.2,79.7-24.2C399.3,7.9,411.6,7.5,421.9,6.5z'/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 415 B After Width: | Height: | Size: 417 B |
@@ -1,4 +1,4 @@
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1500 100' preserveAspectRatio='none'>
|
||||
<path class='pagelayer-shape-fill' d="M0 100L10,2L20,100L30,2L40,100L50,2L60,100L70,2L80,100L90,2L100,100L110,2L120,100L130,2L140,100L150,2L160,100L170,2L180,100L190,2L200,100L210,2L220,100L230,2L240,100L250,2L260,100L270,2L280,100L290,2L300,100L310,2L320,100L330,2L340,100L350,2L360,100L370,2L380,100L390,2L400,100L410,2L420,100L430,2L440,100L450,2L460,100L470,2L480,100L490,2L500,100L510,2L520,100L530,2L540,100L550,2L560,100L570,2L580,100L590,2L600,100L610,2L620,100L630,2L640,100L650,2L660,100L670,2L680,100L690,2L700,100L710,2L720,100L730,2L740,100L750,2L760,100L770,2L780,100L790,2L800,100L810,2L820,100L830,2L840,100L850,2L860,100L870,2L880,100L890,2L900,100L910,2L920,100L930,2L940,100L950,2L960,100L970,2L980,100L990,2L1000,100L1010,2L1020,100L1030,2L1040,100L1050,2L1060,100L1070,2L1080,100L1090,2L1100,100L1110,2L1120,100L1130,2L1140,100L1150,2L1160,100L1170,2L1180,100L1190,2L1200,100L1210,2L1220,100L1230,2L1240,100L1250,2L1260,100L1270,2L1280,100L1290,2L1300,100L1310,2L1320,100L1330,2L1340,100L1350,2L1360,100L1370,2L1380,100L1390,2L1400,100L1410,2L1420,100L1430,2L1440,100L1450,2L1460,100L1470,2L1480,100L1490,2L1500,100V100H0Z">
|
||||
</path>
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1500 100' preserveAspectRatio='none'>
|
||||
<path class='pagelayer-shape-fill' d="M0 100L10,2L20,100L30,2L40,100L50,2L60,100L70,2L80,100L90,2L100,100L110,2L120,100L130,2L140,100L150,2L160,100L170,2L180,100L190,2L200,100L210,2L220,100L230,2L240,100L250,2L260,100L270,2L280,100L290,2L300,100L310,2L320,100L330,2L340,100L350,2L360,100L370,2L380,100L390,2L400,100L410,2L420,100L430,2L440,100L450,2L460,100L470,2L480,100L490,2L500,100L510,2L520,100L530,2L540,100L550,2L560,100L570,2L580,100L590,2L600,100L610,2L620,100L630,2L640,100L650,2L660,100L670,2L680,100L690,2L700,100L710,2L720,100L730,2L740,100L750,2L760,100L770,2L780,100L790,2L800,100L810,2L820,100L830,2L840,100L850,2L860,100L870,2L880,100L890,2L900,100L910,2L920,100L930,2L940,100L950,2L960,100L970,2L980,100L990,2L1000,100L1010,2L1020,100L1030,2L1040,100L1050,2L1060,100L1070,2L1080,100L1090,2L1100,100L1110,2L1120,100L1130,2L1140,100L1150,2L1160,100L1170,2L1180,100L1190,2L1200,100L1210,2L1220,100L1230,2L1240,100L1250,2L1260,100L1270,2L1280,100L1290,2L1300,100L1310,2L1320,100L1330,2L1340,100L1350,2L1360,100L1370,2L1380,100L1390,2L1400,100L1410,2L1420,100L1430,2L1440,100L1450,2L1460,100L1470,2L1480,100L1490,2L1500,100V100H0Z">
|
||||
</path>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -1,4 +1,4 @@
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1500 100' preserveAspectRatio='none'>
|
||||
<path class='pagelayer-shape-fill' d="M0 0L10,100L20,3L30,100L40,3L50,100L60,3L70,100L80,3L90,100L100,3L110,100L120,3L130,100L140,3L150,100L160,3L170,100L180,3L190,100L200,3L210,100L220,3L230,100L240,3L250,100L260,3L270,100L280,3L290,100L300,3L310,100L320,3L330,100L340,3L350,100L360,3L370,100L380,3L390,100L400,3L410,100L420,3L430,100L440,3L450,100L460,3L470,100L480,3L490,100L500,3L510,100L520,3L530,100L540,3L550,100L560,3L570,100L580,3L590,100L600,3L610,100L620,3L630,100L640,3L650,100L660,3L670,100L680,3L690,100L700,3L710,100L720,3L730,100L740,3L750,100L760,3L770,100L780,3L790,100L800,3L810,100L820,3L830,100L840,3L850,100L860,3L870,100L880,3L890,100L900,3L910,100L920,3L930,100L940,3L950,100L960,3L970,100L980,3L990,100L1000,3L1010,100L1020,3L1030,100L1040,3L1050,100L1060,3L1070,100L1080,3L1090,100L1100,3L1110,100L1120,3L1130,100L1140,3L1150,100L1160,3L1170,100L1180,3L1190,100L1200,3L1210,100L1220,3L1230,100L1240,3L1250,100L1260,3L1270,100L1280,3L1290,100L1300,3L1310,100L1320,3L1330,100L1340,3L1350,100L1360,3L1370,100L1380,3L1390,100L1400,3L1410,100L1420,3L1430,100L1440,3L1450,100L1460,3L1470,100L1480,3L1490,100L1500,3V0H0Z">
|
||||
</path>
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1500 100' preserveAspectRatio='none'>
|
||||
<path class='pagelayer-shape-fill' d="M0 0L10,100L20,3L30,100L40,3L50,100L60,3L70,100L80,3L90,100L100,3L110,100L120,3L130,100L140,3L150,100L160,3L170,100L180,3L190,100L200,3L210,100L220,3L230,100L240,3L250,100L260,3L270,100L280,3L290,100L300,3L310,100L320,3L330,100L340,3L350,100L360,3L370,100L380,3L390,100L400,3L410,100L420,3L430,100L440,3L450,100L460,3L470,100L480,3L490,100L500,3L510,100L520,3L530,100L540,3L550,100L560,3L570,100L580,3L590,100L600,3L610,100L620,3L630,100L640,3L650,100L660,3L670,100L680,3L690,100L700,3L710,100L720,3L730,100L740,3L750,100L760,3L770,100L780,3L790,100L800,3L810,100L820,3L830,100L840,3L850,100L860,3L870,100L880,3L890,100L900,3L910,100L920,3L930,100L940,3L950,100L960,3L970,100L980,3L990,100L1000,3L1010,100L1020,3L1030,100L1040,3L1050,100L1060,3L1070,100L1080,3L1090,100L1100,3L1110,100L1120,3L1130,100L1140,3L1150,100L1160,3L1170,100L1180,3L1190,100L1200,3L1210,100L1220,3L1230,100L1240,3L1250,100L1260,3L1270,100L1280,3L1290,100L1300,3L1310,100L1320,3L1330,100L1340,3L1350,100L1360,3L1370,100L1380,3L1390,100L1400,3L1410,100L1420,3L1430,100L1440,3L1450,100L1460,3L1470,100L1480,3L1490,100L1500,3V0H0Z">
|
||||
</path>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -1,373 +1,373 @@
|
||||
/*
|
||||
* [hi-base64]{@link https://github.com/emn178/hi-base64}
|
||||
*
|
||||
* @version 0.2.1
|
||||
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
||||
* @copyright Chen, Yi-Cyuan 2014-2017
|
||||
* @license MIT
|
||||
*/
|
||||
/*jslint bitwise: true */
|
||||
/*Modified by Pagelayer*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var root = typeof window === 'object' ? window : {};
|
||||
var NODE_JS = false;
|
||||
if (NODE_JS) {
|
||||
root = global;
|
||||
}
|
||||
var COMMON_JS = !root.HI_BASE64_NO_COMMON_JS && typeof module === 'object' && module.exports;
|
||||
var AMD = typeof define === 'function' && define.amd;
|
||||
var BASE64_ENCODE_CHAR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
|
||||
var BASE64_DECODE_CHAR = {
|
||||
'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'I': 8,
|
||||
'J': 9, 'K': 10, 'L': 11, 'M': 12, 'N': 13, 'O': 14, 'P': 15, 'Q': 16,
|
||||
'R': 17, 'S': 18, 'T': 19, 'U': 20, 'V': 21, 'W': 22, 'X': 23, 'Y': 24,
|
||||
'Z': 25, 'a': 26, 'b': 27, 'c': 28, 'd': 29, 'e': 30, 'f': 31, 'g': 32,
|
||||
'h': 33, 'i': 34, 'j': 35, 'k': 36, 'l': 37, 'm': 38, 'n': 39, 'o': 40,
|
||||
'p': 41, 'q': 42, 'r': 43, 's': 44, 't': 45, 'u': 46, 'v': 47, 'w': 48,
|
||||
'x': 49, 'y': 50, 'z': 51, '0': 52, '1': 53, '2': 54, '3': 55, '4': 56,
|
||||
'5': 57, '6': 58, '7': 59, '8': 60, '9': 61, '+': 62, '/': 63, '-': 62,
|
||||
'_': 63
|
||||
};
|
||||
|
||||
var utf8ToBytes = function (str) {
|
||||
var bytes = [];
|
||||
for (var i = 0; i < str.length; i++) {
|
||||
var c = str.charCodeAt(i);
|
||||
if (c < 0x80) {
|
||||
bytes[bytes.length] = c;
|
||||
} else if (c < 0x800) {
|
||||
bytes[bytes.length] = 0xc0 | (c >> 6);
|
||||
bytes[bytes.length] = 0x80 | (c & 0x3f);
|
||||
} else if (c < 0xd800 || c >= 0xe000) {
|
||||
bytes[bytes.length] = 0xe0 | (c >> 12);
|
||||
bytes[bytes.length] = 0x80 | ((c >> 6) & 0x3f);
|
||||
bytes[bytes.length] = 0x80 | (c & 0x3f);
|
||||
} else {
|
||||
c = 0x10000 + (((c & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff));
|
||||
bytes[bytes.length] = 0xf0 | (c >> 18);
|
||||
bytes[bytes.length] = 0x80 | ((c >> 12) & 0x3f);
|
||||
bytes[bytes.length] = 0x80 | ((c >> 6) & 0x3f);
|
||||
bytes[bytes.length] = 0x80 | (c & 0x3f);
|
||||
}
|
||||
}
|
||||
return bytes;
|
||||
};
|
||||
|
||||
var decodeAsBytes = function (base64Str) {
|
||||
var v1, v2, v3, v4, bytes = [], index = 0, length = base64Str.length;
|
||||
if (base64Str.charAt(length - 2) === '=') {
|
||||
length -= 2;
|
||||
} else if (base64Str.charAt(length - 1) === '=') {
|
||||
length -= 1;
|
||||
}
|
||||
|
||||
// 4 char to 3 bytes
|
||||
for (var i = 0, count = length >> 2 << 2; i < count;) {
|
||||
v1 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v2 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v3 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v4 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
bytes[index++] = (v1 << 2 | v2 >>> 4) & 255;
|
||||
bytes[index++] = (v2 << 4 | v3 >>> 2) & 255;
|
||||
bytes[index++] = (v3 << 6 | v4) & 255;
|
||||
}
|
||||
|
||||
// remain bytes
|
||||
var remain = length - count;
|
||||
if (remain === 2) {
|
||||
v1 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v2 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
bytes[index++] = (v1 << 2 | v2 >>> 4) & 255;
|
||||
} else if (remain === 3) {
|
||||
v1 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v2 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v3 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
bytes[index++] = (v1 << 2 | v2 >>> 4) & 255;
|
||||
bytes[index++] = (v2 << 4 | v3 >>> 2) & 255;
|
||||
}
|
||||
return bytes;
|
||||
};
|
||||
|
||||
var encodeFromBytes = function (bytes) {
|
||||
var v1, v2, v3, base64Str = '', length = bytes.length;
|
||||
for (var i = 0, count = parseInt(length / 3) * 3; i < count;) {
|
||||
v1 = bytes[i++];
|
||||
v2 = bytes[i++];
|
||||
v3 = bytes[i++];
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
|
||||
BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] +
|
||||
BASE64_ENCODE_CHAR[v3 & 63];
|
||||
}
|
||||
|
||||
// remain char
|
||||
var remain = length - count;
|
||||
if (remain === 1) {
|
||||
v1 = bytes[i];
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4) & 63] +
|
||||
'==';
|
||||
} else if (remain === 2) {
|
||||
v1 = bytes[i++];
|
||||
v2 = bytes[i];
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
|
||||
BASE64_ENCODE_CHAR[(v2 << 2) & 63] +
|
||||
'=';
|
||||
}
|
||||
return base64Str;
|
||||
};
|
||||
|
||||
var btoa = root.btoa, atob = root.atob, utf8Base64Encode, utf8Base64Decode;
|
||||
if (NODE_JS) {
|
||||
} else if (!btoa) {
|
||||
btoa = function (str) {
|
||||
var v1, v2, v3, base64Str = '', length = str.length;
|
||||
for (var i = 0, count = parseInt(length / 3) * 3; i < count;) {
|
||||
v1 = str.charCodeAt(i++);
|
||||
v2 = str.charCodeAt(i++);
|
||||
v3 = str.charCodeAt(i++);
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
|
||||
BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] +
|
||||
BASE64_ENCODE_CHAR[v3 & 63];
|
||||
}
|
||||
|
||||
// remain char
|
||||
var remain = length - count;
|
||||
if (remain === 1) {
|
||||
v1 = str.charCodeAt(i);
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4) & 63] +
|
||||
'==';
|
||||
} else if (remain === 2) {
|
||||
v1 = str.charCodeAt(i++);
|
||||
v2 = str.charCodeAt(i);
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
|
||||
BASE64_ENCODE_CHAR[(v2 << 2) & 63] +
|
||||
'=';
|
||||
}
|
||||
return base64Str;
|
||||
};
|
||||
|
||||
utf8Base64Encode = function (str) {
|
||||
var v1, v2, v3, base64Str = '', bytes = utf8ToBytes(str), length = bytes.length;
|
||||
for (var i = 0, count = parseInt(length / 3) * 3; i < count;) {
|
||||
v1 = bytes[i++];
|
||||
v2 = bytes[i++];
|
||||
v3 = bytes[i++];
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
|
||||
BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] +
|
||||
BASE64_ENCODE_CHAR[v3 & 63];
|
||||
}
|
||||
|
||||
// remain char
|
||||
var remain = length - count;
|
||||
if (remain === 1) {
|
||||
v1 = bytes[i];
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4) & 63] +
|
||||
'==';
|
||||
} else if (remain === 2) {
|
||||
v1 = bytes[i++];
|
||||
v2 = bytes[i];
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
|
||||
BASE64_ENCODE_CHAR[(v2 << 2) & 63] +
|
||||
'=';
|
||||
}
|
||||
return base64Str;
|
||||
};
|
||||
|
||||
atob = function (base64Str) {
|
||||
var v1, v2, v3, v4, str = '', length = base64Str.length;
|
||||
if (base64Str.charAt(length - 2) === '=') {
|
||||
length -= 2;
|
||||
} else if (base64Str.charAt(length - 1) === '=') {
|
||||
length -= 1;
|
||||
}
|
||||
|
||||
// 4 char to 3 bytes
|
||||
for (var i = 0, count = length >> 2 << 2; i < count;) {
|
||||
v1 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v2 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v3 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v4 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
str += String.fromCharCode((v1 << 2 | v2 >>> 4) & 255) +
|
||||
String.fromCharCode((v2 << 4 | v3 >>> 2) & 255) +
|
||||
String.fromCharCode((v3 << 6 | v4) & 255);
|
||||
}
|
||||
|
||||
// remain bytes
|
||||
var remain = length - count;
|
||||
if (remain === 2) {
|
||||
v1 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v2 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
str += String.fromCharCode((v1 << 2 | v2 >>> 4) & 255);
|
||||
} else if (remain === 3) {
|
||||
v1 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v2 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v3 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
str += String.fromCharCode((v1 << 2 | v2 >>> 4) & 255) +
|
||||
String.fromCharCode((v2 << 4 | v3 >>> 2) & 255);
|
||||
}
|
||||
return str;
|
||||
};
|
||||
|
||||
utf8Base64Decode = function (base64Str) {
|
||||
var str = '', bytes = decodeAsBytes(base64Str), length = bytes.length;
|
||||
var i = 0, followingChars = 0, b, c;
|
||||
while (i < length) {
|
||||
b = bytes[i++];
|
||||
if (b <= 0x7F) {
|
||||
str += String.fromCharCode(b);
|
||||
continue;
|
||||
} else if (b > 0xBF && b <= 0xDF) {
|
||||
c = b & 0x1F;
|
||||
followingChars = 1;
|
||||
} else if (b <= 0xEF) {
|
||||
c = b & 0x0F;
|
||||
followingChars = 2;
|
||||
} else if (b <= 0xF7) {
|
||||
c = b & 0x07;
|
||||
followingChars = 3;
|
||||
} else {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
|
||||
for (var j = 0; j < followingChars; ++j) {
|
||||
b = bytes[i++];
|
||||
if (b < 0x80 || b > 0xBF) {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
c <<= 6;
|
||||
c += b & 0x3F;
|
||||
}
|
||||
if (c >= 0xD800 && c <= 0xDFFF) {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
if (c > 0x10FFFF) {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
|
||||
if (c <= 0xFFFF) {
|
||||
str += String.fromCharCode(c);
|
||||
} else {
|
||||
c -= 0x10000;
|
||||
str += String.fromCharCode((c >> 10) + 0xD800);
|
||||
str += String.fromCharCode((c & 0x3FF) + 0xDC00);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
} else {
|
||||
utf8Base64Encode = function (str) {
|
||||
var result = '';
|
||||
for (var i = 0; i < str.length; i++) {
|
||||
var charcode = str.charCodeAt(i);
|
||||
if (charcode < 0x80) {
|
||||
result += String.fromCharCode(charcode);
|
||||
} else if (charcode < 0x800) {
|
||||
result += String.fromCharCode(0xc0 | (charcode >> 6)) +
|
||||
String.fromCharCode(0x80 | (charcode & 0x3f));
|
||||
} else if (charcode < 0xd800 || charcode >= 0xe000) {
|
||||
result += String.fromCharCode(0xe0 | (charcode >> 12)) +
|
||||
String.fromCharCode(0x80 | ((charcode >> 6) & 0x3f)) +
|
||||
String.fromCharCode(0x80 | (charcode & 0x3f));
|
||||
} else {
|
||||
charcode = 0x10000 + (((charcode & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff));
|
||||
result += String.fromCharCode(0xf0 | (charcode >> 18)) +
|
||||
String.fromCharCode(0x80 | ((charcode >> 12) & 0x3f)) +
|
||||
String.fromCharCode(0x80 | ((charcode >> 6) & 0x3f)) +
|
||||
String.fromCharCode(0x80 | (charcode & 0x3f));
|
||||
}
|
||||
}
|
||||
return btoa(result);
|
||||
};
|
||||
|
||||
utf8Base64Decode = function (base64Str) {
|
||||
var tmpStr = atob(base64Str.trim('=').replace(/-/g, '+').replace(/_/g, '/'));
|
||||
if (!/[^\x00-\x7F]/.test(tmpStr)) {
|
||||
return tmpStr;
|
||||
}
|
||||
var str = '', i = 0, length = tmpStr.length, followingChars = 0, b, c;
|
||||
while (i < length) {
|
||||
b = tmpStr.charCodeAt(i++);
|
||||
if (b <= 0x7F) {
|
||||
str += String.fromCharCode(b);
|
||||
continue;
|
||||
} else if (b > 0xBF && b <= 0xDF) {
|
||||
c = b & 0x1F;
|
||||
followingChars = 1;
|
||||
} else if (b <= 0xEF) {
|
||||
c = b & 0x0F;
|
||||
followingChars = 2;
|
||||
} else if (b <= 0xF7) {
|
||||
c = b & 0x07;
|
||||
followingChars = 3;
|
||||
} else {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
|
||||
for (var j = 0; j < followingChars; ++j) {
|
||||
b = tmpStr.charCodeAt(i++);
|
||||
if (b < 0x80 || b > 0xBF) {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
c <<= 6;
|
||||
c += b & 0x3F;
|
||||
}
|
||||
if (c >= 0xD800 && c <= 0xDFFF) {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
if (c > 0x10FFFF) {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
|
||||
if (c <= 0xFFFF) {
|
||||
str += String.fromCharCode(c);
|
||||
} else {
|
||||
c -= 0x10000;
|
||||
str += String.fromCharCode((c >> 10) + 0xD800);
|
||||
str += String.fromCharCode((c & 0x3FF) + 0xDC00);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
}
|
||||
|
||||
var encode = function (str, asciiOnly) {
|
||||
var notString = typeof(str) != 'string';
|
||||
if (notString && str.constructor === root.ArrayBuffer) {
|
||||
str = new Uint8Array(str);
|
||||
}
|
||||
if (notString) {
|
||||
return encodeFromBytes(str);
|
||||
} else {
|
||||
if (!asciiOnly && /[^\x00-\x7F]/.test(str)) {
|
||||
return utf8Base64Encode(str);
|
||||
} else {
|
||||
return btoa(str);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var decode = function (base64Str, asciiOnly) {
|
||||
return asciiOnly ? atob(base64Str) : utf8Base64Decode(base64Str);
|
||||
};
|
||||
|
||||
var exports = {
|
||||
encode: encode,
|
||||
decode: decode,
|
||||
atob: atob,
|
||||
btoa: btoa
|
||||
};
|
||||
decode.bytes = decodeAsBytes;
|
||||
decode.string = decode;
|
||||
|
||||
root.pagelayer_Base64 = exports;
|
||||
})();
|
||||
/*
|
||||
* [hi-base64]{@link https://github.com/emn178/hi-base64}
|
||||
*
|
||||
* @version 0.2.1
|
||||
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
||||
* @copyright Chen, Yi-Cyuan 2014-2017
|
||||
* @license MIT
|
||||
*/
|
||||
/*jslint bitwise: true */
|
||||
/*Modified by Pagelayer*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var root = typeof window === 'object' ? window : {};
|
||||
var NODE_JS = false;
|
||||
if (NODE_JS) {
|
||||
root = global;
|
||||
}
|
||||
var COMMON_JS = !root.HI_BASE64_NO_COMMON_JS && typeof module === 'object' && module.exports;
|
||||
var AMD = typeof define === 'function' && define.amd;
|
||||
var BASE64_ENCODE_CHAR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
|
||||
var BASE64_DECODE_CHAR = {
|
||||
'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'I': 8,
|
||||
'J': 9, 'K': 10, 'L': 11, 'M': 12, 'N': 13, 'O': 14, 'P': 15, 'Q': 16,
|
||||
'R': 17, 'S': 18, 'T': 19, 'U': 20, 'V': 21, 'W': 22, 'X': 23, 'Y': 24,
|
||||
'Z': 25, 'a': 26, 'b': 27, 'c': 28, 'd': 29, 'e': 30, 'f': 31, 'g': 32,
|
||||
'h': 33, 'i': 34, 'j': 35, 'k': 36, 'l': 37, 'm': 38, 'n': 39, 'o': 40,
|
||||
'p': 41, 'q': 42, 'r': 43, 's': 44, 't': 45, 'u': 46, 'v': 47, 'w': 48,
|
||||
'x': 49, 'y': 50, 'z': 51, '0': 52, '1': 53, '2': 54, '3': 55, '4': 56,
|
||||
'5': 57, '6': 58, '7': 59, '8': 60, '9': 61, '+': 62, '/': 63, '-': 62,
|
||||
'_': 63
|
||||
};
|
||||
|
||||
var utf8ToBytes = function (str) {
|
||||
var bytes = [];
|
||||
for (var i = 0; i < str.length; i++) {
|
||||
var c = str.charCodeAt(i);
|
||||
if (c < 0x80) {
|
||||
bytes[bytes.length] = c;
|
||||
} else if (c < 0x800) {
|
||||
bytes[bytes.length] = 0xc0 | (c >> 6);
|
||||
bytes[bytes.length] = 0x80 | (c & 0x3f);
|
||||
} else if (c < 0xd800 || c >= 0xe000) {
|
||||
bytes[bytes.length] = 0xe0 | (c >> 12);
|
||||
bytes[bytes.length] = 0x80 | ((c >> 6) & 0x3f);
|
||||
bytes[bytes.length] = 0x80 | (c & 0x3f);
|
||||
} else {
|
||||
c = 0x10000 + (((c & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff));
|
||||
bytes[bytes.length] = 0xf0 | (c >> 18);
|
||||
bytes[bytes.length] = 0x80 | ((c >> 12) & 0x3f);
|
||||
bytes[bytes.length] = 0x80 | ((c >> 6) & 0x3f);
|
||||
bytes[bytes.length] = 0x80 | (c & 0x3f);
|
||||
}
|
||||
}
|
||||
return bytes;
|
||||
};
|
||||
|
||||
var decodeAsBytes = function (base64Str) {
|
||||
var v1, v2, v3, v4, bytes = [], index = 0, length = base64Str.length;
|
||||
if (base64Str.charAt(length - 2) === '=') {
|
||||
length -= 2;
|
||||
} else if (base64Str.charAt(length - 1) === '=') {
|
||||
length -= 1;
|
||||
}
|
||||
|
||||
// 4 char to 3 bytes
|
||||
for (var i = 0, count = length >> 2 << 2; i < count;) {
|
||||
v1 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v2 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v3 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v4 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
bytes[index++] = (v1 << 2 | v2 >>> 4) & 255;
|
||||
bytes[index++] = (v2 << 4 | v3 >>> 2) & 255;
|
||||
bytes[index++] = (v3 << 6 | v4) & 255;
|
||||
}
|
||||
|
||||
// remain bytes
|
||||
var remain = length - count;
|
||||
if (remain === 2) {
|
||||
v1 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v2 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
bytes[index++] = (v1 << 2 | v2 >>> 4) & 255;
|
||||
} else if (remain === 3) {
|
||||
v1 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v2 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v3 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
bytes[index++] = (v1 << 2 | v2 >>> 4) & 255;
|
||||
bytes[index++] = (v2 << 4 | v3 >>> 2) & 255;
|
||||
}
|
||||
return bytes;
|
||||
};
|
||||
|
||||
var encodeFromBytes = function (bytes) {
|
||||
var v1, v2, v3, base64Str = '', length = bytes.length;
|
||||
for (var i = 0, count = parseInt(length / 3) * 3; i < count;) {
|
||||
v1 = bytes[i++];
|
||||
v2 = bytes[i++];
|
||||
v3 = bytes[i++];
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
|
||||
BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] +
|
||||
BASE64_ENCODE_CHAR[v3 & 63];
|
||||
}
|
||||
|
||||
// remain char
|
||||
var remain = length - count;
|
||||
if (remain === 1) {
|
||||
v1 = bytes[i];
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4) & 63] +
|
||||
'==';
|
||||
} else if (remain === 2) {
|
||||
v1 = bytes[i++];
|
||||
v2 = bytes[i];
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
|
||||
BASE64_ENCODE_CHAR[(v2 << 2) & 63] +
|
||||
'=';
|
||||
}
|
||||
return base64Str;
|
||||
};
|
||||
|
||||
var btoa = root.btoa, atob = root.atob, utf8Base64Encode, utf8Base64Decode;
|
||||
if (NODE_JS) {
|
||||
} else if (!btoa) {
|
||||
btoa = function (str) {
|
||||
var v1, v2, v3, base64Str = '', length = str.length;
|
||||
for (var i = 0, count = parseInt(length / 3) * 3; i < count;) {
|
||||
v1 = str.charCodeAt(i++);
|
||||
v2 = str.charCodeAt(i++);
|
||||
v3 = str.charCodeAt(i++);
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
|
||||
BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] +
|
||||
BASE64_ENCODE_CHAR[v3 & 63];
|
||||
}
|
||||
|
||||
// remain char
|
||||
var remain = length - count;
|
||||
if (remain === 1) {
|
||||
v1 = str.charCodeAt(i);
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4) & 63] +
|
||||
'==';
|
||||
} else if (remain === 2) {
|
||||
v1 = str.charCodeAt(i++);
|
||||
v2 = str.charCodeAt(i);
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
|
||||
BASE64_ENCODE_CHAR[(v2 << 2) & 63] +
|
||||
'=';
|
||||
}
|
||||
return base64Str;
|
||||
};
|
||||
|
||||
utf8Base64Encode = function (str) {
|
||||
var v1, v2, v3, base64Str = '', bytes = utf8ToBytes(str), length = bytes.length;
|
||||
for (var i = 0, count = parseInt(length / 3) * 3; i < count;) {
|
||||
v1 = bytes[i++];
|
||||
v2 = bytes[i++];
|
||||
v3 = bytes[i++];
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
|
||||
BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] +
|
||||
BASE64_ENCODE_CHAR[v3 & 63];
|
||||
}
|
||||
|
||||
// remain char
|
||||
var remain = length - count;
|
||||
if (remain === 1) {
|
||||
v1 = bytes[i];
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4) & 63] +
|
||||
'==';
|
||||
} else if (remain === 2) {
|
||||
v1 = bytes[i++];
|
||||
v2 = bytes[i];
|
||||
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
|
||||
BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
|
||||
BASE64_ENCODE_CHAR[(v2 << 2) & 63] +
|
||||
'=';
|
||||
}
|
||||
return base64Str;
|
||||
};
|
||||
|
||||
atob = function (base64Str) {
|
||||
var v1, v2, v3, v4, str = '', length = base64Str.length;
|
||||
if (base64Str.charAt(length - 2) === '=') {
|
||||
length -= 2;
|
||||
} else if (base64Str.charAt(length - 1) === '=') {
|
||||
length -= 1;
|
||||
}
|
||||
|
||||
// 4 char to 3 bytes
|
||||
for (var i = 0, count = length >> 2 << 2; i < count;) {
|
||||
v1 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v2 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v3 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v4 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
str += String.fromCharCode((v1 << 2 | v2 >>> 4) & 255) +
|
||||
String.fromCharCode((v2 << 4 | v3 >>> 2) & 255) +
|
||||
String.fromCharCode((v3 << 6 | v4) & 255);
|
||||
}
|
||||
|
||||
// remain bytes
|
||||
var remain = length - count;
|
||||
if (remain === 2) {
|
||||
v1 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v2 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
str += String.fromCharCode((v1 << 2 | v2 >>> 4) & 255);
|
||||
} else if (remain === 3) {
|
||||
v1 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v2 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
v3 = BASE64_DECODE_CHAR[base64Str.charAt(i++)];
|
||||
str += String.fromCharCode((v1 << 2 | v2 >>> 4) & 255) +
|
||||
String.fromCharCode((v2 << 4 | v3 >>> 2) & 255);
|
||||
}
|
||||
return str;
|
||||
};
|
||||
|
||||
utf8Base64Decode = function (base64Str) {
|
||||
var str = '', bytes = decodeAsBytes(base64Str), length = bytes.length;
|
||||
var i = 0, followingChars = 0, b, c;
|
||||
while (i < length) {
|
||||
b = bytes[i++];
|
||||
if (b <= 0x7F) {
|
||||
str += String.fromCharCode(b);
|
||||
continue;
|
||||
} else if (b > 0xBF && b <= 0xDF) {
|
||||
c = b & 0x1F;
|
||||
followingChars = 1;
|
||||
} else if (b <= 0xEF) {
|
||||
c = b & 0x0F;
|
||||
followingChars = 2;
|
||||
} else if (b <= 0xF7) {
|
||||
c = b & 0x07;
|
||||
followingChars = 3;
|
||||
} else {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
|
||||
for (var j = 0; j < followingChars; ++j) {
|
||||
b = bytes[i++];
|
||||
if (b < 0x80 || b > 0xBF) {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
c <<= 6;
|
||||
c += b & 0x3F;
|
||||
}
|
||||
if (c >= 0xD800 && c <= 0xDFFF) {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
if (c > 0x10FFFF) {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
|
||||
if (c <= 0xFFFF) {
|
||||
str += String.fromCharCode(c);
|
||||
} else {
|
||||
c -= 0x10000;
|
||||
str += String.fromCharCode((c >> 10) + 0xD800);
|
||||
str += String.fromCharCode((c & 0x3FF) + 0xDC00);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
} else {
|
||||
utf8Base64Encode = function (str) {
|
||||
var result = '';
|
||||
for (var i = 0; i < str.length; i++) {
|
||||
var charcode = str.charCodeAt(i);
|
||||
if (charcode < 0x80) {
|
||||
result += String.fromCharCode(charcode);
|
||||
} else if (charcode < 0x800) {
|
||||
result += String.fromCharCode(0xc0 | (charcode >> 6)) +
|
||||
String.fromCharCode(0x80 | (charcode & 0x3f));
|
||||
} else if (charcode < 0xd800 || charcode >= 0xe000) {
|
||||
result += String.fromCharCode(0xe0 | (charcode >> 12)) +
|
||||
String.fromCharCode(0x80 | ((charcode >> 6) & 0x3f)) +
|
||||
String.fromCharCode(0x80 | (charcode & 0x3f));
|
||||
} else {
|
||||
charcode = 0x10000 + (((charcode & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff));
|
||||
result += String.fromCharCode(0xf0 | (charcode >> 18)) +
|
||||
String.fromCharCode(0x80 | ((charcode >> 12) & 0x3f)) +
|
||||
String.fromCharCode(0x80 | ((charcode >> 6) & 0x3f)) +
|
||||
String.fromCharCode(0x80 | (charcode & 0x3f));
|
||||
}
|
||||
}
|
||||
return btoa(result);
|
||||
};
|
||||
|
||||
utf8Base64Decode = function (base64Str) {
|
||||
var tmpStr = atob(base64Str.trim('=').replace(/-/g, '+').replace(/_/g, '/'));
|
||||
if (!/[^\x00-\x7F]/.test(tmpStr)) {
|
||||
return tmpStr;
|
||||
}
|
||||
var str = '', i = 0, length = tmpStr.length, followingChars = 0, b, c;
|
||||
while (i < length) {
|
||||
b = tmpStr.charCodeAt(i++);
|
||||
if (b <= 0x7F) {
|
||||
str += String.fromCharCode(b);
|
||||
continue;
|
||||
} else if (b > 0xBF && b <= 0xDF) {
|
||||
c = b & 0x1F;
|
||||
followingChars = 1;
|
||||
} else if (b <= 0xEF) {
|
||||
c = b & 0x0F;
|
||||
followingChars = 2;
|
||||
} else if (b <= 0xF7) {
|
||||
c = b & 0x07;
|
||||
followingChars = 3;
|
||||
} else {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
|
||||
for (var j = 0; j < followingChars; ++j) {
|
||||
b = tmpStr.charCodeAt(i++);
|
||||
if (b < 0x80 || b > 0xBF) {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
c <<= 6;
|
||||
c += b & 0x3F;
|
||||
}
|
||||
if (c >= 0xD800 && c <= 0xDFFF) {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
if (c > 0x10FFFF) {
|
||||
throw 'not a UTF-8 string';
|
||||
}
|
||||
|
||||
if (c <= 0xFFFF) {
|
||||
str += String.fromCharCode(c);
|
||||
} else {
|
||||
c -= 0x10000;
|
||||
str += String.fromCharCode((c >> 10) + 0xD800);
|
||||
str += String.fromCharCode((c & 0x3FF) + 0xDC00);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
}
|
||||
|
||||
var encode = function (str, asciiOnly) {
|
||||
var notString = typeof(str) != 'string';
|
||||
if (notString && str.constructor === root.ArrayBuffer) {
|
||||
str = new Uint8Array(str);
|
||||
}
|
||||
if (notString) {
|
||||
return encodeFromBytes(str);
|
||||
} else {
|
||||
if (!asciiOnly && /[^\x00-\x7F]/.test(str)) {
|
||||
return utf8Base64Encode(str);
|
||||
} else {
|
||||
return btoa(str);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var decode = function (base64Str, asciiOnly) {
|
||||
return asciiOnly ? atob(base64Str) : utf8Base64Decode(base64Str);
|
||||
};
|
||||
|
||||
var exports = {
|
||||
encode: encode,
|
||||
decode: decode,
|
||||
atob: atob,
|
||||
btoa: btoa
|
||||
};
|
||||
decode.bytes = decodeAsBytes;
|
||||
decode.string = decode;
|
||||
|
||||
root.pagelayer_Base64 = exports;
|
||||
})();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* [hi-base64]{@link https://github.com/emn178/hi-base64}
|
||||
*
|
||||
* @version 0.2.1
|
||||
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
||||
* @copyright Chen, Yi-Cyuan 2014-2017
|
||||
* @license MIT
|
||||
*/
|
||||
/*jslint bitwise: true */
|
||||
/*Modified by Pagelayer*/
|
||||
/*
|
||||
* [hi-base64]{@link https://github.com/emn178/hi-base64}
|
||||
*
|
||||
* @version 0.2.1
|
||||
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
||||
* @copyright Chen, Yi-Cyuan 2014-2017
|
||||
* @license MIT
|
||||
*/
|
||||
/*jslint bitwise: true */
|
||||
/*Modified by Pagelayer*/
|
||||
!function(){"use strict";var r="object"==typeof window?window:{};!r.HI_BASE64_NO_COMMON_JS&&"object"==typeof module&&module.exports,"function"==typeof define&&define.amd;var t,o,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),n={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,a:26,b:27,c:28,d:29,e:30,f:31,g:32,h:33,i:34,j:35,k:36,l:37,m:38,n:39,o:40,p:41,q:42,r:43,s:44,t:45,u:46,v:47,w:48,x:49,y:50,z:51,0:52,1:53,2:54,3:55,4:56,5:57,6:58,7:59,8:60,9:61,"+":62,"/":63,"-":62,_:63},a=function(r){var t,o,e,a,h=[],f=0,i=r.length;"="===r.charAt(i-2)?i-=2:"="===r.charAt(i-1)&&(i-=1);for(var C=0,c=i>>2<<2;C<c;)t=n[r.charAt(C++)],o=n[r.charAt(C++)],e=n[r.charAt(C++)],a=n[r.charAt(C++)],h[f++]=255&(t<<2|o>>>4),h[f++]=255&(o<<4|e>>>2),h[f++]=255&(e<<6|a);var g=i-c;return 2===g?(t=n[r.charAt(C++)],o=n[r.charAt(C++)],h[f++]=255&(t<<2|o>>>4)):3===g&&(t=n[r.charAt(C++)],o=n[r.charAt(C++)],e=n[r.charAt(C++)],h[f++]=255&(t<<2|o>>>4),h[f++]=255&(o<<4|e>>>2)),h},h=r.btoa,f=r.atob;h?(t=function(r){for(var t="",o=0;o<r.length;o++){var e=r.charCodeAt(o);e<128?t+=String.fromCharCode(e):e<2048?t+=String.fromCharCode(192|e>>6)+String.fromCharCode(128|63&e):e<55296||e>=57344?t+=String.fromCharCode(224|e>>12)+String.fromCharCode(128|e>>6&63)+String.fromCharCode(128|63&e):(e=65536+((1023&e)<<10|1023&r.charCodeAt(++o)),t+=String.fromCharCode(240|e>>18)+String.fromCharCode(128|e>>12&63)+String.fromCharCode(128|e>>6&63)+String.fromCharCode(128|63&e))}return h(t)},o=function(r){var t=f(r.trim("=").replace(/-/g,"+").replace(/_/g,"/"));if(!/[^\x00-\x7F]/.test(t))return t;for(var o,e,n="",a=0,h=t.length,i=0;a<h;)if((o=t.charCodeAt(a++))<=127)n+=String.fromCharCode(o);else{if(o>191&&o<=223)e=31&o,i=1;else if(o<=239)e=15&o,i=2;else{if(!(o<=247))throw"not a UTF-8 string";e=7&o,i=3}for(var C=0;C<i;++C){if((o=t.charCodeAt(a++))<128||o>191)throw"not a UTF-8 string";e<<=6,e+=63&o}if(e>=55296&&e<=57343)throw"not a UTF-8 string";if(e>1114111)throw"not a UTF-8 string";e<=65535?n+=String.fromCharCode(e):(e-=65536,n+=String.fromCharCode(55296+(e>>10)),n+=String.fromCharCode(56320+(1023&e)))}return n}):(h=function(r){for(var t,o,n,a="",h=r.length,f=0,i=3*parseInt(h/3);f<i;)t=r.charCodeAt(f++),o=r.charCodeAt(f++),n=r.charCodeAt(f++),a+=e[t>>>2]+e[63&(t<<4|o>>>4)]+e[63&(o<<2|n>>>6)]+e[63&n];var C=h-i;return 1===C?(t=r.charCodeAt(f),a+=e[t>>>2]+e[t<<4&63]+"=="):2===C&&(t=r.charCodeAt(f++),o=r.charCodeAt(f),a+=e[t>>>2]+e[63&(t<<4|o>>>4)]+e[o<<2&63]+"="),a},t=function(r){for(var t,o,n,a="",h=function(r){for(var t=[],o=0;o<r.length;o++){var e=r.charCodeAt(o);e<128?t[t.length]=e:e<2048?(t[t.length]=192|e>>6,t[t.length]=128|63&e):e<55296||e>=57344?(t[t.length]=224|e>>12,t[t.length]=128|e>>6&63,t[t.length]=128|63&e):(e=65536+((1023&e)<<10|1023&r.charCodeAt(++o)),t[t.length]=240|e>>18,t[t.length]=128|e>>12&63,t[t.length]=128|e>>6&63,t[t.length]=128|63&e)}return t}(r),f=h.length,i=0,C=3*parseInt(f/3);i<C;)t=h[i++],o=h[i++],n=h[i++],a+=e[t>>>2]+e[63&(t<<4|o>>>4)]+e[63&(o<<2|n>>>6)]+e[63&n];var c=f-C;return 1===c?(t=h[i],a+=e[t>>>2]+e[t<<4&63]+"=="):2===c&&(t=h[i++],o=h[i],a+=e[t>>>2]+e[63&(t<<4|o>>>4)]+e[o<<2&63]+"="),a},f=function(r){var t,o,e,a,h="",f=r.length;"="===r.charAt(f-2)?f-=2:"="===r.charAt(f-1)&&(f-=1);for(var i=0,C=f>>2<<2;i<C;)t=n[r.charAt(i++)],o=n[r.charAt(i++)],e=n[r.charAt(i++)],a=n[r.charAt(i++)],h+=String.fromCharCode(255&(t<<2|o>>>4))+String.fromCharCode(255&(o<<4|e>>>2))+String.fromCharCode(255&(e<<6|a));var c=f-C;return 2===c?(t=n[r.charAt(i++)],o=n[r.charAt(i++)],h+=String.fromCharCode(255&(t<<2|o>>>4))):3===c&&(t=n[r.charAt(i++)],o=n[r.charAt(i++)],e=n[r.charAt(i++)],h+=String.fromCharCode(255&(t<<2|o>>>4))+String.fromCharCode(255&(o<<4|e>>>2))),h},o=function(r){for(var t,o,e="",n=a(r),h=n.length,f=0,i=0;f<h;)if((t=n[f++])<=127)e+=String.fromCharCode(t);else{if(t>191&&t<=223)o=31&t,i=1;else if(t<=239)o=15&t,i=2;else{if(!(t<=247))throw"not a UTF-8 string";o=7&t,i=3}for(var C=0;C<i;++C){if((t=n[f++])<128||t>191)throw"not a UTF-8 string";o<<=6,o+=63&t}if(o>=55296&&o<=57343)throw"not a UTF-8 string";if(o>1114111)throw"not a UTF-8 string";o<=65535?e+=String.fromCharCode(o):(o-=65536,e+=String.fromCharCode(55296+(o>>10)),e+=String.fromCharCode(56320+(1023&o)))}return e});var i=function(r,t){return t?f(r):o(r)},C={encode:function(o,n){var a="string"!=typeof o;return a&&o.constructor===r.ArrayBuffer&&(o=new Uint8Array(o)),a?function(r){for(var t,o,n,a="",h=r.length,f=0,i=3*parseInt(h/3);f<i;)t=r[f++],o=r[f++],n=r[f++],a+=e[t>>>2]+e[63&(t<<4|o>>>4)]+e[63&(o<<2|n>>>6)]+e[63&n];var C=h-i;return 1===C?(t=r[f],a+=e[t>>>2]+e[t<<4&63]+"=="):2===C&&(t=r[f++],o=r[f],a+=e[t>>>2]+e[63&(t<<4|o>>>4)]+e[o<<2&63]+"="),a}(o):!n&&/[^\x00-\x7F]/.test(o)?t(o):h(o)},decode:i,atob:f,btoa:h};i.bytes=a,i.string=i,r.pagelayer_Base64=C}();
|
||||
@@ -1 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '0d1f000656bdb8897914');
|
||||
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '0d1f000656bdb8897914');
|
||||
|
||||
@@ -1,170 +1,170 @@
|
||||
<?php
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
//===========================================================
|
||||
// givejs.php
|
||||
//===========================================================
|
||||
// PAGELAYER
|
||||
// Inspired by the DESIRE to be the BEST OF ALL
|
||||
// ----------------------------------------------------------
|
||||
// Started by: Pulkit Gupta
|
||||
// Date: 23rd Jan 2017
|
||||
// Time: 23:00 hrs
|
||||
// Site: http://pagelayer.com/wordpress (PAGELAYER)
|
||||
// ----------------------------------------------------------
|
||||
// Please Read the Terms of use at http://pagelayer.com/tos
|
||||
// ----------------------------------------------------------
|
||||
//===========================================================
|
||||
// (c)Pagelayer Team
|
||||
//===========================================================
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
if(!empty($_REQUEST['test'])){
|
||||
echo 1;
|
||||
die();
|
||||
}
|
||||
|
||||
// Read the file
|
||||
$data = '';
|
||||
$data_premium = '';
|
||||
$self_path = dirname(__FILE__);
|
||||
$files = array(
|
||||
// Admin JS
|
||||
'pagelayer-editor.js',
|
||||
'widgets.js',
|
||||
'premium.js',
|
||||
'properties.js',
|
||||
'base-64.min.js',
|
||||
'slimscroll.js',
|
||||
'vanilla-picker.min.js',
|
||||
'tlite.min.js',
|
||||
'pagelayer-pen.js',
|
||||
// Enduser JS
|
||||
'imagesloaded.min.js',
|
||||
'nivo-lightbox.min.js',
|
||||
'owl.carousel.min.js',
|
||||
'pagelayer-frontend.js',
|
||||
'premium-frontend.js',
|
||||
'wow.min.js',
|
||||
'jquery-numerator.js',
|
||||
'simpleParallax.min.js',
|
||||
'chart.min.js',
|
||||
'shuffle.min.js'
|
||||
);
|
||||
|
||||
// What files to give
|
||||
$give = @$_REQUEST['give'];
|
||||
|
||||
// Premium
|
||||
$premium = @$_REQUEST['premium'];
|
||||
|
||||
if(!empty($give)){
|
||||
|
||||
$give = explode(',', $give);
|
||||
|
||||
// Check all files are in the supported list
|
||||
foreach($give as $file){
|
||||
if(in_array($file, $files)){
|
||||
$final[md5($file)] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!empty($premium)){
|
||||
|
||||
$premium = explode(',', trim($premium, ','));
|
||||
|
||||
// Check all files are in the supported list
|
||||
foreach($premium as $file){
|
||||
if(in_array($file, $files)){
|
||||
$final_premium[md5($file)] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Give all
|
||||
if(empty($final)){
|
||||
$final = $files;
|
||||
}
|
||||
|
||||
foreach($final as $k => $v){
|
||||
//echo $k.'<br>';
|
||||
$data .= file_get_contents($self_path.'/'.$v)."\n\n";
|
||||
}
|
||||
|
||||
if(!empty($final_premium)){
|
||||
|
||||
foreach($final_premium as $k => $v){
|
||||
//echo $k.'<br>';
|
||||
$data_premium .= file_get_contents($self_path.'/'.$v)."\n\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// We are zipping if possible
|
||||
if(function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')){
|
||||
ob_start('ob_gzhandler');
|
||||
}
|
||||
|
||||
// Type javascript
|
||||
header("Content-type: text/javascript; charset: UTF-8");
|
||||
|
||||
// Set a zero Mtime
|
||||
$filetime = filemtime($self_path.'/pagelayer-editor.js');
|
||||
|
||||
// Are we to also serve Shortcodes ?
|
||||
if(!empty($pagelayer->shortcodes)){
|
||||
$data .= 'pagelayer_shortcodes = '.json_encode($pagelayer->shortcodes).';'."\n\n";
|
||||
$data .= 'pagelayer_styles = '.json_encode($pagelayer->styles).';'."\n\n";
|
||||
$data .= 'pagelayer_groups = '.json_encode($pagelayer->groups).';'."\n\n";
|
||||
}
|
||||
|
||||
// Add the langs as well
|
||||
preg_match_all('/pagelayer_l\([\'"](\w*)[\'"]\)/is', $data, $matches);
|
||||
if(!empty($matches[1]) && function_exists('__pl')){
|
||||
foreach($matches[1] as $lk => $lv){
|
||||
$export_langs[$lv] = __pl($lv);
|
||||
}
|
||||
}
|
||||
|
||||
// Also add the fonts
|
||||
if(!empty($pagelayer->fonts)){
|
||||
$export_langs['pl_fonts_list'] = $pagelayer->fonts;
|
||||
}
|
||||
|
||||
// And lang string ?
|
||||
if(!empty($export_langs)){
|
||||
$data .= 'pagelayer_lang = '.json_encode($export_langs).';'."\n\n";
|
||||
}
|
||||
|
||||
// Cache Control
|
||||
header("Cache-Control: must-revalidate");
|
||||
|
||||
// Checking if the client is validating his cache and if it is current.
|
||||
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && (@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $filetime)) {
|
||||
|
||||
// Client's cache IS current, so we just respond '304 Not Modified'.
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filetime).' GMT', true, 304);
|
||||
|
||||
return;
|
||||
|
||||
}else{
|
||||
|
||||
// Image not cached or cache outdated, we respond '200 OK' and output the image.
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filetime).' GMT', true, 200);
|
||||
|
||||
}
|
||||
|
||||
echo $data;
|
||||
echo $data_premium;
|
||||
|
||||
// Write if we are front-end only then
|
||||
$dev = dirname(dirname(__FILE__)).'/dev.php';
|
||||
if(!empty($_REQUEST['write']) && file_exists($dev)){
|
||||
include_once($dev);
|
||||
write_js();
|
||||
}
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
//===========================================================
|
||||
// givejs.php
|
||||
//===========================================================
|
||||
// PAGELAYER
|
||||
// Inspired by the DESIRE to be the BEST OF ALL
|
||||
// ----------------------------------------------------------
|
||||
// Started by: Pulkit Gupta
|
||||
// Date: 23rd Jan 2017
|
||||
// Time: 23:00 hrs
|
||||
// Site: http://pagelayer.com/wordpress (PAGELAYER)
|
||||
// ----------------------------------------------------------
|
||||
// Please Read the Terms of use at http://pagelayer.com/tos
|
||||
// ----------------------------------------------------------
|
||||
//===========================================================
|
||||
// (c)Pagelayer Team
|
||||
//===========================================================
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
if(!empty($_REQUEST['test'])){
|
||||
echo 1;
|
||||
die();
|
||||
}
|
||||
|
||||
// Read the file
|
||||
$data = '';
|
||||
$data_premium = '';
|
||||
$self_path = dirname(__FILE__);
|
||||
$files = array(
|
||||
// Admin JS
|
||||
'pagelayer-editor.js',
|
||||
'widgets.js',
|
||||
'premium.js',
|
||||
'properties.js',
|
||||
'base-64.min.js',
|
||||
'slimscroll.js',
|
||||
'vanilla-picker.min.js',
|
||||
'tlite.min.js',
|
||||
'pagelayer-pen.js',
|
||||
// Enduser JS
|
||||
'imagesloaded.min.js',
|
||||
'nivo-lightbox.min.js',
|
||||
'owl.carousel.min.js',
|
||||
'pagelayer-frontend.js',
|
||||
'premium-frontend.js',
|
||||
'wow.min.js',
|
||||
'jquery-numerator.js',
|
||||
'simpleParallax.min.js',
|
||||
'chart.min.js',
|
||||
'shuffle.min.js'
|
||||
);
|
||||
|
||||
// What files to give
|
||||
$give = @$_REQUEST['give'];
|
||||
|
||||
// Premium
|
||||
$premium = @$_REQUEST['premium'];
|
||||
|
||||
if(!empty($give)){
|
||||
|
||||
$give = explode(',', $give);
|
||||
|
||||
// Check all files are in the supported list
|
||||
foreach($give as $file){
|
||||
if(in_array($file, $files)){
|
||||
$final[md5($file)] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!empty($premium)){
|
||||
|
||||
$premium = explode(',', trim($premium, ','));
|
||||
|
||||
// Check all files are in the supported list
|
||||
foreach($premium as $file){
|
||||
if(in_array($file, $files)){
|
||||
$final_premium[md5($file)] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Give all
|
||||
if(empty($final)){
|
||||
$final = $files;
|
||||
}
|
||||
|
||||
foreach($final as $k => $v){
|
||||
//echo $k.'<br>';
|
||||
$data .= file_get_contents($self_path.'/'.$v)."\n\n";
|
||||
}
|
||||
|
||||
if(!empty($final_premium)){
|
||||
|
||||
foreach($final_premium as $k => $v){
|
||||
//echo $k.'<br>';
|
||||
$data_premium .= file_get_contents($self_path.'/'.$v)."\n\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// We are zipping if possible
|
||||
if(function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')){
|
||||
ob_start('ob_gzhandler');
|
||||
}
|
||||
|
||||
// Type javascript
|
||||
header("Content-type: text/javascript; charset: UTF-8");
|
||||
|
||||
// Set a zero Mtime
|
||||
$filetime = filemtime($self_path.'/pagelayer-editor.js');
|
||||
|
||||
// Are we to also serve Shortcodes ?
|
||||
if(!empty($pagelayer->shortcodes)){
|
||||
$data .= 'pagelayer_shortcodes = '.json_encode($pagelayer->shortcodes).';'."\n\n";
|
||||
$data .= 'pagelayer_styles = '.json_encode($pagelayer->styles).';'."\n\n";
|
||||
$data .= 'pagelayer_groups = '.json_encode($pagelayer->groups).';'."\n\n";
|
||||
}
|
||||
|
||||
// Add the langs as well
|
||||
preg_match_all('/pagelayer_l\([\'"](\w*)[\'"]\)/is', $data, $matches);
|
||||
if(!empty($matches[1]) && function_exists('__pl')){
|
||||
foreach($matches[1] as $lk => $lv){
|
||||
$export_langs[$lv] = __pl($lv);
|
||||
}
|
||||
}
|
||||
|
||||
// Also add the fonts
|
||||
if(!empty($pagelayer->fonts)){
|
||||
$export_langs['pl_fonts_list'] = $pagelayer->fonts;
|
||||
}
|
||||
|
||||
// And lang string ?
|
||||
if(!empty($export_langs)){
|
||||
$data .= 'pagelayer_lang = '.json_encode($export_langs).';'."\n\n";
|
||||
}
|
||||
|
||||
// Cache Control
|
||||
header("Cache-Control: must-revalidate");
|
||||
|
||||
// Checking if the client is validating his cache and if it is current.
|
||||
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && (@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $filetime)) {
|
||||
|
||||
// Client's cache IS current, so we just respond '304 Not Modified'.
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filetime).' GMT', true, 304);
|
||||
|
||||
return;
|
||||
|
||||
}else{
|
||||
|
||||
// Image not cached or cache outdated, we respond '200 OK' and output the image.
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filetime).' GMT', true, 200);
|
||||
|
||||
}
|
||||
|
||||
echo $data;
|
||||
echo $data_premium;
|
||||
|
||||
// Write if we are front-end only then
|
||||
$dev = dirname(dirname(__FILE__)).'/dev.php';
|
||||
if(!empty($_REQUEST['write']) && file_exists($dev)){
|
||||
include_once($dev);
|
||||
write_js();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,137 +1,137 @@
|
||||
/*
|
||||
* jQuery Numerator Plugin 0.2.1
|
||||
* https://github.com/garethdn/jquery-numerator
|
||||
*
|
||||
* Copyright 2015, Gareth Nolan
|
||||
* http://ie.linkedin.com/in/garethnolan/
|
||||
|
||||
* Based on jQuery Boilerplate by Zeno Rocha with the help of Addy Osmani
|
||||
* http://jqueryboilerplate.com
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
;(function (factory) {
|
||||
'use strict';
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD is used - Register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
factory(require('jquery'));
|
||||
} else {
|
||||
// Neither AMD nor CommonJS used. Use global variables.
|
||||
if (typeof jQuery === 'undefined') {
|
||||
throw 'jquery-numerator requires jQuery to be loaded first';
|
||||
}
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
|
||||
var pluginName = "numerator",
|
||||
defaults = {
|
||||
easing: 'swing',
|
||||
duration: 500,
|
||||
delimiter: undefined,
|
||||
rounding: 0,
|
||||
toValue: undefined,
|
||||
fromValue: undefined,
|
||||
queue: false,
|
||||
onStart: function(){},
|
||||
onStep: function(){},
|
||||
onProgress: function(){},
|
||||
onComplete: function(){}
|
||||
};
|
||||
|
||||
function Plugin ( element, options ) {
|
||||
this.element = element;
|
||||
this.settings = $.extend( {}, defaults, options );
|
||||
this._defaults = defaults;
|
||||
this._name = pluginName;
|
||||
this.init();
|
||||
}
|
||||
|
||||
Plugin.prototype = {
|
||||
|
||||
init: function () {
|
||||
this.parseElement();
|
||||
this.setValue();
|
||||
},
|
||||
|
||||
parseElement: function () {
|
||||
var elText = $.trim($(this.element).text());
|
||||
|
||||
this.settings.fromValue = this.settings.fromValue || this.format(elText);
|
||||
},
|
||||
|
||||
setValue: function() {
|
||||
var self = this;
|
||||
|
||||
$({value: self.settings.fromValue}).animate({value: self.settings.toValue}, {
|
||||
|
||||
duration: parseInt(self.settings.duration, 10),
|
||||
|
||||
easing: self.settings.easing,
|
||||
|
||||
start: self.settings.onStart,
|
||||
|
||||
step: function(now, fx) {
|
||||
$(self.element).text(self.format(now));
|
||||
// accepts two params - (now, fx)
|
||||
self.settings.onStep(now, fx);
|
||||
},
|
||||
|
||||
// accepts three params - (animation object, progress ratio, time remaining(ms))
|
||||
progress: self.settings.onProgress,
|
||||
|
||||
complete: self.settings.onComplete
|
||||
});
|
||||
},
|
||||
|
||||
format: function(value){
|
||||
var self = this;
|
||||
|
||||
if ( parseInt(this.settings.rounding ) < 1) {
|
||||
value = parseInt(value, 10);
|
||||
} else {
|
||||
value = parseFloat(value).toFixed( parseInt(this.settings.rounding) );
|
||||
}
|
||||
|
||||
if (self.settings.delimiter) {
|
||||
return this.delimit(value)
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
|
||||
// TODO: Add comments to this function
|
||||
delimit: function(value){
|
||||
var self = this;
|
||||
|
||||
value = value.toString();
|
||||
|
||||
if (self.settings.rounding && parseInt(self.settings.rounding, 10) > 0) {
|
||||
var decimals = value.substring( (value.length - (self.settings.rounding + 1)), value.length ),
|
||||
wholeValue = value.substring( 0, (value.length - (self.settings.rounding + 1)));
|
||||
|
||||
return self.addDelimiter(wholeValue) + decimals;
|
||||
} else {
|
||||
return self.addDelimiter(value);
|
||||
}
|
||||
},
|
||||
|
||||
addDelimiter: function(value){
|
||||
return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, this.settings.delimiter);
|
||||
}
|
||||
};
|
||||
|
||||
$.fn[ pluginName ] = function ( options ) {
|
||||
return this.each(function() {
|
||||
if ( $.data( this, "plugin_" + pluginName ) ) {
|
||||
$.data(this, 'plugin_' + pluginName, null);
|
||||
}
|
||||
$.data( this, "plugin_" + pluginName, new Plugin( this, options ) );
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
* jQuery Numerator Plugin 0.2.1
|
||||
* https://github.com/garethdn/jquery-numerator
|
||||
*
|
||||
* Copyright 2015, Gareth Nolan
|
||||
* http://ie.linkedin.com/in/garethnolan/
|
||||
|
||||
* Based on jQuery Boilerplate by Zeno Rocha with the help of Addy Osmani
|
||||
* http://jqueryboilerplate.com
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
;(function (factory) {
|
||||
'use strict';
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD is used - Register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
factory(require('jquery'));
|
||||
} else {
|
||||
// Neither AMD nor CommonJS used. Use global variables.
|
||||
if (typeof jQuery === 'undefined') {
|
||||
throw 'jquery-numerator requires jQuery to be loaded first';
|
||||
}
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
|
||||
var pluginName = "numerator",
|
||||
defaults = {
|
||||
easing: 'swing',
|
||||
duration: 500,
|
||||
delimiter: undefined,
|
||||
rounding: 0,
|
||||
toValue: undefined,
|
||||
fromValue: undefined,
|
||||
queue: false,
|
||||
onStart: function(){},
|
||||
onStep: function(){},
|
||||
onProgress: function(){},
|
||||
onComplete: function(){}
|
||||
};
|
||||
|
||||
function Plugin ( element, options ) {
|
||||
this.element = element;
|
||||
this.settings = $.extend( {}, defaults, options );
|
||||
this._defaults = defaults;
|
||||
this._name = pluginName;
|
||||
this.init();
|
||||
}
|
||||
|
||||
Plugin.prototype = {
|
||||
|
||||
init: function () {
|
||||
this.parseElement();
|
||||
this.setValue();
|
||||
},
|
||||
|
||||
parseElement: function () {
|
||||
var elText = $.trim($(this.element).text());
|
||||
|
||||
this.settings.fromValue = this.settings.fromValue || this.format(elText);
|
||||
},
|
||||
|
||||
setValue: function() {
|
||||
var self = this;
|
||||
|
||||
$({value: self.settings.fromValue}).animate({value: self.settings.toValue}, {
|
||||
|
||||
duration: parseInt(self.settings.duration, 10),
|
||||
|
||||
easing: self.settings.easing,
|
||||
|
||||
start: self.settings.onStart,
|
||||
|
||||
step: function(now, fx) {
|
||||
$(self.element).text(self.format(now));
|
||||
// accepts two params - (now, fx)
|
||||
self.settings.onStep(now, fx);
|
||||
},
|
||||
|
||||
// accepts three params - (animation object, progress ratio, time remaining(ms))
|
||||
progress: self.settings.onProgress,
|
||||
|
||||
complete: self.settings.onComplete
|
||||
});
|
||||
},
|
||||
|
||||
format: function(value){
|
||||
var self = this;
|
||||
|
||||
if ( parseInt(this.settings.rounding ) < 1) {
|
||||
value = parseInt(value, 10);
|
||||
} else {
|
||||
value = parseFloat(value).toFixed( parseInt(this.settings.rounding) );
|
||||
}
|
||||
|
||||
if (self.settings.delimiter) {
|
||||
return this.delimit(value)
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
|
||||
// TODO: Add comments to this function
|
||||
delimit: function(value){
|
||||
var self = this;
|
||||
|
||||
value = value.toString();
|
||||
|
||||
if (self.settings.rounding && parseInt(self.settings.rounding, 10) > 0) {
|
||||
var decimals = value.substring( (value.length - (self.settings.rounding + 1)), value.length ),
|
||||
wholeValue = value.substring( 0, (value.length - (self.settings.rounding + 1)));
|
||||
|
||||
return self.addDelimiter(wholeValue) + decimals;
|
||||
} else {
|
||||
return self.addDelimiter(value);
|
||||
}
|
||||
},
|
||||
|
||||
addDelimiter: function(value){
|
||||
return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, this.settings.delimiter);
|
||||
}
|
||||
};
|
||||
|
||||
$.fn[ pluginName ] = function ( options ) {
|
||||
return this.each(function() {
|
||||
if ( $.data( this, "plugin_" + pluginName ) ) {
|
||||
$.data(this, 'plugin_' + pluginName, null);
|
||||
}
|
||||
$.data( this, "plugin_" + pluginName, new Plugin( this, options ) );
|
||||
});
|
||||
};
|
||||
|
||||
}));
|
||||
@@ -1,79 +1,79 @@
|
||||
// Lets start
|
||||
jQuery(document).ready(function(){
|
||||
|
||||
var pl_admin_tabs = function(sel){
|
||||
jQuery('.nav-tab-wrapper a').click(function(){
|
||||
|
||||
var tEle = jQuery(this);
|
||||
|
||||
var sel = tEle.attr('tab-class') || 'pagelayer-tab-panel';
|
||||
|
||||
// Limit effect to the container element.
|
||||
var context = tEle.closest('.nav-tab-wrapper').parent().parent();
|
||||
context.find('.nav-tab-wrapper a').removeClass('nav-tab-active');
|
||||
tEle.addClass('nav-tab-active');
|
||||
context.find('.'+sel).hide();
|
||||
context.find(tEle.attr('href')).show();
|
||||
location.hash = tEle.attr('href')+'_tab';
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
// Make setting nav-tab-active optional.
|
||||
jQuery('.nav-tab-wrapper.pagelayer-wrapper').each(function(){
|
||||
|
||||
var jEle = jQuery(this);
|
||||
var hash = location.hash.slice(1, -4);
|
||||
|
||||
if(hash){
|
||||
var active_tab_ele = jEle.find('[href="#'+hash+'"]');
|
||||
if (active_tab_ele.length > 0){
|
||||
active_tab_ele.click();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var first = jEle.find('a').first();
|
||||
first.click();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
var pl_admin_accordion = function(){
|
||||
|
||||
jQuery('.pagelayer-acc-wrapper .pagelayer-acc-tab').click(function(){
|
||||
|
||||
var tEle = jQuery(this);
|
||||
|
||||
if(tEle.hasClass('nav-tab-active')){
|
||||
tEle.toggleClass('nav-tab-active').next('.pagelayer-acc-panel').toggle();
|
||||
}else{
|
||||
// Limit effect to the container element.
|
||||
var context = tEle.closest('.pagelayer-acc-wrapper ');
|
||||
context.find('.pagelayer-acc-tab').removeClass('nav-tab-active');
|
||||
context.find('.pagelayer-acc-panel').hide();
|
||||
tEle.addClass('nav-tab-active');
|
||||
tEle.next('.pagelayer-acc-panel').show();
|
||||
}
|
||||
});
|
||||
|
||||
// Make setting nav-tab-active optional.
|
||||
jQuery('.pagelayer-acc-wrapper').each(function(){
|
||||
|
||||
var jEle = jQuery(this);
|
||||
|
||||
var active_acc_ele = jEle.find('nav-tab-active');
|
||||
if (active_acc_ele.length > 0){
|
||||
active_acc_ele.click();
|
||||
}else{
|
||||
jEle.find('.pagelayer-acc-tab').first().click();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
pl_admin_tabs();
|
||||
pl_admin_accordion();
|
||||
|
||||
// Lets start
|
||||
jQuery(document).ready(function(){
|
||||
|
||||
var pl_admin_tabs = function(sel){
|
||||
jQuery('.nav-tab-wrapper a').click(function(){
|
||||
|
||||
var tEle = jQuery(this);
|
||||
|
||||
var sel = tEle.attr('tab-class') || 'pagelayer-tab-panel';
|
||||
|
||||
// Limit effect to the container element.
|
||||
var context = tEle.closest('.nav-tab-wrapper').parent().parent();
|
||||
context.find('.nav-tab-wrapper a').removeClass('nav-tab-active');
|
||||
tEle.addClass('nav-tab-active');
|
||||
context.find('.'+sel).hide();
|
||||
context.find(tEle.attr('href')).show();
|
||||
location.hash = tEle.attr('href')+'_tab';
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
// Make setting nav-tab-active optional.
|
||||
jQuery('.nav-tab-wrapper.pagelayer-wrapper').each(function(){
|
||||
|
||||
var jEle = jQuery(this);
|
||||
var hash = location.hash.slice(1, -4);
|
||||
|
||||
if(hash){
|
||||
var active_tab_ele = jEle.find('[href="#'+hash+'"]');
|
||||
if (active_tab_ele.length > 0){
|
||||
active_tab_ele.click();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var first = jEle.find('a').first();
|
||||
first.click();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
var pl_admin_accordion = function(){
|
||||
|
||||
jQuery('.pagelayer-acc-wrapper .pagelayer-acc-tab').click(function(){
|
||||
|
||||
var tEle = jQuery(this);
|
||||
|
||||
if(tEle.hasClass('nav-tab-active')){
|
||||
tEle.toggleClass('nav-tab-active').next('.pagelayer-acc-panel').toggle();
|
||||
}else{
|
||||
// Limit effect to the container element.
|
||||
var context = tEle.closest('.pagelayer-acc-wrapper ');
|
||||
context.find('.pagelayer-acc-tab').removeClass('nav-tab-active');
|
||||
context.find('.pagelayer-acc-panel').hide();
|
||||
tEle.addClass('nav-tab-active');
|
||||
tEle.next('.pagelayer-acc-panel').show();
|
||||
}
|
||||
});
|
||||
|
||||
// Make setting nav-tab-active optional.
|
||||
jQuery('.pagelayer-acc-wrapper').each(function(){
|
||||
|
||||
var jEle = jQuery(this);
|
||||
|
||||
var active_acc_ele = jEle.find('nav-tab-active');
|
||||
if (active_acc_ele.length > 0){
|
||||
active_acc_ele.click();
|
||||
}else{
|
||||
jEle.find('.pagelayer-acc-tab').first().click();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
pl_admin_tabs();
|
||||
pl_admin_accordion();
|
||||
|
||||
});
|
||||
@@ -1,16 +1,16 @@
|
||||
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
|
||||
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
||||
*
|
||||
* Version: 1.3.8
|
||||
*
|
||||
*/
|
||||
(function(e){e.fn.extend({slimScroll:function(f){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},f);this.each(function(){function v(d){if(r){d=d||window.event;
|
||||
var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&n(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function n(d,g,e){k=!1;var f=b.outerHeight()-c.outerHeight();g&&(g=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),g=Math.min(Math.max(g,0),f),g=0<d?Math.ceil(g):Math.floor(g),c.css({top:g+"px"}));l=parseInt(c.css("top"))/(b.outerHeight()-c.outerHeight());g=
|
||||
l*(b[0].scrollHeight-b.outerHeight());e&&(g=d,d=g/b[0].scrollHeight*b.outerHeight(),d=Math.min(Math.max(d,0),f),c.css({top:d+"px"}));b.scrollTop(g);b.trigger("slimscrolling",~~g);w();p()}function x(){u=Math.max(b.outerHeight()/b[0].scrollHeight*b.outerHeight(),30);c.css({height:u+"px"});var a=u==b.outerHeight()?"none":"block";c.css({display:a})}function w(){x();clearTimeout(B);l==~~l?(k=a.allowPageScroll,C!=l&&b.trigger("slimscroll",0==~~l?"top":"bottom")):k=!1;C=l;u>=b.outerHeight()?k=!0:(c.stop(!0,
|
||||
!0).fadeIn("fast"),a.railVisible&&m.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(B=setTimeout(function(){a.disableFadeOut&&r||y||z||(c.fadeOut("slow"),m.fadeOut("slow"))},1E3))}var r,y,z,B,A,u,l,C,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var q=b.scrollTop(),c=b.siblings("."+a.barClass),m=b.siblings("."+a.railClass);x();if(e.isPlainObject(f)){if("height"in f&&"auto"==f.height){b.parent().css("height","auto");b.css("height","auto");var h=b.parent().parent().height();b.parent().css("height",
|
||||
h);b.css("height",h)}else"height"in f&&(h=f.height,b.parent().css("height",h),b.css("height",h));if("scrollTo"in f)q=parseInt(a.scrollTo);else if("scrollBy"in f)q+=parseInt(a.scrollBy);else if("destroy"in f){c.remove();m.remove();b.unwrap();return}n(q,!1,!0)}}else if(!(e.isPlainObject(f)&&"destroy"in f)){a.height="auto"==a.height?b.parent().height():a.height;q=e("<div></div>").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",
|
||||
width:a.width,height:a.height});var m=e("<div></div>").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("<div></div>").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,
|
||||
WebkitBorderRadius:a.borderRadius,zIndex:99}),h="right"==a.position?{right:a.distance}:{left:a.distance};m.css(h);c.css(h);b.wrap(q);b.parent().append(c);b.parent().append(m);a.railDraggable&&c.bind("mousedown",function(a){var b=c.parent();z=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);n(0,c.position().top,!1)});b.bind("mouseup.slimscroll",function(a){z=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",
|
||||
function(a){a.stopPropagation();a.preventDefault();return!1});m.hover(function(){w()},function(){p()});c.hover(function(){y=!0},function(){y=!1});b.hover(function(){r=!0;w();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(A=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&(n((A-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),A=b.originalEvent.touches[0].pageY)});
|
||||
x();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),n(0,!0)):"top"!==a.start&&(n(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());window.addEventListener?(this.addEventListener("DOMMouseScroll",v,!1),this.addEventListener("mousewheel",v,!1)):document.attachEvent("onmousewheel",v)}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery);
|
||||
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
|
||||
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
||||
*
|
||||
* Version: 1.3.8
|
||||
*
|
||||
*/
|
||||
(function(e){e.fn.extend({slimScroll:function(f){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},f);this.each(function(){function v(d){if(r){d=d||window.event;
|
||||
var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&n(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function n(d,g,e){k=!1;var f=b.outerHeight()-c.outerHeight();g&&(g=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),g=Math.min(Math.max(g,0),f),g=0<d?Math.ceil(g):Math.floor(g),c.css({top:g+"px"}));l=parseInt(c.css("top"))/(b.outerHeight()-c.outerHeight());g=
|
||||
l*(b[0].scrollHeight-b.outerHeight());e&&(g=d,d=g/b[0].scrollHeight*b.outerHeight(),d=Math.min(Math.max(d,0),f),c.css({top:d+"px"}));b.scrollTop(g);b.trigger("slimscrolling",~~g);w();p()}function x(){u=Math.max(b.outerHeight()/b[0].scrollHeight*b.outerHeight(),30);c.css({height:u+"px"});var a=u==b.outerHeight()?"none":"block";c.css({display:a})}function w(){x();clearTimeout(B);l==~~l?(k=a.allowPageScroll,C!=l&&b.trigger("slimscroll",0==~~l?"top":"bottom")):k=!1;C=l;u>=b.outerHeight()?k=!0:(c.stop(!0,
|
||||
!0).fadeIn("fast"),a.railVisible&&m.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(B=setTimeout(function(){a.disableFadeOut&&r||y||z||(c.fadeOut("slow"),m.fadeOut("slow"))},1E3))}var r,y,z,B,A,u,l,C,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var q=b.scrollTop(),c=b.siblings("."+a.barClass),m=b.siblings("."+a.railClass);x();if(e.isPlainObject(f)){if("height"in f&&"auto"==f.height){b.parent().css("height","auto");b.css("height","auto");var h=b.parent().parent().height();b.parent().css("height",
|
||||
h);b.css("height",h)}else"height"in f&&(h=f.height,b.parent().css("height",h),b.css("height",h));if("scrollTo"in f)q=parseInt(a.scrollTo);else if("scrollBy"in f)q+=parseInt(a.scrollBy);else if("destroy"in f){c.remove();m.remove();b.unwrap();return}n(q,!1,!0)}}else if(!(e.isPlainObject(f)&&"destroy"in f)){a.height="auto"==a.height?b.parent().height():a.height;q=e("<div></div>").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",
|
||||
width:a.width,height:a.height});var m=e("<div></div>").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("<div></div>").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,
|
||||
WebkitBorderRadius:a.borderRadius,zIndex:99}),h="right"==a.position?{right:a.distance}:{left:a.distance};m.css(h);c.css(h);b.wrap(q);b.parent().append(c);b.parent().append(m);a.railDraggable&&c.bind("mousedown",function(a){var b=c.parent();z=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);n(0,c.position().top,!1)});b.bind("mouseup.slimscroll",function(a){z=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",
|
||||
function(a){a.stopPropagation();a.preventDefault();return!1});m.hover(function(){w()},function(){p()});c.hover(function(){y=!0},function(){y=!1});b.hover(function(){r=!0;w();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(A=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&(n((A-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),A=b.originalEvent.touches[0].pageY)});
|
||||
x();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),n(0,!0)):"top"!==a.start&&(n(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());window.addEventListener?(this.addEventListener("DOMMouseScroll",v,!1),this.addEventListener("mousewheel",v,!1)):document.attachEvent("onmousewheel",v)}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery);
|
||||
|
||||
@@ -1,148 +1,148 @@
|
||||
function pagelayer_tlite(getTooltipOpts) {
|
||||
document.addEventListener('mouseover', function (e) {
|
||||
var el = e.target;
|
||||
var opts = getTooltipOpts(el);
|
||||
|
||||
if (!opts) {
|
||||
el = el.parentElement;
|
||||
opts = el && getTooltipOpts(el);
|
||||
}
|
||||
|
||||
opts && pagelayer_tlite.show(el, opts, true);
|
||||
});
|
||||
}
|
||||
|
||||
pagelayer_tlite.show = function (el, opts, isAuto) {
|
||||
var fallbackAttrib = 'data-tlite';
|
||||
opts = opts || {};
|
||||
|
||||
(el.tooltip || Tooltip(el, opts)).show();
|
||||
|
||||
function Tooltip(el, opts) {
|
||||
var tooltipEl;
|
||||
var showTimer;
|
||||
var text;
|
||||
|
||||
el.addEventListener('mousedown', autoHide);
|
||||
el.addEventListener('mouseleave', autoHide);
|
||||
|
||||
function show() {
|
||||
text = el.title || el.getAttribute(fallbackAttrib) || text;
|
||||
el.title = '';
|
||||
el.setAttribute(fallbackAttrib, '');
|
||||
text && !showTimer && (showTimer = setTimeout(fadeIn, isAuto ? 150 : 1))
|
||||
}
|
||||
|
||||
function autoHide() {
|
||||
pagelayer_tlite.hide(el, true);
|
||||
}
|
||||
|
||||
function hide(isAutoHiding) {
|
||||
if (isAuto === isAutoHiding) {
|
||||
showTimer = clearTimeout(showTimer);
|
||||
var parent = tooltipEl && tooltipEl.parentNode;
|
||||
parent && parent.removeChild(tooltipEl);
|
||||
tooltipEl = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
function fadeIn() {
|
||||
if (!tooltipEl) {
|
||||
tooltipEl = createTooltip(el, text, opts);
|
||||
}
|
||||
}
|
||||
|
||||
return el.tooltip = {
|
||||
show: show,
|
||||
hide: hide
|
||||
};
|
||||
}
|
||||
|
||||
function createTooltip(el, text, opts) {
|
||||
var tooltipEl = document.createElement('span');
|
||||
var grav = opts.grav || el.getAttribute('data-tlite') || 'n';
|
||||
|
||||
tooltipEl.innerHTML = text;
|
||||
|
||||
el.appendChild(tooltipEl);
|
||||
|
||||
var vertGrav = grav[0] || '';
|
||||
var horzGrav = grav[1] || '';
|
||||
|
||||
var windowInnerWidth = window.parent.innerWidth - 15;
|
||||
var windowInnerHeight = window.parent.innerHeight;
|
||||
|
||||
function positionTooltip() {
|
||||
tooltipEl.className = 'pagelayer-tlite ' + 'pagelayer-tlite-' + vertGrav + horzGrav;
|
||||
|
||||
var arrowSize = 10;
|
||||
var top = el.offsetTop;
|
||||
var left = el.offsetLeft;
|
||||
|
||||
if (tooltipEl.offsetParent === el) {
|
||||
top = left = 0;
|
||||
}
|
||||
|
||||
var width = el.offsetWidth;
|
||||
var height = el.offsetHeight;
|
||||
var tooltipHeight = tooltipEl.offsetHeight;
|
||||
var tooltipWidth = tooltipEl.offsetWidth;
|
||||
var centerEl = left + (width / 2);
|
||||
|
||||
tooltipEl.style.top = (
|
||||
vertGrav === 's' ? (top - tooltipHeight - arrowSize) :
|
||||
vertGrav === 'n' ? (top + height + arrowSize) :
|
||||
(top + (height / 2) - (tooltipHeight / 2))
|
||||
) + 'px';
|
||||
|
||||
tooltipEl.style.left = (
|
||||
horzGrav === 'w' ? left :
|
||||
horzGrav === 'e' ? left + width - tooltipWidth :
|
||||
vertGrav === 'w' ? (left + width + arrowSize) :
|
||||
vertGrav === 'e' ? (left - tooltipWidth - arrowSize) :
|
||||
(centerEl - tooltipWidth / 2)
|
||||
) + 'px';
|
||||
}
|
||||
|
||||
positionTooltip();
|
||||
|
||||
var rect = tooltipEl.getBoundingClientRect();
|
||||
|
||||
if (vertGrav === 's' && rect.top < 0) {
|
||||
vertGrav = 'n';
|
||||
positionTooltip();
|
||||
} else if (vertGrav === 'n' && rect.bottom > windowInnerHeight) {
|
||||
vertGrav = 's';
|
||||
positionTooltip();
|
||||
} else if (vertGrav === 'e' && rect.left < 0) {
|
||||
vertGrav = 'w';
|
||||
positionTooltip();
|
||||
} else if (vertGrav === 'w' && rect.right > windowInnerWidth) {
|
||||
vertGrav = 'e';
|
||||
positionTooltip();
|
||||
}
|
||||
|
||||
positionTooltip();
|
||||
|
||||
// Additional handling
|
||||
if(rect.left < 0) {
|
||||
horzGrav = 'w';
|
||||
positionTooltip();
|
||||
} else if (rect.right > windowInnerWidth) {
|
||||
horzGrav = 'e';
|
||||
positionTooltip();
|
||||
}
|
||||
|
||||
tooltipEl.className += ' pagelayer-tlite-visible';
|
||||
|
||||
return tooltipEl;
|
||||
}
|
||||
};
|
||||
|
||||
pagelayer_tlite.hide = function (el, isAuto) {
|
||||
el.tooltip && el.tooltip.hide(isAuto);
|
||||
};
|
||||
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = tlite;
|
||||
}
|
||||
function pagelayer_tlite(getTooltipOpts) {
|
||||
document.addEventListener('mouseover', function (e) {
|
||||
var el = e.target;
|
||||
var opts = getTooltipOpts(el);
|
||||
|
||||
if (!opts) {
|
||||
el = el.parentElement;
|
||||
opts = el && getTooltipOpts(el);
|
||||
}
|
||||
|
||||
opts && pagelayer_tlite.show(el, opts, true);
|
||||
});
|
||||
}
|
||||
|
||||
pagelayer_tlite.show = function (el, opts, isAuto) {
|
||||
var fallbackAttrib = 'data-tlite';
|
||||
opts = opts || {};
|
||||
|
||||
(el.tooltip || Tooltip(el, opts)).show();
|
||||
|
||||
function Tooltip(el, opts) {
|
||||
var tooltipEl;
|
||||
var showTimer;
|
||||
var text;
|
||||
|
||||
el.addEventListener('mousedown', autoHide);
|
||||
el.addEventListener('mouseleave', autoHide);
|
||||
|
||||
function show() {
|
||||
text = el.title || el.getAttribute(fallbackAttrib) || text;
|
||||
el.title = '';
|
||||
el.setAttribute(fallbackAttrib, '');
|
||||
text && !showTimer && (showTimer = setTimeout(fadeIn, isAuto ? 150 : 1))
|
||||
}
|
||||
|
||||
function autoHide() {
|
||||
pagelayer_tlite.hide(el, true);
|
||||
}
|
||||
|
||||
function hide(isAutoHiding) {
|
||||
if (isAuto === isAutoHiding) {
|
||||
showTimer = clearTimeout(showTimer);
|
||||
var parent = tooltipEl && tooltipEl.parentNode;
|
||||
parent && parent.removeChild(tooltipEl);
|
||||
tooltipEl = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
function fadeIn() {
|
||||
if (!tooltipEl) {
|
||||
tooltipEl = createTooltip(el, text, opts);
|
||||
}
|
||||
}
|
||||
|
||||
return el.tooltip = {
|
||||
show: show,
|
||||
hide: hide
|
||||
};
|
||||
}
|
||||
|
||||
function createTooltip(el, text, opts) {
|
||||
var tooltipEl = document.createElement('span');
|
||||
var grav = opts.grav || el.getAttribute('data-tlite') || 'n';
|
||||
|
||||
tooltipEl.innerHTML = text;
|
||||
|
||||
el.appendChild(tooltipEl);
|
||||
|
||||
var vertGrav = grav[0] || '';
|
||||
var horzGrav = grav[1] || '';
|
||||
|
||||
var windowInnerWidth = window.parent.innerWidth - 15;
|
||||
var windowInnerHeight = window.parent.innerHeight;
|
||||
|
||||
function positionTooltip() {
|
||||
tooltipEl.className = 'pagelayer-tlite ' + 'pagelayer-tlite-' + vertGrav + horzGrav;
|
||||
|
||||
var arrowSize = 10;
|
||||
var top = el.offsetTop;
|
||||
var left = el.offsetLeft;
|
||||
|
||||
if (tooltipEl.offsetParent === el) {
|
||||
top = left = 0;
|
||||
}
|
||||
|
||||
var width = el.offsetWidth;
|
||||
var height = el.offsetHeight;
|
||||
var tooltipHeight = tooltipEl.offsetHeight;
|
||||
var tooltipWidth = tooltipEl.offsetWidth;
|
||||
var centerEl = left + (width / 2);
|
||||
|
||||
tooltipEl.style.top = (
|
||||
vertGrav === 's' ? (top - tooltipHeight - arrowSize) :
|
||||
vertGrav === 'n' ? (top + height + arrowSize) :
|
||||
(top + (height / 2) - (tooltipHeight / 2))
|
||||
) + 'px';
|
||||
|
||||
tooltipEl.style.left = (
|
||||
horzGrav === 'w' ? left :
|
||||
horzGrav === 'e' ? left + width - tooltipWidth :
|
||||
vertGrav === 'w' ? (left + width + arrowSize) :
|
||||
vertGrav === 'e' ? (left - tooltipWidth - arrowSize) :
|
||||
(centerEl - tooltipWidth / 2)
|
||||
) + 'px';
|
||||
}
|
||||
|
||||
positionTooltip();
|
||||
|
||||
var rect = tooltipEl.getBoundingClientRect();
|
||||
|
||||
if (vertGrav === 's' && rect.top < 0) {
|
||||
vertGrav = 'n';
|
||||
positionTooltip();
|
||||
} else if (vertGrav === 'n' && rect.bottom > windowInnerHeight) {
|
||||
vertGrav = 's';
|
||||
positionTooltip();
|
||||
} else if (vertGrav === 'e' && rect.left < 0) {
|
||||
vertGrav = 'w';
|
||||
positionTooltip();
|
||||
} else if (vertGrav === 'w' && rect.right > windowInnerWidth) {
|
||||
vertGrav = 'e';
|
||||
positionTooltip();
|
||||
}
|
||||
|
||||
positionTooltip();
|
||||
|
||||
// Additional handling
|
||||
if(rect.left < 0) {
|
||||
horzGrav = 'w';
|
||||
positionTooltip();
|
||||
} else if (rect.right > windowInnerWidth) {
|
||||
horzGrav = 'e';
|
||||
positionTooltip();
|
||||
}
|
||||
|
||||
tooltipEl.className += ' pagelayer-tlite-visible';
|
||||
|
||||
return tooltipEl;
|
||||
}
|
||||
};
|
||||
|
||||
pagelayer_tlite.hide = function (el, isAuto) {
|
||||
el.tooltip && el.tooltip.hide(isAuto);
|
||||
};
|
||||
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = tlite;
|
||||
}
|
||||
|
||||
@@ -1,428 +1,428 @@
|
||||
(function ($) {
|
||||
'use strict';
|
||||
// jshint camelcase:true
|
||||
|
||||
|
||||
function hex(x) {
|
||||
return ('0' + parseInt(x).toString(16)).slice(-2);
|
||||
}
|
||||
|
||||
function colorToHex(rgb) {
|
||||
if (rgb.search('rgb') === -1) {
|
||||
return rgb.replace('#', '');
|
||||
} else if (rgb === 'rgba(0, 0, 0, 0)') {
|
||||
return 'transparent';
|
||||
} else {
|
||||
rgb = rgb.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/);
|
||||
return hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
|
||||
}
|
||||
}
|
||||
|
||||
function colorTagHandler(element, trumbowyg) {
|
||||
var tags = [];
|
||||
|
||||
if (!element.style) {
|
||||
return tags;
|
||||
}
|
||||
|
||||
// background color
|
||||
if (element.style.backgroundColor !== '') {
|
||||
var backColor = colorToHex(element.style.backgroundColor);
|
||||
if (trumbowyg.o.plugins.colors.colorList.indexOf(backColor) >= 0) {
|
||||
tags.push('backColor' + backColor);
|
||||
} else {
|
||||
tags.push('backColorFree');
|
||||
}
|
||||
}
|
||||
|
||||
// text color
|
||||
var foreColor;
|
||||
if (element.style.color !== '') {
|
||||
foreColor = colorToHex(element.style.color);
|
||||
} else if (element.hasAttribute('color')) {
|
||||
foreColor = colorToHex(element.getAttribute('color'));
|
||||
}
|
||||
if (foreColor) {
|
||||
if (trumbowyg.o.plugins.colors.colorList.indexOf(foreColor) >= 0) {
|
||||
tags.push('foreColor' + foreColor);
|
||||
} else {
|
||||
tags.push('foreColorFree');
|
||||
}
|
||||
}
|
||||
|
||||
return tags;
|
||||
}
|
||||
|
||||
var defaultOptions = {
|
||||
colorList: ['ffffff', '000000', 'eeece1', '1f497d', '4f81bd', 'c0504d', '9bbb59', '8064a2', '4bacc6', 'f79646', 'ffff00', 'f2f2f2', '7f7f7f', 'ddd9c3', 'c6d9f0', 'dbe5f1', 'f2dcdb', 'ebf1dd', 'e5e0ec', 'dbeef3', 'fdeada', 'fff2ca', 'd8d8d8', '595959', 'c4bd97', '8db3e2', 'b8cce4', 'e5b9b7', 'd7e3bc', 'ccc1d9', 'b7dde8', 'fbd5b5', 'ffe694', 'bfbfbf', '3f3f3f', '938953', '548dd4', '95b3d7', 'd99694', 'c3d69b', 'b2a2c7', 'b7dde8', 'fac08f', 'f2c314', 'a5a5a5', '262626', '494429', '17365d', '366092', '953734', '76923c', '5f497a', '92cddc', 'e36c09', 'c09100', '7f7f7f', '0c0c0c', '1d1b10', '0f243e', '244061', '632423', '4f6128', '3f3151', '31859b', '974806', '7f6000']
|
||||
};
|
||||
|
||||
// Default Options for font-size
|
||||
var fontSizedefaultOptions = {
|
||||
sizeList: ['x-small', 'small', 'medium', 'large', 'x-large'],
|
||||
allowCustomSize: true
|
||||
};
|
||||
|
||||
// Default Options for line height
|
||||
var lineHeightOptions = {
|
||||
sizeList: ['0.9', '1', '1.5', '2.0', '2.5','3.0', '3.5', '4.0', '4.5', '5.0'],
|
||||
allowCustomSize: true
|
||||
};
|
||||
|
||||
// If WP media is a button
|
||||
function openwpmediaDef(trumbowyg) {
|
||||
return {
|
||||
fn: function() {
|
||||
// WP media button logic
|
||||
|
||||
var func_media = window['pagelayer_select_frame'];
|
||||
|
||||
if(typeof func_media == 'function'){
|
||||
|
||||
// Load the frame
|
||||
var frame = pagelayer_select_frame('image');
|
||||
|
||||
// On select update the stuff
|
||||
frame.on({'select': function(){
|
||||
var state = frame.state();
|
||||
var url = '', alt = '', id = '';
|
||||
|
||||
// External URL
|
||||
if('props' in state){
|
||||
|
||||
url = state.props.attributes.url;
|
||||
alt = state.props.attributes.alt;
|
||||
|
||||
// Internal from gallery
|
||||
}else{
|
||||
|
||||
var attachment = frame.state().get('selection').first().toJSON();
|
||||
//console.log(attachment);
|
||||
|
||||
// Set the new and URL
|
||||
url = attachment.url;
|
||||
alt = attachment.alt;
|
||||
id = attachment.id;
|
||||
|
||||
}
|
||||
|
||||
trumbowyg.execCmd('insertImage', url, false, true);
|
||||
var $img = $('img[src="' + url + '"]:not([alt])', trumbowyg.$box);
|
||||
|
||||
$img.attr('alt', alt);
|
||||
$img.attr('pl-media-id', id);
|
||||
|
||||
trumbowyg.syncCode;
|
||||
trumbowyg.$c.trigger('tbwchange');
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
frame.open();
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
ico: 'insert-image'
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$.extend(true, $.trumbowyg, {
|
||||
// Add some translations
|
||||
langs: {
|
||||
en: {
|
||||
wpmedia: 'Insert Image',
|
||||
foreColor: 'Text color',
|
||||
backColor: 'Background color',
|
||||
fontsize: 'Font size',
|
||||
fontsizes: {
|
||||
'x-small': 'Extra small',
|
||||
'small': 'Small',
|
||||
'medium': 'Regular',
|
||||
'large': 'Large',
|
||||
'x-large': 'Extra large',
|
||||
'custom': 'Custom'
|
||||
},
|
||||
fontCustomSize: {
|
||||
title: 'Custom Font Size',
|
||||
label: 'Font Size',
|
||||
value: '48px'
|
||||
},
|
||||
lineheight: 'Line Height',
|
||||
lineCustomHeight: {
|
||||
title: 'Custom Line Height',
|
||||
label: 'Line Height',
|
||||
value: '7.0'
|
||||
},
|
||||
lineheights: {
|
||||
'normal': 'Normal',
|
||||
'custom': 'Custom',
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
// Add our plugin to Trumbowyg registred plugins
|
||||
plugins: {
|
||||
wpmedia: {
|
||||
init: function(trumbowyg) {
|
||||
var t = $(this);
|
||||
// Fill current Trumbowyg instance with WP media default options
|
||||
trumbowyg.o.plugins.wpmedia = $.extend(true, {},
|
||||
defaultOptions,
|
||||
trumbowyg.o.plugins.wpmedia || {}
|
||||
);
|
||||
|
||||
// If WP media is a
|
||||
trumbowyg.addBtnDef('wpmedia', openwpmediaDef(trumbowyg));
|
||||
|
||||
},
|
||||
},
|
||||
color: {
|
||||
init: function (trumbowyg) {
|
||||
trumbowyg.o.plugins.colors = trumbowyg.o.plugins.colors || defaultOptions;
|
||||
var foreColorBtnDef = {
|
||||
dropdown: buildDropdown('foreColor', trumbowyg)
|
||||
},
|
||||
backColorBtnDef = {
|
||||
dropdown: buildDropdown('backColor', trumbowyg)
|
||||
};
|
||||
|
||||
trumbowyg.addBtnDef('foreColor', foreColorBtnDef);
|
||||
trumbowyg.addBtnDef('backColor', backColorBtnDef);
|
||||
},
|
||||
tagHandler: colorTagHandler
|
||||
},
|
||||
pasteImage: {
|
||||
init: function (trumbowyg) {
|
||||
trumbowyg.pasteHandlers.push(function (pasteEvent) {
|
||||
|
||||
var pagelayer_ajax_func = {};
|
||||
|
||||
// This function for ajax success call back
|
||||
pagelayer_ajax_func['success'] = function(obj){
|
||||
//alert(obj);
|
||||
if(obj['success']){
|
||||
trumbowyg.execCmd('insertImage', obj['data']['url'], false, true);
|
||||
}else{
|
||||
alert(obj['data']['message']);
|
||||
}
|
||||
}
|
||||
|
||||
// This function for ajax before send call back
|
||||
pagelayer_ajax_func['beforeSend'] = function(xhr){
|
||||
trumbowyg.showOverlay();
|
||||
}
|
||||
|
||||
// This function for ajax complete call back
|
||||
pagelayer_ajax_func['complete'] = function(xhr){
|
||||
trumbowyg.hideOverlay();
|
||||
}
|
||||
|
||||
pagelayer_editable_paste_handler(pasteEvent, pagelayer_ajax_func);
|
||||
});
|
||||
}
|
||||
},
|
||||
fontsize: {
|
||||
init: function (trumbowyg) {
|
||||
trumbowyg.o.plugins.fontsize = $.extend({},
|
||||
fontSizedefaultOptions,
|
||||
trumbowyg.o.plugins.fontsize || {}
|
||||
);
|
||||
trumbowyg.addBtnDef('fontsize', {
|
||||
dropdown: fontSizeBuildDropdown(trumbowyg)
|
||||
});
|
||||
}
|
||||
},
|
||||
lineheight: {
|
||||
init: function (trumbowyg) {
|
||||
trumbowyg.o.plugins.lineheight = $.extend({},
|
||||
lineHeightOptions,
|
||||
trumbowyg.o.plugins.lineheight || {}
|
||||
);
|
||||
|
||||
trumbowyg.addBtnDef('lineheight', {
|
||||
dropdown: lineHeightDropdown(trumbowyg)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function buildDropdown(fn, trumbowyg) {
|
||||
var dropdown = [];
|
||||
|
||||
$.each(trumbowyg.o.plugins.colors.colorList, function (i, color) {
|
||||
var btn = fn + color,
|
||||
btnDef = {
|
||||
fn: fn,
|
||||
forceCss: true,
|
||||
param: '#' + color,
|
||||
style: 'background-color: #' + color + ';'
|
||||
};
|
||||
trumbowyg.addBtnDef(btn, btnDef);
|
||||
dropdown.push(btn);
|
||||
});
|
||||
|
||||
var removeColorButtonName = fn + 'Remove',
|
||||
removeColorBtnDef = {
|
||||
fn: 'removeFormat',
|
||||
param: fn,
|
||||
style: 'background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAG0lEQVQIW2NkQAAfEJMRmwBYhoGBYQtMBYoAADziAp0jtJTgAAAAAElFTkSuQmCC);'
|
||||
};
|
||||
trumbowyg.addBtnDef(removeColorButtonName, removeColorBtnDef);
|
||||
dropdown.push(removeColorButtonName);
|
||||
|
||||
// add free color btn
|
||||
var freeColorButtonName = fn + 'Free',
|
||||
freeColorBtnDef = {
|
||||
fn: function () {
|
||||
trumbowyg.openModalInsert(trumbowyg.lang[fn],
|
||||
{
|
||||
color: {
|
||||
label: fn,
|
||||
forceCss: true,
|
||||
type: 'color',
|
||||
value: '#FFFFFF'
|
||||
}
|
||||
},
|
||||
// callback
|
||||
function (values) {
|
||||
trumbowyg.execCmd(fn, values.color);
|
||||
return true;
|
||||
}
|
||||
);
|
||||
},
|
||||
text: '#',
|
||||
// style adjust for displaying the text
|
||||
style: 'text-indent: 0;line-height: 20px;padding: 0 5px;'
|
||||
};
|
||||
trumbowyg.addBtnDef(freeColorButtonName, freeColorBtnDef);
|
||||
dropdown.push(freeColorButtonName);
|
||||
|
||||
return dropdown;
|
||||
}
|
||||
|
||||
// Functions for font-size widget
|
||||
function setFontSize(trumbowyg, size) {
|
||||
trumbowyg.$ed.focus();
|
||||
trumbowyg.saveRange();
|
||||
var text = trumbowyg.range.startContainer.parentElement;
|
||||
var selectedText = trumbowyg.getRangeText();
|
||||
if ($(text).html() === selectedText) {
|
||||
$(text).css('font-size', size);
|
||||
} else {
|
||||
trumbowyg.range.deleteContents();
|
||||
var html = '<span style="font-size: ' + size + ';">' + selectedText + '</span>';
|
||||
var node = $(html)[0];
|
||||
trumbowyg.range.insertNode(node);
|
||||
}
|
||||
}
|
||||
|
||||
function fontSizeBuildDropdown(trumbowyg) {
|
||||
var dropdown = [];
|
||||
|
||||
$.each(trumbowyg.o.plugins.fontsize.sizeList, function (index, size) {
|
||||
trumbowyg.addBtnDef('fontsize_' + size, {
|
||||
text: '<span style="font-size: ' + size + ';">' + (trumbowyg.lang.fontsizes[size] || size) + '</span>',
|
||||
hasIcon: false,
|
||||
fn: function () {
|
||||
setFontSize(trumbowyg, size);
|
||||
trumbowyg.syncCode();
|
||||
trumbowyg.$c.trigger('tbwchange');
|
||||
}
|
||||
});
|
||||
dropdown.push('fontsize_' + size);
|
||||
});
|
||||
|
||||
if (trumbowyg.o.plugins.fontsize.allowCustomSize) {
|
||||
var customSizeButtonName = 'fontsize_custom';
|
||||
var customSizeBtnDef = {
|
||||
fn: function () {
|
||||
trumbowyg.openModalInsert(trumbowyg.lang.fontCustomSize.title,
|
||||
{
|
||||
size: {
|
||||
label: trumbowyg.lang.fontCustomSize.label,
|
||||
value: trumbowyg.lang.fontCustomSize.value
|
||||
}
|
||||
},
|
||||
function (form) {
|
||||
setFontSize(trumbowyg, form.size);
|
||||
return true;
|
||||
}
|
||||
);
|
||||
},
|
||||
text: '<span style="font-size: medium;">' + trumbowyg.lang.fontsizes.custom + '</span>',
|
||||
hasIcon: false
|
||||
};
|
||||
trumbowyg.addBtnDef(customSizeButtonName, customSizeBtnDef);
|
||||
dropdown.push(customSizeButtonName);
|
||||
}
|
||||
|
||||
return dropdown;
|
||||
}
|
||||
|
||||
// Build the dropdown for line-height
|
||||
function lineHeightDropdown(trumbowyg) {
|
||||
var dropdown = [];
|
||||
|
||||
$.each(trumbowyg.o.plugins.lineheight.sizeList, function(index, size) {
|
||||
trumbowyg.addBtnDef('lineheight_' + size, {
|
||||
text: trumbowyg.lang.lineheights[size] || size,
|
||||
hasIcon: false,
|
||||
fn: function(){
|
||||
setLineHight(trumbowyg, size);
|
||||
}
|
||||
});
|
||||
dropdown.push('lineheight_' + size);
|
||||
});
|
||||
|
||||
if (trumbowyg.o.plugins.lineheight.allowCustomSize) {
|
||||
var customSizeButtonName = 'lineheight_custom';
|
||||
var customSizeBtnDef = {
|
||||
fn: function () {
|
||||
trumbowyg.openModalInsert(trumbowyg.lang.lineCustomHeight.title,
|
||||
{
|
||||
size: {
|
||||
label: trumbowyg.lang.lineCustomHeight.label,
|
||||
value: trumbowyg.lang.lineCustomHeight.value
|
||||
}
|
||||
},
|
||||
function (form) {
|
||||
setLineHight(trumbowyg, form.size);
|
||||
return true;
|
||||
}
|
||||
);
|
||||
},
|
||||
text: '<span style="font-size: medium;">' + trumbowyg.lang.lineheights.custom + '</span>',
|
||||
hasIcon: false
|
||||
};
|
||||
trumbowyg.addBtnDef(customSizeButtonName, customSizeBtnDef);
|
||||
dropdown.push(customSizeButtonName);
|
||||
}
|
||||
|
||||
return dropdown;
|
||||
}
|
||||
|
||||
// Set line-height
|
||||
function setLineHight(trumbowyg, size) {
|
||||
trumbowyg.$ed.focus();
|
||||
trumbowyg.saveRange();
|
||||
var parent = trumbowyg.range.startContainer.parentElement;
|
||||
var text = trumbowyg.getRangeText();
|
||||
if ($(parent).html() === text) {
|
||||
$(parent).css('line-height', size);
|
||||
} else {
|
||||
trumbowyg.range.deleteContents();
|
||||
var html = '<span style="line-height: ' + size + ';">' + text + '</span>';
|
||||
var node = $(html)[0];
|
||||
trumbowyg.range.insertNode(node);
|
||||
}
|
||||
trumbowyg.syncCode();
|
||||
trumbowyg.$c.trigger('tbwchange');
|
||||
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
(function ($) {
|
||||
'use strict';
|
||||
// jshint camelcase:true
|
||||
|
||||
|
||||
function hex(x) {
|
||||
return ('0' + parseInt(x).toString(16)).slice(-2);
|
||||
}
|
||||
|
||||
function colorToHex(rgb) {
|
||||
if (rgb.search('rgb') === -1) {
|
||||
return rgb.replace('#', '');
|
||||
} else if (rgb === 'rgba(0, 0, 0, 0)') {
|
||||
return 'transparent';
|
||||
} else {
|
||||
rgb = rgb.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/);
|
||||
return hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
|
||||
}
|
||||
}
|
||||
|
||||
function colorTagHandler(element, trumbowyg) {
|
||||
var tags = [];
|
||||
|
||||
if (!element.style) {
|
||||
return tags;
|
||||
}
|
||||
|
||||
// background color
|
||||
if (element.style.backgroundColor !== '') {
|
||||
var backColor = colorToHex(element.style.backgroundColor);
|
||||
if (trumbowyg.o.plugins.colors.colorList.indexOf(backColor) >= 0) {
|
||||
tags.push('backColor' + backColor);
|
||||
} else {
|
||||
tags.push('backColorFree');
|
||||
}
|
||||
}
|
||||
|
||||
// text color
|
||||
var foreColor;
|
||||
if (element.style.color !== '') {
|
||||
foreColor = colorToHex(element.style.color);
|
||||
} else if (element.hasAttribute('color')) {
|
||||
foreColor = colorToHex(element.getAttribute('color'));
|
||||
}
|
||||
if (foreColor) {
|
||||
if (trumbowyg.o.plugins.colors.colorList.indexOf(foreColor) >= 0) {
|
||||
tags.push('foreColor' + foreColor);
|
||||
} else {
|
||||
tags.push('foreColorFree');
|
||||
}
|
||||
}
|
||||
|
||||
return tags;
|
||||
}
|
||||
|
||||
var defaultOptions = {
|
||||
colorList: ['ffffff', '000000', 'eeece1', '1f497d', '4f81bd', 'c0504d', '9bbb59', '8064a2', '4bacc6', 'f79646', 'ffff00', 'f2f2f2', '7f7f7f', 'ddd9c3', 'c6d9f0', 'dbe5f1', 'f2dcdb', 'ebf1dd', 'e5e0ec', 'dbeef3', 'fdeada', 'fff2ca', 'd8d8d8', '595959', 'c4bd97', '8db3e2', 'b8cce4', 'e5b9b7', 'd7e3bc', 'ccc1d9', 'b7dde8', 'fbd5b5', 'ffe694', 'bfbfbf', '3f3f3f', '938953', '548dd4', '95b3d7', 'd99694', 'c3d69b', 'b2a2c7', 'b7dde8', 'fac08f', 'f2c314', 'a5a5a5', '262626', '494429', '17365d', '366092', '953734', '76923c', '5f497a', '92cddc', 'e36c09', 'c09100', '7f7f7f', '0c0c0c', '1d1b10', '0f243e', '244061', '632423', '4f6128', '3f3151', '31859b', '974806', '7f6000']
|
||||
};
|
||||
|
||||
// Default Options for font-size
|
||||
var fontSizedefaultOptions = {
|
||||
sizeList: ['x-small', 'small', 'medium', 'large', 'x-large'],
|
||||
allowCustomSize: true
|
||||
};
|
||||
|
||||
// Default Options for line height
|
||||
var lineHeightOptions = {
|
||||
sizeList: ['0.9', '1', '1.5', '2.0', '2.5','3.0', '3.5', '4.0', '4.5', '5.0'],
|
||||
allowCustomSize: true
|
||||
};
|
||||
|
||||
// If WP media is a button
|
||||
function openwpmediaDef(trumbowyg) {
|
||||
return {
|
||||
fn: function() {
|
||||
// WP media button logic
|
||||
|
||||
var func_media = window['pagelayer_select_frame'];
|
||||
|
||||
if(typeof func_media == 'function'){
|
||||
|
||||
// Load the frame
|
||||
var frame = pagelayer_select_frame('image');
|
||||
|
||||
// On select update the stuff
|
||||
frame.on({'select': function(){
|
||||
var state = frame.state();
|
||||
var url = '', alt = '', id = '';
|
||||
|
||||
// External URL
|
||||
if('props' in state){
|
||||
|
||||
url = state.props.attributes.url;
|
||||
alt = state.props.attributes.alt;
|
||||
|
||||
// Internal from gallery
|
||||
}else{
|
||||
|
||||
var attachment = frame.state().get('selection').first().toJSON();
|
||||
//console.log(attachment);
|
||||
|
||||
// Set the new and URL
|
||||
url = attachment.url;
|
||||
alt = attachment.alt;
|
||||
id = attachment.id;
|
||||
|
||||
}
|
||||
|
||||
trumbowyg.execCmd('insertImage', url, false, true);
|
||||
var $img = $('img[src="' + url + '"]:not([alt])', trumbowyg.$box);
|
||||
|
||||
$img.attr('alt', alt);
|
||||
$img.attr('pl-media-id', id);
|
||||
|
||||
trumbowyg.syncCode;
|
||||
trumbowyg.$c.trigger('tbwchange');
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
frame.open();
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
ico: 'insert-image'
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$.extend(true, $.trumbowyg, {
|
||||
// Add some translations
|
||||
langs: {
|
||||
en: {
|
||||
wpmedia: 'Insert Image',
|
||||
foreColor: 'Text color',
|
||||
backColor: 'Background color',
|
||||
fontsize: 'Font size',
|
||||
fontsizes: {
|
||||
'x-small': 'Extra small',
|
||||
'small': 'Small',
|
||||
'medium': 'Regular',
|
||||
'large': 'Large',
|
||||
'x-large': 'Extra large',
|
||||
'custom': 'Custom'
|
||||
},
|
||||
fontCustomSize: {
|
||||
title: 'Custom Font Size',
|
||||
label: 'Font Size',
|
||||
value: '48px'
|
||||
},
|
||||
lineheight: 'Line Height',
|
||||
lineCustomHeight: {
|
||||
title: 'Custom Line Height',
|
||||
label: 'Line Height',
|
||||
value: '7.0'
|
||||
},
|
||||
lineheights: {
|
||||
'normal': 'Normal',
|
||||
'custom': 'Custom',
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
// Add our plugin to Trumbowyg registred plugins
|
||||
plugins: {
|
||||
wpmedia: {
|
||||
init: function(trumbowyg) {
|
||||
var t = $(this);
|
||||
// Fill current Trumbowyg instance with WP media default options
|
||||
trumbowyg.o.plugins.wpmedia = $.extend(true, {},
|
||||
defaultOptions,
|
||||
trumbowyg.o.plugins.wpmedia || {}
|
||||
);
|
||||
|
||||
// If WP media is a
|
||||
trumbowyg.addBtnDef('wpmedia', openwpmediaDef(trumbowyg));
|
||||
|
||||
},
|
||||
},
|
||||
color: {
|
||||
init: function (trumbowyg) {
|
||||
trumbowyg.o.plugins.colors = trumbowyg.o.plugins.colors || defaultOptions;
|
||||
var foreColorBtnDef = {
|
||||
dropdown: buildDropdown('foreColor', trumbowyg)
|
||||
},
|
||||
backColorBtnDef = {
|
||||
dropdown: buildDropdown('backColor', trumbowyg)
|
||||
};
|
||||
|
||||
trumbowyg.addBtnDef('foreColor', foreColorBtnDef);
|
||||
trumbowyg.addBtnDef('backColor', backColorBtnDef);
|
||||
},
|
||||
tagHandler: colorTagHandler
|
||||
},
|
||||
pasteImage: {
|
||||
init: function (trumbowyg) {
|
||||
trumbowyg.pasteHandlers.push(function (pasteEvent) {
|
||||
|
||||
var pagelayer_ajax_func = {};
|
||||
|
||||
// This function for ajax success call back
|
||||
pagelayer_ajax_func['success'] = function(obj){
|
||||
//alert(obj);
|
||||
if(obj['success']){
|
||||
trumbowyg.execCmd('insertImage', obj['data']['url'], false, true);
|
||||
}else{
|
||||
alert(obj['data']['message']);
|
||||
}
|
||||
}
|
||||
|
||||
// This function for ajax before send call back
|
||||
pagelayer_ajax_func['beforeSend'] = function(xhr){
|
||||
trumbowyg.showOverlay();
|
||||
}
|
||||
|
||||
// This function for ajax complete call back
|
||||
pagelayer_ajax_func['complete'] = function(xhr){
|
||||
trumbowyg.hideOverlay();
|
||||
}
|
||||
|
||||
pagelayer_editable_paste_handler(pasteEvent, pagelayer_ajax_func);
|
||||
});
|
||||
}
|
||||
},
|
||||
fontsize: {
|
||||
init: function (trumbowyg) {
|
||||
trumbowyg.o.plugins.fontsize = $.extend({},
|
||||
fontSizedefaultOptions,
|
||||
trumbowyg.o.plugins.fontsize || {}
|
||||
);
|
||||
trumbowyg.addBtnDef('fontsize', {
|
||||
dropdown: fontSizeBuildDropdown(trumbowyg)
|
||||
});
|
||||
}
|
||||
},
|
||||
lineheight: {
|
||||
init: function (trumbowyg) {
|
||||
trumbowyg.o.plugins.lineheight = $.extend({},
|
||||
lineHeightOptions,
|
||||
trumbowyg.o.plugins.lineheight || {}
|
||||
);
|
||||
|
||||
trumbowyg.addBtnDef('lineheight', {
|
||||
dropdown: lineHeightDropdown(trumbowyg)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function buildDropdown(fn, trumbowyg) {
|
||||
var dropdown = [];
|
||||
|
||||
$.each(trumbowyg.o.plugins.colors.colorList, function (i, color) {
|
||||
var btn = fn + color,
|
||||
btnDef = {
|
||||
fn: fn,
|
||||
forceCss: true,
|
||||
param: '#' + color,
|
||||
style: 'background-color: #' + color + ';'
|
||||
};
|
||||
trumbowyg.addBtnDef(btn, btnDef);
|
||||
dropdown.push(btn);
|
||||
});
|
||||
|
||||
var removeColorButtonName = fn + 'Remove',
|
||||
removeColorBtnDef = {
|
||||
fn: 'removeFormat',
|
||||
param: fn,
|
||||
style: 'background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAG0lEQVQIW2NkQAAfEJMRmwBYhoGBYQtMBYoAADziAp0jtJTgAAAAAElFTkSuQmCC);'
|
||||
};
|
||||
trumbowyg.addBtnDef(removeColorButtonName, removeColorBtnDef);
|
||||
dropdown.push(removeColorButtonName);
|
||||
|
||||
// add free color btn
|
||||
var freeColorButtonName = fn + 'Free',
|
||||
freeColorBtnDef = {
|
||||
fn: function () {
|
||||
trumbowyg.openModalInsert(trumbowyg.lang[fn],
|
||||
{
|
||||
color: {
|
||||
label: fn,
|
||||
forceCss: true,
|
||||
type: 'color',
|
||||
value: '#FFFFFF'
|
||||
}
|
||||
},
|
||||
// callback
|
||||
function (values) {
|
||||
trumbowyg.execCmd(fn, values.color);
|
||||
return true;
|
||||
}
|
||||
);
|
||||
},
|
||||
text: '#',
|
||||
// style adjust for displaying the text
|
||||
style: 'text-indent: 0;line-height: 20px;padding: 0 5px;'
|
||||
};
|
||||
trumbowyg.addBtnDef(freeColorButtonName, freeColorBtnDef);
|
||||
dropdown.push(freeColorButtonName);
|
||||
|
||||
return dropdown;
|
||||
}
|
||||
|
||||
// Functions for font-size widget
|
||||
function setFontSize(trumbowyg, size) {
|
||||
trumbowyg.$ed.focus();
|
||||
trumbowyg.saveRange();
|
||||
var text = trumbowyg.range.startContainer.parentElement;
|
||||
var selectedText = trumbowyg.getRangeText();
|
||||
if ($(text).html() === selectedText) {
|
||||
$(text).css('font-size', size);
|
||||
} else {
|
||||
trumbowyg.range.deleteContents();
|
||||
var html = '<span style="font-size: ' + size + ';">' + selectedText + '</span>';
|
||||
var node = $(html)[0];
|
||||
trumbowyg.range.insertNode(node);
|
||||
}
|
||||
}
|
||||
|
||||
function fontSizeBuildDropdown(trumbowyg) {
|
||||
var dropdown = [];
|
||||
|
||||
$.each(trumbowyg.o.plugins.fontsize.sizeList, function (index, size) {
|
||||
trumbowyg.addBtnDef('fontsize_' + size, {
|
||||
text: '<span style="font-size: ' + size + ';">' + (trumbowyg.lang.fontsizes[size] || size) + '</span>',
|
||||
hasIcon: false,
|
||||
fn: function () {
|
||||
setFontSize(trumbowyg, size);
|
||||
trumbowyg.syncCode();
|
||||
trumbowyg.$c.trigger('tbwchange');
|
||||
}
|
||||
});
|
||||
dropdown.push('fontsize_' + size);
|
||||
});
|
||||
|
||||
if (trumbowyg.o.plugins.fontsize.allowCustomSize) {
|
||||
var customSizeButtonName = 'fontsize_custom';
|
||||
var customSizeBtnDef = {
|
||||
fn: function () {
|
||||
trumbowyg.openModalInsert(trumbowyg.lang.fontCustomSize.title,
|
||||
{
|
||||
size: {
|
||||
label: trumbowyg.lang.fontCustomSize.label,
|
||||
value: trumbowyg.lang.fontCustomSize.value
|
||||
}
|
||||
},
|
||||
function (form) {
|
||||
setFontSize(trumbowyg, form.size);
|
||||
return true;
|
||||
}
|
||||
);
|
||||
},
|
||||
text: '<span style="font-size: medium;">' + trumbowyg.lang.fontsizes.custom + '</span>',
|
||||
hasIcon: false
|
||||
};
|
||||
trumbowyg.addBtnDef(customSizeButtonName, customSizeBtnDef);
|
||||
dropdown.push(customSizeButtonName);
|
||||
}
|
||||
|
||||
return dropdown;
|
||||
}
|
||||
|
||||
// Build the dropdown for line-height
|
||||
function lineHeightDropdown(trumbowyg) {
|
||||
var dropdown = [];
|
||||
|
||||
$.each(trumbowyg.o.plugins.lineheight.sizeList, function(index, size) {
|
||||
trumbowyg.addBtnDef('lineheight_' + size, {
|
||||
text: trumbowyg.lang.lineheights[size] || size,
|
||||
hasIcon: false,
|
||||
fn: function(){
|
||||
setLineHight(trumbowyg, size);
|
||||
}
|
||||
});
|
||||
dropdown.push('lineheight_' + size);
|
||||
});
|
||||
|
||||
if (trumbowyg.o.plugins.lineheight.allowCustomSize) {
|
||||
var customSizeButtonName = 'lineheight_custom';
|
||||
var customSizeBtnDef = {
|
||||
fn: function () {
|
||||
trumbowyg.openModalInsert(trumbowyg.lang.lineCustomHeight.title,
|
||||
{
|
||||
size: {
|
||||
label: trumbowyg.lang.lineCustomHeight.label,
|
||||
value: trumbowyg.lang.lineCustomHeight.value
|
||||
}
|
||||
},
|
||||
function (form) {
|
||||
setLineHight(trumbowyg, form.size);
|
||||
return true;
|
||||
}
|
||||
);
|
||||
},
|
||||
text: '<span style="font-size: medium;">' + trumbowyg.lang.lineheights.custom + '</span>',
|
||||
hasIcon: false
|
||||
};
|
||||
trumbowyg.addBtnDef(customSizeButtonName, customSizeBtnDef);
|
||||
dropdown.push(customSizeButtonName);
|
||||
}
|
||||
|
||||
return dropdown;
|
||||
}
|
||||
|
||||
// Set line-height
|
||||
function setLineHight(trumbowyg, size) {
|
||||
trumbowyg.$ed.focus();
|
||||
trumbowyg.saveRange();
|
||||
var parent = trumbowyg.range.startContainer.parentElement;
|
||||
var text = trumbowyg.getRangeText();
|
||||
if ($(parent).html() === text) {
|
||||
$(parent).css('line-height', size);
|
||||
} else {
|
||||
trumbowyg.range.deleteContents();
|
||||
var html = '<span style="line-height: ' + size + ';">' + text + '</span>';
|
||||
var node = $(html)[0];
|
||||
trumbowyg.range.insertNode(node);
|
||||
}
|
||||
trumbowyg.syncCode();
|
||||
trumbowyg.$c.trigger('tbwchange');
|
||||
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,85 +1,85 @@
|
||||
(function ($) {
|
||||
'use strict';
|
||||
|
||||
$.extend(true, $.trumbowyg, {
|
||||
langs: {
|
||||
// jshint camelcase:false
|
||||
en: {
|
||||
fontFamily: 'Font'
|
||||
},
|
||||
da: {
|
||||
fontFamily: 'Skrifttype'
|
||||
},
|
||||
fr: {
|
||||
fontFamily: 'Police'
|
||||
},
|
||||
de: {
|
||||
fontFamily: 'Schriftart'
|
||||
},
|
||||
nl: {
|
||||
fontFamily: 'Lettertype'
|
||||
},
|
||||
tr: {
|
||||
fontFamily: 'Yazı Tipi'
|
||||
},
|
||||
zh_tw: {
|
||||
fontFamily: '字體',
|
||||
},
|
||||
pt_br: {
|
||||
fontFamily: 'Fonte',
|
||||
}
|
||||
}
|
||||
});
|
||||
// jshint camelcase:true
|
||||
|
||||
var defaultOptions = {
|
||||
fontList: [
|
||||
{name: 'Arial', family: 'Arial, Helvetica, sans-serif'},
|
||||
{name: 'Arial Black', family: '\'Arial Black\', Gadget, sans-serif'},
|
||||
{name: 'Comic Sans', family: '\'Comic Sans MS\', Textile, cursive, sans-serif'},
|
||||
{name: 'Courier New', family: '\'Courier New\', Courier, monospace'},
|
||||
{name: 'Georgia', family: 'Georgia, serif'},
|
||||
{name: 'Impact', family: 'Impact, Charcoal, sans-serif'},
|
||||
{name: 'Lucida Console', family: '\'Lucida Console\', Monaco, monospace'},
|
||||
{name: 'Lucida Sans', family: '\'Lucida Sans Uncide\', \'Lucida Grande\', sans-serif'},
|
||||
{name: 'Palatino', family: '\'Palatino Linotype\', \'Book Antiqua\', Palatino, serif'},
|
||||
{name: 'Tahoma', family: 'Tahoma, Geneva, sans-serif'},
|
||||
{name: 'Times New Roman', family: '\'Times New Roman\', Times, serif'},
|
||||
{name: 'Trebuchet', family: '\'Trebuchet MS\', Helvetica, sans-serif'},
|
||||
{name: 'Verdana', family: 'Verdana, Geneva, sans-serif'}
|
||||
]
|
||||
};
|
||||
|
||||
// Add dropdown with web safe fonts
|
||||
$.extend(true, $.trumbowyg, {
|
||||
plugins: {
|
||||
fontfamily: {
|
||||
init: function (trumbowyg) {
|
||||
trumbowyg.o.plugins.fontfamily = trumbowyg.o.plugins.fontfamily || defaultOptions;
|
||||
trumbowyg.addBtnDef('fontfamily', {
|
||||
dropdown: buildDropdown(trumbowyg),
|
||||
hasIcon: false,
|
||||
text: trumbowyg.lang.fontFamily
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function buildDropdown(trumbowyg) {
|
||||
var dropdown = [];
|
||||
|
||||
$.each(trumbowyg.o.plugins.fontfamily.fontList, function (index, font) {
|
||||
trumbowyg.addBtnDef('fontfamily_' + index, {
|
||||
title: '<span style="font-family: ' + font.family + ';">' + font.name + '</span>',
|
||||
hasIcon: false,
|
||||
fn: function () {
|
||||
trumbowyg.execCmd('fontName', font.family, true);
|
||||
}
|
||||
});
|
||||
dropdown.push('fontfamily_' + index);
|
||||
});
|
||||
|
||||
return dropdown;
|
||||
}
|
||||
})(jQuery);
|
||||
(function ($) {
|
||||
'use strict';
|
||||
|
||||
$.extend(true, $.trumbowyg, {
|
||||
langs: {
|
||||
// jshint camelcase:false
|
||||
en: {
|
||||
fontFamily: 'Font'
|
||||
},
|
||||
da: {
|
||||
fontFamily: 'Skrifttype'
|
||||
},
|
||||
fr: {
|
||||
fontFamily: 'Police'
|
||||
},
|
||||
de: {
|
||||
fontFamily: 'Schriftart'
|
||||
},
|
||||
nl: {
|
||||
fontFamily: 'Lettertype'
|
||||
},
|
||||
tr: {
|
||||
fontFamily: 'Yazı Tipi'
|
||||
},
|
||||
zh_tw: {
|
||||
fontFamily: '字體',
|
||||
},
|
||||
pt_br: {
|
||||
fontFamily: 'Fonte',
|
||||
}
|
||||
}
|
||||
});
|
||||
// jshint camelcase:true
|
||||
|
||||
var defaultOptions = {
|
||||
fontList: [
|
||||
{name: 'Arial', family: 'Arial, Helvetica, sans-serif'},
|
||||
{name: 'Arial Black', family: '\'Arial Black\', Gadget, sans-serif'},
|
||||
{name: 'Comic Sans', family: '\'Comic Sans MS\', Textile, cursive, sans-serif'},
|
||||
{name: 'Courier New', family: '\'Courier New\', Courier, monospace'},
|
||||
{name: 'Georgia', family: 'Georgia, serif'},
|
||||
{name: 'Impact', family: 'Impact, Charcoal, sans-serif'},
|
||||
{name: 'Lucida Console', family: '\'Lucida Console\', Monaco, monospace'},
|
||||
{name: 'Lucida Sans', family: '\'Lucida Sans Uncide\', \'Lucida Grande\', sans-serif'},
|
||||
{name: 'Palatino', family: '\'Palatino Linotype\', \'Book Antiqua\', Palatino, serif'},
|
||||
{name: 'Tahoma', family: 'Tahoma, Geneva, sans-serif'},
|
||||
{name: 'Times New Roman', family: '\'Times New Roman\', Times, serif'},
|
||||
{name: 'Trebuchet', family: '\'Trebuchet MS\', Helvetica, sans-serif'},
|
||||
{name: 'Verdana', family: 'Verdana, Geneva, sans-serif'}
|
||||
]
|
||||
};
|
||||
|
||||
// Add dropdown with web safe fonts
|
||||
$.extend(true, $.trumbowyg, {
|
||||
plugins: {
|
||||
fontfamily: {
|
||||
init: function (trumbowyg) {
|
||||
trumbowyg.o.plugins.fontfamily = trumbowyg.o.plugins.fontfamily || defaultOptions;
|
||||
trumbowyg.addBtnDef('fontfamily', {
|
||||
dropdown: buildDropdown(trumbowyg),
|
||||
hasIcon: false,
|
||||
text: trumbowyg.lang.fontFamily
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function buildDropdown(trumbowyg) {
|
||||
var dropdown = [];
|
||||
|
||||
$.each(trumbowyg.o.plugins.fontfamily.fontList, function (index, font) {
|
||||
trumbowyg.addBtnDef('fontfamily_' + index, {
|
||||
title: '<span style="font-family: ' + font.family + ';">' + font.name + '</span>',
|
||||
hasIcon: false,
|
||||
fn: function () {
|
||||
trumbowyg.execCmd('fontName', font.family, true);
|
||||
}
|
||||
});
|
||||
dropdown.push('fontfamily_' + index);
|
||||
});
|
||||
|
||||
return dropdown;
|
||||
}
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,152 +1,152 @@
|
||||
<?php
|
||||
|
||||
namespace pagelayerQuery;
|
||||
|
||||
interface IQuery extends \Countable {
|
||||
/// Methods ///
|
||||
|
||||
/**
|
||||
* Adds the specified class(es) to each of the set of matched elements.
|
||||
* @param string $classname The name of the class to add. You can add multiple classes by separating them with spaces.
|
||||
* @return IQuery
|
||||
*/
|
||||
function addClass($classname);
|
||||
|
||||
/**
|
||||
* Insert content, specified by the parameter, after each element in the set of matched elements.
|
||||
* @param string $content The content to add.
|
||||
* @return IQuery
|
||||
*/
|
||||
function after($content);
|
||||
|
||||
/**
|
||||
* Insert content, specified by the parameter, to the end of each element in the set of matched elements.
|
||||
* @param string $content The content to append.
|
||||
* @return IQuery
|
||||
*/
|
||||
function append($content);
|
||||
|
||||
/**
|
||||
* Get the value of an attribute for the first element in the set of matched elements or set one
|
||||
* or more attributes for every matched element.
|
||||
* @param string $name The name of the attribute.
|
||||
* @param null|string $value The value to set or null to get the current attribute value.
|
||||
* @return string|IQuery
|
||||
*/
|
||||
function attr($name, $value = null);
|
||||
|
||||
/**
|
||||
* Insert content, specified by the parameter, before each element in the set of matched elements.
|
||||
* @param string $content The content to add.
|
||||
* @return IQuery
|
||||
*/
|
||||
function before($content);
|
||||
|
||||
/**
|
||||
* Remove all child nodes of the set of matched elements from the DOM.
|
||||
* @return IQuery;
|
||||
*/
|
||||
function clear();
|
||||
|
||||
/**
|
||||
* Get the value of a style property for the first element in the set of matched elements or
|
||||
* set one or more CSS properties for every matched element.
|
||||
*/
|
||||
// function css($name, $value = null);
|
||||
|
||||
/**
|
||||
* Determine whether any of the matched elements are assigned the given class.
|
||||
* @param string $classname The name of the class to check.
|
||||
*/
|
||||
function hasClass($classname);
|
||||
|
||||
/**
|
||||
* Get the HTML contents of the first element in the set of matched elements
|
||||
* or set the HTML contents of every matched element.
|
||||
* @param string|null $value The value to set.
|
||||
*/
|
||||
function html($value = null);
|
||||
|
||||
/**
|
||||
* Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
|
||||
* @param string $content The content to add.
|
||||
*/
|
||||
function prepend($content);
|
||||
|
||||
/**
|
||||
* Get the value of a property for the first element in the set of matched elements
|
||||
* or set one or more properties for every matched element.
|
||||
* @param string $name The name of the property.
|
||||
* The currently supported properties are `tagname`, `selected`, and `checked`.
|
||||
* @param null|string $value The value to set or null to get the current property value.
|
||||
*/
|
||||
function prop($name, $value = null);
|
||||
|
||||
/**
|
||||
* Remove the set of matched elements from the DOM.
|
||||
* @param null|string $selector A css query to filter the set of removed nodes.
|
||||
*/
|
||||
function remove($selector = null);
|
||||
|
||||
/**
|
||||
* Remove an attribute from each element in the set of matched elements.
|
||||
* @param string $name The name of the attribute to remove.
|
||||
*/
|
||||
function removeAttr($name);
|
||||
|
||||
/**
|
||||
* Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
|
||||
* @param string $classname The name of the class to remove.
|
||||
*/
|
||||
function removeClass($classname);
|
||||
|
||||
/**
|
||||
* Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
|
||||
* @param string $content The content that will replace the nodes.
|
||||
*/
|
||||
function replaceWith($content);
|
||||
|
||||
/**
|
||||
* Returns the name of the element.
|
||||
* @param null|string $tagName A new tag name or null to return the current tag name.
|
||||
*/
|
||||
function tagName($value = null);
|
||||
|
||||
/**
|
||||
* Get the combined text contents of each element in the set of matched elements, including their descendants, or set the text contents of the matched elements.
|
||||
* @param null|string $value A string to set the text or null to return the current text.
|
||||
*/
|
||||
function text($value = null);
|
||||
|
||||
/**
|
||||
* Add or remove one or more classes from each element in the set of matched elements,
|
||||
* depending on either the class’s presence or the value of the switch argument.
|
||||
* @param string $classname
|
||||
* @param bool|null
|
||||
*/
|
||||
function toggleClass($classname, $switch = null);
|
||||
|
||||
/**
|
||||
* Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
|
||||
*/
|
||||
function unwrap();
|
||||
|
||||
/**
|
||||
* Get the current value of the first element in the set of matched elements or set the value of every matched element.
|
||||
* @param string|null $value The new value of the element or null to return the current value.
|
||||
*/
|
||||
function val($value = null);
|
||||
|
||||
/**
|
||||
* Wrap an HTML structure around each element in the set of matched elements.
|
||||
* @param string A tag name or html string specifying the structure to wrap around the matched elements.
|
||||
*/
|
||||
function wrap($wrapping_element);
|
||||
|
||||
/**
|
||||
* Wrap an HTML structure around the content of each element in the set of matched elements.
|
||||
* @param string A tag name or html string specifying the structure to wrap around the content of the matched elements.
|
||||
*/
|
||||
function wrapInner($wrapping_element);
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
namespace pagelayerQuery;
|
||||
|
||||
interface IQuery extends \Countable {
|
||||
/// Methods ///
|
||||
|
||||
/**
|
||||
* Adds the specified class(es) to each of the set of matched elements.
|
||||
* @param string $classname The name of the class to add. You can add multiple classes by separating them with spaces.
|
||||
* @return IQuery
|
||||
*/
|
||||
function addClass($classname);
|
||||
|
||||
/**
|
||||
* Insert content, specified by the parameter, after each element in the set of matched elements.
|
||||
* @param string $content The content to add.
|
||||
* @return IQuery
|
||||
*/
|
||||
function after($content);
|
||||
|
||||
/**
|
||||
* Insert content, specified by the parameter, to the end of each element in the set of matched elements.
|
||||
* @param string $content The content to append.
|
||||
* @return IQuery
|
||||
*/
|
||||
function append($content);
|
||||
|
||||
/**
|
||||
* Get the value of an attribute for the first element in the set of matched elements or set one
|
||||
* or more attributes for every matched element.
|
||||
* @param string $name The name of the attribute.
|
||||
* @param null|string $value The value to set or null to get the current attribute value.
|
||||
* @return string|IQuery
|
||||
*/
|
||||
function attr($name, $value = null);
|
||||
|
||||
/**
|
||||
* Insert content, specified by the parameter, before each element in the set of matched elements.
|
||||
* @param string $content The content to add.
|
||||
* @return IQuery
|
||||
*/
|
||||
function before($content);
|
||||
|
||||
/**
|
||||
* Remove all child nodes of the set of matched elements from the DOM.
|
||||
* @return IQuery;
|
||||
*/
|
||||
function clear();
|
||||
|
||||
/**
|
||||
* Get the value of a style property for the first element in the set of matched elements or
|
||||
* set one or more CSS properties for every matched element.
|
||||
*/
|
||||
// function css($name, $value = null);
|
||||
|
||||
/**
|
||||
* Determine whether any of the matched elements are assigned the given class.
|
||||
* @param string $classname The name of the class to check.
|
||||
*/
|
||||
function hasClass($classname);
|
||||
|
||||
/**
|
||||
* Get the HTML contents of the first element in the set of matched elements
|
||||
* or set the HTML contents of every matched element.
|
||||
* @param string|null $value The value to set.
|
||||
*/
|
||||
function html($value = null);
|
||||
|
||||
/**
|
||||
* Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
|
||||
* @param string $content The content to add.
|
||||
*/
|
||||
function prepend($content);
|
||||
|
||||
/**
|
||||
* Get the value of a property for the first element in the set of matched elements
|
||||
* or set one or more properties for every matched element.
|
||||
* @param string $name The name of the property.
|
||||
* The currently supported properties are `tagname`, `selected`, and `checked`.
|
||||
* @param null|string $value The value to set or null to get the current property value.
|
||||
*/
|
||||
function prop($name, $value = null);
|
||||
|
||||
/**
|
||||
* Remove the set of matched elements from the DOM.
|
||||
* @param null|string $selector A css query to filter the set of removed nodes.
|
||||
*/
|
||||
function remove($selector = null);
|
||||
|
||||
/**
|
||||
* Remove an attribute from each element in the set of matched elements.
|
||||
* @param string $name The name of the attribute to remove.
|
||||
*/
|
||||
function removeAttr($name);
|
||||
|
||||
/**
|
||||
* Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
|
||||
* @param string $classname The name of the class to remove.
|
||||
*/
|
||||
function removeClass($classname);
|
||||
|
||||
/**
|
||||
* Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
|
||||
* @param string $content The content that will replace the nodes.
|
||||
*/
|
||||
function replaceWith($content);
|
||||
|
||||
/**
|
||||
* Returns the name of the element.
|
||||
* @param null|string $tagName A new tag name or null to return the current tag name.
|
||||
*/
|
||||
function tagName($value = null);
|
||||
|
||||
/**
|
||||
* Get the combined text contents of each element in the set of matched elements, including their descendants, or set the text contents of the matched elements.
|
||||
* @param null|string $value A string to set the text or null to return the current text.
|
||||
*/
|
||||
function text($value = null);
|
||||
|
||||
/**
|
||||
* Add or remove one or more classes from each element in the set of matched elements,
|
||||
* depending on either the class’s presence or the value of the switch argument.
|
||||
* @param string $classname
|
||||
* @param bool|null
|
||||
*/
|
||||
function toggleClass($classname, $switch = null);
|
||||
|
||||
/**
|
||||
* Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
|
||||
*/
|
||||
function unwrap();
|
||||
|
||||
/**
|
||||
* Get the current value of the first element in the set of matched elements or set the value of every matched element.
|
||||
* @param string|null $value The new value of the element or null to return the current value.
|
||||
*/
|
||||
function val($value = null);
|
||||
|
||||
/**
|
||||
* Wrap an HTML structure around each element in the set of matched elements.
|
||||
* @param string A tag name or html string specifying the structure to wrap around the matched elements.
|
||||
*/
|
||||
function wrap($wrapping_element);
|
||||
|
||||
/**
|
||||
* Wrap an HTML structure around the content of each element in the set of matched elements.
|
||||
* @param string A tag name or html string specifying the structure to wrap around the content of the matched elements.
|
||||
*/
|
||||
function wrapInner($wrapping_element);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
# pQuery
|
||||
|
||||
[](https://travis-ci.org/tburry/pquery)
|
||||
[](https://scrutinizer-ci.com/g/tburry/pquery/)
|
||||
[](https://packagist.org/packages/tburry/pquery)
|
||||
|
||||
pQuery is a jQuery like html dom parser written in php. It is a fork of the [ganon dom parser](https://code.google.com/p/ganon/).
|
||||
|
||||
## Basic usage
|
||||
|
||||
To get started using pQuery do the following.
|
||||
|
||||
1. Require the pQuery library into your project using [composer](http://getcomposer.org/doc/01-basic-usage.md#the-require-key).
|
||||
2. Parse a snippet of html using `pQuery::parseStr()` or `pQuery::parseFile()` to return a document object model (DOM).
|
||||
3. Run jQuery like functions on the DOM.
|
||||
|
||||
## Example
|
||||
|
||||
The following example parses an html string and does some manipulation on it.
|
||||
|
||||
```php
|
||||
$html = '<div class="container">
|
||||
<div class="inner verb">Hello</div>
|
||||
<div class="inner adj">Cruel</div>
|
||||
<div class="inner obj">World</div>
|
||||
</div>';
|
||||
|
||||
$dom = pQuery::parseStr($html);
|
||||
|
||||
$dom->query('.inner')
|
||||
->tagName('span');
|
||||
|
||||
$dom->query('.adj')
|
||||
->html('Beautiful')
|
||||
->tagName('i');
|
||||
|
||||
echo $dom->html();
|
||||
```
|
||||
|
||||
## Differences between pQuery and ganon
|
||||
|
||||
pQuery is a fork of the [ganon php processor](https://code.google.com/p/ganon/). Most of the functionality is identical to ganon with the following exceptions.
|
||||
|
||||
* pQuery is a composer package.
|
||||
* pQuery renames ganon's classes and puts them into a namespace.
|
||||
* pQuery is used only with objects rather than functions so that it can be autoloaded.
|
||||
* pQuery Adds the `IQuery` interface and the `pQuery` object that define the jQuery-like interface for querying the dom.
|
||||
* pQuery implements more of jQuery's methods. See the `IQuery` interface for a list of methods.
|
||||
* pQuery supports adding tags to the dom using the `<div class="something"></div>` notation rather than just `div`.
|
||||
# pQuery
|
||||
|
||||
[](https://travis-ci.org/tburry/pquery)
|
||||
[](https://scrutinizer-ci.com/g/tburry/pquery/)
|
||||
[](https://packagist.org/packages/tburry/pquery)
|
||||
|
||||
pQuery is a jQuery like html dom parser written in php. It is a fork of the [ganon dom parser](https://code.google.com/p/ganon/).
|
||||
|
||||
## Basic usage
|
||||
|
||||
To get started using pQuery do the following.
|
||||
|
||||
1. Require the pQuery library into your project using [composer](http://getcomposer.org/doc/01-basic-usage.md#the-require-key).
|
||||
2. Parse a snippet of html using `pQuery::parseStr()` or `pQuery::parseFile()` to return a document object model (DOM).
|
||||
3. Run jQuery like functions on the DOM.
|
||||
|
||||
## Example
|
||||
|
||||
The following example parses an html string and does some manipulation on it.
|
||||
|
||||
```php
|
||||
$html = '<div class="container">
|
||||
<div class="inner verb">Hello</div>
|
||||
<div class="inner adj">Cruel</div>
|
||||
<div class="inner obj">World</div>
|
||||
</div>';
|
||||
|
||||
$dom = pQuery::parseStr($html);
|
||||
|
||||
$dom->query('.inner')
|
||||
->tagName('span');
|
||||
|
||||
$dom->query('.adj')
|
||||
->html('Beautiful')
|
||||
->tagName('i');
|
||||
|
||||
echo $dom->html();
|
||||
```
|
||||
|
||||
## Differences between pQuery and ganon
|
||||
|
||||
pQuery is a fork of the [ganon php processor](https://code.google.com/p/ganon/). Most of the functionality is identical to ganon with the following exceptions.
|
||||
|
||||
* pQuery is a composer package.
|
||||
* pQuery renames ganon's classes and puts them into a namespace.
|
||||
* pQuery is used only with objects rather than functions so that it can be autoloaded.
|
||||
* pQuery Adds the `IQuery` interface and the `pQuery` object that define the jQuery-like interface for querying the dom.
|
||||
* pQuery implements more of jQuery's methods. See the `IQuery` interface for a list of methods.
|
||||
* pQuery supports adding tags to the dom using the `<div class="something"></div>` notation rather than just `div`.
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
{
|
||||
"name": "tburry/pquery",
|
||||
"type": "library",
|
||||
"description": "A jQuery like html dom parser written in php.",
|
||||
"keywords": ["php", "dom", "ganon"],
|
||||
"license": "LGPL-2.1",
|
||||
"authors": [
|
||||
{ "name": "Todd Burry", "email": "todd@vanillaforums.com", "role": "Developer" }
|
||||
],
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"IQuery.php",
|
||||
"gan_formatter.php",
|
||||
"gan_node_html.php",
|
||||
"gan_parser_html.php",
|
||||
"gan_selector_html.php",
|
||||
"gan_tokenizer.php",
|
||||
"gan_xml2array.php",
|
||||
"pQuery.php"
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"htmlawed/htmlawed": "dev-master"
|
||||
}
|
||||
{
|
||||
"name": "tburry/pquery",
|
||||
"type": "library",
|
||||
"description": "A jQuery like html dom parser written in php.",
|
||||
"keywords": ["php", "dom", "ganon"],
|
||||
"license": "LGPL-2.1",
|
||||
"authors": [
|
||||
{ "name": "Todd Burry", "email": "todd@vanillaforums.com", "role": "Developer" }
|
||||
],
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"IQuery.php",
|
||||
"gan_formatter.php",
|
||||
"gan_node_html.php",
|
||||
"gan_parser_html.php",
|
||||
"gan_selector_html.php",
|
||||
"gan_tokenizer.php",
|
||||
"gan_xml2array.php",
|
||||
"pQuery.php"
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"htmlawed/htmlawed": "dev-master"
|
||||
}
|
||||
}
|
||||
@@ -1,381 +1,381 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Niels A.D.
|
||||
* @author Todd Burry <todd@vanillaforums.com>
|
||||
* @copyright 2010 Niels A.D., 2014 Todd Burry
|
||||
* @license http://opensource.org/licenses/LGPL-2.1 LGPL-2.1
|
||||
* @package pQuery
|
||||
*/
|
||||
|
||||
namespace pagelayerQuery;
|
||||
|
||||
/**
|
||||
* Indents text
|
||||
* @param string $text
|
||||
* @param int $indent
|
||||
* @param string $indent_string
|
||||
* @return string
|
||||
*/
|
||||
function indent_text($text, $indent, $indent_string = ' ') {
|
||||
if ($indent && $indent_string) {
|
||||
return str_replace("\n", "\n".str_repeat($indent_string, $indent), $text);
|
||||
} else {
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Class used to format/minify HTML nodes
|
||||
*
|
||||
* Used like:
|
||||
* <code>
|
||||
* <?php
|
||||
* $formatter = new HtmlFormatter();
|
||||
* $formatter->format($root);
|
||||
* ?>
|
||||
* </code>
|
||||
*/
|
||||
class HtmlFormatter {
|
||||
|
||||
/**
|
||||
* Determines which elements start on a new line and which function as block
|
||||
* @var array('element' => array('new_line' => true, 'as_block' => true, 'format_inside' => true))
|
||||
*/
|
||||
var $block_elements = array(
|
||||
'p' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'h1' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'h2' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'h3' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'h4' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'h5' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'h6' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
|
||||
'form' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'fieldset' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'legend' => array('new_line' => true, 'as_block' => false, 'format_inside' => true),
|
||||
'dl' => array('new_line' => true, 'as_block' => false, 'format_inside' => true),
|
||||
'dt' => array('new_line' => true, 'as_block' => false, 'format_inside' => true),
|
||||
'dd' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'ol' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'ul' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'li' => array('new_line' => true, 'as_block' => false, 'format_inside' => true),
|
||||
|
||||
'table' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'tr' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
|
||||
'dir' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'menu' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'address' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'blockquote' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'center' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'del' => array('new_line' => true, 'as_block' => false, 'format_inside' => true),
|
||||
//'div' => array('new_line' => false, 'as_block' => true, 'format_inside' => true),
|
||||
'hr' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'ins' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'noscript' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'pre' => array('new_line' => true, 'as_block' => true, 'format_inside' => false),
|
||||
'script' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'style' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
|
||||
'html' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'head' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'body' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'title' => array('new_line' => true, 'as_block' => false, 'format_inside' => false)
|
||||
);
|
||||
|
||||
/**
|
||||
* Determines which characters are considered whitespace
|
||||
* @var array("\t" => true) True to recognize as new line
|
||||
*/
|
||||
var $whitespace = array(
|
||||
' ' => false,
|
||||
"\t" => false,
|
||||
"\x0B" => false,
|
||||
"\0" => false,
|
||||
"\n" => true,
|
||||
"\r" => true
|
||||
);
|
||||
|
||||
/**
|
||||
* String that is used to generate correct indenting
|
||||
* @var string
|
||||
*/
|
||||
var $indent_string = ' ';
|
||||
|
||||
/**
|
||||
* String that is used to break lines
|
||||
* @var string
|
||||
*/
|
||||
var $linebreak_string = "\n";
|
||||
|
||||
/**
|
||||
* Other formatting options
|
||||
* @var array
|
||||
*/
|
||||
public $options = array(
|
||||
'img_alt' => '',
|
||||
'self_close_str' => null,
|
||||
'attribute_shorttag' => false,
|
||||
'sort_attributes' => false,
|
||||
'attributes_case' => CASE_LOWER,
|
||||
'minify_script' => true
|
||||
);
|
||||
|
||||
/**
|
||||
* Errors found during formatting
|
||||
* @var array
|
||||
*/
|
||||
var $errors = array();
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
* @param array $options {@link $options}
|
||||
*/
|
||||
function __construct($options = array()) {
|
||||
$this->options = array_merge($this->options, $options);
|
||||
|
||||
if (isset($options['indent_str']))
|
||||
$this->indent_string = $options['indent_str'];
|
||||
|
||||
if (isset($options['linebreak_str']))
|
||||
$this->linebreak_string = $options['linebreak_str'];
|
||||
}
|
||||
|
||||
#php4 PHP4 class constructor compatibility
|
||||
#function HtmlFormatter($options = array()) {return $this->__construct($options);}
|
||||
#php4e
|
||||
|
||||
/**
|
||||
* Class magic invoke method, performs {@link format()}
|
||||
* @access private
|
||||
*/
|
||||
function __invoke(&$node) {
|
||||
return $this->format($node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Minifies HTML / removes unneeded whitespace
|
||||
* @param DomNode $root
|
||||
* @param bool $strip_comments
|
||||
* @param bool $recursive
|
||||
*/
|
||||
static function minify_html(&$root, $strip_comments = true, $recursive = true) {
|
||||
if ($strip_comments) {
|
||||
foreach($root->select(':comment', false, $recursive, true) as $c) {
|
||||
$prev = $c->getSibling(-1);
|
||||
$next = $c->getSibling(1);
|
||||
$c->delete();
|
||||
if ($prev && $next && ($prev->isText()) && ($next->isText())) {
|
||||
$prev->text .= $next->text;
|
||||
$next->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach($root->select('(!pre + !xmp + !style + !script + !"?php" + !"~text~" + !"~comment~"):not-empty > "~text~"', false, $recursive, true) as $c) {
|
||||
$c->text = preg_replace('`\s+`', ' ', $c->text);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Minifies javascript using JSMin+
|
||||
* @param DomNode $root
|
||||
* @param string $indent_string
|
||||
* @param bool $wrap_comment Wrap javascript in HTML comments (<!-- ~text~ //-->)
|
||||
* @param bool $recursive
|
||||
* @return bool|array Array of errors on failure, true on succes
|
||||
*/
|
||||
static function minify_javascript(&$root, $indent_string = ' ', $wrap_comment = true, $recursive = true) {
|
||||
#php4 JSMin+ doesn't support PHP4
|
||||
#return true;
|
||||
#php4e
|
||||
#php5
|
||||
include_once('third party/jsminplus.php');
|
||||
|
||||
$errors = array();
|
||||
foreach($root->select('script:not-empty > "~text~"', false, $recursive, true) as $c) {
|
||||
try {
|
||||
$text = $c->text;
|
||||
while ($text) {
|
||||
$text = trim($text);
|
||||
//Remove comment/CDATA tags at begin and end
|
||||
if (substr($text, 0, 4) === '<!--') {
|
||||
$text = substr($text, 5);
|
||||
continue;
|
||||
} elseif (strtolower(substr($text, 0, 9)) === '<![cdata[') {
|
||||
$text = substr($text, 10);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (($end = substr($text, -3)) && (($end === '-->') || ($end === ']]>'))) {
|
||||
$text = substr($text, 0, -3);
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (trim($text)) {
|
||||
$text = \JSMinPlus::minify($text);
|
||||
if ($wrap_comment) {
|
||||
$text = "<!--\n".$text."\n//-->";
|
||||
}
|
||||
if ($indent_string && ($wrap_comment || (strpos($text, "\n") !== false))) {
|
||||
$text = indent_text("\n".$text, $c->indent(), $indent_string);
|
||||
}
|
||||
}
|
||||
$c->text = $text;
|
||||
} catch (\Exception $e) {
|
||||
$errors[] = array($e, $c->parent->dumpLocation());
|
||||
}
|
||||
}
|
||||
|
||||
return (($errors) ? $errors : true);
|
||||
#php5e
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats HTML
|
||||
* @param DomNode $root
|
||||
* @param bool $recursive
|
||||
* @access private
|
||||
*/
|
||||
function format_html(&$root, $recursive = null) {
|
||||
if ($recursive === null) {
|
||||
$recursive = true;
|
||||
self::minify_html($root);
|
||||
} elseif (is_int($recursive)) {
|
||||
$recursive = (($recursive > 1) ? $recursive - 1 : false);
|
||||
}
|
||||
|
||||
$root_tag = strtolower($root->tag);
|
||||
$in_block = isset($this->block_elements[$root_tag]) && $this->block_elements[$root_tag]['as_block'];
|
||||
$child_count = count($root->children);
|
||||
|
||||
if (isset($this->options['attributes_case']) && $this->options['attributes_case']) {
|
||||
$root->attributes = array_change_key_case($root->attributes, $this->options['attributes_case']);
|
||||
$root->attributes_ns = null;
|
||||
}
|
||||
|
||||
if (isset($this->options['sort_attributes']) && $this->options['sort_attributes']) {
|
||||
if ($this->options['sort_attributes'] === 'reverse') {
|
||||
krsort($root->attributes);
|
||||
} else {
|
||||
ksort($root->attributes);
|
||||
}
|
||||
}
|
||||
|
||||
if ($root->select(':element', true, false, true)) {
|
||||
$root->setTag(strtolower($root->tag), true);
|
||||
if (($this->options['img_alt'] !== null) && ($root_tag === 'img') && (!isset($root->alt))) {
|
||||
$root->setAttribute('alt', $this->options['img_alt']);
|
||||
}
|
||||
}
|
||||
if ($this->options['self_close_str'] !== null) {
|
||||
$root->self_close_str = $this->options['self_close_str'];
|
||||
}
|
||||
if ($this->options['attribute_shorttag'] !== null) {
|
||||
$root->attribute_shorttag = $this->options['attribute_shorttag'];
|
||||
}
|
||||
|
||||
$prev = null;
|
||||
$n_tag = '';
|
||||
// $prev_tag = '';
|
||||
$as_block = false;
|
||||
$prev_asblock = false;
|
||||
for($i = 0; $i < $child_count; $i++) {
|
||||
$n =& $root->children[$i];
|
||||
$indent = $n->indent();
|
||||
|
||||
if (!$n->isText()) {
|
||||
$n_tag = strtolower($n->tag);
|
||||
$new_line = isset($this->block_elements[$n_tag]) && $this->block_elements[$n_tag]['new_line'];
|
||||
$as_block = isset($this->block_elements[$n_tag]) && $this->block_elements[$n_tag]['as_block'];
|
||||
$format_inside = ((!isset($this->block_elements[$n_tag])) || $this->block_elements[$n_tag]['format_inside']);
|
||||
|
||||
if ($prev && ($prev->isText()) && $prev->text && ($char = $prev->text[strlen($prev->text) - 1]) && isset($this->whitespace[$char])) {
|
||||
if ($this->whitespace[$char]) {
|
||||
$prev->text .= str_repeat($this->indent_string, $indent);
|
||||
} else {
|
||||
$prev->text = substr_replace($prev->text, $this->linebreak_string.str_repeat($this->indent_string, $indent), -1, 1);
|
||||
}
|
||||
} elseif (($new_line || $prev_asblock || ($in_block && ($i === 0)))){
|
||||
if ($prev && ($prev->isText())) {
|
||||
$prev->text .= $this->linebreak_string.str_repeat($this->indent_string, $indent);
|
||||
} else {
|
||||
$root->addText($this->linebreak_string.str_repeat($this->indent_string, $indent), $i);
|
||||
++$child_count;
|
||||
}
|
||||
}
|
||||
|
||||
if ($format_inside && count($n->children)) {
|
||||
//$last = end($n->children);
|
||||
$last = $n->children[count($n->children) - 1];
|
||||
$last_tag = ($last) ? strtolower($last->tag) : '';
|
||||
$last_asblock = ($last_tag && isset($this->block_elements[$last_tag]) && $this->block_elements[$last_tag]['as_block']);
|
||||
|
||||
if (($n->childCount(true) > 0) || (trim($n->getPlainText()))) {
|
||||
if ($last && ($last->isText()) && $last->text && ($char = $last->text[strlen($last->text) - 1]) && isset($this->whitespace[$char])) {
|
||||
if ($as_block || ($last->index() > 0) || isset($this->whitespace[$last->text[0]])) {
|
||||
if ($this->whitespace[$char]) {
|
||||
$last->text .= str_repeat($this->indent_string, $indent);
|
||||
} else {
|
||||
$last->text = substr_replace($last->text, $this->linebreak_string.str_repeat($this->indent_string, $indent), -1, 1);
|
||||
}
|
||||
}
|
||||
} elseif (($as_block || $last_asblock || ($in_block && ($i === 0))) && $last) {
|
||||
if ($last && ($last->isText())) {
|
||||
$last->text .= $this->linebreak_string.str_repeat($this->indent_string, $indent);
|
||||
} else {
|
||||
$n->addText($this->linebreak_string.str_repeat($this->indent_string, $indent));
|
||||
}
|
||||
}
|
||||
} elseif (!trim($n->getInnerText())) {
|
||||
$n->clear();
|
||||
}
|
||||
|
||||
if ($recursive) {
|
||||
$this->format_html($n, $recursive);
|
||||
}
|
||||
}
|
||||
|
||||
} elseif (trim($n->text) && ((($i - 1 < $child_count) && ($char = $n->text[0]) && isset($this->whitespace[$char])) || ($in_block && ($i === 0)))) {
|
||||
if (isset($this->whitespace[$char])) {
|
||||
if ($this->whitespace[$char]) {
|
||||
$n->text = str_repeat($this->indent_string, $indent).$n->text;
|
||||
} else {
|
||||
$n->text = substr_replace($n->text, $this->linebreak_string.str_repeat($this->indent_string, $indent), 0, 1);
|
||||
}
|
||||
} else {
|
||||
$n->text = $this->linebreak_string.str_repeat($this->indent_string, $indent).$n->text;
|
||||
}
|
||||
}
|
||||
|
||||
$prev = $n;
|
||||
// $prev_tag = $n_tag;
|
||||
$prev_asblock = $as_block;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats HTML/Javascript
|
||||
* @param DomNode $root
|
||||
* @see format_html()
|
||||
*/
|
||||
function format(&$node) {
|
||||
$this->errors = array();
|
||||
if ($this->options['minify_script']) {
|
||||
$a = self::minify_javascript($node, $this->indent_string, true, true);
|
||||
if (is_array($a)) {
|
||||
foreach($a as $error) {
|
||||
$this->errors[] = $error[0]->getMessage().' >>> '.$error[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->format_html($node);
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
/**
|
||||
* @author Niels A.D.
|
||||
* @author Todd Burry <todd@vanillaforums.com>
|
||||
* @copyright 2010 Niels A.D., 2014 Todd Burry
|
||||
* @license http://opensource.org/licenses/LGPL-2.1 LGPL-2.1
|
||||
* @package pQuery
|
||||
*/
|
||||
|
||||
namespace pagelayerQuery;
|
||||
|
||||
/**
|
||||
* Indents text
|
||||
* @param string $text
|
||||
* @param int $indent
|
||||
* @param string $indent_string
|
||||
* @return string
|
||||
*/
|
||||
function indent_text($text, $indent, $indent_string = ' ') {
|
||||
if ($indent && $indent_string) {
|
||||
return str_replace("\n", "\n".str_repeat($indent_string, $indent), $text);
|
||||
} else {
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Class used to format/minify HTML nodes
|
||||
*
|
||||
* Used like:
|
||||
* <code>
|
||||
* <?php
|
||||
* $formatter = new HtmlFormatter();
|
||||
* $formatter->format($root);
|
||||
* ?>
|
||||
* </code>
|
||||
*/
|
||||
class HtmlFormatter {
|
||||
|
||||
/**
|
||||
* Determines which elements start on a new line and which function as block
|
||||
* @var array('element' => array('new_line' => true, 'as_block' => true, 'format_inside' => true))
|
||||
*/
|
||||
var $block_elements = array(
|
||||
'p' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'h1' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'h2' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'h3' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'h4' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'h5' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'h6' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
|
||||
'form' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'fieldset' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'legend' => array('new_line' => true, 'as_block' => false, 'format_inside' => true),
|
||||
'dl' => array('new_line' => true, 'as_block' => false, 'format_inside' => true),
|
||||
'dt' => array('new_line' => true, 'as_block' => false, 'format_inside' => true),
|
||||
'dd' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'ol' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'ul' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'li' => array('new_line' => true, 'as_block' => false, 'format_inside' => true),
|
||||
|
||||
'table' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'tr' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
|
||||
'dir' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'menu' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'address' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'blockquote' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'center' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'del' => array('new_line' => true, 'as_block' => false, 'format_inside' => true),
|
||||
//'div' => array('new_line' => false, 'as_block' => true, 'format_inside' => true),
|
||||
'hr' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'ins' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'noscript' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'pre' => array('new_line' => true, 'as_block' => true, 'format_inside' => false),
|
||||
'script' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'style' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
|
||||
'html' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'head' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'body' => array('new_line' => true, 'as_block' => true, 'format_inside' => true),
|
||||
'title' => array('new_line' => true, 'as_block' => false, 'format_inside' => false)
|
||||
);
|
||||
|
||||
/**
|
||||
* Determines which characters are considered whitespace
|
||||
* @var array("\t" => true) True to recognize as new line
|
||||
*/
|
||||
var $whitespace = array(
|
||||
' ' => false,
|
||||
"\t" => false,
|
||||
"\x0B" => false,
|
||||
"\0" => false,
|
||||
"\n" => true,
|
||||
"\r" => true
|
||||
);
|
||||
|
||||
/**
|
||||
* String that is used to generate correct indenting
|
||||
* @var string
|
||||
*/
|
||||
var $indent_string = ' ';
|
||||
|
||||
/**
|
||||
* String that is used to break lines
|
||||
* @var string
|
||||
*/
|
||||
var $linebreak_string = "\n";
|
||||
|
||||
/**
|
||||
* Other formatting options
|
||||
* @var array
|
||||
*/
|
||||
public $options = array(
|
||||
'img_alt' => '',
|
||||
'self_close_str' => null,
|
||||
'attribute_shorttag' => false,
|
||||
'sort_attributes' => false,
|
||||
'attributes_case' => CASE_LOWER,
|
||||
'minify_script' => true
|
||||
);
|
||||
|
||||
/**
|
||||
* Errors found during formatting
|
||||
* @var array
|
||||
*/
|
||||
var $errors = array();
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
* @param array $options {@link $options}
|
||||
*/
|
||||
function __construct($options = array()) {
|
||||
$this->options = array_merge($this->options, $options);
|
||||
|
||||
if (isset($options['indent_str']))
|
||||
$this->indent_string = $options['indent_str'];
|
||||
|
||||
if (isset($options['linebreak_str']))
|
||||
$this->linebreak_string = $options['linebreak_str'];
|
||||
}
|
||||
|
||||
#php4 PHP4 class constructor compatibility
|
||||
#function HtmlFormatter($options = array()) {return $this->__construct($options);}
|
||||
#php4e
|
||||
|
||||
/**
|
||||
* Class magic invoke method, performs {@link format()}
|
||||
* @access private
|
||||
*/
|
||||
function __invoke(&$node) {
|
||||
return $this->format($node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Minifies HTML / removes unneeded whitespace
|
||||
* @param DomNode $root
|
||||
* @param bool $strip_comments
|
||||
* @param bool $recursive
|
||||
*/
|
||||
static function minify_html(&$root, $strip_comments = true, $recursive = true) {
|
||||
if ($strip_comments) {
|
||||
foreach($root->select(':comment', false, $recursive, true) as $c) {
|
||||
$prev = $c->getSibling(-1);
|
||||
$next = $c->getSibling(1);
|
||||
$c->delete();
|
||||
if ($prev && $next && ($prev->isText()) && ($next->isText())) {
|
||||
$prev->text .= $next->text;
|
||||
$next->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach($root->select('(!pre + !xmp + !style + !script + !"?php" + !"~text~" + !"~comment~"):not-empty > "~text~"', false, $recursive, true) as $c) {
|
||||
$c->text = preg_replace('`\s+`', ' ', $c->text);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Minifies javascript using JSMin+
|
||||
* @param DomNode $root
|
||||
* @param string $indent_string
|
||||
* @param bool $wrap_comment Wrap javascript in HTML comments (<!-- ~text~ //-->)
|
||||
* @param bool $recursive
|
||||
* @return bool|array Array of errors on failure, true on succes
|
||||
*/
|
||||
static function minify_javascript(&$root, $indent_string = ' ', $wrap_comment = true, $recursive = true) {
|
||||
#php4 JSMin+ doesn't support PHP4
|
||||
#return true;
|
||||
#php4e
|
||||
#php5
|
||||
include_once('third party/jsminplus.php');
|
||||
|
||||
$errors = array();
|
||||
foreach($root->select('script:not-empty > "~text~"', false, $recursive, true) as $c) {
|
||||
try {
|
||||
$text = $c->text;
|
||||
while ($text) {
|
||||
$text = trim($text);
|
||||
//Remove comment/CDATA tags at begin and end
|
||||
if (substr($text, 0, 4) === '<!--') {
|
||||
$text = substr($text, 5);
|
||||
continue;
|
||||
} elseif (strtolower(substr($text, 0, 9)) === '<![cdata[') {
|
||||
$text = substr($text, 10);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (($end = substr($text, -3)) && (($end === '-->') || ($end === ']]>'))) {
|
||||
$text = substr($text, 0, -3);
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (trim($text)) {
|
||||
$text = \JSMinPlus::minify($text);
|
||||
if ($wrap_comment) {
|
||||
$text = "<!--\n".$text."\n//-->";
|
||||
}
|
||||
if ($indent_string && ($wrap_comment || (strpos($text, "\n") !== false))) {
|
||||
$text = indent_text("\n".$text, $c->indent(), $indent_string);
|
||||
}
|
||||
}
|
||||
$c->text = $text;
|
||||
} catch (\Exception $e) {
|
||||
$errors[] = array($e, $c->parent->dumpLocation());
|
||||
}
|
||||
}
|
||||
|
||||
return (($errors) ? $errors : true);
|
||||
#php5e
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats HTML
|
||||
* @param DomNode $root
|
||||
* @param bool $recursive
|
||||
* @access private
|
||||
*/
|
||||
function format_html(&$root, $recursive = null) {
|
||||
if ($recursive === null) {
|
||||
$recursive = true;
|
||||
self::minify_html($root);
|
||||
} elseif (is_int($recursive)) {
|
||||
$recursive = (($recursive > 1) ? $recursive - 1 : false);
|
||||
}
|
||||
|
||||
$root_tag = strtolower($root->tag);
|
||||
$in_block = isset($this->block_elements[$root_tag]) && $this->block_elements[$root_tag]['as_block'];
|
||||
$child_count = count($root->children);
|
||||
|
||||
if (isset($this->options['attributes_case']) && $this->options['attributes_case']) {
|
||||
$root->attributes = array_change_key_case($root->attributes, $this->options['attributes_case']);
|
||||
$root->attributes_ns = null;
|
||||
}
|
||||
|
||||
if (isset($this->options['sort_attributes']) && $this->options['sort_attributes']) {
|
||||
if ($this->options['sort_attributes'] === 'reverse') {
|
||||
krsort($root->attributes);
|
||||
} else {
|
||||
ksort($root->attributes);
|
||||
}
|
||||
}
|
||||
|
||||
if ($root->select(':element', true, false, true)) {
|
||||
$root->setTag(strtolower($root->tag), true);
|
||||
if (($this->options['img_alt'] !== null) && ($root_tag === 'img') && (!isset($root->alt))) {
|
||||
$root->setAttribute('alt', $this->options['img_alt']);
|
||||
}
|
||||
}
|
||||
if ($this->options['self_close_str'] !== null) {
|
||||
$root->self_close_str = $this->options['self_close_str'];
|
||||
}
|
||||
if ($this->options['attribute_shorttag'] !== null) {
|
||||
$root->attribute_shorttag = $this->options['attribute_shorttag'];
|
||||
}
|
||||
|
||||
$prev = null;
|
||||
$n_tag = '';
|
||||
// $prev_tag = '';
|
||||
$as_block = false;
|
||||
$prev_asblock = false;
|
||||
for($i = 0; $i < $child_count; $i++) {
|
||||
$n =& $root->children[$i];
|
||||
$indent = $n->indent();
|
||||
|
||||
if (!$n->isText()) {
|
||||
$n_tag = strtolower($n->tag);
|
||||
$new_line = isset($this->block_elements[$n_tag]) && $this->block_elements[$n_tag]['new_line'];
|
||||
$as_block = isset($this->block_elements[$n_tag]) && $this->block_elements[$n_tag]['as_block'];
|
||||
$format_inside = ((!isset($this->block_elements[$n_tag])) || $this->block_elements[$n_tag]['format_inside']);
|
||||
|
||||
if ($prev && ($prev->isText()) && $prev->text && ($char = $prev->text[strlen($prev->text) - 1]) && isset($this->whitespace[$char])) {
|
||||
if ($this->whitespace[$char]) {
|
||||
$prev->text .= str_repeat($this->indent_string, $indent);
|
||||
} else {
|
||||
$prev->text = substr_replace($prev->text, $this->linebreak_string.str_repeat($this->indent_string, $indent), -1, 1);
|
||||
}
|
||||
} elseif (($new_line || $prev_asblock || ($in_block && ($i === 0)))){
|
||||
if ($prev && ($prev->isText())) {
|
||||
$prev->text .= $this->linebreak_string.str_repeat($this->indent_string, $indent);
|
||||
} else {
|
||||
$root->addText($this->linebreak_string.str_repeat($this->indent_string, $indent), $i);
|
||||
++$child_count;
|
||||
}
|
||||
}
|
||||
|
||||
if ($format_inside && count($n->children)) {
|
||||
//$last = end($n->children);
|
||||
$last = $n->children[count($n->children) - 1];
|
||||
$last_tag = ($last) ? strtolower($last->tag) : '';
|
||||
$last_asblock = ($last_tag && isset($this->block_elements[$last_tag]) && $this->block_elements[$last_tag]['as_block']);
|
||||
|
||||
if (($n->childCount(true) > 0) || (trim($n->getPlainText()))) {
|
||||
if ($last && ($last->isText()) && $last->text && ($char = $last->text[strlen($last->text) - 1]) && isset($this->whitespace[$char])) {
|
||||
if ($as_block || ($last->index() > 0) || isset($this->whitespace[$last->text[0]])) {
|
||||
if ($this->whitespace[$char]) {
|
||||
$last->text .= str_repeat($this->indent_string, $indent);
|
||||
} else {
|
||||
$last->text = substr_replace($last->text, $this->linebreak_string.str_repeat($this->indent_string, $indent), -1, 1);
|
||||
}
|
||||
}
|
||||
} elseif (($as_block || $last_asblock || ($in_block && ($i === 0))) && $last) {
|
||||
if ($last && ($last->isText())) {
|
||||
$last->text .= $this->linebreak_string.str_repeat($this->indent_string, $indent);
|
||||
} else {
|
||||
$n->addText($this->linebreak_string.str_repeat($this->indent_string, $indent));
|
||||
}
|
||||
}
|
||||
} elseif (!trim($n->getInnerText())) {
|
||||
$n->clear();
|
||||
}
|
||||
|
||||
if ($recursive) {
|
||||
$this->format_html($n, $recursive);
|
||||
}
|
||||
}
|
||||
|
||||
} elseif (trim($n->text) && ((($i - 1 < $child_count) && ($char = $n->text[0]) && isset($this->whitespace[$char])) || ($in_block && ($i === 0)))) {
|
||||
if (isset($this->whitespace[$char])) {
|
||||
if ($this->whitespace[$char]) {
|
||||
$n->text = str_repeat($this->indent_string, $indent).$n->text;
|
||||
} else {
|
||||
$n->text = substr_replace($n->text, $this->linebreak_string.str_repeat($this->indent_string, $indent), 0, 1);
|
||||
}
|
||||
} else {
|
||||
$n->text = $this->linebreak_string.str_repeat($this->indent_string, $indent).$n->text;
|
||||
}
|
||||
}
|
||||
|
||||
$prev = $n;
|
||||
// $prev_tag = $n_tag;
|
||||
$prev_asblock = $as_block;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats HTML/Javascript
|
||||
* @param DomNode $root
|
||||
* @see format_html()
|
||||
*/
|
||||
function format(&$node) {
|
||||
$this->errors = array();
|
||||
if ($this->options['minify_script']) {
|
||||
$a = self::minify_javascript($node, $this->indent_string, true, true);
|
||||
if (is_array($a)) {
|
||||
foreach($a as $error) {
|
||||
$this->errors[] = $error[0]->getMessage().' >>> '.$error[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->format_html($node);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,101 +1,101 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Niels A.D.
|
||||
* @author Todd Burry <todd@vanillaforums.com>
|
||||
* @copyright 2010 Niels A.D., 2014 Todd Burry
|
||||
* @license http://opensource.org/licenses/LGPL-2.1 LGPL-2.1
|
||||
* @package pQuery
|
||||
*/
|
||||
|
||||
namespace pagelayerQuery;
|
||||
|
||||
/**
|
||||
* Converts a XML document to an array
|
||||
*/
|
||||
class XML2ArrayParser extends HtmlParserBase {
|
||||
|
||||
/**
|
||||
* Holds the document structure
|
||||
* @var array array('name' => 'tag', 'attrs' => array('attr' => 'val'), 'childen' => array())
|
||||
*/
|
||||
var $root = array(
|
||||
'name' => '',
|
||||
'attrs' => array(),
|
||||
'children' => array()
|
||||
);
|
||||
|
||||
/**
|
||||
* Current parsing hierarchy
|
||||
* @var array
|
||||
* @access private
|
||||
*/
|
||||
var $hierarchy = array();
|
||||
|
||||
protected function parse_hierarchy($self_close) {
|
||||
if ($this->status['closing_tag']) {
|
||||
$found = false;
|
||||
for ($count = count($this->hierarchy), $i = $count - 1; $i >= 0; $i--) {
|
||||
if (strcasecmp($this->hierarchy[$i]['name'], $this->status['tag_name']) === 0) {
|
||||
|
||||
for($ii = ($count - $i - 1); $ii >= 0; $ii--) {
|
||||
$e = array_pop($this->hierarchy);
|
||||
if ($ii > 0) {
|
||||
$this->addError('Closing tag "'.$this->status['tag_name'].'" while "'.$e['name'].'" is not closed yet');
|
||||
}
|
||||
}
|
||||
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$found) {
|
||||
$this->addError('Closing tag "'.$this->status['tag_name'].'" which is not open');
|
||||
}
|
||||
} else {
|
||||
$tag = array(
|
||||
'name' => $this->status['tag_name'],
|
||||
'attrs' => $this->status['attributes'],
|
||||
'children' => array()
|
||||
);
|
||||
if ($this->hierarchy) {
|
||||
$current =& $this->hierarchy[count($this->hierarchy) - 1];
|
||||
$current['children'][] = $tag;
|
||||
$tag =& $current['children'][count($current['children']) - 1];
|
||||
unset($current['tagData']);
|
||||
} else {
|
||||
$this->root = $tag;
|
||||
$tag =& $this->root;
|
||||
$self_close = false;
|
||||
}
|
||||
if (!$self_close) {
|
||||
$this->hierarchy[] =& $tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function parse_tag_default() {
|
||||
if (!parent::parse_tag_default()) {return false;}
|
||||
|
||||
if ($this->status['tag_name'][0] !== '?') {
|
||||
$this->parse_hierarchy(($this->status['self_close']) ? true : null);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function parse_text() {
|
||||
parent::parse_text();
|
||||
if (($this->status['text'] !== '') && $this->hierarchy) {
|
||||
$current =& $this->hierarchy[count($this->hierarchy) - 1];
|
||||
if (!$current['children']) {
|
||||
$current['tagData'] = $this->status['text'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function parse_all() {
|
||||
return ((parent::parse_all()) ? $this->root : false);
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
/**
|
||||
* @author Niels A.D.
|
||||
* @author Todd Burry <todd@vanillaforums.com>
|
||||
* @copyright 2010 Niels A.D., 2014 Todd Burry
|
||||
* @license http://opensource.org/licenses/LGPL-2.1 LGPL-2.1
|
||||
* @package pQuery
|
||||
*/
|
||||
|
||||
namespace pagelayerQuery;
|
||||
|
||||
/**
|
||||
* Converts a XML document to an array
|
||||
*/
|
||||
class XML2ArrayParser extends HtmlParserBase {
|
||||
|
||||
/**
|
||||
* Holds the document structure
|
||||
* @var array array('name' => 'tag', 'attrs' => array('attr' => 'val'), 'childen' => array())
|
||||
*/
|
||||
var $root = array(
|
||||
'name' => '',
|
||||
'attrs' => array(),
|
||||
'children' => array()
|
||||
);
|
||||
|
||||
/**
|
||||
* Current parsing hierarchy
|
||||
* @var array
|
||||
* @access private
|
||||
*/
|
||||
var $hierarchy = array();
|
||||
|
||||
protected function parse_hierarchy($self_close) {
|
||||
if ($this->status['closing_tag']) {
|
||||
$found = false;
|
||||
for ($count = count($this->hierarchy), $i = $count - 1; $i >= 0; $i--) {
|
||||
if (strcasecmp($this->hierarchy[$i]['name'], $this->status['tag_name']) === 0) {
|
||||
|
||||
for($ii = ($count - $i - 1); $ii >= 0; $ii--) {
|
||||
$e = array_pop($this->hierarchy);
|
||||
if ($ii > 0) {
|
||||
$this->addError('Closing tag "'.$this->status['tag_name'].'" while "'.$e['name'].'" is not closed yet');
|
||||
}
|
||||
}
|
||||
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$found) {
|
||||
$this->addError('Closing tag "'.$this->status['tag_name'].'" which is not open');
|
||||
}
|
||||
} else {
|
||||
$tag = array(
|
||||
'name' => $this->status['tag_name'],
|
||||
'attrs' => $this->status['attributes'],
|
||||
'children' => array()
|
||||
);
|
||||
if ($this->hierarchy) {
|
||||
$current =& $this->hierarchy[count($this->hierarchy) - 1];
|
||||
$current['children'][] = $tag;
|
||||
$tag =& $current['children'][count($current['children']) - 1];
|
||||
unset($current['tagData']);
|
||||
} else {
|
||||
$this->root = $tag;
|
||||
$tag =& $this->root;
|
||||
$self_close = false;
|
||||
}
|
||||
if (!$self_close) {
|
||||
$this->hierarchy[] =& $tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function parse_tag_default() {
|
||||
if (!parent::parse_tag_default()) {return false;}
|
||||
|
||||
if ($this->status['tag_name'][0] !== '?') {
|
||||
$this->parse_hierarchy(($this->status['self_close']) ? true : null);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function parse_text() {
|
||||
parent::parse_text();
|
||||
if (($this->status['text'] !== '') && $this->hierarchy) {
|
||||
$current =& $this->hierarchy[count($this->hierarchy) - 1];
|
||||
if (!$current['children']) {
|
||||
$current['tagData'] = $this->status['text'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function parse_all() {
|
||||
return ((parent::parse_all()) ? $this->root : false);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,101 +1,101 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Niels A.D.
|
||||
* @author Todd Burry <todd@vanillaforums.com>
|
||||
* @copyright 2010 Niels A.D., 2014 Todd Burry
|
||||
* @license http://opensource.org/licenses/LGPL-2.1 LGPL-2.1
|
||||
* @package pQuery
|
||||
*/
|
||||
|
||||
use pagelayerQuery\Html5Parser;
|
||||
use pagelayerQuery\HtmlFormatter;
|
||||
|
||||
/**
|
||||
* Returns HTML DOM from string
|
||||
* @param string $str
|
||||
* @param bool $return_root Return root node or return parser object
|
||||
* @return Html5Parser|DomNode
|
||||
*/
|
||||
function str_get_dom($str, $return_root = true) {
|
||||
$a = new Html5Parser($str);
|
||||
return (($return_root) ? $a->root : $a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns HTML DOM from file/website
|
||||
* @param string $str
|
||||
* @param bool $return_root Return root node or return parser object
|
||||
* @param bool $use_include_path Use include path search in file_get_contents
|
||||
* @param resource $context Context resource used in file_get_contents (PHP >= 5.0.0)
|
||||
* @return Html5Parser|DomNode
|
||||
*/
|
||||
function file_get_dom($file, $return_root = true, $use_include_path = false, $context = null) {
|
||||
if (version_compare(PHP_VERSION, '5.0.0', '>='))
|
||||
$f = file_get_contents($file, $use_include_path, $context);
|
||||
else {
|
||||
if ($context !== null)
|
||||
trigger_error('Context parameter not supported in this PHP version');
|
||||
$f = file_get_contents($file, $use_include_path);
|
||||
}
|
||||
|
||||
return (($f === false) ? false : str_get_dom($f, $return_root));
|
||||
}
|
||||
|
||||
/**
|
||||
* Format/beautify DOM
|
||||
* @param DomNode $root
|
||||
* @param array $options Extra formatting options {@link Formatter::$options}
|
||||
* @return bool
|
||||
*/
|
||||
function dom_format(&$root, $options = array()) {
|
||||
$formatter = new HtmlFormatter($options);
|
||||
return $formatter->format($root);
|
||||
}
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.0.0', '<')) {
|
||||
/**
|
||||
* PHP alternative to str_split, for backwards compatibility
|
||||
* @param string $string
|
||||
* @return string
|
||||
*/
|
||||
function str_split($string) {
|
||||
$res = array();
|
||||
$size = strlen($string);
|
||||
for ($i = 0; $i < $size; $i++) {
|
||||
$res[] = $string[$i];
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.2.0', '<')) {
|
||||
/**
|
||||
* PHP alternative to array_fill_keys, for backwards compatibility
|
||||
* @param array $keys
|
||||
* @param mixed $value
|
||||
* @return array
|
||||
*/
|
||||
function array_fill_keys($keys, $value) {
|
||||
$res = array();
|
||||
foreach($keys as $k) {
|
||||
$res[$k] = $value;
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
|
||||
#!! <- Ignore when converting to single file
|
||||
if (!defined('GANON_NO_INCLUDES')) {
|
||||
define('GANON_NO_INCLUDES', true);
|
||||
include_once('IQuery.php');
|
||||
include_once('gan_tokenizer.php');
|
||||
include_once('gan_parser_html.php');
|
||||
include_once('gan_node_html.php');
|
||||
include_once('gan_selector_html.php');
|
||||
include_once('gan_formatter.php');
|
||||
}
|
||||
#!
|
||||
|
||||
<?php
|
||||
/**
|
||||
* @author Niels A.D.
|
||||
* @author Todd Burry <todd@vanillaforums.com>
|
||||
* @copyright 2010 Niels A.D., 2014 Todd Burry
|
||||
* @license http://opensource.org/licenses/LGPL-2.1 LGPL-2.1
|
||||
* @package pQuery
|
||||
*/
|
||||
|
||||
use pagelayerQuery\Html5Parser;
|
||||
use pagelayerQuery\HtmlFormatter;
|
||||
|
||||
/**
|
||||
* Returns HTML DOM from string
|
||||
* @param string $str
|
||||
* @param bool $return_root Return root node or return parser object
|
||||
* @return Html5Parser|DomNode
|
||||
*/
|
||||
function str_get_dom($str, $return_root = true) {
|
||||
$a = new Html5Parser($str);
|
||||
return (($return_root) ? $a->root : $a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns HTML DOM from file/website
|
||||
* @param string $str
|
||||
* @param bool $return_root Return root node or return parser object
|
||||
* @param bool $use_include_path Use include path search in file_get_contents
|
||||
* @param resource $context Context resource used in file_get_contents (PHP >= 5.0.0)
|
||||
* @return Html5Parser|DomNode
|
||||
*/
|
||||
function file_get_dom($file, $return_root = true, $use_include_path = false, $context = null) {
|
||||
if (version_compare(PHP_VERSION, '5.0.0', '>='))
|
||||
$f = file_get_contents($file, $use_include_path, $context);
|
||||
else {
|
||||
if ($context !== null)
|
||||
trigger_error('Context parameter not supported in this PHP version');
|
||||
$f = file_get_contents($file, $use_include_path);
|
||||
}
|
||||
|
||||
return (($f === false) ? false : str_get_dom($f, $return_root));
|
||||
}
|
||||
|
||||
/**
|
||||
* Format/beautify DOM
|
||||
* @param DomNode $root
|
||||
* @param array $options Extra formatting options {@link Formatter::$options}
|
||||
* @return bool
|
||||
*/
|
||||
function dom_format(&$root, $options = array()) {
|
||||
$formatter = new HtmlFormatter($options);
|
||||
return $formatter->format($root);
|
||||
}
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.0.0', '<')) {
|
||||
/**
|
||||
* PHP alternative to str_split, for backwards compatibility
|
||||
* @param string $string
|
||||
* @return string
|
||||
*/
|
||||
function str_split($string) {
|
||||
$res = array();
|
||||
$size = strlen($string);
|
||||
for ($i = 0; $i < $size; $i++) {
|
||||
$res[] = $string[$i];
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.2.0', '<')) {
|
||||
/**
|
||||
* PHP alternative to array_fill_keys, for backwards compatibility
|
||||
* @param array $keys
|
||||
* @param mixed $value
|
||||
* @return array
|
||||
*/
|
||||
function array_fill_keys($keys, $value) {
|
||||
$res = array();
|
||||
foreach($keys as $k) {
|
||||
$res[$k] = $value;
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
|
||||
#!! <- Ignore when converting to single file
|
||||
if (!defined('GANON_NO_INCLUDES')) {
|
||||
define('GANON_NO_INCLUDES', true);
|
||||
include_once('IQuery.php');
|
||||
include_once('gan_tokenizer.php');
|
||||
include_once('gan_parser_html.php');
|
||||
include_once('gan_node_html.php');
|
||||
include_once('gan_selector_html.php');
|
||||
include_once('gan_formatter.php');
|
||||
}
|
||||
#!
|
||||
|
||||
?>
|
||||
@@ -1,281 +1,281 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Niels A.D.
|
||||
* @author Todd Burry <todd@vanillaforums.com>
|
||||
* @copyright 2010 Niels A.D., 2014 Todd Burry
|
||||
* @license http://opensource.org/licenses/LGPL-2.1 LGPL-2.1
|
||||
* @package pQuery
|
||||
*/
|
||||
|
||||
use pagelayerQuery\IQuery;
|
||||
|
||||
/**
|
||||
* A jQuery-like object for php.
|
||||
*/
|
||||
class pagelayerQuery implements ArrayAccess, IteratorAggregate, IQuery {
|
||||
/// Properties ///
|
||||
|
||||
/**
|
||||
* @var IQuery[]
|
||||
*/
|
||||
protected $nodes = array();
|
||||
|
||||
/// Methods ///
|
||||
|
||||
public function __construct($nodes = array()) {
|
||||
$this->nodes = $nodes;
|
||||
}
|
||||
|
||||
public function addClass($classname) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->addClass($classname);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function after($content) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->after($content);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function append($content) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->append($content);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function attr($name, $value = null) {
|
||||
if (empty($this->nodes) && $value === null)
|
||||
return '';
|
||||
|
||||
foreach ($this->nodes as $node) {
|
||||
if ($value === null)
|
||||
return $node->attr($name);
|
||||
$value = str_replace('<', '<', $value);
|
||||
$value = str_replace('>', '>', $value);
|
||||
$node->attr($name, $value);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function before($content) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->before($content);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function clear() {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->clear();
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the count of matched elements.
|
||||
*
|
||||
* @return int Returns the count of matched elements.
|
||||
*/
|
||||
public function count() {
|
||||
return count($this->nodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Format/beautify a DOM.
|
||||
*
|
||||
* @param pagelayerQuery\DomNode $dom The dom to format.
|
||||
* @param array $options Extra formatting options. See {@link pagelayerQuery\HtmlFormatter::$options}.
|
||||
* @return bool Returns `true` on sucess and `false` on failure.
|
||||
*/
|
||||
// public static function format($dom, $options = array()) {
|
||||
// $formatter = new pagelayerQuery\HtmlFormatter($options);
|
||||
// return $formatter->format($dom);
|
||||
// }
|
||||
|
||||
public function getIterator() {
|
||||
return new ArrayIterator($this->nodes);
|
||||
}
|
||||
|
||||
public function hasClass($classname) {
|
||||
foreach ($this->nodes as $node) {
|
||||
if ($node->hasClass($classname))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function html($value = null) {
|
||||
if (empty($this->nodes) && $value === null)
|
||||
return '';
|
||||
|
||||
foreach ($this->nodes as $node) {
|
||||
if ($value === null)
|
||||
return $node->html();
|
||||
$node->html($value);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function offsetExists($offset) {
|
||||
return isset($this->nodes[$offset]);
|
||||
}
|
||||
|
||||
public function offsetGet($offset) {
|
||||
return isset($this->nodes[$offset]) ? $this->nodes[$offset] : null;
|
||||
}
|
||||
|
||||
public function offsetSet($offset, $value) {
|
||||
|
||||
if (is_null($offset) || !isset($this->nodes[$offset])) {
|
||||
throw new \BadMethodCallException("You are not allowed to add new nodes to the pQuery object.");
|
||||
} else {
|
||||
$this->nodes[$offset]->replaceWith($value);
|
||||
}
|
||||
}
|
||||
|
||||
public function offsetUnset($offset) {
|
||||
if (isset($this->nodes[$offset])) {
|
||||
$this->nodes[$offset]->remove();
|
||||
unset($this->nodes[$offset]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Query a file or url.
|
||||
*
|
||||
* @param string $path The path to the url.
|
||||
* @param resource $context A context suitable to be passed into {@link file_get_contents}
|
||||
* @return pagelayerQuery\DomNode Returns the root dom node for the html file.
|
||||
*/
|
||||
public static function parseFile($path, $context = null) {
|
||||
$html_str = file_get_contents($path, false, $context);
|
||||
return static::parseStr($html_str);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query a string of html.
|
||||
*
|
||||
* @param string $html
|
||||
* @return pagelayerQuery\DomNode Returns the root dom node for the html string.
|
||||
*/
|
||||
public static function parseStr($html) {
|
||||
$parser = new pagelayerQuery\Html5Parser($html);
|
||||
return $parser->root;
|
||||
}
|
||||
|
||||
public function prepend($content = null) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->prepend($content);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function prop($name, $value = null) {
|
||||
if (empty($this->nodes) && $value === null)
|
||||
return '';
|
||||
|
||||
foreach ($this->nodes as $node) {
|
||||
if ($value === null)
|
||||
return $node->prop($name);
|
||||
$node->prop($name, $value);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function remove($selector = null) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->remove($selector);
|
||||
}
|
||||
if ($selector === null)
|
||||
$this->nodes = array();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeAttr($name) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->removeAttr($name);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeClass($classname) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->removeClass($classname);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function replaceWith($content) {
|
||||
foreach ($this->nodes as &$node) {
|
||||
$node = $node->replaceWith($content);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function tagName($value = null) {
|
||||
foreach ($this->nodes as $node) {
|
||||
if ($value === null)
|
||||
return $node->tagName();
|
||||
$node->tagName($value);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function text($value = null) {
|
||||
if (empty($this->nodes) && $value === null)
|
||||
return '';
|
||||
|
||||
foreach ($this->nodes as $node) {
|
||||
if ($value === null)
|
||||
return $node->text();
|
||||
$node->text($value);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function toggleClass($classname, $switch = null) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->toggleClass($classname, $switch);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function unwrap() {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->unwrap();
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function val($value = null) {
|
||||
if (empty($this->nodes) && $value === null)
|
||||
return '';
|
||||
|
||||
foreach ($this->nodes as $node) {
|
||||
if ($value === null)
|
||||
return $node->val();
|
||||
$node->val($value);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function wrap($wrapping_element) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->wrap($wrapping_element);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function wrapInner($wrapping_element) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->wrapInner($wrapping_element);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* @author Niels A.D.
|
||||
* @author Todd Burry <todd@vanillaforums.com>
|
||||
* @copyright 2010 Niels A.D., 2014 Todd Burry
|
||||
* @license http://opensource.org/licenses/LGPL-2.1 LGPL-2.1
|
||||
* @package pQuery
|
||||
*/
|
||||
|
||||
use pagelayerQuery\IQuery;
|
||||
|
||||
/**
|
||||
* A jQuery-like object for php.
|
||||
*/
|
||||
class pagelayerQuery implements ArrayAccess, IteratorAggregate, IQuery {
|
||||
/// Properties ///
|
||||
|
||||
/**
|
||||
* @var IQuery[]
|
||||
*/
|
||||
protected $nodes = array();
|
||||
|
||||
/// Methods ///
|
||||
|
||||
public function __construct($nodes = array()) {
|
||||
$this->nodes = $nodes;
|
||||
}
|
||||
|
||||
public function addClass($classname) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->addClass($classname);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function after($content) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->after($content);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function append($content) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->append($content);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function attr($name, $value = null) {
|
||||
if (empty($this->nodes) && $value === null)
|
||||
return '';
|
||||
|
||||
foreach ($this->nodes as $node) {
|
||||
if ($value === null)
|
||||
return $node->attr($name);
|
||||
$value = str_replace('<', '<', $value);
|
||||
$value = str_replace('>', '>', $value);
|
||||
$node->attr($name, $value);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function before($content) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->before($content);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function clear() {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->clear();
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the count of matched elements.
|
||||
*
|
||||
* @return int Returns the count of matched elements.
|
||||
*/
|
||||
public function count() {
|
||||
return count($this->nodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Format/beautify a DOM.
|
||||
*
|
||||
* @param pagelayerQuery\DomNode $dom The dom to format.
|
||||
* @param array $options Extra formatting options. See {@link pagelayerQuery\HtmlFormatter::$options}.
|
||||
* @return bool Returns `true` on sucess and `false` on failure.
|
||||
*/
|
||||
// public static function format($dom, $options = array()) {
|
||||
// $formatter = new pagelayerQuery\HtmlFormatter($options);
|
||||
// return $formatter->format($dom);
|
||||
// }
|
||||
|
||||
public function getIterator() {
|
||||
return new ArrayIterator($this->nodes);
|
||||
}
|
||||
|
||||
public function hasClass($classname) {
|
||||
foreach ($this->nodes as $node) {
|
||||
if ($node->hasClass($classname))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function html($value = null) {
|
||||
if (empty($this->nodes) && $value === null)
|
||||
return '';
|
||||
|
||||
foreach ($this->nodes as $node) {
|
||||
if ($value === null)
|
||||
return $node->html();
|
||||
$node->html($value);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function offsetExists($offset) {
|
||||
return isset($this->nodes[$offset]);
|
||||
}
|
||||
|
||||
public function offsetGet($offset) {
|
||||
return isset($this->nodes[$offset]) ? $this->nodes[$offset] : null;
|
||||
}
|
||||
|
||||
public function offsetSet($offset, $value) {
|
||||
|
||||
if (is_null($offset) || !isset($this->nodes[$offset])) {
|
||||
throw new \BadMethodCallException("You are not allowed to add new nodes to the pQuery object.");
|
||||
} else {
|
||||
$this->nodes[$offset]->replaceWith($value);
|
||||
}
|
||||
}
|
||||
|
||||
public function offsetUnset($offset) {
|
||||
if (isset($this->nodes[$offset])) {
|
||||
$this->nodes[$offset]->remove();
|
||||
unset($this->nodes[$offset]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Query a file or url.
|
||||
*
|
||||
* @param string $path The path to the url.
|
||||
* @param resource $context A context suitable to be passed into {@link file_get_contents}
|
||||
* @return pagelayerQuery\DomNode Returns the root dom node for the html file.
|
||||
*/
|
||||
public static function parseFile($path, $context = null) {
|
||||
$html_str = file_get_contents($path, false, $context);
|
||||
return static::parseStr($html_str);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query a string of html.
|
||||
*
|
||||
* @param string $html
|
||||
* @return pagelayerQuery\DomNode Returns the root dom node for the html string.
|
||||
*/
|
||||
public static function parseStr($html) {
|
||||
$parser = new pagelayerQuery\Html5Parser($html);
|
||||
return $parser->root;
|
||||
}
|
||||
|
||||
public function prepend($content = null) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->prepend($content);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function prop($name, $value = null) {
|
||||
if (empty($this->nodes) && $value === null)
|
||||
return '';
|
||||
|
||||
foreach ($this->nodes as $node) {
|
||||
if ($value === null)
|
||||
return $node->prop($name);
|
||||
$node->prop($name, $value);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function remove($selector = null) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->remove($selector);
|
||||
}
|
||||
if ($selector === null)
|
||||
$this->nodes = array();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeAttr($name) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->removeAttr($name);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeClass($classname) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->removeClass($classname);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function replaceWith($content) {
|
||||
foreach ($this->nodes as &$node) {
|
||||
$node = $node->replaceWith($content);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function tagName($value = null) {
|
||||
foreach ($this->nodes as $node) {
|
||||
if ($value === null)
|
||||
return $node->tagName();
|
||||
$node->tagName($value);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function text($value = null) {
|
||||
if (empty($this->nodes) && $value === null)
|
||||
return '';
|
||||
|
||||
foreach ($this->nodes as $node) {
|
||||
if ($value === null)
|
||||
return $node->text();
|
||||
$node->text($value);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function toggleClass($classname, $switch = null) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->toggleClass($classname, $switch);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function unwrap() {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->unwrap();
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function val($value = null) {
|
||||
if (empty($this->nodes) && $value === null)
|
||||
return '';
|
||||
|
||||
foreach ($this->nodes as $node) {
|
||||
if ($value === null)
|
||||
return $node->val();
|
||||
$node->val($value);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function wrap($wrapping_element) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->wrap($wrapping_element);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function wrapInner($wrapping_element) {
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->wrapInner($wrapping_element);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||