晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/stando/www/wp-content/plugins/js_composer/include/templates/shortcodes/ |
Upload File : |
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $title
* @var $el_class
* @var $el_id
* @var $type
* @var $style
* @var $legend
* @var $animation
* @var $tooltips
* @var $x_values
* @var $values
* @var $css
* @var $css_animation
* Shortcode class
* @var WPBakeryShortCode_Vc_Line_Chart $this
*/
$el_class = $el_id = $title = $type = $legend = $style = $tooltips = $animation = $x_values = $values = $css = $css_animation = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$base_colors = array(
'normal' => array(
'blue' => '#5472d2',
'turquoise' => '#00c1cf',
'pink' => '#fe6c61',
'violet' => '#8d6dc4',
'peacoc' => '#4cadc9',
'chino' => '#cec2ab',
'mulled-wine' => '#50485b',
'vista-blue' => '#75d69c',
'orange' => '#f7be68',
'sky' => '#5aa1e3',
'green' => '#6dab3c',
'juicy-pink' => '#f4524d',
'sandy-brown' => '#f79468',
'purple' => '#b97ebb',
'black' => '#2a2a2a',
'grey' => '#ebebeb',
'white' => '#ffffff',
'default' => '#f7f7f7',
'primary' => '#0088cc',
'info' => '#58b9da',
'success' => '#6ab165',
'warning' => '#ff9900',
'danger' => '#ff675b',
'inverse' => '#555555',
),
'active' => array(
'blue' => '#3c5ecc',
'turquoise' => '#00a4b0',
'pink' => '#fe5043',
'violet' => '#7c57bb',
'peacoc' => '#39a0bd',
'chino' => '#c3b498',
'mulled-wine' => '#413a4a',
'vista-blue' => '#5dcf8b',
'orange' => '#f5b14b',
'sky' => '#4092df',
'green' => '#5f9434',
'juicy-pink' => '#f23630',
'sandy-brown' => '#f57f4b',
'purple' => '#ae6ab0',
'black' => '#1b1b1b',
'grey' => '#dcdcdc',
'white' => '#f0f0f0',
'default' => '#e8e8e8',
'primary' => '#0074ad',
'info' => '#3fafd4',
'success' => '#59a453',
'warning' => '#e08700',
'danger' => '#ff4b3c',
'inverse' => '#464646',
),
);
$colors = array(
'flat' => array(
'normal' => $base_colors['normal'],
'active' => $base_colors['active'],
),
);
foreach ( $base_colors['normal'] as $name => $color ) {
$colors['modern']['normal'][ $name ] = array( vc_colorCreator( $color, 7 ), $color );
}
foreach ( $base_colors['active'] as $name => $color ) {
$colors['modern']['active'][ $name ] = array( vc_colorCreator( $color, 7 ), $color );
}
wp_enqueue_script( 'vc_line_chart' );
$class_to_filter = 'vc_chart vc_line-chart wpb_content_element';
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
$options = array();
if ( ! empty( $legend ) ) {
$options[] = 'data-vc-legend="1"';
}
if ( ! empty( $tooltips ) ) {
$options[] = 'data-vc-tooltips="1"';
}
if ( ! empty( $animation ) ) {
$options[] = 'data-vc-animation="' . esc_attr( str_replace( 'easein', 'easeIn', $animation ) ) . '"';
}
$values = (array) vc_param_group_parse_atts( $values );
$data = array(
'labels' => explode( ';', trim( $x_values, ';' ) ),
'datasets' => array(),
);
foreach ( $values as $k => $v ) {
if ( 'custom' === $style ) {
if ( ! empty( $v['custom_color'] ) ) {
$color = $v['custom_color'];
$highlight = vc_colorCreator( $v['custom_color'], - 10 ); // 10% darker
} else {
$color = 'grey';
$highlight = 'grey';
}
} else {
$color = isset( $colors[ $style ]['normal'][ $v['color'] ] ) ? $colors[ $style ]['normal'][ $v['color'] ] : $v['normal']['color'];
$highlight = isset( $colors[ $style ]['active'][ $v['color'] ] ) ? $colors[ $style ]['active'][ $v['color'] ] : $v['active']['color'];
}
// don't use gradients for lines
if ( 'line' === $type ) {
$color = is_array( $color ) ? end( $color ) : $color;
$highlight = is_array( $highlight ) ? end( $highlight ) : $highlight;
$rgb = vc_hex2rgb( $color );
$fill_color = 'rgba(' . $rgb[0] . ', ' . $rgb[1] . ', ' . $rgb[2] . ', 0.1)';
} else {
$fill_color = $color;
}
if ( 'modern' === $style ) {
$stroke_color = vc_colorCreator( is_array( $color ) ? end( $color ) : $color, - 7 );
$highlight_stroke_color = vc_colorCreator( $stroke_color, - 7 );
} else {
$stroke_color = $color;
$highlight_stroke_color = $highlight;
}
$data['datasets'][] = array(
'label' => isset( $v['title'] ) ? $v['title'] : '',
'fillColor' => $fill_color,
'strokeColor' => $stroke_color,
'pointColor' => $color,
'pointStrokeColor' => $color,
'highlightFill' => $highlight,
'highlightStroke' => $highlight_stroke_color,
'pointHighlightFill' => $highlight_stroke_color,
'pointHighlightStroke' => $highlight_stroke_color,
'data' => explode( ';', isset( $v['y_values'] ) ? trim( $v['y_values'], ';' ) : '' ),
);
}
$options[] = 'data-vc-type="' . esc_attr( $type ) . '"';
$options[] = 'data-vc-values="' . htmlentities( wp_json_encode( $data ) ) . '"';
if ( '' !== $title ) {
$title = '<h2 class="wpb_heading">' . $title . '</h4>';
}
$canvas_html = '<canvas class="vc_line-chart-canvas" width="1" height="1"></canvas>';
$legend_html = '';
if ( $legend ) {
foreach ( $data['datasets'] as $v ) {
$color = is_array( $v['pointColor'] ) ? current( $v['pointColor'] ) : $v['pointColor'];
$legend_html .= '<li><span style="background-color:' . $color . '"></span>' . $v['label'] . '</li>';
}
$legend_html = '<ul class="vc_chart-legend">' . $legend_html . '</ul>';
$canvas_html = '<div class="vc_chart-with-legend">' . $canvas_html . '</div>';
}
if ( ! empty( $el_id ) ) {
$options[] = 'id="' . esc_attr( $el_id ) . '"';
}
$output = '
<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $options ) . '>
' . $title . '
<div class="wpb_wrapper">
' . $canvas_html . $legend_html . '
</div>' . '
</div>' . '
';
return $output;