Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
xwolfde committed May 8, 2023
1 parent a816cf5 commit b527e32
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 89 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -4,7 +4,7 @@ Wordpress-Theme für zentrale Einrichtungen der Friedrich-Alexander-Universität

## Version

Version: 2.3.4-1
Version: 2.3.4-5

## Download

Expand Down
5 changes: 3 additions & 2 deletions css/fau-theme-admin.css
Expand Up @@ -155,8 +155,9 @@
--color-submenu-currentpage-text: #fff;
--color-menulink-hover-text: #fff;
--color-menulink-hover-bg: #004A9F;
--border-radius: 4px;
--border-radius-buttons: 4px;
--border-radius: 0px;
--border-radius-buttons: 0px;
--devider-height: 4px;
}

/*-----------------------------------------------------------------------------------*/
Expand Down
10 changes: 4 additions & 6 deletions functions/sanitizer.php
Expand Up @@ -8,16 +8,14 @@
/*-----------------------------------------------------------------------------------*/
/* Sanitize optional classes for hr shortcodes
/*-----------------------------------------------------------------------------------*/
function fau_sanitize_hr_shortcode( $fau_hr_styles ) {

function fau_sanitize_hr_shortcode( $fau_hr_styles ) {
if (isset($fau_hr_styles)) {
$fau_hr_styles = esc_attr( trim($fau_hr_styles) );
$fau_hr_styles = esc_attr( trim($fau_hr_styles) );
}
if (fau_empty($fau_hr_styles)) return;

if ( ! in_array( $fau_hr_styles, array( 'big', 'line' ) ) ) {
if ( ! in_array( $fau_hr_styles, array( "nat", "tf", "rw", "med", "phil", "zentral", "fau" ) ) ) {
$fau_hr_styles = '';

}
return $fau_hr_styles;
}
Expand All @@ -27,7 +25,7 @@ function fau_sanitize_hr_shortcode( $fau_hr_styles ) {
/*-----------------------------------------------------------------------------------*/
if ( ! function_exists( 'fau_san' ) ) :
function fau_san($s){
return filter_var(trim($s), FILTER_SANITIZE_STRING);
return filter_var(trim($s), FILTER_SANITIZE_STRING);
}
endif;

Expand Down
11 changes: 2 additions & 9 deletions functions/shortcodes.php
Expand Up @@ -150,23 +150,16 @@ function fau_organigram($atts, $content = null)
/*-----------------------------------------------------------------------------------*/
/* Special HRs for FAU
/*-----------------------------------------------------------------------------------*/

function fau_hr($atts, $content = null)
{
function fau_hr($atts, $content = null) {
extract(shortcode_atts(
array(
"size" => '',
"class" => ''
), $atts));


$size = fau_sanitize_hr_shortcode($size);
$class = fau_sanitize_hr_shortcode($class);

$classes = "";
if (!fau_empty($size)) {
$classes .= $size;
}

if (!fau_empty($class)) {
if (!fau_empty($classes)) {
$classes .= " ";
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "FAU-Einrichtungen",
"textdomain": "fau",
"version": "2.3.4-1",
"version": "2.3.4-5",
"keywords": [
"WordPress",
"Theme",
Expand Down
4 changes: 2 additions & 2 deletions print.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/sass/_custom-properties.scss
Expand Up @@ -106,5 +106,6 @@

--border-radius: #{$default-border-radius};
--border-radius-buttons: #{$border-radius-buttons};
--devider-height: #{$default-devider-height};
}

7 changes: 5 additions & 2 deletions src/sass/_variables.scss
Expand Up @@ -174,10 +174,13 @@ $color-ghostbutton-hover-bg: map-get($colormap-primary, "ci-hell");


// Default Border Radius
$default-border-radius: 4px;
$border-radius-buttons: 4px;
$default-border-radius: 0px;
$border-radius-buttons: 0px;


// Devider Height
$default-devider-height: 4px;

// Hinweis: Für SVG-Grafiken brauchen wir den HEX-Code direkt und können nicht Custom Properies nutzen!
$socialmedia_icon_bgcolor_hover: map-get($colormap-primary, "ci-hell-kontrast");
$socialmedia_icon_color: map-get($colormap-primary, "ci-hell-kontrast");
Expand Down
61 changes: 27 additions & 34 deletions src/sass/elements/_devider.scss
Expand Up @@ -4,43 +4,36 @@
hr {
position: relative;
clear: both;
background: var(--color-MainBackground);
border: none;
outline: none;
display: none;
background: var(--color-FAU);
color: var(--color-FAU);
border: none;
height: var(--devider-height, 4px);
margin: 2rem 0;

height: 1rem;
margin: 1rem 0;


@media (min-width: $screen-sm) {
display: block;
margin: 1rem 3rem 2rem;
height: 1.5rem;
}


&.big,
.page-template-page-start &,
.home & {

@media (min-width: $screen-sm) {
height: 60px;
margin-bottom: 10px
}
&.nat {
background-color: var(--color-branding-nat);
color: var(--color-branding-nat);
}
@include box-shadow(0 10px 10px -10px var(--color-StandardHellgrau) inset);

&.line {
height: 1px;
@include linear-gradient-three(transparent,var(--color-StandardHellgrau) 50%,transparent);
&.rw {
background-color: var(--color-branding-rw);
color: var(--color-branding-rw);
}
&.line.big {
margin-bottom: 60px
&.phil {
background-color: var(--color-branding-phil);
color: var(--color-branding-phil);
}
}
.page-template-page-start hr::after,
.home hr::after {
top: 30px;
@include box-shadow(0 0 30px var(--color-StandardHellgrau));
&.tf {
background-color: var(--color-branding-tf);
color: var(--color-branding-tf);
}
&.med {
background-color: var(--color-branding-med);
color: var(--color-branding-med);
}
&.fau,
&.zentral {
background-color: var(--color-branding-zentral);
color: var(--color-branding-zentral);
}
}
59 changes: 27 additions & 32 deletions style.css
@@ -1,7 +1,7 @@
@charset "UTF-8";
/*!
Theme Name: FAU-Einrichtungen
Version: 2.3.4-1
Version: 2.3.4-5
Requires at least: 6.0
Tested up to: 6.1
Requires PHP: 8.0
Expand Down Expand Up @@ -170,8 +170,9 @@ Text Domain: fau
--color-submenu-currentpage-text: #fff;
--color-menulink-hover-text: #fff;
--color-menulink-hover-bg: #004A9F;
--border-radius: 4px;
--border-radius-buttons: 4px;
--border-radius: 0px;
--border-radius-buttons: 0px;
--devider-height: 4px;
}

/*
Expand Down Expand Up @@ -6963,41 +6964,35 @@ abbr.initialism {
hr {
position: relative;
clear: both;
background: var(--color-MainBackground);
background: var(--color-FAU);
color: var(--color-FAU);
border: none;
outline: none;
display: none;
height: 1rem;
margin: 1rem 0;
box-shadow: 0 10px 10px -10px var(--color-StandardHellgrau) inset;
height: var(--devider-height, 4px);
margin: 2rem 0;
}
@media (min-width: 768px) {
hr {
display: block;
margin: 1rem 3rem 2rem;
height: 1.5rem;
}
hr.nat {
background-color: var(--color-branding-nat);
color: var(--color-branding-nat);
}
@media (min-width: 768px) {
hr.big, .page-template-page-start hr, .home hr {
height: 60px;
margin-bottom: 10px;
}
hr.rw {
background-color: var(--color-branding-rw);
color: var(--color-branding-rw);
}
hr.line {
height: 1px;
background-color: transparent;
/* Fallback Color */
background-image: linear-gradient(to right, transparent, var(--color-StandardHellgrau) 50%, transparent);
hr.phil {
background-color: var(--color-branding-phil);
color: var(--color-branding-phil);
}
hr.line.big {
margin-bottom: 60px;
hr.tf {
background-color: var(--color-branding-tf);
color: var(--color-branding-tf);
}

.page-template-page-start hr::after,
.home hr::after {
top: 30px;
box-shadow: 0 0 30px var(--color-StandardHellgrau);
hr.med {
background-color: var(--color-branding-med);
color: var(--color-branding-med);
}
hr.fau, hr.zentral {
background-color: var(--color-branding-zentral);
color: var(--color-branding-zentral);
}

/*-----------------------------------------------------------------------------------*/
Expand Down

0 comments on commit b527e32

Please sign in to comment.