-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #210 from RRZE-Webteam/dev
v1.23.0
- Loading branch information
Showing
20 changed files
with
2,810 additions
and
727 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
a { | ||
& > i.fa.rrze-elements-icon { | ||
padding: .2em .2em .15em; | ||
border-radius: 50%; | ||
color: var(--color-button-bg, #1f4c7a); | ||
} | ||
&:has(i.fa.rrze-elements-icon) { | ||
box-shadow: none; // fix für FAU-Themes | ||
} | ||
} | ||
a:hover, a:focus, a:active { | ||
& > i.fa.rrze-elements-icon { | ||
background-color: var(--color-button-bg, #1f4c7a); | ||
color: var(--color-button-text, #ffffff); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,4 +53,7 @@ | |
@import "symbols"; | ||
|
||
// LaTeX | ||
@import "latex"; | ||
@import "latex"; | ||
|
||
//Font-Awesome-Icons | ||
@import "icons"; |
Binary file not shown.
Binary file not shown.
3,350 changes: 2,668 additions & 682 deletions
3,350
assets/fonts/fontawesome/fontawesome-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
namespace RRZE\Elements\Icon; | ||
|
||
defined('ABSPATH') || exit; | ||
class Icon { | ||
|
||
public function __construct() { | ||
add_shortcode( 'icon', [ $this, 'shortcodeIcon' ] ); | ||
} | ||
|
||
public function shortcodeIcon($atts, $content = '', $tag = '') { | ||
$defaults = [ | ||
'icon' => '', | ||
'style' => '', | ||
'color' => '']; | ||
$args = shortcode_atts($defaults, $atts); | ||
array_walk($args, 'sanitize_text_field'); | ||
if ($args['icon'] == '') return ''; | ||
$styles = array_map('trim', explode(',', $args['style'])); | ||
$styleParams = ''; | ||
foreach ($styles as $style) { | ||
if (in_array($style, ['2x', '3x', '4x', '5x', 'border', 'pull-right', 'pull-left']) ) { | ||
$styleParams .= ' fa-'. $style; | ||
} | ||
} | ||
$inlineCSS = ''; | ||
if (in_array($args['color'], ['fau', 'zuv', 'phil', 'nat', 'med', 'rw', 'tf']) ) { | ||
// FAU Theme Colors | ||
if ($args['color'] == 'fau' || $args['color'] == 'zuv') { | ||
$args['color'] = 'zentral'; | ||
} | ||
$inlineCSS = 'style="color: var(--color-'.$args['color'].'-basis, #04316A);"'; | ||
} elseif (strlen($args['color']) == 7 && strpos($args['color'], '#') == 0) { | ||
// Hex Colors | ||
$inlineCSS = 'style="color: '.$args['color'].';"'; | ||
} | ||
$output = '<i class="rrze-elements-icon fa fa-'.$args['icon'].' ' . $styleParams . '" ' . $inlineCSS . 'aria-hidden="true" ></i>'; | ||
|
||
wp_enqueue_style('fontawesome'); | ||
wp_enqueue_style('rrze-elements'); | ||
|
||
return $output; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters