Save
This commit is contained in:
67
wp-content/plugins/elementor-addon/assets/css/main.css
Normal file
67
wp-content/plugins/elementor-addon/assets/css/main.css
Normal file
@@ -0,0 +1,67 @@
|
||||
.elementor-widget-language .elementor-language-switcher {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
font-family: inherit;
|
||||
}
|
||||
.elementor-widget-language .elementor-language-switcher .lang-current {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
.elementor-widget-language .elementor-language-switcher .lang-current img {
|
||||
width: 16px;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
.elementor-widget-language .elementor-language-switcher .lang-current span {
|
||||
font-size: 14px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.elementor-widget-language .elementor-language-switcher .lang-dropdown {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
min-width: 100%;
|
||||
margin: 8px 0 0;
|
||||
padding: 6px 0;
|
||||
list-style: none;
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transform: translateY(10px);
|
||||
transition: all 0.25s ease;
|
||||
z-index: 100;
|
||||
}
|
||||
.elementor-widget-language .elementor-language-switcher .lang-dropdown li a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 14px;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
width: -moz-max-content;
|
||||
width: max-content;
|
||||
}
|
||||
.elementor-widget-language .elementor-language-switcher .lang-dropdown li a img {
|
||||
width: 16px;
|
||||
height: auto;
|
||||
}
|
||||
.elementor-widget-language .elementor-language-switcher .lang-dropdown li a span {
|
||||
font-size: 14px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.elementor-widget-language .elementor-language-switcher .lang-dropdown li a:hover {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.elementor-widget-language .elementor-language-switcher.is-open .lang-dropdown {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateY(0);
|
||||
}/*# sourceMappingURL=main.css.map */
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["main.scss","main.css"],"names":[],"mappings":"AACC;EACC,kBAAA;EACA,qBAAA;EACA,oBAAA;ACAF;ADEE;EACC,aAAA;EACA,mBAAA;EACA,QAAA;EACA,uBAAA;EACA,SAAA;EACA,UAAA;EACA,eAAA;ACAH;ADEG;EACC,WAAA;EACA,YAAA;EACA,cAAA;ACAJ;ADGG;EACC,eAAA;EACA,yBAAA;ACDJ;ADKE;EACC,kBAAA;EACA,SAAA;EACA,OAAA;EACA,eAAA;EACA,eAAA;EACA,cAAA;EACA,gBAAA;EACA,gBAAA;EACA,kBAAA;EACA,0CAAA;EACA,UAAA;EACA,kBAAA;EACA,2BAAA;EACA,0BAAA;EACA,YAAA;ACHH;ADMI;EACC,aAAA;EACA,mBAAA;EACA,QAAA;EACA,iBAAA;EACA,WAAA;EACA,qBAAA;EACA,mBAAA;EACA,uBAAA;EAAA,kBAAA;ACJL;ADMK;EACC,WAAA;EACA,YAAA;ACJN;ADOK;EACC,eAAA;EACA,yBAAA;ACLN;ADQK;EACC,mBAAA;ACNN;ADaG;EACC,UAAA;EACA,mBAAA;EACA,wBAAA;ACXJ","file":"main.css"}
|
||||
81
wp-content/plugins/elementor-addon/assets/css/main.scss
Normal file
81
wp-content/plugins/elementor-addon/assets/css/main.scss
Normal file
@@ -0,0 +1,81 @@
|
||||
.elementor-widget-language {
|
||||
.elementor-language-switcher {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
font-family: inherit;
|
||||
|
||||
.lang-current {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
|
||||
img {
|
||||
width: 16px;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
.lang-dropdown {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
min-width: 100%;
|
||||
margin: 8px 0 0;
|
||||
padding: 6px 0;
|
||||
list-style: none;
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transform: translateY(10px);
|
||||
transition: all 0.25s ease;
|
||||
z-index: 100;
|
||||
|
||||
li {
|
||||
a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 14px;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
width: max-content;
|
||||
|
||||
img {
|
||||
width: 16px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-open {
|
||||
.lang-dropdown {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
9
wp-content/plugins/elementor-addon/assets/js/main.js
Normal file
9
wp-content/plugins/elementor-addon/assets/js/main.js
Normal file
@@ -0,0 +1,9 @@
|
||||
document.addEventListener('click', function (e) {
|
||||
document.querySelectorAll('.elementor-language-switcher').forEach(function (switcher) {
|
||||
if (switcher.contains(e.target)) {
|
||||
switcher.classList.toggle('is-open');
|
||||
} else {
|
||||
switcher.classList.remove('is-open');
|
||||
}
|
||||
});
|
||||
});
|
||||
45
wp-content/plugins/elementor-addon/elementor-addon.php
Normal file
45
wp-content/plugins/elementor-addon/elementor-addon.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: Elementor Addon
|
||||
* Description: Simple hello world widgets for Elementor.
|
||||
* Version: 1.0.0
|
||||
* Author: Elementor Developer
|
||||
* Author URI: https://developers.elementor.com/
|
||||
* Text Domain: elementor-addon
|
||||
*
|
||||
* Requires Plugins: elementor
|
||||
* Elementor tested up to: 3.21.0
|
||||
* Elementor Pro tested up to: 3.21.0
|
||||
*/
|
||||
|
||||
function register_hello_world_widget( $widgets_manager ) {
|
||||
require_once( __DIR__ . '/widgets/language.php' );
|
||||
|
||||
$widgets_manager->register( new \Elementor_Language() );
|
||||
}
|
||||
add_action( 'elementor/widgets/register', 'register_hello_world_widget' );
|
||||
|
||||
function enqueue_elementor_addon_styles() {
|
||||
if ( did_action( 'elementor/loaded' ) ) {
|
||||
wp_enqueue_style(
|
||||
'elementor-addon-main-css',
|
||||
plugins_url( 'assets/css/main.css', __FILE__ ),
|
||||
[],
|
||||
'1.0.0'
|
||||
);
|
||||
}
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'enqueue_elementor_addon_styles' );
|
||||
|
||||
function enqueue_elementor_addon_scripts() {
|
||||
if ( did_action( 'elementor/loaded' ) ) {
|
||||
wp_enqueue_script(
|
||||
'elementor-addon-main-js',
|
||||
plugins_url( 'assets/js/main.js', __FILE__ ),
|
||||
[ 'jquery' ],
|
||||
'1.0.0',
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'enqueue_elementor_addon_scripts' );
|
||||
95
wp-content/plugins/elementor-addon/widgets/language.php
Normal file
95
wp-content/plugins/elementor-addon/widgets/language.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
// use Elementor\Utils;
|
||||
use Elementor\Icons_Manager;
|
||||
// use Elementor\Group_Control_Text_Shadow;
|
||||
// use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
|
||||
// use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
|
||||
// use Elementor\Group_Control_Text_Stroke;
|
||||
// use Elementor\Group_Control_Typography;
|
||||
|
||||
class Elementor_Language extends \Elementor\Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'language';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return esc_html__( 'Language', 'elementor-addon' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-code';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'basic' ];
|
||||
}
|
||||
|
||||
public function get_keywords() {
|
||||
return [ 'language', 'translate'];
|
||||
}
|
||||
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'section_setting',
|
||||
[
|
||||
'label' => esc_html__( 'Settings', 'elementor' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
|
||||
if ( ! function_exists( 'pll_the_languages' ) ) {
|
||||
echo '<!-- Polylang not active -->';
|
||||
return;
|
||||
}
|
||||
|
||||
$languages = pll_the_languages( [
|
||||
'raw' => 1,
|
||||
] );
|
||||
|
||||
if ( empty( $languages ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$current_lang = null;
|
||||
foreach ( $languages as $lang ) {
|
||||
if ( $lang['current_lang'] ) {
|
||||
$current_lang = $lang;
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="elementor-language-switcher">
|
||||
<button class="lang-current">
|
||||
<img src="<?php echo esc_url( $current_lang['flag'] ); ?>" alt="<?php echo esc_attr( $current_lang['name'] ); ?>">
|
||||
<!-- <span><?php echo esc_html( $current_lang['slug'] ); ?></span> -->
|
||||
</button>
|
||||
|
||||
<ul class="lang-dropdown">
|
||||
<?php foreach ( $languages as $lang ) :
|
||||
if ( $lang['current_lang'] ) continue;
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo esc_url( $lang['url'] ); ?>">
|
||||
<img src="<?php echo esc_url( $lang['flag'] ); ?>" alt="<?php echo esc_attr( $lang['name'] ); ?>">
|
||||
<!-- <span><?php echo esc_html( $lang['slug'] ); ?></span> -->
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -49,4 +49,8 @@
|
||||
}
|
||||
#box-floating-icons .elementor-icon-list-item .elementor-icon-list-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
main .page-header {
|
||||
display: none;
|
||||
}/*# sourceMappingURL=custom.css.map */
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["custom.scss","custom.css"],"names":[],"mappings":"AAAA;EACE,eAAA;EACA,aAAA;EACA,WAAA;EACA,YAAA;ACCF;ADEI;EACE,kBAAA;EACA,WAAA;EACA,eAAA;EACA,YAAA;EACA,oBAAA;EACA,mBAAA;EAEA,mBAAA;EACA,uBAAA;ACDN;ADGM;EACE,WAAA;EACA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,QAAA;EACA,SAAA;EACA,mBAAA;EACA,gCAAA;EACA,WAAA;EACA,mBAAA;ACDR;ADKQ;EACE,sCAAA;ACHV;ADOM;EACE;IACE,WAAA;IACA,YAAA;IACA,UAAA;ECLR;EDQM;IACE,WAAA;IACA,YAAA;IACA,UAAA;ECNR;AACF;ADUI;EACE,SAAA;ACRN;ADUM;EACE,SAAA;ACRR;ADYI;EACE,aAAA;ACVN","file":"custom.css","sourcesContent":["#box-floating-icons {\r\n position: fixed;\r\n bottom: 150px;\r\n right: 10px;\r\n z-index: 100;\r\n\r\n .elementor-icon-list-item {\r\n a {\r\n position: relative;\r\n width: 45px;\r\n min-width: 45px;\r\n height: 45px;\r\n border-radius: 100px;\r\n background: #255b38;\r\n\r\n align-items: center;\r\n justify-content: center;\r\n\r\n &::before {\r\n content: '';\r\n position: absolute;\r\n width: 15px;\r\n height: 15px;\r\n top: 50%;\r\n left: 50%;\r\n background: #255b38;\r\n transform: translate(-50%, -50%);\r\n z-index: -1;\r\n border-radius: 100%;\r\n }\r\n\r\n &:hover {\r\n &::before {\r\n animation: float-item-puls 1s infinite;\r\n }\r\n }\r\n\r\n @keyframes float-item-puls {\r\n 0% {\r\n width: 25px;\r\n height: 25px;\r\n opacity: 1;\r\n }\r\n\r\n 100% {\r\n width: 55px;\r\n height: 55px;\r\n opacity: 0;\r\n }\r\n }\r\n }\r\n\r\n svg {\r\n margin: 0;\r\n\r\n path {\r\n margin: 0;\r\n }\r\n }\r\n\r\n .elementor-icon-list-text {\r\n display: none;\r\n }\r\n }\r\n}","#box-floating-icons {\n position: fixed;\n bottom: 150px;\n right: 10px;\n z-index: 100;\n}\n#box-floating-icons .elementor-icon-list-item a {\n position: relative;\n width: 45px;\n min-width: 45px;\n height: 45px;\n border-radius: 100px;\n background: #255b38;\n align-items: center;\n justify-content: center;\n}\n#box-floating-icons .elementor-icon-list-item a::before {\n content: \"\";\n position: absolute;\n width: 15px;\n height: 15px;\n top: 50%;\n left: 50%;\n background: #255b38;\n transform: translate(-50%, -50%);\n z-index: -1;\n border-radius: 100%;\n}\n#box-floating-icons .elementor-icon-list-item a:hover::before {\n animation: float-item-puls 1s infinite;\n}\n@keyframes float-item-puls {\n 0% {\n width: 25px;\n height: 25px;\n opacity: 1;\n }\n 100% {\n width: 55px;\n height: 55px;\n opacity: 0;\n }\n}\n#box-floating-icons .elementor-icon-list-item svg {\n margin: 0;\n}\n#box-floating-icons .elementor-icon-list-item svg path {\n margin: 0;\n}\n#box-floating-icons .elementor-icon-list-item .elementor-icon-list-text {\n display: none;\n}"]}
|
||||
{"version":3,"sources":["custom.scss","custom.css"],"names":[],"mappings":"AAAA;EACC,eAAA;EACA,aAAA;EACA,WAAA;EACA,YAAA;ACCD;ADEE;EACC,kBAAA;EACA,WAAA;EACA,eAAA;EACA,YAAA;EACA,oBAAA;EACA,mBAAA;EAEA,mBAAA;EACA,uBAAA;ACDH;ADGG;EACC,WAAA;EACA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,QAAA;EACA,SAAA;EACA,mBAAA;EACA,gCAAA;EACA,WAAA;EACA,mBAAA;ACDJ;ADKI;EACC,sCAAA;ACHL;ADOG;EACC;IACC,WAAA;IACA,YAAA;IACA,UAAA;ECLH;EDQE;IACC,WAAA;IACA,YAAA;IACA,UAAA;ECNH;AACF;ADUE;EACC,SAAA;ACRH;ADUG;EACC,SAAA;ACRJ;ADYE;EACC,aAAA;ACVH;;ADeA;EACC,aAAA;ACZD","file":"custom.css"}
|
||||
@@ -1,65 +1,69 @@
|
||||
#box-floating-icons {
|
||||
position: fixed;
|
||||
bottom: 150px;
|
||||
right: 10px;
|
||||
z-index: 100;
|
||||
position: fixed;
|
||||
bottom: 150px;
|
||||
right: 10px;
|
||||
z-index: 100;
|
||||
|
||||
.elementor-icon-list-item {
|
||||
a {
|
||||
position: relative;
|
||||
width: 45px;
|
||||
min-width: 45px;
|
||||
height: 45px;
|
||||
border-radius: 100px;
|
||||
background: #255b38;
|
||||
.elementor-icon-list-item {
|
||||
a {
|
||||
position: relative;
|
||||
width: 45px;
|
||||
min-width: 45px;
|
||||
height: 45px;
|
||||
border-radius: 100px;
|
||||
background: #255b38;
|
||||
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
background: #255b38;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: -1;
|
||||
border-radius: 100%;
|
||||
}
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
background: #255b38;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: -1;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
&::before {
|
||||
animation: float-item-puls 1s infinite;
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
&::before {
|
||||
animation: float-item-puls 1s infinite;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes float-item-puls {
|
||||
0% {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
opacity: 1;
|
||||
}
|
||||
@keyframes float-item-puls {
|
||||
0% {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
width: 55px;
|
||||
height: 55px;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
100% {
|
||||
width: 55px;
|
||||
height: 55px;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
svg {
|
||||
margin: 0;
|
||||
svg {
|
||||
margin: 0;
|
||||
|
||||
path {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
path {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.elementor-icon-list-text {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.elementor-icon-list-text {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main .page-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -298,4 +298,15 @@ function naprawa_bledu_sprintf() {
|
||||
add_action('admin_footer', 'naprawa_bledu_sprintf');
|
||||
// Dodaj do stopki strony głównej
|
||||
add_action('wp_footer', 'naprawa_bledu_sprintf');
|
||||
/* --- Koniec: Naprawa błędu sprintf --- */
|
||||
/* --- Koniec: Naprawa błędu sprintf --- */
|
||||
|
||||
add_action( 'wp_enqueue_scripts', function () {
|
||||
|
||||
wp_enqueue_style(
|
||||
'hello-custom-css',
|
||||
get_stylesheet_directory_uri() . '/assets/css/custom.css',
|
||||
[],
|
||||
filemtime( get_stylesheet_directory() . '/assets/css/custom.css' )
|
||||
);
|
||||
|
||||
}, 9999 );
|
||||
|
||||
Reference in New Issue
Block a user