HEX
Server: LiteSpeed
System: Linux eko108.isimtescil.net 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: uyarreklamcomtr (11202)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/headline.tar
assets/banner.svg000064400000003044151540022330010030 0ustar00<svg enable-background="new 55 277 240 240" viewBox="55 277 240 240" xmlns="http://www.w3.org/2000/svg"><path d="m55 277h240v240h-240z" fill="#1880b6"/><path d="m231 333h-92c-1.9 0-4 2.4-4 4v92c0 4.4-3.6 8-8 8-1.1 0-2-.9-2-2s.9-2 2-2c2.2 0 4-1.8 4-4v-52h-12c-2.1 0-4 2.3-4 4v56c0 9.8 6.4 16 12 16h96c5.9 0 12-6 12-12v-104c0-2.1-2-4-4-4zm-12 56c0 2.2-1.8 4-4 4h-60c-2.2 0-4-1.8-4-4v-24c0-2.2 1.8-4 4-4h60c2.2 0 4 1.8 4 4z" fill="#8ed9ef"/><path d="m215 361h-60c-2.2 0-4 1.8-4 4v24c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4v-24c0-2.2-1.8-4-4-4zm0 28h-60v-24h60z" fill="#324249"/><path d="m231 329h-92c-4.4 0-8 3.9-8 8v36h-12c-4.2 0-8 4.1-8 8v56c0 12 7.7 20 16 20h96c8.1 0 16-8 16-16v-104c0-4.4-3.7-8-8-8zm4 112c0 6-6.1 12-12 12h-96c-5.6 0-12-6.2-12-16v-56c0-1.8 1.9-4 4-4h12v52c0 2.2-1.8 4-4 4-1.1 0-2 .9-2 2s.9 2 2 2c4.4 0 8-3.6 8-8v-92c0-1.6 2.1-4 4-4h92c2 0 4 1.9 4 4z" fill="#324249"/><g opacity=".2"><path d="m153 353h24c1.1 0 2-.9 2-2s-.9-2-2-2h-24c-1.1 0-2 .9-2 2s.9 2 2 2z"/><path d="m153 405h36c1.1 0 2-.9 2-2s-.9-2-2-2h-36c-1.1 0-2 .9-2 2s.9 2 2 2z"/><path d="m197 405h20c1.1 0 2-.9 2-2s-.9-2-2-2h-20c-1.1 0-2 .9-2 2s.9 2 2 2z"/><path d="m217 425h-36c-1.1 0-2 .9-2 2s.9 2 2 2h36c1.1 0 2-.9 2-2s-.9-2-2-2z"/><path d="m173 425h-20c-1.1 0-2 .9-2 2s.9 2 2 2h20c1.1 0 2-.9 2-2s-.9-2-2-2z"/><path d="m153 417h12c1.1 0 2-.9 2-2s-.9-2-2-2h-12c-1.1 0-2 .9-2 2s.9 2 2 2z"/><path d="m173 413c-1.1 0-2 .9-2 2s.9 2 2 2h12c1.1 0 2-.9 2-2s-.9-2-2-2z"/><path d="m217 413h-24c-1.1 0-2 .9-2 2s.9 2 2 2h24c1.1 0 2-.9 2-2s-.9-2-2-2z"/></g><path d="m155 365h60v24h-60z" fill="#f2f0da"/></svg>assets/icon.svg000064400000001771151540022330007520 0ustar00<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m20.1709 3.16357h-11.78516c-.96484 0-1.75.78516-1.75 1.75v6.43835c-.08234-.01196-.16443-.02527-.25-.02527h-2.55664c-.96484 0-1.75.78516-1.75 1.75v4.73096c0 1.66992 1.3584 3.02881 3.02832 3.02881h13.78516c1.66992 0 3.02832-1.35889 3.02832-3.02881v-12.89404c0-.96484-.78516-1.75-1.75-1.75zm-16.5918 14.64405v-4.73096c0-.1377.1123-.25.25-.25h2.55664c.1377 0 .25.1123.25.25v4.73096c0 .84277-.68555 1.52881-1.52832 1.52881s-1.52832-.68604-1.52832-1.52881zm16.8418 0c0 .84277-.68555 1.52881-1.52832 1.52881h-11.18591c.26599-.4505.42908-.96887.42908-1.52881v-12.89405c0-.1377.1123-.25.25-.25h11.78516c.1377 0 .25.1123.25.25v12.89404z"/><path d="m18.2002 6.21826h-7.82422c-.41406 0-.75.33594-.75.75v3.15918c0 .41406.33594.75.75.75h7.82422c.41406 0 .75-.33594.75-.75v-3.15918c0-.41406-.33594-.75-.75-.75zm-.75 3.15918h-6.32422v-1.65918h6.32422z"/><path d="m10.37598 12.67432h7.82422v1.5h-7.82422z"/><path d="m10.37598 15.75586h7.82422v1.5h-7.82422z"/></svg>headline.php000064400000043321151540022330007024 0ustar00<?php
/*
Widget Name: Headline
Description: Engage visitors with a prominent, stylish headline and optional divider and sub-headline to convey key messages.
Author: SiteOrigin
Author URI: https://siteorigin.com
Documentation: https://siteorigin.com/widgets-bundle/headline-widget/
*/

class SiteOrigin_Widget_Headline_Widget extends SiteOrigin_Widget {
	public function __construct() {
		parent::__construct(
			'sow-headline',
			__( 'SiteOrigin Headline', 'so-widgets-bundle' ),
			array(
				'description' => __( 'Engage visitors with a prominent, stylish headline and optional divider and sub-headline to convey key messages.', 'so-widgets-bundle' ),
				'help' => 'https://siteorigin.com/widgets-bundle/headline-widget/',
			),
			array(),
			false,
			plugin_dir_path( __FILE__ )
		);
	}

	public function initialize() {
		add_action( 'siteorigin_widgets_enqueue_frontend_scripts_' . $this->id_base, array( $this, 'enqueue_widget_scripts' ) );
		add_filter( 'siteorigin_widgets_wrapper_classes_' . $this->id_base, array( $this, 'wrapper_class_filter' ), 10, 2 );
		add_filter( 'siteorigin_widgets_wrapper_data_' . $this->id_base, array( $this, 'wrapper_data_filter' ), 10, 2 );
	}

	public function get_settings_form() {
		return array(
			'responsive_breakpoint' => array(
				'type' => 'measurement',
				'label' => __( 'Responsive Breakpoint', 'so-widgets-bundle' ),
				'default' => '780px',
				'description' => __( 'The pixel resolution when the mobile alignment settings will be applied.', 'so-widgets-bundle' ),
			),
		);
	}

	public function get_widget_form() {
		return array(
			'headline' => array(
				'type' => 'section',
				'label'  => __( 'Headline', 'so-widgets-bundle' ),
				'hide'   => false,
				'fields' => array(
					'text' => array(
						'type' => 'text',
						'label' => __( 'Text', 'so-widgets-bundle' ),
					),
					'destination_url' => array(
						'type' => 'link',
						'label' => __( 'Destination URL', 'so-widgets-bundle' ),
					),
					'new_window' => array(
						'type' => 'checkbox',
						'default' => false,
						'label' => __( 'Open in a new window', 'so-widgets-bundle' ),
					),
					'tag' => array(
						'type' => 'select',
						'label' => __( 'HTML Tag', 'so-widgets-bundle' ),
						'default' => 'h2',
						'options' => array(
							'h1' => __( 'H1', 'so-widgets-bundle' ),
							'h2' => __( 'H2', 'so-widgets-bundle' ),
							'h3' => __( 'H3', 'so-widgets-bundle' ),
							'h4' => __( 'H4', 'so-widgets-bundle' ),
							'h5' => __( 'H5', 'so-widgets-bundle' ),
							'h6' => __( 'H6', 'so-widgets-bundle' ),
							'p' => __( 'Paragraph', 'so-widgets-bundle' ),
						),
					),
					'color' => array(
						'type' => 'color',
						'label' => __( 'Color', 'so-widgets-bundle' ),
					),
					'hover_color' => array(
						'type' => 'color',
						'label' => __( 'Hover Color', 'so-widgets-bundle' ),
					),
					'font' => array(
						'type' => 'font',
						'label' => __( 'Font', 'so-widgets-bundle' ),
						'default' => 'default',
					),
					'font_size' => array(
						'type' => 'measurement',
						'label' => __( 'Font Size', 'so-widgets-bundle' ),
					),
					'align' => array(
						'type' => 'select',
						'label' => __( 'Alignment', 'so-widgets-bundle' ),
						'default' => 'center',
						'options' => array(
							'center' => __( 'Center', 'so-widgets-bundle' ),
							'left' => __( 'Left', 'so-widgets-bundle' ),
							'right' => __( 'Right', 'so-widgets-bundle' ),
							'justify' => __( 'Justify', 'so-widgets-bundle' ),
						),
					),
					'mobile_align' => array(
						'type' => 'select',
						'label' => __( 'Mobile alignment', 'so-widgets-bundle' ),
						'options' => array(
							'center' => __( 'Center', 'so-widgets-bundle' ),
							'left' => __( 'Left', 'so-widgets-bundle' ),
							'right' => __( 'Right', 'so-widgets-bundle' ),
							'justify' => __( 'Justify', 'so-widgets-bundle' ),
						),
					),
					'line_height' => array(
						'type' => 'measurement',
						'label' => __( 'Line Height', 'so-widgets-bundle' ),
					),
					'margin' => array(
						'type' => 'measurement',
						'label' => __( 'Top and Bottom Margin', 'so-widgets-bundle' ),
						'default' => '',
					),
				),
			),
			'sub_headline' => array(
				'type' => 'section',
				'label'  => __( 'Sub headline', 'so-widgets-bundle' ),
				'hide'   => true,
				'fields' => array(
					'text' => array(
						'type' => 'text',
						'label' => __( 'Text', 'so-widgets-bundle' ),
					),
					'destination_url' => array(
						'type' => 'link',
						'label' => __( 'Destination URL', 'so-widgets-bundle' ),
					),
					'new_window' => array(
						'type' => 'checkbox',
						'default' => false,
						'label' => __( 'Open in a new window', 'so-widgets-bundle' ),
					),
					'tag' => array(
						'type' => 'select',
						'label' => __( 'HTML Tag', 'so-widgets-bundle' ),
						'default' => 'h3',
						'options' => array(
							'h1' => __( 'H1', 'so-widgets-bundle' ),
							'h2' => __( 'H2', 'so-widgets-bundle' ),
							'h3' => __( 'H3', 'so-widgets-bundle' ),
							'h4' => __( 'H4', 'so-widgets-bundle' ),
							'h5' => __( 'H5', 'so-widgets-bundle' ),
							'h6' => __( 'H6', 'so-widgets-bundle' ),
							'p' => __( 'Paragraph', 'so-widgets-bundle' ),
						),
					),
					'color' => array(
						'type' => 'color',
						'label' => __( 'Color', 'so-widgets-bundle' ),
					),
					'hover_color' => array(
						'type' => 'color',
						'label' => __( 'Hover Color', 'so-widgets-bundle' ),
					),
					'font' => array(
						'type' => 'font',
						'label' => __( 'Font', 'so-widgets-bundle' ),
						'default' => 'default',
					),
					'font_size' => array(
						'type' => 'measurement',
						'label' => __( 'Font Size', 'so-widgets-bundle' ),
					),
					'align' => array(
						'type' => 'select',
						'label' => __( 'Alignment', 'so-widgets-bundle' ),
						'default' => 'center',
						'options' => array(
							'center' => __( 'Center', 'so-widgets-bundle' ),
							'left' => __( 'Left', 'so-widgets-bundle' ),
							'right' => __( 'Right', 'so-widgets-bundle' ),
							'justify' => __( 'Justify', 'so-widgets-bundle' ),
						),
					),
					'mobile_align' => array(
						'type' => 'select',
						'label' => __( 'Mobile alignment', 'so-widgets-bundle' ),
						'options' => array(
							'center' => __( 'Center', 'so-widgets-bundle' ),
							'left' => __( 'Left', 'so-widgets-bundle' ),
							'right' => __( 'Right', 'so-widgets-bundle' ),
							'justify' => __( 'Justify', 'so-widgets-bundle' ),
						),
					),
					'line_height' => array(
						'type' => 'measurement',
						'label' => __( 'Line Height', 'so-widgets-bundle' ),
					),
					'margin' => array(
						'type' => 'measurement',
						'label' => __( 'Top and Bottom Margin', 'so-widgets-bundle' ),
						'default' => '',
					),
				),
			),
			'divider' => array(
				'type' => 'section',
				'label' => __( 'Divider', 'so-widgets-bundle' ),
				'hide' => true,
				'fields' => array(
					'style' => array(
						'type' => 'select',
						'label' => __( 'Style', 'so-widgets-bundle' ),
						'default' => 'solid',
						'options' => array(
							'none' => __( 'None', 'so-widgets-bundle' ),
							'solid' => __( 'Solid', 'so-widgets-bundle' ),
							'dotted' => __( 'Dotted', 'so-widgets-bundle' ),
							'dashed' => __( 'Dashed', 'so-widgets-bundle' ),
							'double' => __( 'Double', 'so-widgets-bundle' ),
							'groove' => __( 'Groove', 'so-widgets-bundle' ),
							'ridge' => __( 'Ridge', 'so-widgets-bundle' ),
							'inset' => __( 'Inset', 'so-widgets-bundle' ),
							'outset' => __( 'Outset', 'so-widgets-bundle' ),
						),
					),
					'color' => array(
						'type' => 'color',
						'label' => __( 'Color', 'so-widgets-bundle' ),
						'default' => '#eee',
					),
					'thickness' => array(
						'type' => 'slider',
						'label' => __( 'Thickness', 'so-widgets-bundle' ),
						'min' => 0,
						'max' => 20,
						'default' => 1,
					),
					'align' => array(
						'type' => 'select',
						'label' => __( 'Alignment', 'so-widgets-bundle' ),
						'default' => 'center',
						'options' => array(
							'center' => __( 'Center', 'so-widgets-bundle' ),
							'left' => __( 'Left', 'so-widgets-bundle' ),
							'right' => __( 'Right', 'so-widgets-bundle' ),
						),
					),
					'mobile_align' => array(
						'type' => 'select',
						'label' => __( 'Mobile alignment', 'so-widgets-bundle' ),
						'options' => array(
							'center' => __( 'Center', 'so-widgets-bundle' ),
							'left' => __( 'Left', 'so-widgets-bundle' ),
							'right' => __( 'Right', 'so-widgets-bundle' ),
						),
					),
					'width' => array(
						'type' => 'measurement',
						'label' => __( 'Divider Width', 'so-widgets-bundle' ),
						'default' => '80%',
					),
					'margin' => array(
						'type' => 'measurement',
						'label' => __( 'Top and Bottom Margin', 'so-widgets-bundle' ),
						'default' => '',
					),
				),
			),

			'order' => array(
				'type' => 'order',
				'label' => __( 'Element Order', 'so-widgets-bundle' ),
				'options' => array(
					'headline' => __( 'Headline', 'so-widgets-bundle' ),
					'divider' => __( 'Divider', 'so-widgets-bundle' ),
					'sub_headline' => __( 'Sub Headline', 'so-widgets-bundle' ),
				),
				'default' => array( 'headline', 'divider', 'sub_headline' ),
			),

			'fittext' => array(
				'type' => 'checkbox',
				'label' => __( 'Use FitText', 'so-widgets-bundle' ),
				'description' => __( 'Dynamically adjust your heading font size based on screen size.', 'so-widgets-bundle' ),
				'default' => false,
				'state_emitter' => array(
					'callback' => 'conditional',
					'args'     => array(
						'use_fittext[show]: val',
						'use_fittext[hide]: ! val',
					),
				),
			),

			'fittext_compressor' => array(
				'type' => 'number',
				'label' => __( 'FitText Compressor Strength', 'so-widgets-bundle' ),
				'description' => __( 'The higher the value, the more your headings will be scaled down. Values above 1 are allowed.', 'so-widgets-bundle' ),
				'default' => 0.85,
				'step' => 0.01,
				'state_handler' => array(
					'use_fittext[show]' => array( 'show' ),
					'use_fittext[hide]' => array( 'hide' ),
				),
			),
		);
	}

	public function get_less_variables( $instance ) {
		$less_vars = array(
			'responsive_breakpoint' => $this->get_global_settings( 'responsive_breakpoint' ),
		);

		// All the headline attributes.
		$less_vars['headline_tag'] = isset( $instance['headline']['tag'] ) ? $instance['headline']['tag'] : false;
		$less_vars['headline_hover_color'] = isset( $instance['headline']['hover_color'] ) ? $instance['headline']['hover_color'] : false;
		$less_vars['headline_align'] = isset( $instance['headline']['align'] ) ? $instance['headline']['align'] : false;
		$less_vars['headline_mobile_align'] = isset( $instance['headline']['mobile_align'] ) ? $instance['headline']['mobile_align'] : false;
		$less_vars['headline_color'] = isset( $instance['headline']['color'] ) ? $instance['headline']['color'] : false;
		$less_vars['headline_font_size'] = isset( $instance['headline']['font_size'] ) ? $instance['headline']['font_size'] : false;
		$less_vars['headline_line_height'] = isset( $instance['headline']['line_height'] ) ? $instance['headline']['line_height'] : false;
		$less_vars['headline_margin'] = isset( $instance['headline']['margin'] ) ? $instance['headline']['margin'] : false;

		// Headline font family and weight.
		if ( ! empty( $instance['headline']['font'] ) ) {
			$font = siteorigin_widget_get_font( $instance['headline']['font'] );
			$less_vars['headline_font'] = $font['family'];

			if ( ! empty( $font['weight'] ) ) {
				$less_vars['headline_font_style'] = $font['style'];
				$less_vars['headline_font_weight'] = $font['weight_raw'];
			}
		}

		// Set the sub headline attributes.
		$less_vars['sub_headline_align'] = isset( $instance['sub_headline']['align'] ) ? $instance['sub_headline']['align'] : false;
		$less_vars['sub_headline_mobile_align'] = isset( $instance['sub_headline']['mobile_align'] ) ? $instance['sub_headline']['mobile_align'] : false;
		$less_vars['sub_headline_hover_color'] = isset( $instance['sub_headline']['hover_color'] ) ? $instance['sub_headline']['hover_color'] : false;
		$less_vars['sub_headline_tag'] = isset( $instance['sub_headline']['tag'] ) ? $instance['sub_headline']['tag'] : false;
		$less_vars['sub_headline_color'] = isset( $instance['sub_headline']['color'] ) ? $instance['sub_headline']['color'] : false;
		$less_vars['sub_headline_font_size'] = isset( $instance['sub_headline']['font_size'] ) ? $instance['sub_headline']['font_size'] : false;
		$less_vars['sub_headline_line_height'] = isset( $instance['sub_headline']['line_height'] ) ? $instance['sub_headline']['line_height'] : false;
		$less_vars['sub_headline_margin'] = isset( $instance['sub_headline']['margin'] ) ? $instance['sub_headline']['margin'] : false;

		// Sub headline font family and weight.
		if ( ! empty( $instance['sub_headline']['font'] ) ) {
			$font = siteorigin_widget_get_font( $instance['sub_headline']['font'] );
			$less_vars['sub_headline_font'] = $font['family'];

			if ( ! empty( $font['weight'] ) ) {
				$less_vars['sub_headline_font_style'] = $font['style'];
				$less_vars['sub_headline_font_weight'] = $font['weight_raw'];
			}
		}

		$less_vars['divider_style'] = isset( $instance['divider']['style'] ) ? $instance['divider']['style'] : false;
		$less_vars['divider_width'] = isset( $instance['divider']['width'] ) ? $instance['divider']['width'] : false;
		$less_vars['divider_thickness'] = isset( $instance['divider']['thickness'] ) ? (int) $instance['divider']['thickness'] . 'px' : false;
		$less_vars['divider_align'] = isset( $instance['divider']['align'] ) ? $instance['divider']['align'] : false;
		$less_vars['divider_mobile_align'] = isset( $instance['divider']['mobile_align'] ) ? $instance['divider']['mobile_align'] : false;
		$less_vars['divider_color'] = isset( $instance['divider']['color'] ) ? $instance['divider']['color'] : false;
		$less_vars['divider_margin'] = isset( $instance['divider']['margin'] ) ? $instance['divider']['margin'] : false;

		return $less_vars;
	}

	/**
	 * Get the template variables for the headline
	 *
	 * @return array
	 */
	public function get_template_variables( $instance, $args ) {
		if ( empty( $instance ) ) {
			return array();
		}

		return array(
			'headline' => $instance['headline']['text'],
			'headline_destination_url' => $instance['headline']['destination_url'],
			'headline_new_window' => $instance['headline']['new_window'],
			'headline_tag' => siteorigin_widget_valid_tag(
				$instance['headline']['tag'],
				'h2'
			),
			'sub_headline' => $instance['sub_headline']['text'],
			'sub_headline_destination_url' => $instance['sub_headline']['destination_url'],
			'sub_headline_new_window' => $instance['sub_headline']['new_window'],
			'sub_headline_tag' => siteorigin_widget_valid_tag(
				$instance['sub_headline']['tag'],
				'h3'
			),
			'order' => $instance['order'],
			'has_divider' => ! empty( $instance['divider'] ) && $instance['divider']['style'] != 'none',
		);
	}

	public function wrapper_class_filter( $classes, $instance ) {
		if ( ! empty( $instance[ 'fittext' ] ) ) {
			$classes[] = 'so-widget-fittext-wrapper';
		}

		return $classes;
	}

	public function wrapper_data_filter( $data, $instance ) {
		if ( ! empty( $instance['fittext'] ) ) {
			$data['fit-text-compressor'] = $instance['fittext_compressor'];
		}

		return $data;
	}

	public function enqueue_widget_scripts( $instance ) {
		if ( ! empty( $instance['fittext'] ) || $this->is_preview( $instance ) ) {
			wp_enqueue_script( 'sowb-fittext' );
		}
	}

	public function modify_instance( $instance ) {
		// Change the old divider weight into a divider thickness.
		if ( isset( $instance['divider']['weight'] ) && ! isset( $instance['divider']['thickness'] ) ) {
			switch( $instance['divider']['weight'] ) {
				case 'medium':
					$instance['divider']['thickness'] = 3;
					break;

				case 'thick':
					$instance['divider']['thickness'] = 5;
					break;

				case 'thin':
				default:
					$instance['divider']['thickness'] = 1;
					break;
			}
			unset( $instance['divider']['weight'] );
		}

		// Change the old divider side margin into overall width.
		if ( isset( $instance['divider']['side_margin'] ) && ! isset( $instance['divider']['width'] ) ) {
			global $content_width;
			$value = (float) $instance['divider']['side_margin'];

			switch( $instance['divider']['side_margin_unit'] ) {
				case 'px':
					$instance['divider']['width'] = ( ( ! empty( $content_width ) ? $content_width : 960 ) - ( 2 * $value ) ) . 'px';
					$instance['divider']['width_unit'] = 'px';
					break;

				case '%':
					$instance['divider']['width'] = ( 100 - ( 2 * $value ) ) . '%';
					$instance['divider']['width_unit'] = '%';
					break;

				default:
					$instance['divider']['width'] = '80%';
					$instance['divider']['width_unit'] = '%';
					break;
			}

			unset( $instance['divider']['side_margin'] );
			unset( $instance['divider']['side_margin_unit'] );
		}

		// Copy top margin over to bottom margin.
		if ( isset( $instance['divider']['top_margin'] ) && ! isset( $instance['divider']['bottom_margin'] ) ) {
			$instance['divider']['bottom_margin'] = $instance['divider']['top_margin'];
			$instance['divider']['bottom_margin_unit'] = $instance['divider']['top_margin_unit'];
		}

		// Set Mobile alignment settings to same value as the Alignment for existing widgets.
		if ( ! empty( $instance['headline']['align'] ) && empty( $instance['headline']['mobile_align'] ) ) {
			$instance['headline']['mobile_align'] = ! empty( $instance['headline']['align'] ) ? $instance['headline']['align'] : 'center';
			$instance['sub_headline']['mobile_align'] = ! empty( $instance['sub_headline']['align'] ) ? $instance['sub_headline']['align'] : 'center';
			$instance['divider']['mobile_align'] = ! empty( $instance['divider']['align'] ) ? $instance['divider']['align'] : 'center';
		}

		return $instance;
	}
}
siteorigin_widget_register( 'sow-headline', __FILE__, 'SiteOrigin_Widget_Headline_Widget' );
styles/default.less000064400000005471151540022330010405 0ustar00@import "../../../base/less/mixins";

@responsive_breakpoint: 780px;

@headline_tag: h1;
@headline_font: default;
@headline_font_weight: 400;
@headline_font_size: default;
@headline_font_style: default;
@headline_line_height: 1.4em;
@headline_margin: default;
@headline_align: center;
@headline_mobile_align: center;
@headline_color: default;
@headline_hover_color: default;

@sub_headline_tag: h3;
@sub_headline_font: default;
@sub_headline_font_weight: 400;
@sub_headline_font_size: default;
@sub_headline_font_style: default;
@sub_headline_line_height: 1.4em;
@sub_headline_margin: default;
@sub_headline_align: center;
@sub_headline_mobile_align: center;
@sub_headline_color: default;
@sub_headline_hover_color: default;

@divider_style: solid;
@divider_width: 80%;
@divider_thickness: 1px;
@divider_color: #EEEEEE;
@divider_margin: 20px;
@divider_align: center;
@divider_mobile_align: center;

.sow-headline-container {

    @{headline_tag}.sow-headline {
        .font(@headline_font, @headline_font_weight);
        font-style: @headline_font_style;
        text-align: @headline_align;
        color: @headline_color;
        line-height: @headline_line_height;
        font-size: @headline_font_size;

        margin-top: @headline_margin;
        margin-bottom: @headline_margin;

        @media (max-width: @responsive_breakpoint) {
            text-align: @headline_mobile_align;
        }

        & a {
            color: @headline_color;
            &:hover {
                color: @headline_hover_color;
            }
        }
    }

    @{sub_headline_tag}.sow-sub-headline {
        .font(@sub_headline_font, @sub_headline_font_weight);
        font-style: @sub_headline_font_style;
        text-align: @sub_headline_align;
        color: @sub_headline_color;
        line-height: @sub_headline_line_height;
        font-size: @sub_headline_font_size;

        margin-top: @sub_headline_margin;
        margin-bottom: @sub_headline_margin;

        @media (max-width: @responsive_breakpoint) {
            text-align: @sub_headline_mobile_align;
        }

        & a {
            color: @sub_headline_color;
            &:hover {
                color: @sub_headline_hover_color;
            }
        }
    }

    .decoration {
        line-height: 0em;
        text-align: @divider_align;

        margin-top: @divider_margin;
        margin-bottom: @divider_margin;

        @media (max-width: @responsive_breakpoint) {
            text-align: @divider_mobile_align;
        }

        .decoration-inside {
            height: 1px;
            display: inline-block;
            border-top: @divider_thickness @divider_style @divider_color;
            width: 100%;
            max-width: @divider_width;
        }
    }

    *:first-child {
        margin-top: 0 !important;
    }

    *:last-child {
        margin-bottom: 0 !important;
    }
}
tpl/default.php000064400000002503151540022330007473 0ustar00<div class="sow-headline-container <?php if ( $instance['fittext'] ) {
	;
} ?>">
	<?php
	foreach ( $order as $item ) {
		unset( $text );

		switch( $item ) {
			case 'headline':
				case 'headline':
					$text = $headline;
					$tag = $headline_tag;
					$destination_url = $headline_destination_url;
					$new_window = $headline_new_window;
					$class = 'sow-headline';
				case 'sub_headline':
					if ( ! isset( $text ) ) {
						$text = $sub_headline;
						$tag = $sub_headline_tag;
						$destination_url = $sub_headline_destination_url;
						$new_window = $sub_headline_new_window;
						$class = 'sow-sub-headline';
					}

					if ( ! empty( $text ) ) {
						?>
						<<?php echo esc_attr( $tag ); ?> class="<?php echo $class; ?>">
						<?php
						if ( ! empty( $destination_url ) ) { ?>
							<a href="<?php echo sow_esc_url( $destination_url ); ?>" <?php echo (bool) $new_window ? 'target="_blank" rel="noopener noreferrer"' : ''; ?>>
								<?php
						}

						echo wp_kses_post( $text );

						if ( ! empty( $destination_url ) ) {
							echo '</a>';
						}
						?>
						</<?php echo esc_attr( $tag ); ?>>
						<?php
					}
				break;

			case 'divider':
				if ( $has_divider ) {
					?>
					<div class="decoration">
						<div class="decoration-inside"></div>
					</div>
					<?php
				}
				break;
		}
	}
	?>
</div>