first commit

This commit is contained in:
2024-11-10 21:08:49 +01:00
commit 0d932ce5ee
14455 changed files with 2567501 additions and 0 deletions

View File

@@ -0,0 +1,150 @@
<?php
class DSM_GradientText extends ET_Builder_Module {
public $slug = 'dsm_gradient_text';
public $vb_support = 'on';
protected $module_credits = array(
'module_uri' => 'https://divisupreme.com/',
'author' => 'Divi Supreme',
'author_uri' => 'https://divisupreme.com/',
);
public function init() {
$this->name = esc_html__( 'Supreme Gradient Text', 'dsm-supreme-modules-for-divi' );
$this->icon_path = plugin_dir_path( __FILE__ ) . 'icon.svg';
// Toggle settings
$this->settings_modal_toggles = array(
'general' => array(
'toggles' => array(
'main_content' => esc_html__( 'Text', 'dsm-supreme-modules-for-divi' ),
),
),
'advanced' => array(
'toggles' => array(),
),
);
}
public function get_advanced_fields_config() {
return array(
'fonts' => array(
'header' => array(
'label' => esc_html__( 'Title', 'dsm-supreme-modules-for-divi' ),
'css' => array(
'main' => '%%order_class%% h1.dsm-gradient-text, %%order_class%% h2.dsm-gradient-text, %%order_class%% h3.dsm-gradient-text, %%order_class%% h4.dsm-gradient-text, %%order_class%% h5.dsm-gradient-text, %%order_class%% h6.dsm-gradient-text',
),
'font_size' => array(
'default' => '30px',
),
'line_height' => array(
'default' => '1em',
),
'letter_spacing' => array(
'default' => '0px',
),
'header_level' => array(
'default' => 'h1',
),
),
),
'text' => array(
'use_text_orientation' => true,
'use_background_layout' => false,
'css' => array(
'text_shadow' => '%%order_class%%',
),
'options' => array(
'background_layout' => array(
'default' => 'light',
),
),
),
'background' => array(
'css' => array(
'main' => '%%order_class%% .dsm-gradient-text',
),
'options' => array(
'use_background_color' => array(
'default' => 'off',
),
'use_background_video' => array(
'default' => 'off',
),
'use_background_color_gradient' => array(
'default' => 'on',
),
'background_color_gradient_start' => array(
'default' => 'rgba(131,0,233,0.78)',
),
'background_color_gradient_end' => array(
'default' => 'rgba(41,196,169,0.62)',
),
'parallax_method' => array(
'default' => 'off',
),
),
),
'borders' => array(
'default' => array(
'css' => array(
'main' => array(
'border_radii' => '%%order_class%%',
'border_styles' => '%%order_class%%',
),
),
),
),
'box_shadow' => array(
'default' => array(
'css' => array(
'main' => '%%order_class%%',
),
),
),
);
}
public function get_fields() {
return array(
'gradient_text' => array(
'label' => esc_html__( 'Gradient Text', 'dsm-supreme-modules-for-divi' ),
'type' => 'text',
'option_category' => 'basic_option',
'toggle_slug' => 'main_content',
'default_on_front' => 'Supreme Gradient Text',
),
);
}
public function render( $attrs, $content = null, $render_slug ) {
$gradient_text = $this->props['gradient_text'];
$header_level = $this->props['header_level'];
if ( '' !== $gradient_text ) {
$gradient_text = sprintf(
'<%1$s class="dsm-gradient-text">%2$s</%1$s>',
et_pb_process_header_level( $header_level, 'h1' ),
$gradient_text
);
}
$this->add_classname(
array(
$this->get_text_orientation_classname(),
)
);
// Render module content
$output = sprintf(
'%1$s',
$gradient_text
);
return $output;
//return $this->_render_module_wrapper( $output, $render_slug );
}
}
new DSM_GradientText;

View File

@@ -0,0 +1 @@
<svg enable-background="new 0 0 28 28" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><path d="m17.95 21.31h-7.24v-.77c.49 0 .85-.14 1.11-.41.5-.54.43-1.45.42-1.46v-.03-6.94h-2.32c-.75 0-1.22.37-1.49.68-.15.18-.39.24-.61.15s-.36-.29-.36-.53v-4.43h13.75v4.43c0 .23-.14.44-.36.52s-.46.02-.61-.15c-.27-.31-.74-.68-1.49-.68h-2.32v6.97c0 .01-.07.92.42 1.46.26.28.62.41 1.11.41v.78zm-5.47-.77h3.71c-.59-.74-.55-1.76-.53-1.92v-7.69h3.09c.75 0 1.31.27 1.7.58v-3.17h-12.22v3.17c.39-.31.94-.58 1.7-.58h3.09v7.69c0 .16.05 1.18-.54 1.92z" fill="#fff"/><g fill="#03dac6"><path d="m5.35 6.67c-.76 0-1.38-.62-1.38-1.38s.62-1.38 1.38-1.38 1.38.62 1.38 1.38-.62 1.38-1.38 1.38zm0-1.99c-.34 0-.62.28-.62.62s.28.62.62.62.62-.28.62-.62-.28-.62-.62-.62z"/><path d="m7.84 24.09c-.76 0-1.38-.62-1.38-1.38s.62-1.38 1.38-1.38 1.38.62 1.38 1.38-.62 1.38-1.38 1.38zm0-2c-.34 0-.62.28-.62.62s.28.62.62.62.62-.28.62-.62-.28-.62-.62-.62z"/><path d="m22.65 24.09c-.76 0-1.38-.62-1.38-1.38s.62-1.38 1.38-1.38 1.38.62 1.38 1.38c.01.76-.61 1.38-1.38 1.38zm0-2c-.34 0-.62.28-.62.62s.28.62.62.62.62-.28.62-.62-.28-.62-.62-.62z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB