Skip to content

Commit 5e56a5b

Browse files
authored
Merge pull request #174 from RRZE-Webteam/dev
v1.22.4
2 parents c27dcb2 + 99f0ea6 commit 5e56a5b

12 files changed

+6446
-52
lines changed

assets/css/_accordion.scss

+7-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ button.expand-all.standard-btn {
7878
}
7979
&.active:hover,
8080
&.active:focus {
81-
//border-color: var(--color-primary-dunkler, $colorDefaultDunkler);
81+
border-color: var(--color-primary-dunkler, $colorDefaultDunkler);
8282
background-color: var(--color-primary-dunkler, $colorDefaultDunkler);
8383
color: var(--color-primary-ci-hell-kontrast, #fff);
8484
}
@@ -90,6 +90,7 @@ button.expand-all.standard-btn {
9090
&:hover,
9191
&:focus,
9292
&.active {
93+
border-color: var(--color-phil-ci-hell, $colorPhilFak);
9394
background-color: var(--color-phil-ci-hell, $colorPhilFak);
9495
color: var(--color-phil-ci-hell-kontrast, #fff);
9596
}
@@ -107,6 +108,7 @@ button.expand-all.standard-btn {
107108
&:hover,
108109
&:focus,
109110
&.active {
111+
border-color: var(--color-rw-ci-hell, $colorRwFak);
110112
background-color: var(--color-rw-ci-hell, $colorRwFak);
111113
color: var(--color-rw-ci-hell-kontrast, #fff);
112114
}
@@ -124,6 +126,7 @@ button.expand-all.standard-btn {
124126
&:hover,
125127
&:focus,
126128
&.active {
129+
border-color: var(--color-med-ci-hell, $colorMedFak);
127130
background-color: var(--color-med-ci-hell, $colorMedFak);
128131
color: var(--color-med-ci-hell-kontrast, #fff);
129132
}
@@ -141,6 +144,7 @@ button.expand-all.standard-btn {
141144
&:hover,
142145
&:focus,
143146
&.active {
147+
border-color: var(--color-nat-ci-hell, $colorNatFak);
144148
background-color: var(--color-nat-ci-hell, $colorNatFak);
145149
color: var(--color-nat-ci-hell-kontrast, #fff);
146150
}
@@ -158,6 +162,7 @@ button.expand-all.standard-btn {
158162
&:hover,
159163
&:focus,
160164
&.active {
165+
border-color: var(--color-tf-ci-hell, $colorTechFak);
161166
background-color: var(--color-tf-ci-hell, $colorTechFak);
162167
color: var(--color-tf-ci-dunkel-kontrast, #fff);
163168
}
@@ -174,6 +179,7 @@ button.expand-all.standard-btn {
174179
&:hover,
175180
&:focus,
176181
&.active {
182+
border-color: var(--color-zentral-ci-hell, $colorDefault);
177183
background-color: var(--color-zentral-ci-hell, $colorDefault);
178184
color: var(--color-zentral-ci-hell-kontrast, #fff);
179185
}

assets/css/_button.scss

+14
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,22 @@ a.standard-btn {
112112
}
113113
&.black-btn {
114114
background: $text;
115+
color: #fff;
115116
&:hover, &:focus, &:active {
116117
background: darken($text, 12%);
118+
color: #fff;
119+
}
120+
}
121+
&.ghost-btn {
122+
background: transparent;
123+
color: var(--color-Text, $text);
124+
border: 1px solid var(--color-ContentBorders, #dfe6ec);
125+
&:hover, &:focus, &:active {
126+
color: var(--color-ghostbutton-hover-text, #fff);
127+
background: var(--color-ghostbutton-hover-bg, $primary);
128+
}
129+
.fau-events & {
130+
border-width: 2px;
117131
}
118132
}
119133
&.full-btn {

assets/css/rrze-elements.css

+6,380-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/rrze-elements.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/rrze-elements.min.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/rrze-elements.min.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/Accordion/Accordion.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ public function shortcodeCollapse($atts, $content, $tag)
169169
public static function enqueueScripts() {
170170
wp_register_script(
171171
'rrze-accordions',
172-
//plugins_url('assets/js/rrze-accordion.min.js', plugin_basename(__FILE__)),
173-
plugins_url('assets/js/rrze-accordion.js', plugin_basename(__FILE__)),
174-
['jquery'],
172+
plugins_url('assets/js/rrze-accordion.min.js', plugin_basename(__FILE__)),
173+
//plugins_url('assets/js/rrze-accordion.js', plugin_basename(__FILE__)),
174+
['jquery', 'wp-i18n'],
175175
'1.0.0'
176176
);
177177
}

includes/Accordion/assets/js/rrze-accordion.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ jQuery(document).ready(function($) {
5656
$($thisgroup).children('.accordion-heading').children('.accordion-toggle').toggleClass('active');
5757
$($thisgroup).children('.accordion-body').slideToggle();
5858
// refresh Slick Gallery
59-
$($thisgroup).find("div.slick-slider").slick("refresh");
59+
let $slick = $($thisgroup).find("div.slick-slider");
60+
if ($slick.length < 0) {
61+
$slick.slick("refresh");
62+
}
6063
}
6164

6265
function openAnchorAccordion($target) {

includes/Accordion/assets/js/rrze-accordion.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/Button/Button.php

+31-25
Original file line numberDiff line numberDiff line change
@@ -25,39 +25,45 @@ public function __construct()
2525
*/
2626
public function shortcodeButton($atts, $content = '')
2727
{
28-
extract(shortcode_atts([
29-
'link' => '#',
30-
'target' => '',
31-
'color' => '',
32-
'border_color' => '',
33-
'size' => '',
34-
'width' => '',
35-
'style' => '',
36-
'font' => '',
37-
'title' => '',
38-
], $atts));
28+
$atts = shortcode_atts(
29+
array(
30+
'link' => '#',
31+
'target' => '',
32+
'color' => '',
33+
'border_color' => '',
34+
'size' => '',
35+
'width' => '',
36+
'style' => '',
37+
'font' => '',
38+
'title' => '',
39+
'aria-label' => '',
40+
), $atts );
3941

40-
$style = (in_array($style, ['success', 'info', 'warning', 'danger', 'primary'])) ? ' ' . $style . '-btn' : ' primary-btn';
42+
$arialabel = $atts['aria-label'] != '' ? ' aria-label="' . sanitize_text_field($atts['aria-label']) . '"' : '';
43+
/*if ($arialabel != '' && stripos($arialabel, $content) === false) {
44+
return do_shortcode('[alert style="danger"]' . __('<strong>Button shortcode error</strong>: The button text ("' . $content . '") has to be included in the aria label ("' . sanitize_text_field($atts['aria-label']) . '"). ' , 'rrze-elements') . '[/alert]');
45+
}*/
46+
$style = (in_array($atts['style'], ['success', 'info', 'warning', 'danger', 'primary', 'ghost'])) ? ' ' . $atts['style'] . '-btn' : ' primary-btn';
4147
$color_hex = '';
4248
$color_name = '';
4349

44-
if ((substr($color, 0, 1) == '#') && (in_array(strlen($color), [4, 7]))) {
50+
if ((substr($atts['color'], 0, 1) == '#') && (in_array(strlen($atts['color']), [4, 7]))) {
4551
$color_name = '';
46-
$color_hex = 'background-color:' . $color . ';';
52+
$color_hex = 'background-color:' . $atts['color'] . ';';
4753
$style = 'X';
4854
}
4955

50-
if (in_array($color, ['red', 'yellow', 'blue', 'green', 'grey', 'black'])) {
51-
$color_name = ' ' . $color . '-btn';
56+
if (in_array($atts['color'], ['red', 'yellow', 'blue', 'green', 'grey', 'black'])) {
57+
$color_name = ' ' . $atts['color'] . '-btn';
5258
$style = 'Y';
5359
}
5460

55-
$border_color = ((substr($border_color, 0, 1) == '#') && (in_array(strlen($border_color), [4, 7]))) ? ' border:1px solid' . $border_color . ';' : '';
61+
$border_color = ((substr($atts['border_color'], 0, 1) == '#') && (in_array(strlen($atts['border_color']), [4, 7]))) ? ' border:1px solid' . $atts['border_color'] . ';' : '';
5662

57-
$size = ($size) ? ' ' . $size . '-btn' : '';
58-
$target = ($target == 'blank') ? ' target="_blank"' : '';
59-
$link = esc_url($link);
60-
switch ($font) {
63+
$size = ($atts['size']) ? ' ' . $atts['size'] . '-btn' : '';
64+
$target = ($atts['target'] == 'blank') ? ' target="_blank"' : '';
65+
$link = esc_url($atts['link']);
66+
switch ($atts['font']) {
6167
case 'dark':
6268
$fontColor = ' color: #1a1a1a;';
6369
break;
@@ -67,8 +73,8 @@ public function shortcodeButton($atts, $content = '')
6773
default:
6874
$fontColor = '';
6975
}
70-
$title = $title != '' ? ' title="' . sanitize_text_field($title) . '"' : '';
71-
$width = trim($width);
76+
$title = $atts['title'] != '' ? ' title="' . sanitize_text_field($atts['title']) . '"' : '';
77+
$width = trim($atts['width']);
7278
$width_full = '';
7379
$width_px = '';
7480
if ($width == 'full') {
@@ -79,11 +85,11 @@ public function shortcodeButton($atts, $content = '')
7985
$width = $width . 'px';
8086
}
8187

82-
if ('' != $color || '' != $fontColor) {
88+
if ('' != $atts['color'] || '' != $fontColor) {
8389
$style = '';
8490
}
8591

86-
$output = '<a' . $target . $title . ' class="standard-btn' . $color_name . $size . $width_full . $style . '" href="' . $link . '" style="' . $fontColor . $color_hex . $width_px . $border_color . '"><span>' . do_shortcode($content) . '</span></a>';
92+
$output = '<a' . $target . $title . $arialabel . ' class="standard-btn' . $color_name . $size . $width_full . $style . '" href="' . $link . '" style="' . $fontColor . $color_hex . $width_px . $border_color . '"><span>' . do_shortcode($content) . '</span></a>';
8793

8894
wp_enqueue_style('fontawesome');
8995
wp_enqueue_style('rrze-elements');

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rrze-elements",
3-
"version": "1.22.1",
3+
"version": "1.22.4",
44
"description": "RRZE Elements: Gestalterische Erweiterungen für Webauftritte.",
55
"main": "rrze-elements.php",
66
"textdomain": "rrze-elements",

rrze-elements.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Plugin Name: RRZE Elements
55
Plugin URI: https://github.com/RRZE-Webteam/rrze-elements
66
Description: Advanced design elements for WordPress websites.
7-
Version: 1.22.3
7+
Version: 1.22.4
88
Author: RRZE Webteam
99
Author URI: https://blogs.fau.de/webworking/
1010
License: GNU General Public License v2

0 commit comments

Comments
 (0)